|
@@ -186,7 +186,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<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 label="任务描述" prop="description">
|
|
|
<rich-text-editor ref="rtEditor" :value="form.description"
|
|
@@ -452,6 +452,7 @@ export default {
|
|
|
cancel() {
|
|
|
this.$refs.dut2.clearText()
|
|
|
this.$refs.rtEditor.clear()
|
|
|
+ this.$refs.fu.clear()
|
|
|
this.reset()
|
|
|
this.open = false;
|
|
|
},
|
|
@@ -583,6 +584,7 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
/** 审核按钮操作 */
|
|
|
handleAudit(row) {
|
|
|
getTask(row.id).then(res => {
|
|
@@ -613,8 +615,10 @@ export default {
|
|
|
if (valid) {
|
|
|
this.form.beginDate = this.form.rangeDate[0]
|
|
|
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;
|
|
|
if (!this.form.id) {
|
|
|
addTask(this.form).then(res => {
|
|
@@ -639,6 +643,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
submitConfirm() {
|
|
|
if (this.open) {
|
|
|
this.form.checkTaskConflict = false;
|
|
@@ -660,8 +665,8 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
+
|
|
|
cancelConfirm() {
|
|
|
this.open = false;
|
|
|
this.splitOpen = false;
|
|
@@ -672,8 +677,7 @@ export default {
|
|
|
dutSplit[key].clearText()
|
|
|
}
|
|
|
this.resetForm("splitForm");
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
|
|
|
/** 审核提交按钮 */
|
|
|
submitAudit() {
|
|
@@ -687,8 +691,8 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
+
|
|
|
/** 分解任务提交按钮 */
|
|
|
submitSplit() {
|
|
|
if (this.splitForm.children.length === 0) {
|
|
@@ -707,8 +711,10 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
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;
|
|
|
splitTask(this.splitForm).then(res => {
|
|
@@ -722,9 +728,7 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
|
|
|
/** 终止按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -735,8 +739,7 @@ export default {
|
|
|
this.$message.success("终止成功");
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
this.$confirm('是否确认删除任务编号为"' + row.id + '"的数据项?').then(() => {
|
|
@@ -746,8 +749,7 @@ export default {
|
|
|
this.$message.success("删除成功");
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
|
|
|
addChild() {
|
|
|
let child = {
|
|
@@ -758,15 +760,13 @@ export default {
|
|
|
description: undefined
|
|
|
}
|
|
|
this.splitForm.children.push(child)
|
|
|
- }
|
|
|
- ,
|
|
|
+ },
|
|
|
delChild(index) {
|
|
|
this.splitForm.children.splice(index, 1)
|
|
|
}
|
|
|
- ,
|
|
|
+
|
|
|
}
|
|
|
-}
|
|
|
-;
|
|
|
+};
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.split-form {
|