Browse Source

优化报表

master
陈裕财 3 years ago
parent
commit
1e095a70cf
  1. 12
      src/views/xm/core/xmTestPlan/XmTestPlanInfo.vue
  2. 9
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  3. 64
      src/views/xm/core/xmTestPlan/rpt/CompsSet.vue
  4. 334
      src/views/xm/core/xmTestPlan/rpt/biz/question.vue
  5. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionAskUserSort.vue
  6. 6
      src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue
  7. 47
      src/views/xm/core/xmTestPlan/rpt/biz/questionBugReasonDist.vue
  8. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionBugSeverityDist.vue
  9. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionBugSolutionDist.vue
  10. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionBugStatusDist.vue
  11. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionBugTypeDist.vue
  12. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionFuncSort.vue
  13. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionHandlerUserSort.vue
  14. 3
      src/views/xm/core/xmTestPlan/rpt/biz/questionMenuSort.vue
  15. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionPriorityDist.vue
  16. 48
      src/views/xm/core/xmTestPlan/rpt/biz/questionRepRateDist.vue
  17. 9
      src/views/xm/core/xmTestPlan/rpt/biz/questionRetestDist.vue
  18. 2
      src/views/xm/core/xmTestPlan/rpt/biz/testDayTimesCalc.vue
  19. 2
      src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue
  20. 16
      src/views/xm/rpt/product/questionRetestDist.vue

12
src/views/xm/core/xmTestPlan/XmTestPlanInfo.vue

