Commit ff5da86c authored by 旭艳's avatar 旭艳

修改甘特图报错的问题

parent 4a92a4af
......@@ -128,7 +128,12 @@ export default {
item.isCritical = _link.isCritical
item.costHours = _link.costHours
} else {
this.modifyData.links.push(_link)
const index = this.modifyData.links.findIndex(l => l.id === _link.id && l.sourceId === _link.sourceId && l.targetId === _link.targetId)
if (index === -1) {
this.modifyData.links.push(_link)
} else {
this.modifyData.links[index] = _link
}
}
}
},
......
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