소스 검색

计划排期优化

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);