@ -54,10 +54,7 @@
import util from '@/common/js/util';// import util from '@/common/js/util';//
import config from '@/common/config';// import config from '@/common/config';//
import XmTestCaseMng from '../xmTestCase/XmTestCaseMng';//
import XmTestPlanMng from '../xmTestPlan/XmTestPlanMng';//
import XmTestPlanCaseMng from '../xmTestPlanCase/XmTestPlanCaseMng';//
import { mapGetters } from 'vuex'
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';// import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmQuestionMng from '@/views/xm/core/xmQuestion/XmQuestionMng';// import XmQuestionMng from '@/views/xm/core/xmQuestion/XmQuestionMng';//
import { initDicts } from '@/api/xm/core/xmTestPlan'; import { initDicts } from '@/api/xm/core/xmTestPlan';
@ -66,8 +63,11 @@ import { listXmTestPlan,calcXmTestPlan } from '@/api/xm/core/xmTestPlan';
export default { export default {
name:'xmTestCasedbMng', name:'xmTestCasedbMng',
components: { components: {
XmProductSelect, XmTestPlanMng,XmTestPlanCaseMng,XmQuestionMng,
"xm-test-plan-rpt":()=>import("./rpt/index.vue")
XmProductSelect,XmQuestionMng,
"xm-test-plan-rpt":()=>import("./rpt/index.vue"),
"xm-test-plan-mng":()=>import("../xmTestPlan/XmTestPlanMng.vue"),
"xm-test-case-mng":()=>import("../xmTestCase/XmTestCaseMng.vue"),
"xm-test-plan-case-mng":()=>import("../xmTestPlanCase/XmTestPlanCaseMng.vue")
}, },
props:['visible','xmTestCasedb'], props:['visible','xmTestCasedb'],
computed: { computed: {

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

@ -87,7 +87,14 @@ export default {
xmTestRptOverview, xmTestRptOverview,
xmQuestionRetestDist, xmQuestionRetestDist,
xmTestCaseToPlanCalc, xmTestCaseToPlanCalc,
xmTestDayTimesCalc
xmTestDayTimesCalc,
"xmQuestionBugReasonDist":()=>import("./biz/questionBugReasonDist.vue"),
"xmQuestionBugStatusDist":()=>import("./biz/questionBugStatusDist.vue"),
"xmQuestionBugTypeDist":()=>import("./biz/questionBugTypeDist.vue"),
"xmQuestionRepRateDist":()=>import("./biz/questionRepRateDist.vue"),
"xmQuestionBugSeverityDist":()=>import("./biz/questionBugSeverityDist.vue"),
"xmQuestionPriorityDist":()=>import("./biz/questionPriorityDist.vue"),
}, },
props:['xmTestPlan','rptConfigVisible'], props:['xmTestPlan','rptConfigVisible'],

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

@ -89,14 +89,14 @@ export default {
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionFuncDist',
compId: 'xmQuestionFuncSort',
icon: lineStack, icon: lineStack,
name: '缺陷模块分布', name: '缺陷模块分布',
compDesc: '统计缺陷在各个模块的分布情况', compDesc: '统计缺陷在各个模块的分布情况',
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionMenuDist',
compId: 'xmQuestionMenuSort',
icon: lineStack, icon: lineStack,
name: '缺陷故事分布', name: '缺陷故事分布',
compDesc: '统计缺陷在各个用户故事的分布情况', compDesc: '统计缺陷在各个用户故事的分布情况',
@ -112,29 +112,71 @@ export default {
{ {
compId: 'xmQuestionHandlerUserSort', compId: 'xmQuestionHandlerUserSort',
icon: bar, icon: bar,
name: '缺陷人员排行榜',
name: '缺陷负责人员排行榜',
compDesc: '统计每个负责人的缺陷总数,并按大小进行排序', compDesc: '统计每个负责人的缺陷总数,并按大小进行排序',
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionStateDist',
compId: 'xmQuestionRetestDist',
icon: pieSimple,
name: '缺陷回归测试分布',
compDesc: '统计回归测试的次数与缺陷数',
isChecked: false,
},
{
compId: 'xmQuestionAttDist',
icon: pieSimple,
name: '缺陷属性分布',
compDesc: '按缺陷的属性进行统计,多种属性可选择',
isChecked: false,
},
{
compId: 'xmQuestionBugStatusDist',
icon: pieSimple, icon: pieSimple,
name: '缺陷状态分布', name: '缺陷状态分布',
compDesc: '按缺陷处理情况进行统计',
compDesc: '按缺陷状态进行分组统计',
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionRetestDist',
compId: 'xmQuestionBugReasonDist',
icon: pieSimple, icon: pieSimple,
name: '缺陷回归分布',
compDesc: '统计回归测试的缺陷数',
name: '缺陷原因分布',
compDesc: '按缺陷原因进行分组统计',
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionAttDist',
compId: 'xmQuestionBugTypeDist',
icon: pieSimple, icon: pieSimple,
name: '缺陷属性分布',
compDesc: '按缺陷的属性进行统计,多种属性可选择',
name: '缺陷类型分布',
compDesc: '按缺陷类型进行分组统计',
isChecked: false,
},
{
compId: 'xmQuestionRepRateDist',
icon: pieSimple,
name: '缺陷重新频率分布',
compDesc: '按缺陷出现频率进行分组统计',
isChecked: false,
},
{
compId: 'xmQuestionBugSolutionDist',
icon: pieSimple,
name: '缺陷解决方案分布',
compDesc: '按缺陷解决方案进行分组统计',
isChecked: false,
},
{
compId: 'xmQuestionBugSeverityDist',
icon: pieSimple,
name: '缺陷紧急程度分布',
compDesc: '按缺陷紧急程度进行分组统计',
isChecked: false,
},
{
compId: 'xmQuestionPriorityDist',
icon: pieSimple,
name: '缺陷优先级分布',
compDesc: '按缺陷优先级进行分组统计',
isChecked: false, isChecked: false,
}, },
{ {

334
src/views/xm/core/xmTestPlan/rpt/biz/question.vue

@ -0,0 +1,334 @@
<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="分组属性">
<el-select v-model="filters.groupBy" @change="onXmQuestionSomeFieldsChange('groupBy',$event)" clearable>
<el-option v-for="i in this.groupBys" :label="i.name" :key="i.id" :value="i.id"></el-option>
</el-select>
</el-form-item>
<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="searchXmQuestionAttDist">查询</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 { getXmQuestionAttDist } from '@/api/xm/core/xmQuestion';
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
components: {
XmIterationSelect,XmProductSelect,
},
props:['xmTestPlan','xmRptConfig','compCfg','groupBy'],
computed: {
...mapGetters([
'userInfo','roles'
]),
xmQuestionAttDistsCpd(){
if(this.xmQuestionAttDists.length==0){
return []
}else{
var itemId="";
if(this.filters.groupBy=='bug_status'){
itemId="bugStatus"
}else if(this.filters.groupBy=='bug_type'){
itemId="bugType"
}else if(this.filters.groupBy=='bug_reason'){
itemId="bugReason"
}else if(this.filters.groupBy=='bug_severity'){
itemId="bugSeverity"
}else if(this.filters.groupBy=='priority'){
itemId="priority"
} else if(this.filters.groupBy=='bug_solution'){
itemId="bugSolution"
} else if(this.filters.groupBy=='rep_rate'){
itemId="bugRepRate"
}
return this.xmQuestionAttDists.map(i=>{
var data={...i}
data.name=this.formatDict(itemId,data.name)
return data;
})
}
},
title(){
return this.groupBys.find(i=>i.id==this.filters.groupBy).name+'数量分布'
},
legendCpd(){
var itemId="";
if(this.filters.groupBy=='bug_status'){
itemId="bugStatus"
}else if(this.filters.groupBy=='bug_type'){
itemId="bugType"
}else if(this.filters.groupBy=='bug_reason'){
itemId="bugReason"
}else if(this.filters.groupBy=='bug_severity'){
itemId="bugSeverity"
}else if(this.filters.groupBy=='priority'){
itemId="priority"
} else if(this.filters.groupBy=='bug_solution'){
itemId="bugSolution"
} else if(this.filters.groupBy=='rep_rate'){
itemId="bugRepRate"
}
return this.dicts[itemId].map(i=>i.name)
},
id(){
return this.compCfg.id
},
},
watch: {
xmQuestionAttDistsCpd(){
this.drawCharts();
}
},
data() {
return {
filters:{
groupBy:'bug_status',
planId:'',
productId:'',
projectId:'',
bugStatus:'',
bugType:'',
bugReason:'',
bugSeverity:'',
priority:'',
solution:'',
repRate:'',
},
groupBys:[
{id:'bug_status', name:'缺陷状态'},
{id:'bug_type', name:'缺陷类型'},
{id:'bug_reason', name:'缺陷原因'},
{id:'bug_severity', name:'紧急程度'},
{id:'priority', name:'优先级'},
{id:'bug_solution', name:'解决方案'},
{id:'rep_rate', name:'复现频率'},
],
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,
xmQuestionAttDists:[],
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;
},
findMax( list ) {
var i, max = list[0];
if(list.length < 2) return max;
for (i = 0; i < list.length; i++) {
if (list[i].distBudgetWorkload > max.distBudgetWorkload) {
max = list[i];
}
}
return max;
},
open(params){
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
},
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.xmQuestionAttDistsCpd,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
label: {
show: true,
},
}
]
}
)
},
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmQuestionAttDists=[]
},
searchXmQuestionAttDist(){
if(!this.filters.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
var params={...this.filters}
getXmQuestionAttDist(params).then(res=>{
this.xmQuestionAttDists=res.data.data
})
},
onProductSelected(product){
this.filters.product=product
},
onProductClear(){
this.filters.product=null
},
onIterationSelected(iteration){
this.filters.iteration=iteration
},
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.groupBy){
this.filters.groupBy=this.groupBy
}
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() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{
this.dicts=res.data.data;
})
this.initData();
this.searchXmQuestionAttDist();
//this.charts();
//this.drawCharts();
}//end mounted
}
</script>
<style scoped>
.image {
width: 100%;
display: block;
}
</style>

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

