Browse Source

优化

master
陈裕财 3 years ago
parent
commit
4009dc6334
  1. 49
      src/views/xm/rpt/iteration/IterationWorkItemDayList.vue
  2. 23
      src/views/xm/rpt/iteration/menuDayAccumulate.vue
  3. 25
      src/views/xm/rpt/iteration/menuDayTrend.vue
  4. 5
      src/views/xm/rpt/reportIndex.vue

49
src/views/xm/rpt/iteration/IterationWorkItemDayList.vue

@ -1,6 +1,6 @@
<template>
<section>
<el-dialog fullscreen :title="(filters.product?'【'+filters.product.productName+'】':'')+'工作项按日分布趋势图'" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible">
<el-row :gutter="5">
<el-col :span="18">
@ -11,14 +11,20 @@
<el-col :span="6" class="border padding">
<el-form :model="filters">
<el-form-item label="归属产品" >
<xm-product-select v-if="!xmProduct" ref="xmProductSelect" style="display:inline;" :auto-select="false" :link-project-id="xmProject?xmProject.id:null" @row-click="onProductSelected" @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="xmIteration?xmIteration.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 label="归属迭代">
<xm-iteration-select v-if="!xmIteration || !xmIteration.id" 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>
<span v-else> {{xmIteration.id}}
<span v-if="xmIteration.iterationName"><br/>{{ xmIteration.iterationName }} </span></span>
</el-form-item>
<el-form-item label="日期区间">
<br>
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></mdp-date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="listXmIteationStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
@ -33,13 +39,13 @@
import { mapGetters } from 'vuex'
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import { listXmIteationStateHis } from '@/api/xm/core/xmIterationStateHis';
export default {
components: {
XmProductSelect,
},
props:['xmProduct','xmProject'],
props:['xmProduct','xmProject','xmIteration'],
computed: {
...mapGetters([
'userInfo','roles'
@ -54,6 +60,23 @@
['未关缺陷',...this.xmProductStateHiss.map(i=>i.bugCnt-i.closedBugs)],
['已关缺陷',...this.xmProductStateHiss.map(i=>i.closedBugs)]
]
},
dialogTitle(){
if(this.xmIteration && this.xmIteration.id){
return (this.xmIteration?'迭代【'+this.xmIteration.iterationName+'】':'')+'需求年龄数量分布'
}else {
return (filters.product?'产品【'+filters.product.productName+'】':'')+'需求年龄数量分布'
}
},
xmProductCpd(){
if(this.xmIteration && this.xmIteration.id){
return {id:this.xmIteration.productId,productName:this.xmIteration.productName}
}
if(this.xmProduct && this.xmProduct.id){
return this.xmProduct
}
return null;
}
},
@ -85,7 +108,7 @@
}//end return
},//end data
methods: {
listXmProductStateHis(){
listXmIteationStateHis(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
@ -96,7 +119,7 @@
params.startBizDate=this.filters.startBizDate;
params.endBizDate=this.filters.endBizDate;
}
listXmProductStateHis(params).then(res=>{
listXmIteationStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
})
},
@ -108,7 +131,7 @@
this.xmProductStateHiss=[]
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect();
this.$nextTick(()=>{
this.listXmProductStateHis();
this.listXmIteationStateHis();
})
},
@ -215,7 +238,7 @@
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
this.listXmIteationStateHis();
},
onProductClear(){
@ -224,6 +247,14 @@
this.xmProductStateHiss=[];
},
onIterationSelected(iteration){
this.filters.iteration=iteration
},
onIterationClear(){
this.filters.iteration=null
}
},//end method
mounted() {
/**

23
src/views/xm/rpt/iteration/menuDayAccumulate.vue

@ -25,7 +25,7 @@
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></mdp-date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="listXmIterationStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
@ -39,7 +39,7 @@
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import { listXmIterationStateHis } from '@/api/xm/core/xmIterationStateHis';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
@ -121,6 +121,7 @@
category:'',
product:null,
project:null,
iteration:null,
},
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 },//...
@ -132,18 +133,22 @@
}//end return
},//end data
methods: {
listXmProductStateHis(){
listXmIterationStateHis(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
}
var params={productId:this.filters.product.id,orderBy:'biz_date asc'}
if(!this.filters.iteration){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中迭代',type:'warning'})
return;
}
var params={productId:this.filters.product.id,iterationId:this.filters.iteration.id,orderBy:'biz_date asc'}
if(this.filters.startBizDate && this.filters.endBizDate){
params.startBizDate=this.filters.startBizDate;
params.endBizDate=this.filters.endBizDate;
}
listXmProductStateHis(params).then(res=>{
listXmIterationStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
})
},
@ -151,11 +156,12 @@
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
this.filters.iteration=params.xmIteration
this.xmProductStateHiss=[]
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect();
if(this.$refs['xmIterationSelect'])this.$refs['xmIterationSelect'].clearSelect();
this.$nextTick(()=>{
this.listXmProductStateHis();
this.listXmIterationStateHis();
})
},
@ -253,7 +259,6 @@
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
},
onProductClear(){
@ -264,7 +269,7 @@
onIterationSelected(iteration){
this.filters.iteration=iteration
this.xmProductStateHiss=[];
this.listXmProductStateHis();
this.listXmIterationStateHis();
},
onIterationClear(){

25
src/views/xm/rpt/iteration/menuDayTrend.vue

@ -27,7 +27,7 @@
<mdp-date-range v-model="filters" value-format="yyyy-MM-dd" start-key="startBizDate" end-key="endBizDate"></mdp-date-range>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="listXmProductStateHis">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="listXmIterationStateHis">查询</el-button>
</el-form-item>
</el-form>
</el-col>
@ -41,7 +41,7 @@
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { mapGetters } from 'vuex'
import { listXmProductStateHis } from '@/api/xm/core/xmProductStateHis';
import { listXmIterationStateHis } from '@/api/xm/core/xmIterationStateHis';
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//
export default {
@ -123,6 +123,7 @@
category:'',
product:null,
project:null,
iteration:null,
},
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 },//...
@ -134,18 +135,23 @@
}//end return
},//end data
methods: {
listXmProductStateHis(){
listXmIterationStateHis(){
if(!this.filters.product){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中产品',type:'warning'})
return;
}
var params={productId:this.filters.product.id,orderBy:'biz_date asc'}
if(!this.filters.iteration){
this.$notify({position:'bottom-left',showClose:true,message:'请先选中迭代',type:'warning'})
return;
}
var params={productId:this.filters.product.id,iterationId:this.filters.iteration.id,orderBy:'biz_date asc'}
if(this.filters.startBizDate && this.filters.endBizDate){
params.startBizDate=this.filters.startBizDate;
params.endBizDate=this.filters.endBizDate;
}
listXmProductStateHis(params).then(res=>{
listXmIterationStateHis(params).then(res=>{
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss;
})
},
@ -153,10 +159,11 @@
this.visible=true;
this.filters.product=params.xmProduct
this.filters.project=params.xmProject
this.filters.Product=params.xmProduct
this.filters.iteration=params.xmIteration
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect();
if(this.$refs['xmIterationSelect'])this.$refs['xmIterationSelect'].clearSelect();
this.$nextTick(()=>{
this.listXmProductStateHis();
this.listXmIterationStateHis();
})
},
@ -251,12 +258,10 @@
onProductSelected(product){
this.filters.product=product
this.xmProductStateHiss=[];
this.listXmProductStateHis();
},
onProductClear(){
this.filters.product=null
this.xmProductStateHiss=[];
},
@ -264,7 +269,7 @@
onIterationSelected(iteration){
this.filters.iteration=iteration
this.xmProductStateHiss=[];
this.listXmProductStateHis();
this.listXmIterationStateHis();
},
onIterationClear(){

5
src/views/xm/rpt/reportIndex.vue

@ -80,8 +80,8 @@
import xmQuestionDayTrend from './product/questionDayTrend'
import xmQuestionDayAccumulate from './product/questionDayAccumulate'
import XmIterationXmQuestionDayTrend from './iteration/questionDayTrend'
import XmIterationXmQuestionDayAccumulate from './iteration/questionDayAccumulate'
import xmIterationXmQuestionDayTrend from './iteration/questionDayTrend'
import xmIterationXmQuestionDayAccumulate from './iteration/questionDayAccumulate'
import xmQuestionAttDist from './product/questionAttDist'
import xmQuestionAgeDist from './product/questionAgeDist'
import xmQuestionSort from './product/questionSort'
@ -97,6 +97,7 @@
components: {
xmIterationBurnout,xmMenuDayTrend,xmMenuDayAccumulate,xmMenuAttDist,xmMenuAgeDist,xmMenuSort,xmProductWorkItemDayList,xmTaskDayTrend,xmTaskDayAccumulate,xmTaskAttDist,xmTaskAgeDist,xmTaskSort,xmProjectWorkItemDayList,xmProjectWorkloadSetDayList,xmProjectWorkloadSetMonthList,xmQuestionDayTrend,xmQuestionDayAccumulate,xmQuestionAttDist,xmQuestionAgeDist,xmQuestionSort,
xmIterationXmMenuDayTrend,xmIterationXmMenuDayAccumulate,xmIterationWorkItemDayList,xmIterationXmQuestionDayTrend,xmIterationXmQuestionDayAccumulate
},
props:['xmProduct','xmIteration','xmProject','xmTestCasedb'],
computed: {

Loading…
Cancel
Save