|
@@ -327,7 +327,6 @@ import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import RichTextEditor from '@/components/RichTextEditor'
|
|
|
import {mapGetters} from "vuex";
|
|
|
-import DateUtil from "@/utils/date"
|
|
|
|
|
|
const statusMap = {
|
|
|
'0': {name: '待查看', type: 'info'},
|
|
@@ -527,12 +526,16 @@ export default {
|
|
|
this.title = "修改任务";
|
|
|
let arr = []
|
|
|
arr.push(getTask(row.id).then(res => {
|
|
|
- this.form = res.data;
|
|
|
- this.form['files'] = this.form.files || []
|
|
|
- if (this.form.fileList.length > 0) {
|
|
|
- this.form.files = this.form.fileList.map(item => item.url.replace('http://file.aivfo.com:36000/', ''))
|
|
|
+ this.form = res.data;
|
|
|
+ this.form['files'] = this.form.files || []
|
|
|
+ this.form.files = this.form.fileList
|
|
|
+ if (this.form.fileList.length > 0) {
|
|
|
+ this.form.files = this.form.fileList.map(item => {
|
|
|
+ return {name: item.name, url: item.fileUrl}
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
- }))
|
|
|
+ ))
|
|
|
arr.push(listProject().then(response => {
|
|
|
this.projectOptions = this.handleTree(response.data, "id");
|
|
|
}))
|
|
@@ -550,18 +553,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getFileUrl(val) {
|
|
|
- this.form['files'] = this.form.files || []
|
|
|
- this.form.files.push(val)
|
|
|
+ this.form.files = val
|
|
|
},
|
|
|
removeFile(val) {
|
|
|
- this.form.files.splice(val)
|
|
|
+ this.form.files = val
|
|
|
},
|
|
|
getChildFileUrl(child, val) {
|
|
|
- child['files'] = child.files || []
|
|
|
- child.files.push(val)
|
|
|
+ child['files'] = val
|
|
|
},
|
|
|
removeChildFile(child, val) {
|
|
|
- child.files.splice(val)
|
|
|
+ child['files'] = val
|
|
|
},
|
|
|
/** 更多操作触发 */
|
|
|
handleCommand(command, row) {
|
|
@@ -612,7 +613,8 @@ export default {
|
|
|
if (valid) {
|
|
|
this.form.beginDate = this.form.rangeDate[0]
|
|
|
this.form.endDate = this.form.rangeDate[1]
|
|
|
- this.form.fileUrl = JSON.stringify(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 => {
|
|
@@ -658,7 +660,8 @@ export default {
|
|
|
this.$message.success("操作成功");
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
cancelConfirm() {
|
|
|
this.open = false;
|
|
|
this.splitOpen = false;
|
|
@@ -669,7 +672,8 @@ export default {
|
|
|
dutSplit[key].clearText()
|
|
|
}
|
|
|
this.resetForm("splitForm");
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
|
|
|
/** 审核提交按钮 */
|
|
|
submitAudit() {
|
|
@@ -683,7 +687,8 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
/** 分解任务提交按钮 */
|
|
|
submitSplit() {
|
|
|
if (this.splitForm.children.length === 0) {
|
|
@@ -702,7 +707,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
this.splitForm.children.forEach(c => {
|
|
|
- c.fileUrl = JSON.stringify(c.files)
|
|
|
+ let files = c.files.map(item => item.name);
|
|
|
+ c.fileUrl = JSON.stringify(files)
|
|
|
})
|
|
|
this.splitForm.checkTaskConflict = true;
|
|
|
splitTask(this.splitForm).then(res => {
|
|
@@ -717,7 +723,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
|
|
|
/** 终止按钮操作 */
|
|
|
handleUpdate(row) {
|
|
@@ -728,7 +735,8 @@ export default {
|
|
|
this.$message.success("终止成功");
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
this.$confirm('是否确认删除任务编号为"' + row.id + '"的数据项?').then(() => {
|
|
@@ -738,7 +746,8 @@ export default {
|
|
|
this.$message.success("删除成功");
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
|
|
|
addChild() {
|
|
|
let child = {
|
|
@@ -749,12 +758,15 @@ export default {
|
|
|
description: undefined
|
|
|
}
|
|
|
this.splitForm.children.push(child)
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
delChild(index) {
|
|
|
this.splitForm.children.splice(index, 1)
|
|
|
- },
|
|
|
+ }
|
|
|
+ ,
|
|
|
}
|
|
|
-};
|
|
|
+}
|
|
|
+;
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.split-form {
|