Browse Source

优化

master
陈裕财 3 years ago
parent
commit
811d8c137f
  1. 56
      src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue
  2. 91
      src/views/xm/rpt/testPlan/testDayTimesCalc.vue
  3. 59
      src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue
  4. 66
      src/views/xm/rpt/testPlan/testPlanCaseUserDist.vue

56
src/views/xm/rpt/testPlan/testCaseToPlanCalc.vue

@ -19,14 +19,24 @@
<el-form-item label="归属产品" >
<xm-product-select v-if="!xmProductCpd || !xmProductCpd.id" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmTestPlan?xmTestPlan.id:null" @clear="onProductClear"></xm-product-select>
<span v-else>{{xmProductCpd.id}} <span v-if="xmProductCpd.productName"><br/>{{ xmProductCpd.productName }} </span> </span>
</el-form-item>
</el-form-item>
<el-form-item label="归属迭代" v-if="xmIteration && xmIteration.id">
<span> {{xmIteration.id}}
<span v-if="xmIteration.iterationName"><br/>{{ xmIteration.iterationName }} </span>
</span>
</el-form-item>
<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>
</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 type="primary" @click="$refs['xmTestPlanSelectRef'].open()" plain>选择计划</el-button>
<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>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestPlanCaseExecStatusDist">查询</el-button>
@ -50,12 +60,13 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default {
components: {
XmProjectSelect,XmProductSelect,xmTestPlanSelect,
XmProjectSelect,XmProductSelect,XmIterationSelect,xmTestPlanSelect,
},
props:['xmProject','xmProduct','xmTestCasedb','xmTestPlan'],
computed: {
@ -187,27 +198,32 @@
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
}
if(this.filters.iteration && 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
}
if(params.productId || params.projectId || params.planId || params.casedbId){
if(params.productId || params.projectId || params.planId || params.casedbId || params.linkIterationId){
getXmTestCaseToPlanCalcList(params).then(res=>{
this.xmTestCaseToPlanCalcList=res.data.data
})
}else{
this.$message.error("请选择查询条件,产品、项目、测试计划最少选择一个")
this.$message.error("请选择查询条件,项目、产品、迭代、测试计划最少选择一个")
}
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
},
onProductSelected(product){
this.filters.product=product
@ -217,15 +233,15 @@
this.filters.product=null
},
onProjectSelected(project){
this.filters.project=project
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onProjectClear(){
this.filters.project=null
onIterationClear(){
this.filters.iteration=null
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},

91
src/views/xm/rpt/testPlan/testDayTimesCalc.vue

@ -12,15 +12,32 @@
</el-col>
<el-col :span="6" class="border">
<el-form :model="filters" class="padding">
<el-form-item label="归属项目" >
<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>
</el-form-item>
<el-form-item label="归属产品" >
<xm-product-select v-if="!xmProductCpd || !xmProductCpd.id" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmIteration?xmIteration.id:null" @clear="onProductClear"></xm-product-select>
<xm-product-select v-if="!xmProductCpd || !xmProductCpd.id" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmTestPlan?xmTestPlan.id:null" @clear="onProductClear"></xm-product-select>
<span v-else>{{xmProductCpd.id}} <span v-if="xmProductCpd.productName"><br/>{{ xmProductCpd.productName }} </span> </span>
</el-form-item>
</el-form-item>
<el-form-item label="归属迭代" v-if="xmIteration && xmIteration.id">
<span> {{xmIteration.id}}
<span v-if="xmIteration.iterationName"><br/>{{ xmIteration.iterationName }} </span>
</span>
</el-form-item>
<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>
</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="日期区间">
<br>
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startExecDate" end-key="endExecDate"></mdp-date-range>
@ -31,6 +48,8 @@
</el-form>
</el-col>
</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>
</section>
</template>
@ -40,11 +59,17 @@
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { getXmTestDayTimesList } from '@/api/xm/core/xmTestPlanCase';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default {
components: {
XmProductSelect,
XmProjectSelect,XmProductSelect,XmIterationSelect,xmTestPlanSelect,
},
props:['xmProduct','xmProject'],
computed: {
@ -116,19 +141,33 @@
},//end data
methods: {
getXmTestDayTimesList(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
var params={ }
if(this.filters.product && this.filters.product.id){
params.productId=this.filters.product.id
}
var params={productId:this.filters.product.id}
if(this.filters.startExecDate && this.filters.endExecDate){
params.startExecDate=this.filters.startExecDate;
params.endExecDate=this.filters.endExecDate;
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
if(this.filters.iteration && this.filters.iteration.id){
params.linkIterationId=this.filters.iteration.id
}
if(this.filters.testPlan && this.filters.testPlan.id){
params.planId=this.filters.testPlan.id
}
getXmTestDayTimesList(params).then(res=>{
if(this.filters.testCasedb && this.filters.testCasedb.id){
params.casedbId=this.filters.testCasedb.id
}
if(params.productId || params.projectId || params.planId || params.casedbId || params.linkIterationId){
getXmTestDayTimesList(params).then(res=>{
this.xmTestDayTimesList=res.data.tips.isOk?res.data.data:this.xmTestDayTimesList;
})
}else{
this.$message.error("请选择查询条件,项目、产品、迭代、测试计划最少选择一个")
}
},
open(params){
this.visible=true;
@ -167,17 +206,37 @@
}
)
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
},
onProductSelected(product){
this.filters.product=product
this.xmTestDayTimesList=[];
},
onProductClear(){
this.filters.product=null
this.xmTestDayTimesList=[];
},
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onIterationClear(){
this.filters.iteration=null
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan
},
onXmTestPlanClear(){
this.filters.testPlan=null
},
},//end method
mounted() {

59
src/views/xm/rpt/testPlan/testPlanCaseExecStatusDist.vue

@ -19,14 +19,24 @@
<el-form-item label="归属产品" >
<xm-product-select v-if="!xmProductCpd || !xmProductCpd.id" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmTestPlan?xmTestPlan.id:null" @clear="onProductClear"></xm-product-select>
<span v-else>{{xmProductCpd.id}} <span v-if="xmProductCpd.productName"><br/>{{ xmProductCpd.productName }} </span> </span>
</el-form-item>
</el-form-item>
<el-form-item label="归属迭代" v-if="xmIteration && xmIteration.id">
<span> {{xmIteration.id}}
<span v-if="xmIteration.iterationName"><br/>{{ xmIteration.iterationName }} </span>
</span>
</el-form-item>
<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>
</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 type="primary" @click="$refs['xmTestPlanSelectRef'].open()">选择计划</el-button>
<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>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestPlanCaseExecStatusDist">查询</el-button>
@ -50,12 +60,13 @@
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default {
components: {
XmProjectSelect,XmProductSelect,xmTestPlanSelect,
XmProjectSelect,XmProductSelect,XmIterationSelect,xmTestPlanSelect,
},
props:['xmProject','xmProduct','xmTestCasedb','xmTestPlan'],
computed: {
@ -171,8 +182,7 @@
onXmQuestionSomeFieldsChange(fieldName,$event){
this.xmTestPlanCaseExecStatusDists=[]
},
searchXmTestPlanCaseExecStatusDist(){
searchXmTestPlanCaseExecStatusDist(){
var params={ }
if(this.filters.product && this.filters.product.id){
params.productId=this.filters.product.id
@ -180,27 +190,31 @@
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
}
if(this.filters.iteration && 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
}
if(params.productId || params.projectId || params.planId || params.casedbId){
if(params.productId || params.projectId || params.planId || params.casedbId || params.linkIterationId){
getXmTestPlanCaseExecStatusDist(params).then(res=>{
this.xmTestPlanCaseExecStatusDists=res.data.data
})
}else{
this.$message.error("请选择查询条件,产品、项目、测试计划最少选择一个")
}
this.$message.error("请选择查询条件,项目、产品、迭代、测试计划最少选择一个")
}
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
},
onProductSelected(product){
this.filters.product=product
@ -210,14 +224,13 @@
this.filters.product=null
},
onProjectSelected(project){
this.filters.project=project
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onProjectClear(){
this.filters.project=null
onIterationClear(){
this.filters.iteration=null
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan

66
src/views/xm/rpt/testPlan/testPlanCaseUserDist.vue

@ -19,14 +19,24 @@
<el-form-item label="归属产品" >
<xm-product-select v-if="!xmProductCpd || !xmProductCpd.id" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" :iterationId="xmTestPlan?xmTestPlan.id:null" @clear="onProductClear"></xm-product-select>
<span v-else>{{xmProductCpd.id}} <span v-if="xmProductCpd.productName"><br/>{{ xmProductCpd.productName }} </span> </span>
</el-form-item>
</el-form-item>
<el-form-item label="归属迭代" v-if="xmIteration && xmIteration.id">
<span> {{xmIteration.id}}
<span v-if="xmIteration.iterationName"><br/>{{ xmIteration.iterationName }} </span>
</span>
</el-form-item>
<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>
</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 type="primary" @click="$refs['xmTestPlanSelectRef'].open()">选择计划</el-button>
<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>
<el-button type="primary" icon="el-icon-search" @click="searchXmTestPlanCaseUserDist">查询</el-button>
@ -47,15 +57,16 @@
import { mapGetters } from 'vuex'
import { getXmTestPlanCaseUserDist } from '@/api/xm/core/xmTestPlanCase';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect';//
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//
import xmTestPlanSelect from '@/views/xm/core/xmTestPlan/XmTestPlanSelect';//
export default {
components: {
XmProjectSelect,XmProductSelect,xmTestPlanSelect,
XmProjectSelect,XmProductSelect,XmIterationSelect,xmTestPlanSelect,
},
props:['xmProject','xmProduct','xmTestCasedb','xmTestPlan'],
computed: {
@ -182,7 +193,6 @@
)
},
searchXmTestPlanCaseUserDist(){
var params={ }
if(this.filters.product && this.filters.product.id){
params.productId=this.filters.product.id
@ -190,30 +200,32 @@
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
if(this.filters.project && this.filters.project.id){
params.projectId=this.filters.project.id
}
}
if(this.filters.iteration && 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
}
if(params.productId || params.projectId || params.planId || params.casedbId){
if(params.productId || params.projectId || params.planId || params.casedbId || params.linkIterationId){
getXmTestPlanCaseUserDist(params).then(res=>{
this.xmTestPlanCaseUserDists=res.data.data
})
}else{
this.$message.error("请选择查询条件,产品、项目、测试计划最少选择一个")
}
this.$message.error("请选择查询条件,项目、产品、迭代、测试计划最少选择一个")
}
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
},
onProductSelected(product){
this.filters.product=product
@ -222,14 +234,14 @@
onProductClear(){
this.filters.product=null
},
onProjectSelected(project){
this.filters.project=project
},
onProjectClear(){
this.filters.project=null
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onIterationClear(){
this.filters.iteration=null
},
onXmTestPlanSelected(xmTestPlan){
this.filters.testPlan=xmTestPlan

Loading…
Cancel
Save