Browse Source

优化

master
陈裕财 3 years ago
parent
commit
4e8aab31e8
  1. 6
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 4
      src/views/xm/core/xmTestPlan/rpt/CompsSet.vue
  3. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionAgeDist.vue
  4. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue
  5. 274
      src/views/xm/core/xmTestPlan/rpt/biz/questionRetestDist.vue
  6. 8
      src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue
  7. 203
      src/views/xm/core/xmTestPlan/rpt/biz/testCaseToPlanCalc.vue
  8. 187
      src/views/xm/core/xmTestPlan/rpt/biz/testDayTimesCalc.vue
  9. 30
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseExecStatusDist.vue
  10. 71
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseUserDist.vue
  11. 3
      src/views/xm/rpt/product/questionRetestDist.vue
  12. 6
      src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue

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

@ -59,12 +59,15 @@ import XmTestPlanMng from '@/views/xm/core/xmTestPlan/XmTestPlanMng'
import CompsSet from '@/views/xm/core/xmTestPlan/rpt/CompsSet'
import XmQuestionAgeDist from '@/views/xm/core/xmTestPlan/rpt/biz/questionAgeDist'
import xmQuestionAttDist from '@/views/xm/core/xmTestPlan/rpt/biz/questionAttDist'
import xmQuestionRetestDist from '@/views/xm/core/xmTestPlan/rpt/biz/questionRetestDist'
import xmQuestionHandlerUserSort from '@/views/xm/core/xmTestPlan/rpt/biz/questionHandlerUserSort'
import xmQuestionAskUserSort from '@/views/xm/core/xmTestPlan/rpt/biz/questionAskUserSort'
import xmQuestionMenuSort from '@/views/xm/core/xmTestPlan/rpt/biz/questionMenuSort'
import xmQuestionFuncSort from '@/views/xm/core/xmTestPlan/rpt/biz/questionFuncSort'
import xmTestPlanCaseExecStatusDist from '@/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseExecStatusDist'
import xmTestPlanCaseUserDist from '@/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseUserDist'
import xmTestCaseToPlanCalc from '@/views/xm/core/xmTestPlan/rpt/biz/testCaseToPlanCalc'
import xmTestDayTimesCalc from '@/views/xm/core/xmTestPlan/rpt/biz/testDayTimesCalc'
import xmTestRptOverview from '@/views/xm/core/xmTestPlan/xmTestRptOverview'
@ -82,6 +85,9 @@ export default {
xmTestPlanCaseUserDist,
CompsSet,
xmTestRptOverview,
xmQuestionRetestDist,
xmTestCaseToPlanCalc,
xmTestDayTimesCalc
},
props:['xmTestPlan','rptConfigVisible'],

4
src/views/xm/core/xmTestPlan/rpt/CompsSet.vue

