Browse Source

优化

master
陈裕财 3 years ago
parent
commit
5380b3ff39
  1. 18
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 13
      src/views/xm/core/xmTestPlan/rpt/biz/questionAgeDist.vue
  3. 15
      src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue
  4. 15
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseExecStatusDist.vue
  5. 15
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseUserDist.vue

18
src/views/xm/core/xmTestPlan/rpt/CompsCard.vue

@ -107,14 +107,14 @@ export default {
maxTableHeight:300, maxTableHeight:300,
// //
initCompCfg: [ initCompCfg: [
{ i:1, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionAgeDist',name:'缺陷年龄分布',compId:'xmQuestionAgeDist', params:[] },
{ i: 2, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionAttDist',name:'缺陷属性分布',compId:'xmQuestionAttDist', },
{ i: 3, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionHandlerUserSort',name:'缺陷负责人排行榜',compId:'xmQuestionHandlerUserSort', },
{ i: 4, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionAskUserSort',name:'缺陷提出人排行榜', compId:'xmQuestionAskUserSort', },
{ i:5, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionMenuSort',name:'缺陷需求分布', compId:'xmQuestionMenuSort', },
{ i: 6, x: 0, y: 12, w: 12, h: 4, id:'xmQuestionFuncSort',name:'缺陷模块分布', compId:'xmQuestionFuncSort', },
{ i: 7, x: 0, y: 12, w: 12, h: 4, id:'xmTestPlanCaseExecStatusDist',name:'用例执行结果分布', compId:'xmTestPlanCaseExecStatusDist', },
{ i: 8, x: 0, y: 12, w: 12, h: 4, id:'xmTestPlanCaseUserDist',name:'用例执行人情况分布', compId:'xmTestPlanCaseUserDist', },
{ i:1, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionAgeDist',name:'缺陷年龄分布',compId:'xmQuestionAgeDist', params:[] },
{ i: 2, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionAttDist',name:'缺陷属性分布',compId:'xmQuestionAttDist', },
{ i: 3, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionHandlerUserSort',name:'缺陷负责人排行榜',compId:'xmQuestionHandlerUserSort', },
{ i: 4, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionAskUserSort',name:'缺陷提出人排行榜', compId:'xmQuestionAskUserSort', },
{ i:5, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionMenuSort',name:'缺陷需求分布', compId:'xmQuestionMenuSort', },
{ i: 6, x: 0, y: 12, w: 12, h: 6, id:'xmQuestionFuncSort',name:'缺陷模块分布', compId:'xmQuestionFuncSort', },
{ i: 7, x: 0, y: 12, w: 12, h: 6, id:'xmTestPlanCaseExecStatusDist',name:'用例执行结果分布', compId:'xmTestPlanCaseExecStatusDist', },
{ i: 8, x: 0, y: 12, w: 12, h: 6, id:'xmTestPlanCaseUserDist',name:'用例执行人情况分布', compId:'xmTestPlanCaseUserDist', },
], ],
@ -141,7 +141,7 @@ export default {
} }
}, },
onCompSelect(comp){ onCompSelect(comp){
var compCfg={i:this.compCfgList.length+1, x: 0, y: 0, w: 12, h: 6, compId:comp.compId,name:comp.name,id:comp.compId+seq.sn(),params:[]}
var compCfg={i:this.compCfgList.length+1, x: 0, y: 12, w: 12, h: 6, compId:comp.compId,name:comp.name,id:comp.compId+seq.sn(),params:[]}
this.compCfgList.push(compCfg) this.compCfgList.push(compCfg)
} }

13
src/views/xm/core/xmTestPlan/rpt/biz/questionAgeDist.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row class="padding"> <el-row class="padding">
<span>{{comp?comp.compName:'缺陷年龄数量分布'}}</span>
<span>{{compCfg?compCfg.name:'缺陷年龄数量分布'}}</span>
<el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300"> <el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300">
<el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button> <el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button>
<el-form :model="filters"> <el-form :model="filters">
@ -51,7 +51,7 @@
</el-row> </el-row>
<el-row> <el-row>
<div> <div>
<div class="main" id="xmQuestionAgeDist"
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div> style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
@ -74,7 +74,7 @@
components: { components: {
XmIterationSelect,XmProductSelect, XmIterationSelect,XmProductSelect,
}, },
props:['xmTestPlan','xmRptConfig','comp'],
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -97,6 +97,9 @@
}, },
legendCpd(){ legendCpd(){
return ['0-2天','3-5天','6-7天','8-15天','16-30天','30天以上'] return ['0-2天','3-5天','6-7天','8-15天','16-30天','30天以上']
},
id(){
return this.compCfg.id
} }
}, },
@ -133,7 +136,7 @@
},//end data },//end data
methods: { methods: {
drawCharts() { drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("xmQuestionAgeDist"));
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption( this.myChart.setOption(
{ {
title: { title: {
@ -207,7 +210,7 @@
this.filters.planId=this.xmTestPlan.id this.filters.planId=this.xmTestPlan.id
} }
if(this.xmRptConfig && this.xmRptConfig.cfg){ if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.comp.id)
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){ if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{ compCfg.params.forEach(k=>{
this.filters[k.id]=k.value this.filters[k.id]=k.value

15
src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row class="padding"> <el-row class="padding">
<span>{{comp?comp.compName:'缺陷属性数量分布'}}</span>
<span>{{compCfg?compCfg.name:'缺陷属性数量分布'}}</span>
<el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300"> <el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300">
<el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button> <el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button>
<el-form :model="filters"> <el-form :model="filters">
@ -55,7 +55,7 @@
</el-row> </el-row>
<el-row> <el-row>
<div> <div>
<div class="main" id="xmQuestionAttDist"
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div> style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
@ -78,7 +78,7 @@
components: { components: {
XmIterationSelect,XmProductSelect, XmIterationSelect,XmProductSelect,
}, },
props:['xmTestPlan','xmRptConfig','comp'],
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -132,7 +132,10 @@
} }
return this.dicts[itemId].map(i=>i.name) return this.dicts[itemId].map(i=>i.name)
}
},
id(){
return this.compCfg.id
},
}, },
watch: { watch: {
@ -206,7 +209,7 @@
}, },
drawCharts() { drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("xmQuestionAttDist"));
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption( this.myChart.setOption(
{ {
title: { title: {
@ -281,7 +284,7 @@
this.filters.planId=this.xmTestPlan.id this.filters.planId=this.xmTestPlan.id
} }
if(this.xmRptConfig && this.xmRptConfig.cfg){ if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.comp.id)
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){ if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{ compCfg.params.forEach(k=>{
this.filters[k.id]=k.value this.filters[k.id]=k.value

15
src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseExecStatusDist.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row class="padding"> <el-row class="padding">
<span>{{comp?comp.compName:'执行结果分布'}}</span>
<span>{{compCfg?compCfg.name:'执行结果分布'}}</span>
<el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300"> <el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300">
<el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button> <el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button>
<el-form :model="filters"> <el-form :model="filters">
@ -13,7 +13,7 @@
</el-row> </el-row>
<el-row> <el-row>
<div> <div>
<div class="main" id="xmTestPlanCaseExecStatusDist"
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div> style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
@ -36,7 +36,7 @@
components: { components: {
XmIterationSelect,XmProductSelect, XmIterationSelect,XmProductSelect,
}, },
props:['xmTestPlan','xmRptConfig','comp'],
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -59,7 +59,10 @@
legendCpd(){ legendCpd(){
var itemId="testPlanTcode"; var itemId="testPlanTcode";
return this.dicts[itemId].map(i=>i.name) return this.dicts[itemId].map(i=>i.name)
}
},
id(){
return this.compCfg.id
},
}, },
watch: { watch: {
@ -95,7 +98,7 @@
return val; return val;
}, },
drawCharts() { drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("xmTestPlanCaseExecStatusDist"));
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption( this.myChart.setOption(
{ {
title: { title: {
@ -165,7 +168,7 @@
this.filters.planId=this.xmTestPlan.id this.filters.planId=this.xmTestPlan.id
} }
if(this.xmRptConfig && this.xmRptConfig.cfg){ if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.comp.id)
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){ if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{ compCfg.params.forEach(k=>{
this.filters[k.id]=k.value this.filters[k.id]=k.value

15
src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseUserDist.vue

@ -1,7 +1,7 @@
<template> <template>
<section> <section>
<el-row class="padding"> <el-row class="padding">
<span>{{comp?comp.compName:'成员执行结果分布'}}</span>
<span>{{compCfg?compCfg.name:'成员执行结果分布'}}</span>
<el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300"> <el-popover trigger="manual" v-model="conditionBtnVisible" style="float:right;" width="300">
<el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button> <el-button slot="reference" icon="el-icon-more" @click="conditionBtnVisible=!conditionBtnVisible"></el-button>
<el-form :model="filters"> <el-form :model="filters">
@ -13,7 +13,7 @@
</el-row> </el-row>
<el-row> <el-row>
<div> <div>
<div class="main" id="xmTestPlanCaseUserDist"
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div> style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div> <div class="progress"></div>
</div> </div>
@ -36,7 +36,7 @@
components: { components: {
XmIterationSelect,XmProductSelect, XmIterationSelect,XmProductSelect,
}, },
props:['xmTestPlan','xmRptConfig','comp'],
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -53,7 +53,10 @@
}, },
legendCpd(){ legendCpd(){
return ['已执行','未执行'] return ['已执行','未执行']
}
},
id(){
return this.compCfg.id
},
}, },
watch: { watch: {
@ -89,7 +92,7 @@
return val; return val;
}, },
drawCharts() { drawCharts() {
this.myChart = this.$echarts.init(document.getElementById("xmTestPlanCaseUserDist"));
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption( this.myChart.setOption(
{ {
title: { title: {
@ -159,7 +162,7 @@
this.filters.planId=this.xmTestPlan.id this.filters.planId=this.xmTestPlan.id
} }
if(this.xmRptConfig && this.xmRptConfig.cfg){ if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.comp.id)
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){ if(compCfg && compCfg.params){
compCfg.params.forEach(k=>{ compCfg.params.forEach(k=>{
this.filters[k.id]=k.value this.filters[k.id]=k.value

Loading…
Cancel
Save