|
@@ -186,7 +186,7 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-form-item label="任务附件">
|
|
<el-form-item label="任务附件">
|
|
|
- <file-upload :files="form.fileList" @getFileUrl="getFileUrl" @removeFile="removeFile"></file-upload>
|
|
|
|
|
|
|
+ <file-upload ref="fu" :files="form.fileList" @getFileUrl="getFileUrl" @removeFile="removeFile"></file-upload>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="任务描述" prop="description">
|
|
<el-form-item label="任务描述" prop="description">
|
|
|
<rich-text-editor ref="rtEditor" :value="form.description"
|
|
<rich-text-editor ref="rtEditor" :value="form.description"
|
|
@@ -230,7 +230,7 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="所属项目:">
|
|
<el-form-item label="所属项目:">
|
|
|
<span>{{ splitForm.projectName }}</span>
|
|
<span>{{ splitForm.projectName }}</span>
|
|
|
- <el-button type="text" icon="el-icon-circle-plus-outline"
|
|
|
|
|
|
|
+ <el-button type="primary" plain circle icon="el-icon-plus"
|
|
|
style="float: right; padding: -1px 3px" @click="addChild"></el-button>
|
|
style="float: right; padding: -1px 3px" @click="addChild"></el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap:wrap">
|
|
<div style="display: flex;justify-content: flex-start;flex-wrap:wrap">
|
|
@@ -238,8 +238,9 @@
|
|
|
<div slot="header" class="clearfix">
|
|
<div slot="header" class="clearfix">
|
|
|
<div class="card-header">
|
|
<div class="card-header">
|
|
|
<div style="margin-top: 5px">子任务{{ index + 1 }}</div>
|
|
<div style="margin-top: 5px">子任务{{ index + 1 }}</div>
|
|
|
- <el-button type="text" icon="el-icon-delete" @click="delChild(index)"
|
|
|
|
|
- style="float: right;color: red; padding: 3px 0"></el-button>
|
|
|
|
|
|
|
+ <el-button type="danger" circle @click="delChild(index)" icon="el-icon-delete"
|
|
|
|
|
+ style="float: right;">
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<el-form ref="splitChild" :model="child" :rules="rules" size="mini">
|
|
<el-form ref="splitChild" :model="child" :rules="rules" size="mini">
|
|
@@ -452,6 +453,7 @@ export default {
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.$refs.dut2.clearText()
|
|
this.$refs.dut2.clearText()
|
|
|
this.$refs.rtEditor.clear()
|
|
this.$refs.rtEditor.clear()
|
|
|
|
|
+ this.$refs.fu.clear()
|
|
|
this.reset()
|
|
this.reset()
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
},
|
|
},
|
|
@@ -583,6 +585,7 @@ export default {
|
|
|
break
|
|
break
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
/** 审核按钮操作 */
|
|
/** 审核按钮操作 */
|
|
|
handleAudit(row) {
|
|
handleAudit(row) {
|
|
|
getTask(row.id).then(res => {
|
|
getTask(row.id).then(res => {
|
|
@@ -613,8 +616,10 @@ export default {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
this.form.beginDate = this.form.rangeDate[0]
|
|
this.form.beginDate = this.form.rangeDate[0]
|
|
|
this.form.endDate = this.form.rangeDate[1]
|
|
this.form.endDate = this.form.rangeDate[1]
|
|
|
- let tempFiles = this.form.files.map(item => item.name);
|
|
|
|
|
- this.form.fileUrl = JSON.stringify(tempFiles)
|
|
|
|
|
|
|
+ if (this.form.files) {
|
|
|
|
|
+ let tempFiles = this.form.files.map(item => item.name);
|
|
|
|
|
+ this.form.fileUrl = JSON.stringify(tempFiles)
|
|
|
|
|
+ }
|
|
|
this.form.checkTaskConflict = true;
|
|
this.form.checkTaskConflict = true;
|
|
|
if (!this.form.id) {
|
|
if (!this.form.id) {
|
|
|
addTask(this.form).then(res => {
|
|
addTask(this.form).then(res => {
|
|
@@ -639,6 +644,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
submitConfirm() {
|
|
submitConfirm() {
|
|
|
if (this.open) {
|
|
if (this.open) {
|
|
|
this.form.checkTaskConflict = false;
|
|
this.form.checkTaskConflict = false;
|
|
@@ -660,8 +666,8 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
this.$message.success("操作成功");
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
cancelConfirm() {
|
|
cancelConfirm() {
|
|
|
this.open = false;
|
|
this.open = false;
|
|
|
this.splitOpen = false;
|
|
this.splitOpen = false;
|
|
@@ -672,8 +678,7 @@ export default {
|
|
|
dutSplit[key].clearText()
|
|
dutSplit[key].clearText()
|
|
|
}
|
|
}
|
|
|
this.resetForm("splitForm");
|
|
this.resetForm("splitForm");
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
/** 审核提交按钮 */
|
|
/** 审核提交按钮 */
|
|
|
submitAudit() {
|
|
submitAudit() {
|
|
@@ -687,8 +692,8 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
/** 分解任务提交按钮 */
|
|
/** 分解任务提交按钮 */
|
|
|
submitSplit() {
|
|
submitSplit() {
|
|
|
if (this.splitForm.children.length === 0) {
|
|
if (this.splitForm.children.length === 0) {
|
|
@@ -707,8 +712,10 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.splitForm.children.forEach(c => {
|
|
this.splitForm.children.forEach(c => {
|
|
|
- let files = c.files.map(item => item.name);
|
|
|
|
|
- c.fileUrl = JSON.stringify(files)
|
|
|
|
|
|
|
+ if (c.files) {
|
|
|
|
|
+ let files = c.files.map(item => item.name);
|
|
|
|
|
+ c.fileUrl = JSON.stringify(files)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
this.splitForm.checkTaskConflict = true;
|
|
this.splitForm.checkTaskConflict = true;
|
|
|
splitTask(this.splitForm).then(res => {
|
|
splitTask(this.splitForm).then(res => {
|
|
@@ -722,9 +729,7 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
this.$message.success("操作成功");
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
/** 终止按钮操作 */
|
|
/** 终止按钮操作 */
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
@@ -735,8 +740,7 @@ export default {
|
|
|
this.$message.success("终止成功");
|
|
this.$message.success("终止成功");
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
this.$confirm('是否确认删除任务编号为"' + row.id + '"的数据项?').then(() => {
|
|
this.$confirm('是否确认删除任务编号为"' + row.id + '"的数据项?').then(() => {
|
|
@@ -746,8 +750,7 @@ export default {
|
|
|
this.$message.success("删除成功");
|
|
this.$message.success("删除成功");
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
addChild() {
|
|
addChild() {
|
|
|
let child = {
|
|
let child = {
|
|
@@ -758,15 +761,13 @@ export default {
|
|
|
description: undefined
|
|
description: undefined
|
|
|
}
|
|
}
|
|
|
this.splitForm.children.push(child)
|
|
this.splitForm.children.push(child)
|
|
|
- }
|
|
|
|
|
- ,
|
|
|
|
|
|
|
+ },
|
|
|
delChild(index) {
|
|
delChild(index) {
|
|
|
this.splitForm.children.splice(index, 1)
|
|
this.splitForm.children.splice(index, 1)
|
|
|
}
|
|
}
|
|
|
- ,
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
-;
|
|
|
|
|
|
|
+};
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
.split-form {
|
|
.split-form {
|