@ -63,7 +63,7 @@ export default {
{
compId: 'xmTestPlanCaseExecStatusDist',
icon: pieSimple,
name: '执行结果分布',
name: '用例执行结果分布',
compDesc: '按测试用例执行结果统计,通过、失败、忽略、阻塞',
isChecked: false,
},
@ -117,7 +117,7 @@ export default {
isChecked: false,
},
{
compId: 'xmQuestionReTestingDist',
compId: 'xmQuestionRetestDist',
icon: pieSimple,
name: '缺陷回归分布',
compDesc: '统计回归测试的缺陷数',

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

@ -1,8 +1,7 @@
<template>
<section>
<el-row class="padding">
<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-row>

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

@ -1,8 +1,7 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>

274
src/views/xm/core/xmTestPlan/rpt/biz/questionRetestDist.vue

@ -0,0 +1,274 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>
<el-button style="float:right;" type="text" icon="el-icon-close" @click="conditionBtnVisible=false">关闭</el-button>
</el-row>
<el-form :model="filters">
<el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="缺陷类型" prop="bugType" >
<el-select v-model="filters.bugType" @change="onXmQuestionSomeFieldsChange('bugType',$event)" clearable>
<el-option v-for="i in this.dicts.bugType" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="缺陷原因" prop="bugReason">
<el-select v-model="filters.bugReason" @change="onXmQuestionSomeFieldsChange('bugReason',$event)" clearable>
<el-option v-for="i in this.dicts.bugReason" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="严重程度" prop="bugSeverity" >
<el-select v-model="filters.bugSeverity" @change="onXmQuestionSomeFieldsChange('bugSeverity',$event)" clearable>
<el-option v-for="i in this.dicts.bugSeverity" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="优先级" prop="priority" >
<el-select v-model="filters.priority" @change="onXmQuestionSomeFieldsChange('priority',$event)" clearable>
<el-option v-for="i in dicts.priority" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="解决方案" prop="solution" >
<el-select v-model="filters.solution" @change="onXmQuestionSomeFieldsChange('solution',$event)" clearable>
<el-option v-for="i in dicts.bugSolution" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="重现频率" prop="repRate" >
<el-select v-model="filters.repRate" @change="onXmQuestionSomeFieldsChange('repRate',$event)" clearable>
<el-option v-for="i in dicts.bugRepRate" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchXmQuestionRetestDist">查询</el-button>
</el-form-item>
</el-form>
</el-popover>
</el-row>
<el-row>
<div>
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { getXmQuestionRetestDist } from '@/api/xm/core/xmQuestion';
export default {
components: {
},
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: {
...mapGetters([
'userInfo','roles'
]),
xmQuestionRetestsCpd(){
var def=[
{name:"1次",value:0} ,
{name:"2次",value:0} ,
{name:"3次",value:0} ,
{name:"4次",value:0} ,
{name:"5次",value:0} ,
{name:"5次以上",value:0}
]
if(this.xmQuestionRetests.length==0){
return def
}else{
var datas=[]
this.xmQuestionRetests.forEach(i=>{
var data={}
if(i.retimes>5){
data.name="5次以上"
}else{
data.name=this.legendCpd[i.retimes]
}
data.value=i.bugsNum
datas.push(data)
})
def.forEach(k=>{
if(!datas.some(i=>k.name==i.name)){
datas.push(k)
}
})
return datas;
}
},
legendCpd(){
return ["1次","2次","3次","4次","5次","5次以上"]
},
title(){
return '缺陷回归分布'
},
id(){
return this.compCfg.id
}
},
watch: {
xmQuestionRetestDistsCpd(){
this.drawCharts();
}
},
data() {
return {
filters:{
planId:'',
productId:'',
projectId:'',
bugStatus:'',
bugType:'',
bugReason:'',
bugSeverity:'',
priority:'',
solution:'',
repRate:'',
},
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
dateRanger:[],
maxTableHeight:300,
visible:false,
xmQuestionRetestDists:[],
conditionBtnVisible:false,
}//end return
},//end data
methods: {
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption(
{
title: {
text: this.title,
left: 'center'
},
tooltip: {
trigger: 'item',
},
toolbox: {
show: true,
right:"20px",
feature: {
dataView: { show: true, readOnly: false },
saveAsImage: { show: true },
}
},
calculable: true,
legend: {
top:'5%',
left: 'center',
data:this.legendCpd,
},
series: [
{
type: 'pie',
radius: '50%',
data: this.xmQuestionRetestsCpd,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
label: {
show: true,
},
}
]
}
)
},
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmQuestionRetestDists=[]
},
searchXmQuestionRetestDist(){
var params={...this.filters}
if(this.xmTestPlan && this.xmTestPlan.id){
params.planId=this.xmTestPlan.id
}
getXmQuestionRetestDist(params).then(res=>{
this.xmQuestionRetestDists=res.data.data
})
},
onProductSelected(product){
this.filters.product=product
},
onProductClear(){
this.filters.product=null
},
onIterationSelected(iteration){
this.filters.iteration=iteration
},
doDelete(){
this.$emit("delete",this.compCfg)
},
onIterationClear(){
this.filters.iteration=null
},
initData(){
if(this.xmTestPlan){
this.filters.productId=this.xmTestPlan.productId
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
sizeAutoChange(){
this.myChart.resize();
}
},//end method
mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{
this.dicts=res.data.data;
})
this.initData();
this.searchXmQuestionRetestDist();
//this.charts();
//this.drawCharts();
}//end mounted
}
</script>
<style scoped>
.image {
width: 100%;
display: block;
}
</style>

