Browse Source

优化

master
陈裕财 3 years ago
parent
commit
bfcc472588
  1. 45
      src/views/xm/rpt/product/menuSort.vue
  2. 5
      src/views/xm/rpt/product/questionAttDist.vue
  3. 11
      src/views/xm/rpt/product/questionRetestDist.vue
  4. 10
      src/views/xm/rpt/product/questionSort.vue
  5. 5
      src/views/xm/rpt/project/taskAttDist.vue

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

@ -146,7 +146,7 @@
testCasedb:null, testCasedb:null,
}, },
params:{ params:{
groupBy:'mm_userid'
}, },
title:'',// title:'',//
remark:'', // remark:'', //
@ -269,10 +269,6 @@
this.xmMenuSorts=[] this.xmMenuSorts=[]
}, },
searchXmMenuSort(){ searchXmMenuSort(){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
let params = { let params = {
pageSize: this.pageInfo.pageSize, pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum, pageNum: this.pageInfo.pageNum,
@ -280,42 +276,9 @@
count: this.pageInfo.count, count: this.pageInfo.count,
...this.params ...this.params
}; };
if(this.filters.dtype){
params.dtype=this.filters.dtype
}
if(this.filters.status){
params.status=this.filters.status
}
if(this.filters.source){
params.source=this.filters.source
}
if(this.filters.dlvl){
params.dlvl=this.filters.dlvl
}
if(this.filters.priority){
params.priority=this.filters.priority
}
params.groupBy=this.params.groupBy
if(this.filters.product){
params.productId=this.filters.product.id
}
if(this.filters.iteration){
params.iterationId=this.filters.iteration.id
}
if (
this.pageInfo.orderFields != null &&
this.pageInfo.orderFields.length > 0
) {
let orderBys = [];
for (var i = 0; i < this.pageInfo.orderFields.length; i++) {
orderBys.push(
this.pageInfo.orderFields[i] + " " + this.pageInfo.orderDirs[i]
);
}
params.orderBy = orderBys.join(",");
if(!params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
} }
getXmMenuSort(params).then(res=>{ getXmMenuSort(params).then(res=>{
this.xmMenuSorts=res.data.data this.xmMenuSorts=res.data.data

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

@ -380,12 +380,11 @@
this.xmQuestionAttDists=[] this.xmQuestionAttDists=[]
}, },
searchXmQuestionAttDist(){ searchXmQuestionAttDist(){
if(!this.params.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}
params.groupBy=this.params.groupBy
getXmQuestionAttDist(params).then(res=>{ getXmQuestionAttDist(params).then(res=>{
this.xmQuestionAttDists=res.data.data this.xmQuestionAttDists=res.data.data
}) })

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

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

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

@ -311,10 +311,6 @@
this.xmQuestionSorts=[] this.xmQuestionSorts=[]
}, },
searchXmQuestionSort(){ searchXmQuestionSort(){
if(!this.params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
let params = { let params = {
pageSize: this.pageInfo.pageSize, pageSize: this.pageInfo.pageSize,
pageNum: this.pageInfo.pageNum, pageNum: this.pageInfo.pageNum,
@ -322,8 +318,10 @@
count: this.pageInfo.count, count: this.pageInfo.count,
...this.params ...this.params
}; };
params.groupBy=this.params.groupBy
if(!params.groupBy){
this.$notify({position:'bottom-left',showClose:true,message:'请选中分组属性',type:'warning'})
return
}
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&

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

@ -317,11 +317,12 @@
this.xmTaskAttDists=[] this.xmTaskAttDists=[]
}, },
searchXmTaskAttDist(){ searchXmTaskAttDist(){
if(!this.params.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}
params.ntype='0' params.ntype='0'
getXmTaskAttDist(params).then(res=>{ getXmTaskAttDist(params).then(res=>{
this.xmTaskAttDists=res.data.data this.xmTaskAttDists=res.data.data

Loading…
Cancel
Save