Browse Source

优化

master
陈裕财 3 years ago
parent
commit
9770f733c8
  1. 24
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 6
      src/views/xm/core/xmTestPlan/rpt/CompsSet.vue
  3. 6
      src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue
  4. 2
      src/views/xm/core/xmTestPlan/rpt/biz/questionSolutionDist.vue
  5. 3
      src/views/xm/core/xmTestPlan/xmTestRptOverview.vue

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

@ -29,7 +29,7 @@
:h="item.h" :h="item.h"
:i="item.i" :i="item.i"
:key="index" @resize="sizeAutoChange(item)"> :key="index" @resize="sizeAutoChange(item)">
<component :is="item.compId" :xm-test-plan="xmTestPlan" :comp-cfg="item" :ref="item.id" @delete="doDelete"></component>
<component :is="item.compId" :xm-test-plan="xmTestPlan" :comp-cfg="item" :ref="item.id" @delete="doDelete" :id="item.id+'-id'"></component>
</grid-item> </grid-item>
</grid-layout> </grid-layout>
</div> </div>
@ -94,6 +94,7 @@ export default {
"xmQuestionBugTypeDist":()=>import("./biz/questionBugTypeDist.vue"), "xmQuestionBugTypeDist":()=>import("./biz/questionBugTypeDist.vue"),
"xmQuestionRepRateDist":()=>import("./biz/questionRepRateDist.vue"), "xmQuestionRepRateDist":()=>import("./biz/questionRepRateDist.vue"),
"xmQuestionBugSeverityDist":()=>import("./biz/questionBugSeverityDist.vue"), "xmQuestionBugSeverityDist":()=>import("./biz/questionBugSeverityDist.vue"),
"xmQuestionSolutionDist":()=>import("./biz/questionSolutionDist.vue"),
"xmQuestionPriorityDist":()=>import("./biz/questionPriorityDist.vue"), "xmQuestionPriorityDist":()=>import("./biz/questionPriorityDist.vue"),
}, },
@ -122,7 +123,7 @@ export default {
}) })
} }
}
},
}, },
data() { data() {
@ -176,6 +177,13 @@ export default {
} }
}, },
onCompSelect(comp){ onCompSelect(comp){
if(this.compCfgList.some(k=>k.compId==comp.compId)){
var compCfg=this.compCfgList.find(k=>k.compId==comp.compId)
this.$nextTick(()=>{
this.scrollToComp(compCfg)
})
return;
}
var compCfgListTemp=JSON.parse(JSON.stringify(this.compCfgList)) var compCfgListTemp=JSON.parse(JSON.stringify(this.compCfgList))
compCfgListTemp.sort((i1,i2)=>{ compCfgListTemp.sort((i1,i2)=>{
return i2.i-i1.i return i2.i-i1.i
@ -187,6 +195,18 @@ export default {
var maxY=(compCfgListTemp.length>0?(compCfgListTemp[0].y+6):0); var maxY=(compCfgListTemp.length>0?(compCfgListTemp[0].y+6):0);
var compCfg={i:maxI, x: 0, y: maxY, w: 12, h: 6, compId:comp.compId,name:comp.name,id:comp.compId+seq.sn(),params:{}} var compCfg={i:maxI, x: 0, y: maxY, w: 12, h: 6, compId:comp.compId,name:comp.name,id:comp.compId+seq.sn(),params:{}}
this.compCfgList.push(compCfg) this.compCfgList.push(compCfg)
this.$nextTick(()=>{
setTimeout(()=>{
this.scrollToComp(compCfg)
},100)
})
},
scrollToComp(compCfg){
var doc=document.getElementById(compCfg.id+'-id')
if(doc){
doc.scrollIntoView(false)
}
}, },
submitXmPrtConfig(callback){ submitXmPrtConfig(callback){

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

@ -154,12 +154,12 @@ export default {
{ {
compId: 'xmQuestionRepRateDist', compId: 'xmQuestionRepRateDist',
icon: pieSimple, icon: pieSimple,
name: '缺陷重频率分布',
compDesc: '按缺陷现频率进行分组统计',
name: '缺陷重频率分布',
compDesc: '按缺陷现频率进行分组统计',
isChecked: false, isChecked: false,
}, },
{ {
compId: 'xmQuestionBugSolutionDist',
compId: 'xmQuestionSolutionDist',
icon: pieSimple, icon: pieSimple,
name: '缺陷解决方案分布', name: '缺陷解决方案分布',
compDesc: '按缺陷解决方案进行分组统计', compDesc: '按缺陷解决方案进行分组统计',

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

@ -101,7 +101,7 @@
itemId="bugSeverity" itemId="bugSeverity"
}else if(this.filters.groupBy=='priority'){ }else if(this.filters.groupBy=='priority'){
itemId="priority" itemId="priority"
} else if(this.filters.groupBy=='bug_solution'){
} else if(this.filters.groupBy=='solution'){
itemId="bugSolution" itemId="bugSolution"
} else if(this.filters.groupBy=='rep_rate'){ } else if(this.filters.groupBy=='rep_rate'){
itemId="bugRepRate" itemId="bugRepRate"
@ -128,7 +128,7 @@
itemId="bugSeverity" itemId="bugSeverity"
}else if(this.filters.groupBy=='priority'){ }else if(this.filters.groupBy=='priority'){
itemId="priority" itemId="priority"
} else if(this.filters.groupBy=='bug_solution'){
} else if(this.filters.groupBy=='solution'){
itemId="bugSolution" itemId="bugSolution"
} else if(this.filters.groupBy=='rep_rate'){ } else if(this.filters.groupBy=='rep_rate'){
itemId="bugRepRate" itemId="bugRepRate"
@ -167,7 +167,7 @@
{id:'bug_reason', name:'缺陷原因'}, {id:'bug_reason', name:'缺陷原因'},
{id:'bug_severity', name:'紧急程度'}, {id:'bug_severity', name:'紧急程度'},
{id:'priority', name:'优先级'}, {id:'priority', name:'优先级'},
{id:'bug_solution', name:'解决方案'},
{id:'solution', name:'解决方案'},
{id:'rep_rate', name:'复现频率'}, {id:'rep_rate', name:'复现频率'},
], ],

src/views/xm/core/xmTestPlan/rpt/biz/questionBugSolutionDist.vue → src/views/xm/core/xmTestPlan/rpt/biz/questionSolutionDist.vue

3
src/views/xm/core/xmTestPlan/xmTestRptOverview.vue

@ -248,6 +248,9 @@ import MdpSelectUserXm from '@/views/xm/core/components/MdpSelectUserXm';//修
this.editForm.projectName=row.name this.editForm.projectName=row.name
this.editForm.name=this.editForm.projectName+'-测试计划-V1.0' this.editForm.name=this.editForm.projectName+'-测试计划-V1.0'
}, },
sizeAutoChange(){
}
},//end method },//end method
mounted() { mounted() {
this.$nextTick(() => { this.$nextTick(() => {

Loading…
Cancel
Save