8
src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue

@ -151,7 +151,7 @@
{
title: {
text: this.title,
left: 'left'
left: 'center'
},
tooltip: {
@ -184,12 +184,6 @@
label:{
show: true,
},
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
}
]
}

203
src/views/xm/core/xmTestPlan/rpt/biz/testCaseToPlanCalc.vue

@ -0,0 +1,203 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>
<el-button style="float:right;" type="text" icon="el-icon-close" @click="conditionBtnVisible=false">关闭</el-button>
</el-row>
<el-form :model="filters">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestCaseToPlanCalcList">查询</el-button>
</el-form-item>
</el-form>
</el-popover>
</el-row>
<el-row>
<div>
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { getXmTestCaseToPlanCalcList } from '@/api/xm/core/xmTestPlanCase';
export default {
components: {
},
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: {
...mapGetters([
'userInfo','roles'
]),
xmTestCaseToPlanCalcListCpd(){
if(!this.xmTestCaseToPlanCalcList || this.xmTestCaseToPlanCalcList.length==0){
return []
}else{
var names=this.legendCpd;
var datas=[]
this.xmTestCaseToPlanCalcList.forEach(i=>{
var nameIndex=0;
if(i.useTimes<=2){
nameIndex=i.useTimes
}else if(i.useTimes>=3 && i.useTimes<=5){
nameIndex=3
}else if(i.useTimes>5 && i.useTimes<=10){
nameIndex=4
}else if(i.useTimes>10){
nameIndex=5
}
var data={name:names[nameIndex],value:i.caseNum}
datas.push(data)
})
return datas;
}
},
title(){
return '执行结果数量分布'
},
legendCpd(){
return ['0次','1次','2次','3-5次','5-10次','10次以上']
},
id(){
return this.compCfg.id
},
},
watch: {
xmTestCaseToPlanCalcListCpd(){
this.drawCharts();
}
},
data() {
return {
filters:{
planId:'',
},
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
dateRanger:[],
maxTableHeight:300,
visible:false,
xmTestCaseToPlanCalcList:[],
conditionBtnVisible:false,
}//end return
},//end data
methods: {
formatDict(itemId,val){
var dict=this.dicts[itemId]
if(dict){
var item=dict.find(i=>i.id==val)
if(item){
return item.name
}
}
return val;
},
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption(
{
title: {
text: this.title,
left: 'center'
},
tooltip: {
trigger: 'item',
},
toolbox: {
show: true,
right:"20px",
feature: {
dataView: { show: true, readOnly: false },
saveAsImage: { show: true },
}
},
calculable: true,
legend: {
top:'5%',
left: 'center',
data:this.legendCpd,
},
series: [
{
type: 'pie',
radius: '50%',
data: this.xmTestCaseToPlanCalcListCpd,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
label: {
show: true,
},
}
]
}
)
},
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmTestCaseToPlanCalcList=[]
},
searchXmTestCaseToPlanCalcList(){
var params={...this.filters}
getXmTestCaseToPlanCalcList(params).then(res=>{
this.xmTestCaseToPlanCalcList=res.data.data
})
},
initData(){
if(this.xmTestPlan){
this.filters.productId=this.xmTestPlan.productId
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)
},
sizeAutoChange(){
this.myChart.resize();
}
},//end method
mounted() {
this.initData();
this.searchXmTestCaseToPlanCalcList();
//this.charts();
//this.drawCharts();
}//end mounted
}
</script>
<style scoped>
.image {
width: 100%;
display: block;
}
</style>

187
src/views/xm/core/xmTestPlan/rpt/biz/testDayTimesCalc.vue

