瀏覽代碼

甘特图事件类型显示修改

fujunwen 4 年之前
父節點
當前提交
1961e43db6
共有 3 個文件被更改,包括 16 次插入29 次删除
  1. 4 6
      src/utils/ganttChart/GanttChart_day.js
  2. 4 6
      src/utils/ganttChart/GanttChart_month.js
  3. 8 17
      src/views/analysis/GanttChart.vue

+ 4 - 6
src/utils/ganttChart/GanttChart_day.js

@@ -382,15 +382,13 @@ GanttChartDay.prototype.handleClick = function(task, flag, ev) {
 GanttChartDay.prototype.statusColor = function(task) {
     switch (task.statusType) {
         case 1:
-            return ['#e7e9ea', '#c3c7cb']
+            return ['#E7E9EA', '#C3C7CB']
         case 2:
-            return ['#dee9fe', '#5b8ff9']
+            return ['#FBCE99', '#F58300']
         case 3:
-            return ['#fbce99', '#f58300']
-        case 4:
-            return ['#fbb8b5', '#f54e45']
+            return ['#FBB8B5', '#F54E45']
         default:
-            return ['#f54e45', '#fbb8b5']
+            return ['#FBB8B5', '#F54E45']
     }
 }
 

+ 4 - 6
src/utils/ganttChart/GanttChart_month.js

@@ -376,15 +376,13 @@ GanttChartMonth.prototype.handleClick = function(task, flag, ev) {
 GanttChartMonth.prototype.statusColor = function(task) {
     switch (task.statusType) {
         case 1:
-            return ['#e7e9ea', '#c3c7cb']
+            return ['#E7E9EA', '#C3C7CB']
         case 2:
-            return ['#dee9fe', '#5b8ff9']
+            return ['#FBCE99', '#F58300']
         case 3:
-            return ['#fbce99', '#f58300']
-        case 4:
-            return ['#fbb8b5', '#f54e45']
+            return ['#FBB8B5', '#F54E45']
         default:
-            return ['#fbb8b5', '#f54e45']
+            return ['#FBB8B5', '#F54E45']
     }
 }
 

+ 8 - 17
src/views/analysis/GanttChart.vue

@@ -44,7 +44,7 @@
               <Task class="icon" />
               <div class="title">任务状态</div>
             </div>
-            <div v-show="ganttDetail.status" :style="{'background': ganttDetail.color && ganttDetail.color[1]?ganttDetail.color[1] : '', 'color': ganttDetail.color && ganttDetail.color[0]?ganttDetail.color[0] : ''}">{{ganttDetail.status}}</div>
+            <div v-show="ganttDetail.status" :style="{'background': ganttDetail.color && ganttDetail.color[0]?ganttDetail.color[0] : '', 'color': ganttDetail.color && ganttDetail.color[1]?ganttDetail.color[1] : ''}">{{ganttDetail.status}}</div>
           </div>
           <div class="row">
             <div>
@@ -159,24 +159,18 @@ export default {
       legends: [
         {
           id: 1,
-          text: "按时完成",
+          text: "完成",
           backgroundColor: "#E7E9EA",
           borderColor: "#C3C7CB"
         },
         {
           id: 2,
-          text: "未开始/进行中",
-          backgroundColor: "rgba(91, 143, 249, 0.2)",
-          borderColor: "#5B8FF9"
-        },
-        {
-          id: 3,
-          text: "逾期完成",
+          text: "即将逾期",
           backgroundColor: "#FBCE99",
           borderColor: "#F58300"
         },
         {
-          id: 4,
+          id: 3,
           text: "逾期未完成",
           backgroundColor: "#FBB8B5",
           borderColor: "#F54E45"
@@ -473,19 +467,16 @@ export default {
           let color;
           switch (statusType) {
             case 1:
-              color = ['#c3c7cb', '#e7e9ea'];
+              color = ['#E7E9EA', '#C3C7CB'];
               break
             case 2:
-              color = ['#5b8ff9', '#5b8ff933'];
+              color = ['#FBCE99', '#F58300'];
               break
             case 3:
-              color = ['#f58300', '#fbce99'];
-              break
-            case 4:
-              color = ['#f54e45', '#fbb8b5'];
+              color = ['#FBB8B5', '#F54E45'];
               break
             default:
-              color = ['#f54e45', '#fbb8b5'];
+              color = ['#FBB8B5', '#F54E45'];
               break
           }
           let newData = {