diff --git a/src/views/xm/rpt/product/menuAgeDist.vue b/src/views/xm/rpt/product/menuAgeDist.vue index 21d11679..d02d7d20 100644 --- a/src/views/xm/rpt/product/menuAgeDist.vue +++ b/src/views/xm/rpt/product/menuAgeDist.vue @@ -92,9 +92,16 @@ legendCpd(){ return ['0-2天','3-5天','6-7天','8-15天','16-30天','30天以上'] - }, - title(){ - return '需求年龄数量分布' + }, + + total(){ + if(!this.xmMenuAgeDists || this.xmMenuAgeDists.length==0){ + return 0 + }else{ + return this.xmMenuAgeDists.reduce((n, i) => { + return (n += i.value); + }, 0) + } }, title(){ @@ -193,10 +200,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/product/menuAttDist.vue b/src/views/xm/rpt/product/menuAttDist.vue index 8a8c7cc9..2c2b204a 100644 --- a/src/views/xm/rpt/product/menuAttDist.vue +++ b/src/views/xm/rpt/product/menuAttDist.vue @@ -119,6 +119,16 @@ return this.dicts[itemId].map(i=>i.name) }, + + total(){ + if(!this.xmMenuAttDists || this.xmMenuAttDists.length==0){ + return 0 + }else{ + return this.xmMenuAttDists.reduce((n, i) => { + return (n += i.value); + }, 0) + } + }, title(){ var preName="" @@ -247,10 +257,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/product/questionAgeDist.vue b/src/views/xm/rpt/product/questionAgeDist.vue index f1a860be..9096069e 100644 --- a/src/views/xm/rpt/product/questionAgeDist.vue +++ b/src/views/xm/rpt/product/questionAgeDist.vue @@ -122,6 +122,16 @@ return datas; } }, + + total(){ + if(!this.xmQuestionAgeDists || this.xmQuestionAgeDists.length==0){ + return 0 + }else{ + return this.xmQuestionAgeDists.reduce((n, i) => { + return (n += i.value); + }, 0) + } + }, title(){ var preName="" @@ -219,10 +229,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/product/questionAttDist.vue b/src/views/xm/rpt/product/questionAttDist.vue index 543f8b1f..039c5fcd 100644 --- a/src/views/xm/rpt/product/questionAttDist.vue +++ b/src/views/xm/rpt/product/questionAttDist.vue @@ -140,9 +140,16 @@ }) } }, - title(){ - return this.groupBys.find(i=>i.id==this.groupBy).name+'数量分布' - }, + + total(){ + if(!this.xmQuestionAttDists || this.xmQuestionAttDists.length==0){ + return 0 + }else{ + return this.xmQuestionAttDists.reduce((n, i) => { + return (n += i.value); + }, 0) + } + }, legendCpd(){ var itemId=""; if(this.groupBy=='bug_status'){ diff --git a/src/views/xm/rpt/product/questionRetestDist.vue b/src/views/xm/rpt/product/questionRetestDist.vue index 47f2fd7d..431a86bc 100644 --- a/src/views/xm/rpt/product/questionRetestDist.vue +++ b/src/views/xm/rpt/product/questionRetestDist.vue @@ -142,6 +142,16 @@ legendCpd(){ return ["1次","2次","3次","4次","5次","5次以上"] }, + + total(){ + if(!this.xmQuestionRetestDists || this.xmQuestionRetestDists.length==0){ + return 0 + }else{ + return this.xmQuestionRetestDists.reduce((n, i) => { + return (n += i.bugsNum); + }, 0) + } + }, title(){ var preName="" @@ -254,10 +264,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/project/taskAgeDist.vue b/src/views/xm/rpt/project/taskAgeDist.vue index cf835198..1004edc1 100644 --- a/src/views/xm/rpt/project/taskAgeDist.vue +++ b/src/views/xm/rpt/project/taskAgeDist.vue @@ -79,6 +79,16 @@ return datas; } }, + + total(){ + if(!this.xmTaskAgeDists || this.xmTaskAgeDists.length==0){ + return 0 + }else{ + return this.xmTaskAgeDists.reduce((n, i) => { + return (n += i.value); + }, 0) + } + }, title(){ var preName="" @@ -164,10 +174,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/project/taskAttDist.vue b/src/views/xm/rpt/project/taskAttDist.vue index 3d51b24d..7a71a014 100644 --- a/src/views/xm/rpt/project/taskAttDist.vue +++ b/src/views/xm/rpt/project/taskAttDist.vue @@ -97,12 +97,12 @@ } }, - total(){ - if(!this.xmTestCaseToPlanCalcList || this.xmTestCaseToPlanCalcList.length==0){ + total(){ + if(!this.xmTaskAttDists || this.xmTaskAttDists.length==0){ return 0 }else{ - return this.xmTestCaseToPlanCalcList.reduce((n, i) => { - return (n += i.useTimes); + return this.xmTaskAttDists.reduce((n, i) => { + return (n += i.value); }, 0) } }, @@ -234,10 +234,27 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, + graphic: { + type: 'text', + left: 'center', + top: 'center', + style: { + // text: '总数', + text: + '总数'+this.total , + + textAlign: 'center', + fill: '#333', + width: 30, + height: 30, + fontSize: 14 + } + }, + series: [ { type: 'pie', diff --git a/src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue b/src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue index a4a1bbbf..0d1ba596 100644 --- a/src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue +++ b/src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue @@ -207,11 +207,10 @@ }, calculable: true, - legend: { + legend:{ bottom: 'bottom', data:this.legendCpd, }, - graphic: { type: 'text', left: 'center', @@ -219,7 +218,7 @@ style: { // text: '总数', text: - '总用例数'+this.total , + '总数'+this.total , textAlign: 'center', fill: '#333', @@ -227,7 +226,7 @@ height: 30, fontSize: 14 } - }, + }, series: [ { type: 'pie', diff --git a/src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue b/src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue index 8b3c461c..8d98487b 100644 --- a/src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue +++ b/src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue @@ -197,9 +197,8 @@ saveAsImage: { show: true }, } }, - calculable: true, - - legend: { + calculable: true, + legend:{ bottom: 'bottom', data:this.legendCpd, }, @@ -210,7 +209,7 @@ style: { // text: '总数', text: - '总用例数'+this.total , + '总数'+this.total , textAlign: 'center', fill: '#333',