From 24a4f20e4b6d488bc30ccb2c5ea1aebab1996ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sat, 2 Apr 2022 08:49:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/XmOverview2.vue | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/views/xm/XmOverview2.vue b/src/views/xm/XmOverview2.vue index e2cabcd6..082d79ee 100644 --- a/src/views/xm/XmOverview2.vue +++ b/src/views/xm/XmOverview2.vue @@ -161,14 +161,21 @@ export default { taskMng: function (){ return this.xmBranchState.createUsername; }, - workloadProgress:function (){ - return Math.round(this.xmBranchState.totalActWorkload/this.xmBranchState.estimateWorkload*100); + workloadProgress: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{ + return 100; + } }, deviation:function (){ return Math.round(this.xmBranchState.totalActWorkload-this.xmBranchState.estimateWorkload); }, deviationRate:function (){ - return Math.round((this.xmBranchState.totalActWorkload-this.xmBranchState.estimateWorkload)/this.xmBranchState.estimateWorkload*100); + return Math.round((this.xmBranchState.totalActWorkload-this.xmBranchState.estimateWorkload)/this.xmBranchState.totalPlanWorkload*100); }, remainWorkload:function (){ return this.xmBranchState.totalPlanWorkload - this.xmBranchState.totalActWorkload;