Browse Source

优化

master
陈裕财 3 years ago
parent
commit
1ee7e2fcc1
  1. 26
      src/views/xm/rpt/product/menuAttDist.vue
  2. 8
      src/views/xm/rpt/product/menuSort.vue
  3. 32
      src/views/xm/rpt/product/questionAttDist.vue
  4. 4
      src/views/xm/rpt/product/questionRetestDist.vue
  5. 6
      src/views/xm/rpt/product/questionSort.vue
  6. 24
      src/views/xm/rpt/project/taskAttDist.vue
  7. 2
      src/views/xm/rpt/project/taskSort.vue
  8. 4
      src/views/xm/rpt/testCase/testCaseSort.vue

26
src/views/xm/rpt/product/menuAttDist.vue

@ -85,15 +85,15 @@
return [] return []
}else{ }else{
var itemId=""; var itemId="";
if(this.groupBy=='status'){
if(this.params.groupBy=='status'){
itemId="menuStatus" itemId="menuStatus"
}else if(this.groupBy=='dlvl'){
}else if(this.params.groupBy=='dlvl'){
itemId="demandLvl" itemId="demandLvl"
}else if(this.groupBy=='dtype'){
}else if(this.params.groupBy=='dtype'){
itemId="demandType" itemId="demandType"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
}else if(this.groupBy=='source'){
}else if(this.params.groupBy=='source'){
itemId="demandSource" itemId="demandSource"
} }
return this.xmMenuAttDists.map(i=>{ return this.xmMenuAttDists.map(i=>{
@ -105,15 +105,15 @@
}, },
legendCpd(){ legendCpd(){
var itemId=""; var itemId="";
if(this.groupBy=='status'){
if(this.params.groupBy=='status'){
itemId="menuStatus" itemId="menuStatus"
}else if(this.groupBy=='dlvl'){
}else if(this.params.groupBy=='dlvl'){
itemId="demandLvl" itemId="demandLvl"
}else if(this.groupBy=='dtype'){
}else if(this.params.groupBy=='dtype'){
itemId="demandType" itemId="demandType"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
}else if(this.groupBy=='source'){
}else if(this.params.groupBy=='source'){
itemId="demandSource" itemId="demandSource"
} }
@ -185,7 +185,6 @@
}, },
title:'',// title:'',//
remark:'', // remark:'', //
groupBys:[ groupBys:[
{id:'status', name:'需求状态'}, {id:'status', name:'需求状态'},
{id:'dtype', name:'需求类型'}, {id:'dtype', name:'需求类型'},
@ -336,11 +335,12 @@
this.xmMenuAttDists=[] this.xmMenuAttDists=[]
}, },
searchXmMenuAttDist(){ searchXmMenuAttDist(){
if(!this.groupBy){
var params={...this.params}
if(!params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }
var params={...this.params}
getXmMenuAttDist(params).then(res=>{ getXmMenuAttDist(params).then(res=>{
this.xmMenuAttDists=res.data.data this.xmMenuAttDists=res.data.data
}) })

8
src/views/xm/rpt/product/menuSort.vue

@ -110,7 +110,7 @@
preName=`项目【${this.filters.project.id}` preName=`项目【${this.filters.project.id}`
} }
} }
return preName+this.groupBys.find(i=>i.id==this.groupBy).name+'需求数量排行榜'
return preName+this.groupBys.find(i=>i.id==this.params.groupBy).name+'需求数量排行榜'
}, },
legendCpd(){ legendCpd(){
if(this.xmMenuSorts.length==0){ if(this.xmMenuSorts.length==0){
@ -180,7 +180,7 @@
open(){ open(){
this.visible=true; this.visible=true;
if(this.initGroupBy){ if(this.initGroupBy){
this.groupBy=this.initGroupBy
this.params.groupBy=this.initGroupBy
} }
this.filters.testPlan=this.xmTestPlan this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct this.filters.product=this.xmProduct
@ -269,7 +269,7 @@
this.xmMenuSorts=[] this.xmMenuSorts=[]
}, },
searchXmMenuSort(){ searchXmMenuSort(){
if(!this.groupBy){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }
@ -295,7 +295,7 @@
if(this.filters.priority){ if(this.filters.priority){
params.priority=this.filters.priority params.priority=this.filters.priority
} }
params.groupBy=this.groupBy
params.groupBy=this.params.groupBy
if(this.filters.product){ if(this.filters.product){
params.productId=this.filters.product.id params.productId=this.filters.product.id
} }

32
src/views/xm/rpt/product/questionAttDist.vue

@ -118,19 +118,19 @@
return [] return []
}else{ }else{
var itemId=""; var itemId="";
if(this.groupBy=='bug_status'){
if(this.params.groupBy=='bug_status'){
itemId="bugStatus" itemId="bugStatus"
}else if(this.groupBy=='bug_type'){
}else if(this.params.groupBy=='bug_type'){
itemId="bugType" itemId="bugType"
}else if(this.groupBy=='bug_reason'){
}else if(this.params.groupBy=='bug_reason'){
itemId="bugReason" itemId="bugReason"
}else if(this.groupBy=='bug_severity'){
}else if(this.params.groupBy=='bug_severity'){
itemId="bugSeverity" itemId="bugSeverity"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
} else if(this.groupBy=='solution'){
} else if(this.params.groupBy=='solution'){
itemId="bugSolution" itemId="bugSolution"
} else if(this.groupBy=='rep_rate'){
} else if(this.params.groupBy=='rep_rate'){
itemId="bugRepRate" itemId="bugRepRate"
} }
return this.xmQuestionAttDists.map(i=>{ return this.xmQuestionAttDists.map(i=>{
@ -152,19 +152,19 @@
}, },
legendCpd(){ legendCpd(){
var itemId=""; var itemId="";
if(this.groupBy=='bug_status'){
if(this.params.groupBy=='bug_status'){
itemId="bugStatus" itemId="bugStatus"
}else if(this.groupBy=='bug_type'){
}else if(this.params.groupBy=='bug_type'){
itemId="bugType" itemId="bugType"
}else if(this.groupBy=='bug_reason'){
}else if(this.params.groupBy=='bug_reason'){
itemId="bugReason" itemId="bugReason"
}else if(this.groupBy=='bug_severity'){
}else if(this.params.groupBy=='bug_severity'){
itemId="bugSeverity" itemId="bugSeverity"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
} else if(this.groupBy=='solution'){
} else if(this.params.groupBy=='solution'){
itemId="bugSolution" itemId="bugSolution"
} else if(this.groupBy=='rep_rate'){
} else if(this.params.groupBy=='rep_rate'){
itemId="bugRepRate" itemId="bugRepRate"
} }
@ -380,12 +380,12 @@
this.xmQuestionAttDists=[] this.xmQuestionAttDists=[]
}, },
searchXmQuestionAttDist(){ searchXmQuestionAttDist(){
if(!this.groupBy){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }
var params={...this.params} var params={...this.params}
params.groupBy=this.groupBy
params.groupBy=this.params.groupBy
getXmQuestionAttDist(params).then(res=>{ getXmQuestionAttDist(params).then(res=>{
this.xmQuestionAttDists=res.data.data this.xmQuestionAttDists=res.data.data
}) })

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

@ -345,7 +345,7 @@
this.xmQuestionRetestDists=[] this.xmQuestionRetestDists=[]
}, },
searchXmQuestionRetestDist(){ searchXmQuestionRetestDist(){
if(!this.groupBy){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }
@ -357,7 +357,7 @@
...this.params ...this.params
}; };
params.groupBy=this.groupBy
params.groupBy=this.params.groupBy
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&
this.pageInfo.orderFields.length > 0 this.pageInfo.orderFields.length > 0

6
src/views/xm/rpt/product/questionSort.vue

@ -254,7 +254,7 @@
this.title="企业工作项每日趋势图" this.title="企业工作项每日趋势图"
} }
if(this.initGroupBy){ if(this.initGroupBy){
this.groupBy=this.initGroupBy
this.params.groupBy=this.initGroupBy
} }
this.searchXmQuestionSort() this.searchXmQuestionSort()
}, },
@ -311,7 +311,7 @@
this.xmQuestionSorts=[] this.xmQuestionSorts=[]
}, },
searchXmQuestionSort(){ searchXmQuestionSort(){
if(!this.groupBy){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }
@ -323,7 +323,7 @@
...this.params ...this.params
}; };
params.groupBy=this.groupBy
params.groupBy=this.params.groupBy
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&

24
src/views/xm/rpt/project/taskAttDist.vue

@ -78,15 +78,15 @@
return [] return []
}else{ }else{
var itemId=""; var itemId="";
if(this.groupBy=='task_state'){
if(this.params.groupBy=='task_state'){
itemId="taskState" itemId="taskState"
}else if(this.groupBy=='settle_schemel'){
}else if(this.params.groupBy=='settle_schemel'){
itemId="xmTaskSettleSchemel" itemId="xmTaskSettleSchemel"
}else if(this.groupBy=='task_type'){
}else if(this.params.groupBy=='task_type'){
itemId="taskType" itemId="taskType"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
}else if(this.groupBy=='plan_type'){
}else if(this.params.groupBy=='plan_type'){
itemId="planType" itemId="planType"
} }
return this.xmTaskAttDists.map(i=>{ return this.xmTaskAttDists.map(i=>{
@ -129,19 +129,19 @@
} }
} }
return preName+this.groupBys.find(i=>i.id==this.groupBy).name+'数量分布'
return preName+this.groupBys.find(i=>i.id==this.params.groupBy).name+'数量分布'
}, },
legendCpd(){ legendCpd(){
var itemId=""; var itemId="";
if(this.groupBy=='task_state'){
if(this.params.groupBy=='task_state'){
itemId="taskState" itemId="taskState"
}else if(this.groupBy=='settle_schemel'){
}else if(this.params.groupBy=='settle_schemel'){
itemId="xmTaskSettleSchemel" itemId="xmTaskSettleSchemel"
}else if(this.groupBy=='task_type'){
}else if(this.params.groupBy=='task_type'){
itemId="taskType" itemId="taskType"
}else if(this.groupBy=='priority'){
}else if(this.params.groupBy=='priority'){
itemId="priority" itemId="priority"
}else if(this.groupBy=='plan_type'){
}else if(this.params.groupBy=='plan_type'){
itemId="planType" itemId="planType"
} }
@ -317,7 +317,7 @@
this.xmTaskAttDists=[] this.xmTaskAttDists=[]
}, },
searchXmTaskAttDist(){ searchXmTaskAttDist(){
if(!this.groupBy){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'}) this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return return
} }

2
src/views/xm/rpt/project/taskSort.vue

@ -102,7 +102,7 @@
} }
} }
return preName+this.groupBys.find(i=>i.id==this.groupBy).name+'任务数量排行榜'
return preName+this.groupBys.find(i=>i.id==this.params.groupBy).name+'任务数量排行榜'
}, },
legendCpd(){ legendCpd(){
if(this.xmTaskSorts.length==0){ if(this.xmTaskSorts.length==0){

4
src/views/xm/rpt/testCase/testCaseSort.vue

@ -122,7 +122,7 @@
preName=`项目【${this.filters.project.id}` preName=`项目【${this.filters.project.id}`
} }
} }
return preName+ this.groupBys.find(i=>i.id==this.groupBy).name+'测试用例数量排行榜'
return preName+ this.groupBys.find(i=>i.id==this.params.groupBy).name+'测试用例数量排行榜'
}, },
xmProductCpd(){ xmProductCpd(){
if(this.xmIteration && this.xmIteration.id && this.xmIteration.productId){ if(this.xmIteration && this.xmIteration.id && this.xmIteration.productId){
@ -289,7 +289,7 @@
open(){ open(){
this.visible=true; this.visible=true;
if(this.initGroupBy){ if(this.initGroupBy){
this.groupBy=this.initGroupBy
this.params.groupBy=this.initGroupBy
} }
this.filters.testPlan=this.xmTestPlan this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct this.filters.product=this.xmProduct

Loading…
Cancel
Save