Browse Source

查询条件优化

master
陈裕财 3 years ago
parent
commit
ae64aada20
  1. 40
      src/views/xm/rpt/product/questionAgeDist.vue
  2. 40
      src/views/xm/rpt/product/questionAttDist.vue
  3. 42
      src/views/xm/rpt/product/questionRetestDist.vue
  4. 40
      src/views/xm/rpt/product/questionSort.vue

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

@ -31,6 +31,16 @@
<el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id"> <el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id">
<xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select> <xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select>
</el-form-item> </el-form-item>
<el-form-item label="测试计划" v-if="xmTestPlan && xmTestPlan.id">
<span> {{xmTestPlan.id}}
<span v-if="xmTestPlan.name"><br/>{{ xmTestPlan.name }} </span>
</span>
</el-form-item>
<el-form-item label="测试计划" v-else-if="filters.product && filters.product.id">
<span v-if="filters.testPlan">{{ filters.testPlan.name }}</span>
<el-button v-if="filters.testPlan" type="text" @click="filters.testPlan=null" plain icon="el-icon-circle-close">清除</el-button>
<el-button v-if="!filters.testPlan" type="text" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
</el-form-item>
<el-form-item label="缺陷状态" prop="bugStatus"> <el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable> <el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option> <el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -74,6 +84,8 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<xm-test-plan-select ref="xmTestPlanSelectRef" :casedb-id="xmTestCasedb?xmTestCasedb.id:null" :product-id="xmProduct?xmProduct.id:null" :project-id="xmProject?xmProject.id:null" placeholder="迭代" @select="onXmTestPlanSelected" @clear="onXmTestPlanClear"></xm-test-plan-select >
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -88,11 +100,12 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';// 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';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default { export default {
components: { components: {
XmProjectSelect,XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,xmTestPlanSelect,
}, },
props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan',], props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan',],
computed: { computed: {
@ -147,6 +160,7 @@
filters:{ filters:{
product:null, product:null,
iteration:null, iteration:null,
testPlan:null,
}, },
dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]} dicts:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//... load:{ list: false, edit: false, del: false, add: false },//...
@ -160,9 +174,11 @@
methods: { methods: {
open(params){ open(params){
this.visible=true; this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.iteration=params.xmIteration
this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct
this.filters.project=this.xmProject
this.filters.iteration=this.xmIteration
this.filters.testCasedb=this.xmTestCasedb
if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){ if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){
this.searchXmQuestionAgeDist() this.searchXmQuestionAgeDist()
} }
@ -242,6 +258,12 @@
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
if(this.filters.testPlan && this.filters.testPlan.id){
params.planId=this.filters.testPlan.id
}
if(this.filters.testCasedb && this.filters.testCasedb.id){
params.casedbId=this.filters.testCasedb.id
}
params.groupBy=this.groupBy params.groupBy=this.groupBy
getXmQuestionAgeDist(params).then(res=>{ getXmQuestionAgeDist(params).then(res=>{
this.xmQuestionAgeDists=res.data.data this.xmQuestionAgeDists=res.data.data
@ -271,7 +293,15 @@
onIterationClear(){ onIterationClear(){
this.filters.iteration=null this.filters.iteration=null
}
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},
onXmTestPlanClear(){
this.filters.testPlan=null
},
},//end method },//end method
mounted() { mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{ initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{

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

@ -36,6 +36,16 @@
<el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id"> <el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id">
<xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select> <xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select>
</el-form-item> </el-form-item>
<el-form-item label="测试计划" v-if="xmTestPlan && xmTestPlan.id">
<span> {{xmTestPlan.id}}
<span v-if="xmTestPlan.name"><br/>{{ xmTestPlan.name }} </span>
</span>
</el-form-item>
<el-form-item label="测试计划" v-else-if="filters.product && filters.product.id">
<span v-if="filters.testPlan">{{ filters.testPlan.name }}</span>
<el-button v-if="filters.testPlan" type="text" @click="filters.testPlan=null" plain icon="el-icon-circle-close">清除</el-button>
<el-button v-if="!filters.testPlan" type="text" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
</el-form-item>
<el-form-item label="缺陷状态" prop="bugStatus"> <el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable> <el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option> <el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -78,6 +88,8 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<xm-test-plan-select ref="xmTestPlanSelectRef" :casedb-id="xmTestCasedb?xmTestCasedb.id:null" :product-id="xmProduct?xmProduct.id:null" :project-id="xmProject?xmProject.id:null" placeholder="迭代" @select="onXmTestPlanSelected" @clear="onXmTestPlanClear"></xm-test-plan-select >
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -92,11 +104,12 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';// 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';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default { export default {
components: { components: {
XmProjectSelect,XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,xmTestPlanSelect,
}, },
props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan',], props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan',],
computed: { computed: {
@ -183,6 +196,7 @@
filters:{ filters:{
product:null, product:null,
iteration:null, iteration:null,
testPlan:null,
}, },
groupBy:'bug_status', groupBy:'bug_status',
groupBys:[ groupBys:[
@ -229,9 +243,11 @@
}, },
open(params){ open(params){
this.visible=true; this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.iteration=params.xmIteration
this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct
this.filters.project=this.xmProject
this.filters.iteration=this.xmIteration
this.filters.testCasedb=this.xmTestCasedb
if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){ if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){
this.searchXmQuestionAttDist() this.searchXmQuestionAttDist()
@ -315,6 +331,12 @@
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
if(this.filters.testPlan && this.filters.testPlan.id){
params.planId=this.filters.testPlan.id
}
if(this.filters.testCasedb && this.filters.testCasedb.id){
params.casedbId=this.filters.testCasedb.id
}
params.groupBy=this.groupBy params.groupBy=this.groupBy
getXmQuestionAttDist(params).then(res=>{ getXmQuestionAttDist(params).then(res=>{
this.xmQuestionAttDists=res.data.data this.xmQuestionAttDists=res.data.data
@ -344,7 +366,15 @@
onIterationClear(){ onIterationClear(){
this.filters.iteration=null this.filters.iteration=null
}
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},
onXmTestPlanClear(){
this.filters.testPlan=null
},
},//end method },//end method
mounted() { mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{ initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{

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

@ -31,6 +31,16 @@
<el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id"> <el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id">
<xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select> <xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select>
</el-form-item> </el-form-item>
<el-form-item label="测试计划" v-if="xmTestPlan && xmTestPlan.id">
<span> {{xmTestPlan.id}}
<span v-if="xmTestPlan.name"><br/>{{ xmTestPlan.name }} </span>
</span>
</el-form-item>
<el-form-item label="测试计划" v-else-if="filters.product && filters.product.id">
<span v-if="filters.testPlan">{{ filters.testPlan.name }}</span>
<el-button v-if="filters.testPlan" type="text" @click="filters.testPlan=null" plain icon="el-icon-circle-close">清除</el-button>
<el-button v-if="!filters.testPlan" type="text" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
</el-form-item>
<el-form-item label="缺陷状态" prop="bugStatus"> <el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable> <el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option> <el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -73,6 +83,8 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<xm-test-plan-select ref="xmTestPlanSelectRef" :casedb-id="xmTestCasedb?xmTestCasedb.id:null" :product-id="xmProduct?xmProduct.id:null" :project-id="xmProject?xmProject.id:null" placeholder="迭代" @select="onXmTestPlanSelected" @clear="onXmTestPlanClear"></xm-test-plan-select >
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -87,11 +99,12 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';// 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';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default { export default {
components: { components: {
XmProjectSelect,XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,xmTestPlanSelect,
}, },
props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan'], props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan'],
computed: { computed: {
@ -164,6 +177,7 @@
filters:{ filters:{
product:null, product:null,
iteration:null, iteration:null,
testPlan:null,
}, },
groupBy:'handler_userid', groupBy:'handler_userid',
groupBys:[ groupBys:[
@ -194,9 +208,11 @@
methods: { methods: {
open(params){ open(params){
this.visible=true; this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.iteration=params.xmIteration
this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct
this.filters.project=this.xmProject
this.filters.iteration=this.xmIteration
this.filters.testCasedb=this.xmTestCasedb
if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){ if((this.filters.product && this.filters.product.id) || ( this.filters.iteration && this.filters.iteration.id)){
this.searchXmQuestionRetestDist() this.searchXmQuestionRetestDist()
@ -285,6 +301,14 @@
if(this.filters.iteration){ if(this.filters.iteration){
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
if(this.filters.testPlan && this.filters.testPlan.id){
params.planId=this.filters.testPlan.id
}
if(this.filters.testCasedb && this.filters.testCasedb.id){
params.casedbId=this.filters.testCasedb.id
}
params.groupBy=this.groupBy params.groupBy=this.groupBy
if ( if (
this.pageInfo.orderFields != null && this.pageInfo.orderFields != null &&
@ -326,7 +350,15 @@
onIterationClear(){ onIterationClear(){
this.filters.iteration=null this.filters.iteration=null
}
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},
onXmTestPlanClear(){
this.filters.testPlan=null
},
},//end method },//end method
mounted() { mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{ initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{

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

@ -37,6 +37,16 @@
<el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id"> <el-form-item label="归属迭代" v-else-if="filters.product && filters.product.id">
<xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select> <xm-iteration-select ref="xmIterationSelect" :auto-select="false" :product-id="filters.product?filters.product.id:null" :link-project-id="xmProject?xmProject.id:null" placeholder="迭代" @row-click="onIterationSelected" @clear="onIterationClear"></xm-iteration-select>
</el-form-item> </el-form-item>
<el-form-item label="测试计划" v-if="xmTestPlan && xmTestPlan.id">
<span> {{xmTestPlan.id}}
<span v-if="xmTestPlan.name"><br/>{{ xmTestPlan.name }} </span>
</span>
</el-form-item>
<el-form-item label="测试计划" v-else-if="filters.product && filters.product.id">
<span v-if="filters.testPlan">{{ filters.testPlan.name }}</span>
<el-button v-if="filters.testPlan" type="text" @click="filters.testPlan=null" plain icon="el-icon-circle-close">清除</el-button>
<el-button v-if="!filters.testPlan" type="text" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
</el-form-item>
<el-form-item label="缺陷状态" prop="bugStatus"> <el-form-item label="缺陷状态" prop="bugStatus">
<el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable> <el-select v-model="filters.bugStatus" @change="onXmQuestionSomeFieldsChange('bugStatus',$event)" clearable>
<el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option> <el-option v-for="i in this.dicts.bugStatus" :label="i.name" :key="i.id" :value="i.id"></el-option>
@ -79,6 +89,8 @@
</el-form> </el-form>
</el-col> </el-col>
</el-row> </el-row>
<xm-test-plan-select ref="xmTestPlanSelectRef" :casedb-id="xmTestCasedb?xmTestCasedb.id:null" :product-id="xmProduct?xmProduct.id:null" :project-id="xmProject?xmProject.id:null" placeholder="迭代" @select="onXmTestPlanSelected" @clear="onXmTestPlanClear"></xm-test-plan-select >
</el-dialog> </el-dialog>
</section> </section>
</template> </template>
@ -93,11 +105,12 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';// 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';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default { export default {
components: { components: {
XmProjectSelect,XmIterationSelect,XmProductSelect,
XmProjectSelect,XmIterationSelect,XmProductSelect,xmTestPlanSelect,
}, },
props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan','initGroupBy'], props:['xmProject','xmProduct','xmIteration','xmTestCasedb','xmTestPlan','initGroupBy'],
computed: { computed: {
@ -150,6 +163,7 @@
filters:{ filters:{
product:null, product:null,
iteration:null, iteration:null,
testPlan:null,
}, },
groupBy:'handler_userid', groupBy:'handler_userid',
groupBys:[ groupBys:[
@ -181,9 +195,11 @@
methods: { methods: {
open(params){ open(params){
this.visible=true; this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.iteration=params.xmIteration
this.filters.testPlan=this.xmTestPlan
this.filters.product=this.xmProduct
this.filters.project=this.xmProject
this.filters.iteration=this.xmIteration
this.filters.testCasedb=this.xmTestCasedb
if(this.initGroupBy){ if(this.initGroupBy){
this.groupBy=this.initGroupBy this.groupBy=this.initGroupBy
} }
@ -257,6 +273,12 @@
params.linkIterationId=this.filters.iteration.id params.linkIterationId=this.filters.iteration.id
} }
if(this.filters.testPlan && this.filters.testPlan.id){
params.planId=this.filters.testPlan.id
}
if(this.filters.testCasedb && this.filters.testCasedb.id){
params.casedbId=this.filters.testCasedb.id
}
params.groupBy=this.groupBy params.groupBy=this.groupBy
@ -300,7 +322,15 @@
onIterationClear(){ onIterationClear(){
this.filters.iteration=null this.filters.iteration=null
}
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},
onXmTestPlanClear(){
this.filters.testPlan=null
},
},//end method },//end method
mounted() { mounted() {
initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{ initSimpleDicts('all',['bugSeverity','bugSolution','bugStatus','bugType','priority','bugRepRate','bugReason'] ).then(res=>{

Loading…
Cancel
Save