@ -0,0 +1,187 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>
<el-button style="float:right;" type="text" icon="el-icon-close" @click="conditionBtnVisible=false">关闭</el-button>
</el-row>
<el-form :model="filters">
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestDayTimesList">查询</el-button>
</el-form-item>
</el-form>
</el-popover>
</el-row>
<el-row>
<div>
<div class="main" :id="id"
style="width:100%;height:600px;margin:0 auto;"></div>
<div class="progress"></div>
</div>
</el-row>
</section>
</template>
<script>
import util from '@/common/js/util';//
import { mapGetters } from 'vuex'
import { getXmTestDayTimesList } from '@/api/xm/core/xmTestPlanCase';
export default {
components: {
},
props:['xmTestPlan','xmRptConfig','compCfg'],
computed: {
...mapGetters([
'userInfo','roles'
]),
datesCpd(){
if(!this.xmTestDayTimesList || this.xmTestDayTimesList.length==0){
return []
}else{
return this.xmTestDayTimesList.map(i=>i.execDate)
}
},
testDayTimesCpd(){
if(!this.xmTestDayTimesList || this.xmTestDayTimesList.length==0){
return []
}else{
return this.xmTestDayTimesList.map(i=>i.hadExec)
}
},
title(){
return '测试用例每日执行次数统计'
},
id(){
return this.compCfg.id
},
},
watch: {
xmTestDayTimesListsCpd(){
this.drawCharts();
}
},
data() {
return {
filters:{
planId:'',
},
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
dateRanger:[],
maxTableHeight:300,
visible:false,
xmTestDayTimesLists:[],
conditionBtnVisible:false,
}//end return
},//end data
methods: {
formatDict(itemId,val){
var dict=this.dicts[itemId]
if(dict){
var item=dict.find(i=>i.id==val)
if(item){
return item.name
}
}
return val;
},
drawCharts() {
this.myChart = this.$echarts.init(document.getElementById(this.id));
this.myChart.setOption(
{
title: {
text: this.title,
left: 'center'
},
tooltip: {
trigger: 'axis',
},
barMaxWidth: 100,
toolbox: {
show: true,
right:"20px",
feature: {
dataView: { show: true, readOnly: false },
magicType: { show: true, type: ['line', 'bar'] },
saveAsImage: { show: true }
}
},
calculable: true,
xAxis: {
type: 'category',
data: this.datesCpd
},
yAxis: {
type: 'value'
},
series: [
{
name:'次数',
data: this.testDayTimesCpd,
type: 'line',
label:{
show: true,
},
smooth: true,
}
]
}
)
},
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmTestDayTimesLists=[]
},
searchXmTestDayTimesList(){
var params={...this.filters}
getXmTestDayTimesList(params).then(res=>{
this.xmTestDayTimesLists=res.data.data
})
},
initData(){
if(this.xmTestPlan){
this.filters.productId=this.xmTestPlan.productId
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)
},
sizeAutoChange(){
this.myChart.resize();
}
},//end method
mounted() {
this.initData();
this.searchXmTestDayTimesList();
//this.charts();
//this.drawCharts();
}//end mounted
}
</script>
<style scoped>
.image {
width: 100%;
display: block;
}
</style>

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