@ -32,6 +32,9 @@ export default {
methods: { methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
}, },

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

@ -81,7 +81,7 @@
components: { components: {
XmIterationSelect,XmProductSelect, XmIterationSelect,XmProductSelect,
}, },
props:['xmTestPlan','xmRptConfig','compCfg'],
props:['xmTestPlan','xmRptConfig','compCfg','groupBy'],
computed: { computed: {
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
@ -298,7 +298,9 @@
this.filters.projectId=this.xmTestPlan.projectId this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id this.filters.planId=this.xmTestPlan.id
} }
if(this.groupBy){
this.filters.groupBy=this.groupBy
}
if(this.compCfg && this.compCfg.params){ if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params) Object.assign(this.filters,this.compCfg.params)
} }

47
src/views/xm/core/xmTestPlan/rpt/biz/questionBugReasonDist.vue

@ -0,0 +1,47 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_reason'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

48
src/views/xm/core/xmTestPlan/rpt/biz/questionBugSeverityDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_severity'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

48
src/views/xm/core/xmTestPlan/rpt/biz/questionBugSolutionDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_solution'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

48
src/views/xm/core/xmTestPlan/rpt/biz/questionBugStatusDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_status'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

48
src/views/xm/core/xmTestPlan/rpt/biz/questionBugTypeDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_type'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

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

@ -32,6 +32,9 @@ export default {
methods: { methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
}, },

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

@ -32,6 +32,9 @@ export default {
methods: { methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
}, },

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

@ -32,6 +32,9 @@ export default {
methods: { methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
}, },

48
src/views/xm/core/xmTestPlan/rpt/biz/questionPriorityDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'bug_type'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

48
src/views/xm/core/xmTestPlan/rpt/biz/questionRepRateDist.vue

@ -0,0 +1,48 @@
<template>
<section>
<el-row>
<question-att-dist :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'rep_rate'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>
<script>
import questionAttDist from './questionAttDist'
import { mapGetters } from 'vuex'
import dayjs from 'dayjs'
export default {
props:['xmTestPlan','compCfg'],
components: {questionAttDist},
computed: {
...mapGetters([
'userInfo'
]),
},
watch: {
},
data() {
return {
rptConfigVisible:false,
}
},
methods: {
sizeAutoChange(){
this.refs[this.compCfg.id].sizeAutoChange()
}
},
mounted() {
}
}
</script>
<style lang="scss" scoped>
</style>

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

