Browse Source

优化测试查询条件

master
陈裕财 3 years ago
parent
commit
7af9172518
  1. 22
      src/views/xm/rpt/product/questionAgeDist.vue
  2. 22
      src/views/xm/rpt/product/questionAttDist.vue
  3. 26
      src/views/xm/rpt/product/questionRetestDist.vue
  4. 23
      src/views/xm/rpt/product/questionSort.vue

22
src/views/xm/rpt/product/questionAgeDist.vue

@ -12,7 +12,7 @@
<el-col :span="6" class="border"> <el-col :span="6" class="border">
<el-form :model="filters" class="padding"> <el-form :model="filters" class="padding">
<el-form-item label="归属项目"> <el-form-item label="归属项目">
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd.id?xmProductCpd.id.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd?xmProductCpd.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span> <span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span>
</el-form-item> </el-form-item>
<el-form-item label="归属产品" > <el-form-item label="归属产品" >
@ -81,13 +81,14 @@
import { getXmQuestionAgeDist } from '@/api/xm/core/xmQuestion'; import { getXmQuestionAgeDist } from '@/api/xm/core/xmQuestion';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';// import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';// import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
export default { export default {
components: { components: {
XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,
}, },
props:['xmProduct','xmIteration','xmProject'], props:['xmProduct','xmIteration','xmProject'],
computed: { computed: {
@ -227,18 +228,29 @@
if(this.filters.priority){ if(this.filters.priority){
params.priority=this.filters.priority params.priority=this.filters.priority
} }
params.groupBy=this.groupBy
if(this.filters.project){
params.projectId=this.filters.project.id
}
if(this.filters.product){ if(this.filters.product){
params.productId=this.filters.product.id params.productId=this.filters.product.id
}
}
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
params.groupBy=this.groupBy
getXmQuestionAgeDist(params).then(res=>{ getXmQuestionAgeDist(params).then(res=>{
this.xmQuestionAgeDists=res.data.data this.xmQuestionAgeDists=res.data.data
}) })
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
}, },
onProductSelected(product){ onProductSelected(product){
this.filters.product=product this.filters.product=product

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

@ -17,7 +17,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="归属项目"> <el-form-item label="归属项目">
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd.id?xmProductCpd.id.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd?xmProductCpd.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span> <span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span>
</el-form-item> </el-form-item>
<el-form-item label="归属产品" > <el-form-item label="归属产品" >
@ -85,13 +85,14 @@
import { getXmQuestionAttDist } from '@/api/xm/core/xmQuestion'; import { getXmQuestionAttDist } from '@/api/xm/core/xmQuestion';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';// import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';// import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
export default { export default {
components: { components: {
XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,
}, },
props:['xmProduct','xmIteration','xmProject'], props:['xmProduct','xmIteration','xmProject'],
computed: { computed: {
@ -300,18 +301,29 @@
if(this.filters.priority){ if(this.filters.priority){
params.priority=this.filters.priority params.priority=this.filters.priority
} }
params.groupBy=this.groupBy
if(this.filters.project){
params.projectId=this.filters.project.id
}
if(this.filters.product){ if(this.filters.product){
params.productId=this.filters.product.id params.productId=this.filters.product.id
}
}
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
params.groupBy=this.groupBy
getXmQuestionAttDist(params).then(res=>{ getXmQuestionAttDist(params).then(res=>{
this.xmQuestionAttDists=res.data.data this.xmQuestionAttDists=res.data.data
}) })
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
}, },
onProductSelected(product){ onProductSelected(product){
this.filters.product=product this.filters.product=product

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

@ -12,7 +12,7 @@
<el-col :span="6" class="border"> <el-col :span="6" class="border">
<el-form :model="filters" class="padding"> <el-form :model="filters" class="padding">
<el-form-item label="归属项目"> <el-form-item label="归属项目">
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd.id?xmProductCpd.id.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd?xmProductCpd.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span> <span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span>
</el-form-item> </el-form-item>
<el-form-item label="归属产品" > <el-form-item label="归属产品" >
@ -80,13 +80,14 @@
import { getXmQuestionRetestDist } from '@/api/xm/core/xmQuestion'; import { getXmQuestionRetestDist } from '@/api/xm/core/xmQuestion';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';// import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';// import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
export default { export default {
components: { components: {
XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,
}, },
props:['xmProduct','xmIteration','xmProject'], props:['xmProduct','xmIteration','xmProject'],
computed: { computed: {
@ -270,16 +271,17 @@
if(this.filters.priority){ if(this.filters.priority){
params.priority=this.filters.priority params.priority=this.filters.priority
} }
params.groupBy=this.groupBy
if(this.filters.project){
params.projectId=this.filters.project.id
}
if(this.filters.product){ if(this.filters.product){
params.productId=this.filters.product.id params.productId=this.filters.product.id
}
}
if(this.filters.iteration){ if(this.filters.iteration){
params.iterationId=this.filters.iteration.id
params.linkIterationId=this.filters.iteration.id
} }
params.groupBy=this.groupBy
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&
this.pageInfo.orderFields.length > 0 this.pageInfo.orderFields.length > 0
@ -296,6 +298,14 @@
this.xmQuestionRetests=res.data.data this.xmQuestionRetests=res.data.data
}) })
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
}, },
onProductSelected(product){ onProductSelected(product){
this.filters.product=product this.filters.product=product

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

@ -18,7 +18,7 @@
</el-form-item> </el-form-item>
<el-form-item label="归属项目"> <el-form-item label="归属项目">
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd.id?xmProductCpd.id.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<xm-project-select v-if="!xmProject" ref="xmProjectSelect" style="display:inline;" :auto-select="false" :link-product-id="xmProductCpd?xmProductCpd.id:null" @row-click="onProjectSelected" @clear="onProjectClear"></xm-project-select>
<span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span> <span v-else>{{xmProject.id}} <span v-if="xmProject.name"><br/>{{ xmProject.name }} </span> </span>
</el-form-item> </el-form-item>
<el-form-item label="归属产品" > <el-form-item label="归属产品" >
@ -86,13 +86,14 @@
import { getXmQuestionSort } from '@/api/xm/core/xmQuestion'; import { getXmQuestionSort } from '@/api/xm/core/xmQuestion';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';// import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';// import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
export default { export default {
components: { components: {
XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,
}, },
props:['xmProduct','xmIteration','xmProject','initGroupBy'], props:['xmProduct','xmIteration','xmProject','initGroupBy'],
computed: { computed: {
@ -241,16 +242,20 @@
if(this.filters.priority){ if(this.filters.priority){
params.priority=this.filters.priority params.priority=this.filters.priority
} }
params.groupBy=this.groupBy
if(this.filters.project){
params.projectId=this.filters.project.id
}
if(this.filters.product){ if(this.filters.product){
params.productId=this.filters.product.id params.productId=this.filters.product.id
}
}
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
params.groupBy=this.groupBy
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&
this.pageInfo.orderFields.length > 0 this.pageInfo.orderFields.length > 0
@ -267,6 +272,14 @@
this.xmQuestionSorts=res.data.data this.xmQuestionSorts=res.data.data
}) })
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
}, },
onProductSelected(product){ onProductSelected(product){
this.filters.product=product this.filters.product=product

Loading…
Cancel
Save