@ -1,8 +1,7 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>
@ -46,23 +45,28 @@
'userInfo','roles'
]),
xmTestPlanCaseExecStatusDistsCpd(){
if(this.xmTestPlanCaseExecStatusDists.length==0){
if(!this.xmTestPlanCaseExecStatusDists || this.xmTestPlanCaseExecStatusDists.length==0){
return []
}else{
var itemId="testPlanTcode";
return this.xmTestPlanCaseExecStatusDists.map(i=>{
var data={...i}
data.name=this.formatDict(itemId,data.name)
return data;
var datas=[]
this.xmTestPlanCaseExecStatusDists.forEach(i=>{
var data={}
var itemId="testStepTcode";
data.name=this.formatDict(itemId,i.execStatus)
data.value=i.totalCnt
datas.push(data)
})
return datas;
}
},
title(){
return '执行结果数量分布'
var preName=""
return preName+ '测试用例执行结果数量分布'
},
/**0-未测,1-通过,2-受阻,3-忽略,4-失败 */
legendCpd(){
var itemId="testPlanTcode";
return this.dicts[itemId].map(i=>i.name)
var itemId="testStepTcode";
return this.dicts[itemId].map(i=>this.formatDict(itemId,i.id))
},
id(){
return this.compCfg.id
@ -80,7 +84,7 @@
planId:'',
},
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
dicts:{testStepTcode:[]},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
dateRanger:[],
maxTableHeight:300,
@ -196,7 +200,7 @@
}
},//end method
mounted() {
initSimpleDicts('all',['testPlanTcode'] ).then(res=>{
initSimpleDicts('all',['testStepTcode'] ).then(res=>{
this.dicts=res.data.data;
})
this.initData();

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

@ -1,8 +1,7 @@
<template>
<section>
<el-row class="padding">
<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-row>
<el-button type="danger" icon="el-icon-delete" @click="doDelete">删除</el-button>
@ -45,19 +44,49 @@
...mapGetters([
'userInfo','roles'
]),
xmTestPlanCaseUserDistsCpd(){
if(this.xmTestPlanCaseUserDists.length==0){
return []
}else{
return this.xmTestPlanCaseUserDists
}
},
title(){
return '成员执行结果数量分布'
},
legendCpd(){
return ['已执行','未执行']
},
hadExecCpd(){
if(!this.xmTestPlanCaseUserDists ||this.xmTestPlanCaseUserDists.length==0){
return []
}else{
return this.xmTestPlanCaseUserDists.map(i=>i.hadExec)
}
},
notExecCpd(){
if(!this.xmTestPlanCaseUserDists ||this.xmTestPlanCaseUserDists.length==0){
return []
}else{
return this.xmTestPlanCaseUserDists.map(i=>i.notExec)
}
},
legendCpd(){
if(!this.xmTestPlanCaseUserDists ||this.xmTestPlanCaseUserDists.length==0){
return []
}else{
return this.xmTestPlanCaseUserDists.map(i=>i.execUsername)
}
},
xmTestPlanCaseUserDistsCpd(){
if(!this.xmTestPlanCaseUserDists || this.xmTestPlanCaseUserDists.length==0){
return []
}else{
var datas=[]
this.xmTestPlanCaseUserDists.forEach(i=>{
var data={}
var itemId="testPlanTcode";
data.name=this.formatDict(itemId,i.execStatus)
data.value=i.totalCnt
datas.push(data)
})
return datas;
}
},
title(){
var preName=""
return preName+ '测试用例按执行人分组统计'
},
id(){
return this.compCfg.id
},
@ -141,12 +170,6 @@
label:{
show: true,
},
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
},
{
name: '未执行',
@ -155,12 +178,6 @@
label:{
show: true,
},
markPoint: {
data: [
{ type: 'max', name: 'Max' },
{ type: 'min', name: 'Min' }
]
},
},
]
}

3
src/views/xm/rpt/product/questionRetestDist.vue

@ -140,9 +140,6 @@
return datas;
}
},
title(){
return '缺陷回归测试数量分布'
},
legendCpd(){
return ["1次","2次","3次","4次","5次","5次以上"]
},

6
src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue

@ -43,7 +43,7 @@
<el-button v-if="!filters.testPlan" type="text" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestPlanCaseExecStatusDist">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestCaseToPlanCalcList">查询</el-button>
</el-form-item>
</el-form>
</el-col>
@ -227,7 +227,7 @@
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmTestCaseToPlanCalcList=[]
},
searchXmTestPlanCaseExecStatusDist(){
searchXmTestCaseToPlanCalcList(){
var params={ }
if(this.filters.product && this.filters.product.id){
@ -300,7 +300,7 @@
this.filters.iteration=this.xmIteration
this.filters.testCasedb=this.xmTestCasedb
this.searchXmTestPlanCaseExecStatusDist();
this.searchXmTestCaseToPlanCalcList();
}
},//end method

Loading…
Cancel
Save