@ -80,7 +80,7 @@
'userInfo','roles' 'userInfo','roles'
]), ]),
xmQuestionRetestsCpd(){
xmQuestionRetestDistsCpd(){
var def=[ var def=[
{name:"1次",value:0} , {name:"1次",value:0} ,
{name:"2次",value:0} , {name:"2次",value:0} ,
@ -89,11 +89,11 @@
{name:"5次",value:0} , {name:"5次",value:0} ,
{name:"5次以上",value:0} {name:"5次以上",value:0}
] ]
if(this.xmQuestionRetests.length==0){
if(this.xmQuestionRetestDists.length==0){
return def return def
}else{ }else{
var datas=[] var datas=[]
this.xmQuestionRetests.forEach(i=>{
this.xmQuestionRetestDists.forEach(i=>{
var data={} var data={}
if(i.retimes>5){ if(i.retimes>5){
data.name="5次以上" data.name="5次以上"
@ -186,7 +186,7 @@
{ {
type: 'pie', type: 'pie',
radius: '50%', radius: '50%',
data: this.xmQuestionRetestsCpd,
data: this.xmQuestionRetestDistsCpd,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -247,6 +247,7 @@
if(this.compCfg && this.compCfg.params){ if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params) Object.assign(this.filters,this.compCfg.params)
} }
this.drawCharts();
}, },
sizeAutoChange(){ sizeAutoChange(){
this.myChart.resize(); this.myChart.resize();

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

@ -63,7 +63,7 @@
}, },
watch: { watch: {
xmTestDayTimesListCpd(){
testDayTimesCpd(){
this.drawCharts(); this.drawCharts();
} }
}, },

2
src/views/xm/core/xmTestPlanCase/XmTestPlanCaseMng.vue

@ -103,7 +103,7 @@ export default {
components: { components: {
XmTestPlanCaseEdit,XmTestCaseSelect,XmFuncSelect,MdpSelectUserXm, XmTestPlanCaseEdit,XmTestCaseSelect,XmFuncSelect,MdpSelectUserXm,
}, },
props:['visible','xmTestPlan','xmTestCasedb','xmTestCase','xmProduct','select'],
props:['visible','xmTestPlan','xmTestCasedb','xmTestCase','xmProduct','xmProject','select'],
computed: { computed: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
xmProductCpd(){ xmProductCpd(){

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

@ -109,7 +109,7 @@
...mapGetters([ ...mapGetters([
'userInfo','roles' 'userInfo','roles'
]), ]),
xmQuestionRetestsCpd(){
xmQuestionRetestDistsCpd(){
var def=[ var def=[
{name:"1次",value:0} , {name:"1次",value:0} ,
{name:"2次",value:0} , {name:"2次",value:0} ,
@ -118,11 +118,11 @@
{name:"5次",value:0} , {name:"5次",value:0} ,
{name:"5次以上",value:0} {name:"5次以上",value:0}
] ]
if(this.xmQuestionRetests.length==0){
if(this.xmQuestionRetestDists.length==0){
return def return def
}else{ }else{
var datas=[] var datas=[]
this.xmQuestionRetests.forEach(i=>{
this.xmQuestionRetestDists.forEach(i=>{
var data={} var data={}
if(i.retimes>5){ if(i.retimes>5){
data.name="5次以上" data.name="5次以上"
@ -181,7 +181,7 @@
}, },
watch: { watch: {
xmQuestionRetestsCpd(){
xmQuestionRetestDistsCpd(){
this.drawCharts(); this.drawCharts();
} }
}, },
@ -207,7 +207,7 @@
dateRanger:[], dateRanger:[],
maxTableHeight:300, maxTableHeight:300,
visible:false, visible:false,
xmQuestionRetests:[],
xmQuestionRetestDists:[],
pageInfo: { pageInfo: {
// //
total: 0, //0>0 total: 0, //0>0
@ -263,7 +263,7 @@
{ {
type: 'pie', type: 'pie',
radius: '50%', radius: '50%',
data: this.xmQuestionRetestsCpd,
data: this.xmQuestionRetestDistsCpd,
emphasis: { emphasis: {
itemStyle: { itemStyle: {
shadowBlur: 10, shadowBlur: 10,
@ -282,7 +282,7 @@
) )
}, },
onXmQuestionSomeFieldsChange(fieldName,$event){ onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmQuestionRetests=[]
this.xmQuestionRetestDists=[]
}, },
searchXmQuestionRetestDist(){ searchXmQuestionRetestDist(){
if(!this.groupBy){ if(!this.groupBy){
@ -348,7 +348,7 @@
params.orderBy = orderBys.join(","); params.orderBy = orderBys.join(",");
} }
getXmQuestionRetestDist(params).then(res=>{ getXmQuestionRetestDist(params).then(res=>{
this.xmQuestionRetests=res.data.data
this.xmQuestionRetestDists=res.data.data
}) })
}, },

Loading…
Cancel
Save