From fd3ee442308852b1578db76a9fcefb98feb7491c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 7 Mar 2022 02:08:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/XmOverview.vue | 132 +++++++++++++++++------------------- 1 file changed, 62 insertions(+), 70 deletions(-) diff --git a/src/views/xm/XmOverview.vue b/src/views/xm/XmOverview.vue index fea966a1..c766e8cf 100644 --- a/src/views/xm/XmOverview.vue +++ b/src/views/xm/XmOverview.vue @@ -2,7 +2,7 @@
- +
数据汇总 @@ -25,7 +25,7 @@
-
+
产品总工时
@@ -124,50 +124,18 @@ - - -
- 所有工作项数量分布 -
-
-
-
-
-
- - -
- 缺陷情况 -
-
-
-
-
-
- - - - -
- 任务每日状态趋势 -
-
-
-
-
-
- 项目工时 + 项目进度
- +
- + h
预估工时
@@ -193,7 +161,7 @@
- +
@@ -237,6 +205,50 @@ + + + +
+ 工作量分布 +
+
+
+
+
+
+ + +
+ 工作项数量分布 +
+
+
+
+
+
+ + +
+ 缺陷情况 +
+
+
+
+
+
+
+ + + +
+ 任务每日状态趋势 +
+
+
+
+
+
+
@@ -247,17 +259,7 @@
-
- - -
- 工作量分布 -
-
-
-
-
-
+
@@ -303,37 +305,27 @@ export default { return this.xmBranchState.createUsername; }, workloadProgress:function (){ - return Math.round(this.xmBranchState.totalActWorkload/this.xmBranchState.totalPlanWorkload*100); + return Math.round(this.xmBranchState.totalActWorkload/this.xmBranchState.estimateWorkload*100); }, deviation:function (){ - let now = new Date(); - let taskStartTime = new Date(this.xmBranchState.startTime); - let taskEndTime = new Date(this.xmBranchState.endTime); - if(now<=taskEndTime){ - let allDays=taskEndTime-taskStartTime; - return this.xmBranchState.totalActWorkload - Math.round((now-taskStartTime)/allDays*this.xmBranchState.totalPlanWorkload) - }else{ - return this.xmBranchState.totalActWorkload - this.xmBranchState.totalPlanWorkload; - } + return Math.round(this.xmBranchState.totalActWorkload-this.xmBranchState.estimateWorkload); }, deviationRate:function (){ - return Math.round(this.deviation/this.xmBranchState.totalPlanWorkload*100); + return Math.round((this.xmBranchState.totalActWorkload-this.xmBranchState.estimateWorkload)/this.xmBranchState.estimateWorkload*100); }, remainWorkload:function (){ return this.xmBranchState.totalPlanWorkload - this.xmBranchState.totalActWorkload; }, planProgress:function (){ - let now = new Date(); - let taskStartTime = new Date(this.xmBranchState.startTime); - let taskEndTime = new Date(this.xmBranchState.endTime); - if(now<=taskEndTime){ - let allDays=taskEndTime-taskStartTime; - return Math.round((now-taskStartTime)/allDays*100) - }else{ - return 100; + if(!this.xmBranchState.totalPlanWorkload){ + return 0; } + return parseInt( this.xmBranchState.estimateWorkload/this.xmBranchState.totalPlanWorkload*100) }, realProgress:function (){ + if(!this.xmBranchState.totalPlanWorkload){ + return 0; + } if(this.xmBranchState.totalActWorkload < this.xmBranchState.totalPlanWorkload){ return Math.round(this.xmBranchState.totalActWorkload/this.xmBranchState.totalPlanWorkload*100) }else{ @@ -685,14 +677,14 @@ export default { } }, data: [ - {value: this.xmBranchState.planInnerUserWorkload, + {value: this.xmBranchState.totalPlanInnerUserWorkload, itemStyle: { normal:{ color: '#91CC75' } }, name: '内部人力'}, - {value: this.xmBranchState.planOutUserWorkload, + {value: this.xmBranchState.totalPlanOutUserWorkload, itemStyle: { normal:{ color: '#3BA272'