Quellcode durchsuchen

甘特图实际和进行中颜色区分

yuhan vor 1 Jahr
Ursprung
Commit
6bc9e7da2e

+ 3 - 1
itdmWeb/src/components/Gantt.vue

@@ -503,7 +503,9 @@ export default {
                 testItems: res.testItems,
                 deviceName: res.deviceName,
                 statusC: res.statusC,
-                izShiji: res.izShiji
+                izShiji: res.izShiji,
+
+                jhpqStatus: res.jhpqStatus
               }
             })
 

+ 5 - 2
itdmWeb/src/components/module-iTDM/uGantt/index.vue

@@ -102,7 +102,9 @@
           planHeight: 26, // 计划甘特条的高度
           planBg: '#44c2e5', // 计划甘特条的颜色
           realityHeight: 10, // 实际甘特条的高度
-          realityBg: '#e5de44', // 实际甘特条的颜色
+          realityBgIncomplete: '#ffaf58', // 实际甘特条进行中的颜色
+          realityBgCompleted: '#63D252', // 实际甘特条已完成的颜色
+          // #e5de44
           top: 4, // 甘特条离上线条距离
         })
       },
@@ -394,7 +396,8 @@
           width: 70 * (endIndex - startIndex + 1) + 'px',
           top: (this.uStyle.ganttHeight * (trIndex+1) - 10) + 'px',
           height: this.uStyle.realityHeight,
-          background: this.uStyle.realityBg
+          // jhpqStatus:0未完成 1已完成
+          background: item.jhpqStatus === '0' ? this.uStyle.realityBgIncomplete : this.uStyle.realityBgCompleted
         }
         return style
       },

+ 7 - 4
itdmWeb/src/views/module-iTDM/itdmGongdanMaster/uGantt2.vue

@@ -135,8 +135,9 @@ export default {
   components: { uGantt },
   data () {
     return {
+      // realityBgIncomplete:实际进行中的进度条颜色,realityBgCompleted:实际已完成的进度条颜色
       uStyle: {
-        ganttHeight: 40,planHeight: 26,planBg:'#44c2e5',realityHeight: 1,realityBg:'#e5de44',top: 2,
+        ganttHeight: 40,planHeight: 26,planBg:'#44c2e5',realityHeight: 1,realityBgIncomplete:'#FFC886',realityBgCompleted:'#B1D5AC',top: 2,
       },
       // width:每列宽度--现在逻辑全部默认显示左边table,右边滚动
       // fixed:现在没有,如果需要一部分固定,一部分滚动,则需要重新设置一下组件
@@ -407,7 +408,9 @@ export default {
               sampleModelSpecification: res.sampleModelSpecification,
 
 
-              task_text: res.deviceName+','+res.pm
+              task_text: res.deviceName+','+res.pm,
+
+              jhpqStatus: res.jhpqStatus
             }
           })
         }
@@ -468,8 +471,8 @@ export default {
       })
     },
     // 双击事件
-    rowDblclick(current){
-      console.log(current)
+    rowDblclick(current, a){
+      console.log(current, a)
       if (current.status == 0 || current.status == null) {
         this.status = 0
       } else {