wyh пре 2 година
родитељ
комит
63d82d55dd
1 измењених фајлова са 10 додато и 5 уклоњено
  1. 10 5
      itdmWeb/src/components/Gantt.vue

+ 10 - 5
itdmWeb/src/components/Gantt.vue

@@ -33,6 +33,8 @@ export default {
     }
   },
   created() {
+    // 清空数据
+    gantt.clearAll(); 
     this.getDevicelist();
     this.getCgqlist();
     this.getManagerList();
@@ -85,18 +87,21 @@ export default {
       getJhList(queryParam).then((res) => {
         console.log(res.result)
         this.tasks.data = []
+        gantt.clearAll(); 
         this.tasks.data = res.result.map(res => {
           return {
             id: res.testItemsId,
             // text:res.reportNo,
-            start_date:res.jihuaStartDate,
-            duration:res.lastTime,
-            sampleName:res.sampleName,
-            testItems:res.testItems,
+            start_date: res.jihuaStartDate,
+            // end_date: res.jihuaEndDate,
+            duration: res.lastTime,
+            sampleName: res.sampleName,
+            testItems: res.testItems,
             taskProgress: res.status
           }
         })
-        console.log(33,this.tasks.data)
+        console.log(33,this.tasks)
+
         gantt.init(this.$refs.gantt);
         // gantt.parse(this.$props.tasks);
         gantt.parse(this.tasks);