Commit 47a732b9 authored by 旭艳's avatar 旭艳

修改甘特图未保存工期的问题

parent c63a77e8
......@@ -157,6 +157,7 @@ export default {
this.AOname = ''
this.loading = true
this.modifyData = {
tasks: [],
data: [],
links: []
}
......@@ -451,6 +452,9 @@ export default {
setTimeout(() => {
that.calcCriticalPath(item)
that.modifyLink(item, 'ADD')
if (ganttAss.getTask(item.target).$level === 1 && ganttAss.getTask(item.source).$level === 1) {
that.modifyTask(ganttAss.getTask(ganttAss.getTask(item.source).parenId), 'MODIFY')
}
ganttAss.render()
}, 500)
})
......@@ -460,6 +464,9 @@ export default {
var target = ganttAss.getTask(item.target)
that.calcCriticalPath(item)
that.modifyLink(item, 'REMOVE')
if (ganttAss.getTask(item.target).$level === 1 && ganttAss.getTask(item.source).$level === 1) {
that.modifyTask(ganttAss.getTask(ganttAss.getTask(item.source).parenId), 'MODIFY')
}
var targetLength = target.$target.length
if (!targetLength) {
var data = {
......@@ -593,6 +600,18 @@ export default {
}
})
this.$api.recursion('ExtProcessExecutorRoute', params, true).then(res => {
this.saveDuration()
})
},
saveDuration() {
const params = this.modifyData.tasks.map(task => {
return {
id: task.id,
workHour: task.duration,
operator: 'MODIFY'
}
})
this.$api.recursion('ExtProcessPlan', params, true).then(res => {
this.getData()
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment