Browse Source

优化

master
陈裕财 3 years ago
parent
commit
1bb212763a
  1. 14
      src/views/xm/core/xmTestPlan/rpt/CompsCard.vue
  2. 14
      src/views/xm/core/xmTestPlan/rpt/biz/questionAgeDist.vue
  3. 2
      src/views/xm/core/xmTestPlan/rpt/biz/questionAskUserSort.vue
  4. 10
      src/views/xm/core/xmTestPlan/rpt/biz/questionAttDist.vue
  5. 2
      src/views/xm/core/xmTestPlan/rpt/biz/questionFuncSort.vue
  6. 2
      src/views/xm/core/xmTestPlan/rpt/biz/questionHandlerUserSort.vue
  7. 2
      src/views/xm/core/xmTestPlan/rpt/biz/questionMenuSort.vue
  8. 9
      src/views/xm/core/xmTestPlan/rpt/biz/questionSort.vue
  9. 10
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseExecStatusDist.vue
  10. 10
      src/views/xm/core/xmTestPlan/rpt/biz/testPlanCaseUserDist.vue

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

@ -152,11 +152,17 @@ export default {
this.compCfgList.push(compCfg)
},
submitXmPrtConfig(callback){
debugger;
if(this.xmRptConfig==null){
var xmRptConfig={name:this.xmTestPlan.name,bizId:this.xmTestPlan.id,cfg:[]}
var compCfgList=JSON.parse(JSON.stringify(this.compCfgList))
compCfgList.forEach(k=>{
k.params=this.$refs[k.id].filters
if(this.$refs[k.id] && this.$refs[k.id][0].$refs && this.$refs[k.id][0].$refs[k.id]){
k.params=this.$refs[k.id][0].$refs[k.id].filters
}else{
k.params=this.$refs[k.id][0].filters
}
})
xmRptConfig.cfg=JSON.stringify(compCfgList)
addXmRptConfig(xmRptConfig).then(res=>{
@ -167,7 +173,11 @@ export default {
var xmRptConfig={id:this.xmRptConfig.id,name:this.xmTestPlan.name,bizId:this.xmTestPlan.id,cfg:[]}
var compCfgList=JSON.parse(JSON.stringify(this.compCfgList))
compCfgList.forEach(k=>{
k.params=this.$refs[k.id].filters
if(this.$refs[k.id] && this.$refs[k.id][0].$refs && this.$refs[k.id][0].$refs[k.id]){
k.params=this.$refs[k.id][0].$refs[k.id].filters
}else{
k.params=this.$refs[k.id][0].filters
}
})
xmRptConfig.cfg=JSON.stringify(compCfgList)
editXmRptConfig(xmRptConfig).then(res=>{

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

@ -108,7 +108,7 @@
}
},
watch: {
watch: {
xmQuestionAgeDistsCpd(){
this.drawCharts();
}
@ -212,17 +212,15 @@
this.filters.iteration=null
},
initData(){
debugger;
if(this.xmTestPlan){
this.filters.productId=this.xmTestPlan.productId
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){
Object.assign(this.filters,compCfg.params)
}
}
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
}
},//end method
mounted() {

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

@ -1,7 +1,7 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'ask_userid'" @delete="$emit('delete',$event)"/>
<question-sort :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'ask_userid'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>

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

@ -287,12 +287,10 @@
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){
Object.assign(this.filters,compCfg.params)
}
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)

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

@ -1,7 +1,7 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'func_id'" @delete="$emit('delete',$event)"/>
<question-sort :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'func_id'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>

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

@ -1,7 +1,7 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'handler_userid'" @delete="$emit('delete',$event)"/>
<question-sort :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'handler_userid'" @delete="$emit('delete',$event)"/>
</el-row>
</section>
</template>

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

@ -1,7 +1,7 @@
<template>
<section>
<el-row>
<question-sort ref="questionSort" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'menu_id'" @delete="$emit('delete',$event)" />
<question-sort :ref="compCfg.id" :xm-test-plan="xmTestPlan" :comp-cfg="compCfg" :rpt-config-visible="rptConfigVisible" :group-by="'menu_id'" @delete="$emit('delete',$event)" />
</el-row>
</section>
</template>

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

@ -225,11 +225,10 @@
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.compCfg && this.compCfg.id){
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,compCfg.params)
}
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)

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

@ -171,12 +171,10 @@
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){
Object.assign(this.filters,compCfg.params)
}
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)

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

@ -165,12 +165,10 @@
this.filters.projectId=this.xmTestPlan.projectId
this.filters.planId=this.xmTestPlan.id
}
if(this.xmRptConfig && this.xmRptConfig.cfg){
var compCfg=this.xmRptConfig.cfg.find(k=>k.id==this.compCfg.id)
if(compCfg && compCfg.params){
Object.assign(this.filters,compCfg.params)
}
}
if(this.compCfg && this.compCfg.params){
Object.assign(this.filters,this.compCfg.params)
}
},
doDelete(){
this.$emit("delete",this.compCfg)

Loading…
Cancel
Save