|
@@ -474,6 +474,23 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.tasks = {data:res.data};
|
|
|
+ let taskson = []
|
|
|
+ for(let m in this.tasks.data){
|
|
|
+ this.tasks.data[m].render = null
|
|
|
+ if(this.tasks.data[m].time != 0){
|
|
|
+
|
|
|
+ if(this.tasks.data[m].id != this.tasks.data[m].userId){
|
|
|
+ this.tasks.data[m].render = 'split'
|
|
|
+ let item = JSON.parse(JSON.stringify(this.tasks.data[m]))
|
|
|
+ item.parent = this.tasks.data[m].id
|
|
|
+ item.id = this.tasks.data[m].id + 'son'
|
|
|
+ taskson.push(item)
|
|
|
+ this.tasks.data[m].time = 0
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.tasks.data.push.apply(this.tasks.data,taskson)
|
|
|
for(let i in this.tasks.data){
|
|
|
if(this.tasks.data[i].time == 0){
|
|
|
delete this.tasks.data[i].start_date
|
|
@@ -488,6 +505,7 @@ export default {
|
|
|
this.tasks.data[i].end_date = date2.getFullYear() + '-' + (dmonth < 10 ? '0' + dmonth : dmonth) + '-' + (dday < 10 ? '0' + dday : dday)
|
|
|
}
|
|
|
}
|
|
|
+ console.log('ganttData',this.tasks.data);
|
|
|
this.$nextTick(()=>{
|
|
|
this.updatakey1 += 1
|
|
|
})
|