Browse Source

优化

master
陈裕财 4 years ago
parent
commit
cddd4e6ab7
  1. 26
      src/views/xm/core/xmIteration/XmIterationOverview.vue
  2. 14
      src/views/xm/core/xmMenu/XmMenuOverview.vue
  3. 20
      src/views/xm/core/xmProject/XmProjectMng.vue

26
src/views/xm/core/xmIteration/XmIterationOverview.vue

@ -255,26 +255,32 @@ export default {
return this.xmIteration.endTime?this.xmIteration.endTime.substring(0,10):'';
},
workloadProgress:function (){
if(!this.xmIteration.distBudgetWorkload || !this.xmIteration.actWorkload){
if(!this.xmIteration.budgetWorkload || !this.xmIteration.actWorkload){
return 0;
}
return Math.round(this.xmIteration.actWorkload/this.xmIteration.distBudgetWorkload*100);
return Math.round(this.xmIteration.actWorkload/this.xmIteration.budgetWorkload*100);
},
deviation:function (){
return this.xmIteration.actWorkload -this.xmIteration.estimateWorkload
},
deviationRate:function (){
if(!this.xmIteration.estimateWorkload){
return 0;
}
return Math.round(this.deviation/this.xmIteration.estimateWorkload*100);
},
remainWorkload:function (){
return this.xmIteration.distBudgetWorkload - this.xmIteration.actWorkload;
return this.xmIteration.budgetWorkload - this.xmIteration.actWorkload;
},
planProgress:function (){
return Math.round(this.xmIteration.estimateWorkload/this.xmIteration.distBudgetWorkload*100)
if(!this.xmIteration.budgetWorkload){
return 0;
}
return Math.round(this.xmIteration.estimateWorkload/this.xmIteration.budgetWorkload*100)
},
realProgress:function (){
if(this.xmIteration.actWorkload < this.xmIteration.distBudgetWorkload){
return Math.round(this.xmIteration.actWorkload/this.xmIteration.distBudgetWorkload*100)
if(this.xmIteration.actWorkload < this.xmIteration.budgetWorkload){
return Math.round(this.xmIteration.actWorkload/this.xmIteration.budgetWorkload*100)
}else{
return 100;
}
@ -412,28 +418,28 @@ export default {
}
},
data: [
{value: this.xmIteration.closedBugCnt,
{value: this.xmIteration.closedBugs,
itemStyle: {
normal:{
color: '#5470C6'
}
},
name: '已关闭'},
{value: this.xmIteration.resolvedBugCnt,
{value: this.xmIteration.resolvedBugs,
itemStyle: {
normal:{
color: '#91CC75'
}
},
name: '已解决'},
{value: this.xmIteration.activeBugCnt,
{value: this.xmIteration.activeBugs,
itemStyle: {
normal:{
color: '#FAC858'
}
},
name: '已激活'},
{value: this.xmIteration.confirmedBugCnt,
{value: this.xmIteration.confirmedBugs,
itemStyle: {
normal:{
color: '#EE6666'

14
src/views/xm/core/xmMenu/XmMenuOverview.vue

@ -266,13 +266,13 @@
}
if(now<=endTime){
let allDays=endTime-startTime;
return Math.round((now-startTime)/allDays*this.xmMenu.planWorkload)
return Math.round((now-startTime)/allDays*this.xmMenu.budgetWorkload)
}else{
return this.xmMenu.planWorkload;
return this.xmMenu.budgetWorkload;
}
},
workloadProgress:function (){
return Math.round(this.xmMenu.actWorkload/this.xmMenu.planWorkload*100);
return Math.round(this.xmMenu.actWorkload/this.xmMenu.budgetWorkload*100);
},
deviation:function (){
return this.xmMenuCpd.actWorkload-this.estimateWorkload;
@ -281,14 +281,14 @@
return Math.round(this.deviation/this.estimateWorkload*100);
},
remainWorkload:function (){
return this.xmMenu.planWorkload - this.xmMenu.actWorkload;
return this.xmMenu.budgetWorkload - this.xmMenu.actWorkload;
},
planProgress:function (){
return Math.round(this.xmMenuCpd.estimateWorkload/this.planWorkload *100);
return Math.round(this.xmMenuCpd.estimateWorkload/this.budgetWorkload *100);
},
realProgress:function (){
if(this.xmMenu.actWorkload < this.xmMenu.planWorkload){
return Math.round(this.xmMenu.actWorkload/this.xmMenu.planWorkload*100)
if(this.xmMenu.actWorkload < this.xmMenu.budgetWorkload){
return Math.round(this.xmMenu.actWorkload/this.xmMenu.budgetWorkload*100)
}else{
return 100;
}

20
src/views/xm/core/xmProject/XmProjectMng.vue

@ -122,25 +122,25 @@
</div>
<div class="info-task" title="已完成 / 预算工作量 ,单位人天 ">
<span>
<span class="item-total finish-task">{{p.totalActWorkload==null?0:parseInt(p.totalActWorkload/8)}}</span>
<span class="item-total finish-task">{{p.actWorkload==null?0:parseInt(p.actWorkload/8)}}</span>
<span style="margin: 0 .25rem !important;">/</span>
<span class="item-type total-task">{{p.totalPlanWorkload==null?0:parseInt(p.totalPlanWorkload/8)}}</span>
<span class="item-type total-task">{{p.budgetWorkload==null?0:parseInt(p.budgetWorkload/8)}}</span>
</span>
<span class="item-type">工作量</span>
</div>
<div class="info-task" title="已完成 / 总任务数 ">
<span>
<span class="item-total finish-task">{{p.totalCompleteTaskCnt==null?0:p.totalCompleteTaskCnt}}</span>
<span class="item-total finish-task">{{p.taskFinishCnt==null?0:p.taskFinishCnt}}</span>
<span style="margin: 0 .25rem !important;">/</span>
<span class="item-type total-task">{{p.totalTaskCnt==null?0:p.totalTaskCnt}}</span>
<span class="item-type total-task">{{p.taskCnt==null?0:p.taskCnt}}</span>
</span>
<span class="item-type">任务</span>
</div>
<div class="info-task" title="已关闭 / 总缺陷数 ">
<span>
<span class="item-total finish-task">{{p.totalClosedBugCnt==null?0:p.totalClosedBugCnt}}</span>
<span class="item-total finish-task">{{p.closedBugs==null?0:p.closedBugs}}</span>
<span style="margin: 0 .25rem !important;">/</span>
<span class="item-type total-task">{{p.totalBugCnt==null?0:p.totalBugCnt}}</span>
<span class="item-type total-task">{{p.bugCnt==null?0:p.bugCnt}}</span>
</span>
<span class="item-type">缺陷</span>
</div>
@ -192,14 +192,14 @@
<span title="完成的需求数 / 需求总数 ">{{scope.row.menuCnt>0?scope.row.menuFinishCnt+'&nbsp;/&nbsp;'+scope.row.menuCnt:''}}</span>
</template>
</el-table-column>
<el-table-column prop="totalTaskCnt" label="任务数" sortable min-width="80" >
<el-table-column prop="taskCnt" label="任务数" sortable min-width="80" >
<template slot-scope="scope">
<span title="完成的任务数 / 任务总数 ">{{scope.row.totalTaskCnt>0?scope.row.totalCompleteTaskCnt+'&nbsp;/&nbsp;'+scope.row.totalTaskCnt:''}}</span>
<span title="完成的任务数 / 任务总数 ">{{scope.row.taskCnt>0?scope.row.taskFinishCnt+'&nbsp;/&nbsp;'+scope.row.taskCnt:''}}</span>
</template>
</el-table-column>
<el-table-column prop="totalBugCnt" label="缺陷" sortable min-width="80" >
<el-table-column prop="bugCnt" label="缺陷" sortable min-width="80" >
<template slot-scope="scope">
<span title="关闭的缺陷数 / 缺陷总数 ">{{scope.row.totalBugCnt>0?scope.row.totalClosedBugCnt+'&nbsp;/&nbsp;'+scope.row.totalBugCnt:''}}</span>
<span title="关闭的缺陷数 / 缺陷总数 ">{{scope.row.bugCnt>0?scope.row.closedBugs+'&nbsp;/&nbsp;'+scope.row.bugCnt:''}}</span>
</template>
</el-table-column>
<el-table-column prop="startTime" label="起止时间" sortable min-width="150" >

Loading…
Cancel
Save