6 changed files with 1458 additions and 29 deletions
-
266src/views/xm/rpt/branch/branchWorkItemDayList.vue
-
294src/views/xm/rpt/branch/menuDayAccumulate.vue
-
279src/views/xm/rpt/branch/menuDayTrend.vue
-
283src/views/xm/rpt/branch/questionDayAccumulate.vue
-
280src/views/xm/rpt/branch/questionDayTrend.vue
-
77src/views/xm/rpt/reportIndex.vue
@ -0,0 +1,266 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible"> |
||||
|
|
||||
|
<el-row :gutter="5" v-if="visible"> |
||||
|
<el-col :span="18"> |
||||
|
<div> |
||||
|
<div class="main" id="iterationWorkItemDayList" style="width:100%;height:600px;margin:0 auto;"></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="border"> |
||||
|
<el-form :model="filters" class="padding"> |
||||
|
|
||||
|
<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="listXmBranchStateHis">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-dialog> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//产品选择界面 |
||||
|
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//迭代选择界面 |
||||
|
import { listXmBranchStateHis } from '@/api/xm/core/xmBranchStateHis'; |
||||
|
export default { |
||||
|
|
||||
|
components: { |
||||
|
XmIterationSelect,XmProductSelect, |
||||
|
}, |
||||
|
props:['xmProduct','xmProject','xmIteration'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
dataSetCpd(){ |
||||
|
return [ |
||||
|
['日期',...this.xmProductStateHiss.map(i=>i.bizDate)], |
||||
|
['未关故事',...this.xmProductStateHiss.map(i=>i.menuCnt-i.menuCloseCnt)], |
||||
|
['已关故事',...this.xmProductStateHiss.map(i=>i.menuCloseCnt)], |
||||
|
['未关任务',...this.xmProductStateHiss.map(i=>i.taskCnt-i.taskCloseCnt)], |
||||
|
['已关任务',...this.xmProductStateHiss.map(i=>i.taskCloseCnt)], |
||||
|
['未关缺陷',...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 "迭代工作项每日趋势图" |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
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; |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
dataSetCpd(){ |
||||
|
this.$nextTick(()=>{ |
||||
|
this.drawCharts(); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters:{ |
||||
|
category:'', |
||||
|
product:null, |
||||
|
iteration:null, |
||||
|
project:null, |
||||
|
startBizDate:'', |
||||
|
endBizDate:'', |
||||
|
}, |
||||
|
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 },//查询中... |
||||
|
dateRanger:[], |
||||
|
maxTableHeight:300, |
||||
|
visible:false, |
||||
|
xmProductStateHiss:[], |
||||
|
|
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
listXmBranchStateHis(){ |
||||
|
var params={orderBy:'biz_date asc'} |
||||
|
if(this.filters.startBizDate && this.filters.endBizDate){ |
||||
|
params.startBizDate=this.filters.startBizDate; |
||||
|
params.endBizDate=this.filters.endBizDate; |
||||
|
} |
||||
|
listXmBranchStateHis(params).then(res=>{ |
||||
|
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; |
||||
|
}) |
||||
|
}, |
||||
|
open(params){ |
||||
|
this.visible=true; |
||||
|
this.filters.product=params.xmProduct |
||||
|
this.filters.project=params.xmProject |
||||
|
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.listXmBranchStateHis(); |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
drawCharts() { |
||||
|
this.myChart = this.$echarts.init(document.getElementById("iterationWorkItemDayList")); |
||||
|
var that=this; |
||||
|
this.myChart.on('updateAxisPointer', function (event) { |
||||
|
const xAxisInfo = event.axesInfo[0]; |
||||
|
if (xAxisInfo) { |
||||
|
const dimension = xAxisInfo.value + 1; |
||||
|
that.myChart.setOption({ |
||||
|
series: { |
||||
|
id: 'pie', |
||||
|
label: { |
||||
|
formatter: '{b}: {@[' + dimension + ']} ({d}%)' |
||||
|
}, |
||||
|
encode: { |
||||
|
value: dimension, |
||||
|
tooltip: dimension |
||||
|
} |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}); |
||||
|
this.myChart.setOption({ |
||||
|
title: { |
||||
|
text: '工作项分布', |
||||
|
}, |
||||
|
tooltip: { |
||||
|
trigger: 'axis', |
||||
|
showContent: false |
||||
|
}, |
||||
|
legend: { |
||||
|
}, |
||||
|
|
||||
|
dataset: { |
||||
|
source: this.dataSetCpd |
||||
|
}, |
||||
|
xAxis: { |
||||
|
type: 'category', |
||||
|
}, |
||||
|
yAxis: { gridIndex: 0 }, |
||||
|
grid: { top: '55%' }, |
||||
|
series: [ |
||||
|
{ name:'未关故事', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ name:'已关故事', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ |
||||
|
name:'未关任务', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ |
||||
|
name:'已关任务', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ name:'未关缺陷', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ name:'已关缺陷', |
||||
|
type: 'line', |
||||
|
seriesLayoutBy: 'row', |
||||
|
smooth:true, |
||||
|
emphasis: { focus: 'series' }, |
||||
|
}, |
||||
|
{ |
||||
|
type: 'pie', |
||||
|
id: 'pie', |
||||
|
radius: '30%', |
||||
|
center: ['50%', '25%'], |
||||
|
emphasis: { |
||||
|
focus: 'self' |
||||
|
}, |
||||
|
label: { |
||||
|
formatter: '{b}: {@日期} ({d}%)' |
||||
|
}, |
||||
|
encode: { |
||||
|
itemName: '日期', |
||||
|
value: '日期', |
||||
|
tooltip: '日期' |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
onProductSelected(product){ |
||||
|
this.filters.product=product |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onProductClear(){ |
||||
|
this.filters.product=null |
||||
|
|
||||
|
this.xmProductStateHiss=[]; |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
onIterationSelected(iteration){ |
||||
|
this.filters.iteration=iteration |
||||
|
}, |
||||
|
|
||||
|
onIterationClear(){ |
||||
|
this.filters.iteration=null |
||||
|
} |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
/** |
||||
|
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{ |
||||
|
this.dicts=res.data.data; |
||||
|
}) |
||||
|
*/ |
||||
|
//this.charts(); |
||||
|
//this.drawCharts(); |
||||
|
|
||||
|
}//end mounted |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.image { |
||||
|
width: 100%; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,294 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible"> |
||||
|
|
||||
|
<el-row :gutter="5" v-if="visible"> |
||||
|
<el-col :span="18"> <div> |
||||
|
<div class="main" id="iterationMenuDayAccumulate" |
||||
|
style="width:100%;height:600px;margin:0 auto;"></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="border"> |
||||
|
<el-form :model="filters" class="padding"> |
||||
|
|
||||
|
<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> |
||||
|
<span v-else>{{xmProductCpd.id}} <span v-if="xmProductCpd.productName"><br/>{{ xmProductCpd.productName }} </span> </span> |
||||
|
</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="日期区间"> |
||||
|
<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="listXmBranchStateHis">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-dialog> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import { listXmBranchStateHis } from '@/api/xm/core/xmBranchStateHis'; |
||||
|
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//产品选择界面 |
||||
|
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//迭代选择界面 |
||||
|
export default { |
||||
|
|
||||
|
components: { |
||||
|
XmIterationSelect,XmProductSelect, |
||||
|
}, |
||||
|
props:['xmProduct','xmProject','xmIteration'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
datesCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.bizDate) |
||||
|
} |
||||
|
}, |
||||
|
menuCloseCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.menuCloseCnt) |
||||
|
} |
||||
|
}, |
||||
|
menuUnstartCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.menuUnstartCnt) |
||||
|
} |
||||
|
}, |
||||
|
menuExecCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.menuExecCnt) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
menuFinishCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.menuFinishCnt) |
||||
|
} |
||||
|
}, |
||||
|
dialogTitle(){ |
||||
|
if(this.xmIteration && this.xmIteration.id){ |
||||
|
return (this.xmIteration?'迭代【'+this.xmIteration.iterationName+'】':'')+'需求每日累积图' |
||||
|
}else { |
||||
|
return (this.filters.product?'产品【'+this.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; |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
datesCpd(){ |
||||
|
|
||||
|
this.$nextTick(()=>{ |
||||
|
this.drawCharts(); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters:{ |
||||
|
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 },//查询中... |
||||
|
dateRanger:[], |
||||
|
maxTableHeight:300, |
||||
|
visible:false, |
||||
|
xmProductStateHiss:[], |
||||
|
|
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
listXmBranchStateHis(){ |
||||
|
|
||||
|
var params={orderBy:'biz_date asc'} |
||||
|
if(this.filters.startBizDate && this.filters.endBizDate){ |
||||
|
params.startBizDate=this.filters.startBizDate; |
||||
|
params.endBizDate=this.filters.endBizDate; |
||||
|
} |
||||
|
listXmBranchStateHis(params).then(res=>{ |
||||
|
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; |
||||
|
}) |
||||
|
}, |
||||
|
open(params){ |
||||
|
this.visible=true; |
||||
|
this.filters.product=params.xmProduct |
||||
|
this.filters.project=params.xmProject |
||||
|
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.listXmBranchStateHis(); |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
drawCharts() { |
||||
|
this.myChart = this.$echarts.init(document.getElementById("iterationMenuDayAccumulate")); |
||||
|
this.myChart.setOption( |
||||
|
{ |
||||
|
title: { |
||||
|
text: '需求累积图' |
||||
|
}, |
||||
|
|
||||
|
tooltip: { |
||||
|
trigger: 'axis', |
||||
|
axisPointer: { |
||||
|
type: 'cross', |
||||
|
label: { |
||||
|
backgroundColor: '#6a7985' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
legend: { |
||||
|
data: ['未开始', '执行中', '已完成', '已关闭'] |
||||
|
}, |
||||
|
grid: { |
||||
|
left: '3%', |
||||
|
right: '4%', |
||||
|
bottom: '3%', |
||||
|
containLabel: true |
||||
|
}, |
||||
|
toolbox: { |
||||
|
feature: { |
||||
|
saveAsImage: {} |
||||
|
} |
||||
|
}, |
||||
|
xAxis: { |
||||
|
type: 'category', |
||||
|
boundaryGap: false, |
||||
|
data: this.datesCpd, |
||||
|
}, |
||||
|
yAxis: { |
||||
|
type: 'value' |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name: '未开始', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.menuUnstartCntCpd |
||||
|
}, |
||||
|
{ |
||||
|
name: '执行中', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.menuExecCntCpd, |
||||
|
}, |
||||
|
{ |
||||
|
name: '已完成', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.menuFinishCntCpd, |
||||
|
}, |
||||
|
{ |
||||
|
name: '已关闭', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
|
||||
|
label: { |
||||
|
show: true, |
||||
|
position: 'top' |
||||
|
}, |
||||
|
data: this.menuCloseCntCpd, |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
onProductSelected(product){ |
||||
|
this.filters.product=product |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onProductClear(){ |
||||
|
this.filters.product=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onIterationSelected(iteration){ |
||||
|
this.filters.iteration=iteration |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onIterationClear(){ |
||||
|
this.filters.iteration=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
} |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
/** |
||||
|
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{ |
||||
|
this.dicts=res.data.data; |
||||
|
}) |
||||
|
*/ |
||||
|
//this.charts(); |
||||
|
//this.drawCharts() |
||||
|
|
||||
|
}//end mounted |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.image { |
||||
|
width: 100%; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,279 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible"> |
||||
|
|
||||
|
<el-row :gutter="5" v-if="visible"> |
||||
|
<el-col :span="18"> |
||||
|
<div> |
||||
|
<div class="main" id="iterationMenuDayTrend" |
||||
|
style="width:100%;height:600px;margin:0 auto;"></div> |
||||
|
<div class="progress"></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="border"> |
||||
|
<el-form :model="filters" class="padding"> |
||||
|
<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="listXmBranchStateHis">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-dialog> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import { listXmBranchStateHis } from '@/api/xm/core/xmBranchStateHis'; |
||||
|
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//产品选择界面 |
||||
|
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//迭代选择界面 |
||||
|
export default { |
||||
|
|
||||
|
components: { |
||||
|
XmIterationSelect,XmProductSelect, |
||||
|
}, |
||||
|
props:['xmProduct','xmProject','xmIteration'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
datesCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.bizDate) |
||||
|
} |
||||
|
}, |
||||
|
menuCloseCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.menuCloseCnt) |
||||
|
} |
||||
|
}, |
||||
|
menuUnstartCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.menuUnstartCnt) |
||||
|
} |
||||
|
}, |
||||
|
menuExecCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.menuExecCnt) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
menuFinishCntCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.menuFinishCnt) |
||||
|
} |
||||
|
}, |
||||
|
dialogTitle(){ |
||||
|
if(this.xmIteration && this.xmIteration.id){ |
||||
|
return (this.xmIteration?'迭代【'+this.xmIteration.iterationName+'】':'')+'需求每日趋势图' |
||||
|
}else { |
||||
|
return (this.filters.product?'产品【'+this.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; |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
datesCpd(){ |
||||
|
|
||||
|
this.$nextTick(()=>{ |
||||
|
this.drawCharts(); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters:{ |
||||
|
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 },//查询中... |
||||
|
dateRanger:[], |
||||
|
maxTableHeight:300, |
||||
|
visible:false, |
||||
|
xmProductStateHiss:[], |
||||
|
|
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
listXmBranchStateHis(){ |
||||
|
var params={orderBy:'biz_date asc'} |
||||
|
|
||||
|
if(this.filters.startBizDate && this.filters.endBizDate){ |
||||
|
params.startBizDate=this.filters.startBizDate; |
||||
|
params.endBizDate=this.filters.endBizDate; |
||||
|
} |
||||
|
listXmBranchStateHis(params).then(res=>{ |
||||
|
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; |
||||
|
}) |
||||
|
}, |
||||
|
open(params){ |
||||
|
this.visible=true; |
||||
|
this.filters.product=params.xmProduct |
||||
|
this.filters.project=params.xmProject |
||||
|
this.filters.iteration=params.xmIteration |
||||
|
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect(); |
||||
|
if(this.$refs['xmIterationSelect'])this.$refs['xmIterationSelect'].clearSelect(); |
||||
|
|
||||
|
this.listXmBranchStateHis(); |
||||
|
|
||||
|
}, |
||||
|
drawCharts() { |
||||
|
this.myChart = this.$echarts.init(document.getElementById("iterationMenuDayTrend")); |
||||
|
this.myChart.setOption( |
||||
|
{ |
||||
|
legend: { |
||||
|
right: 40, |
||||
|
data: ['未开始故事数','执行中故事数','已完成故事数','已关闭故事数'] |
||||
|
}, |
||||
|
xAxis: { |
||||
|
type: 'category', |
||||
|
data: this.datesCpd |
||||
|
}, |
||||
|
yAxis: { |
||||
|
type: 'value' |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name:'未开始故事数', |
||||
|
data: this.menuUnstartCntCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'orange', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'orange' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'执行中故事数', |
||||
|
data: this.menuExecCntCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'blue', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'blue' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'已完成故事数', |
||||
|
data: this.menuFinishCntCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'green', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'green' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'已关闭故事数', |
||||
|
data: this.menuCloseCntCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'red', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'red' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
) |
||||
|
}, |
||||
|
|
||||
|
onProductSelected(product){ |
||||
|
this.filters.product=product |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onProductClear(){ |
||||
|
this.filters.product=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
onIterationSelected(iteration){ |
||||
|
this.filters.iteration=iteration |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onIterationClear(){ |
||||
|
this.filters.iteration=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
} |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
/** |
||||
|
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{ |
||||
|
this.dicts=res.data.data; |
||||
|
}) |
||||
|
*/ |
||||
|
//this.charts(); |
||||
|
//this.drawCharts(); |
||||
|
|
||||
|
}//end mounted |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.image { |
||||
|
width: 100%; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,283 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible"> |
||||
|
|
||||
|
<el-row :gutter="5" v-if="visible"> |
||||
|
<el-col :span="18"> <div> |
||||
|
<div class="main" id="iterationQuestionDayAccumulate" |
||||
|
style="width:100%;height:600px;margin:0 auto;"></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="border"> |
||||
|
<el-form :model="filters" class="padding"> |
||||
|
<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="listXmBranchStateHis">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-dialog> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import { listXmBranchStateHis } from '@/api/xm/core/xmBranchStateHis'; |
||||
|
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//产品选择界面 |
||||
|
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//迭代选择界面 |
||||
|
export default { |
||||
|
|
||||
|
components: { |
||||
|
XmIterationSelect,XmProductSelect, |
||||
|
}, |
||||
|
props:['xmProduct','xmProject','xmIteration'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
datesCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.bizDate) |
||||
|
} |
||||
|
}, |
||||
|
closedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.closedBugs) |
||||
|
} |
||||
|
}, |
||||
|
activeBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.menuUnstartCnt) |
||||
|
} |
||||
|
}, |
||||
|
confirmedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.confirmedBugs) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
resolvedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.resolvedBugs) |
||||
|
} |
||||
|
}, |
||||
|
dialogTitle(){ |
||||
|
if(this.xmIteration && this.xmIteration.id){ |
||||
|
return (this.xmIteration?'迭代【'+this.xmIteration.iterationName+'】':'')+'缺陷每日累积图' |
||||
|
}else { |
||||
|
return (this.filters.product?'产品【'+this.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; |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
datesCpd(){ |
||||
|
|
||||
|
this.$nextTick(()=>{ |
||||
|
this.drawCharts(); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters:{ |
||||
|
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 },//查询中... |
||||
|
dateRanger:[], |
||||
|
maxTableHeight:300, |
||||
|
visible:false, |
||||
|
xmProductStateHiss:[], |
||||
|
|
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
listXmBranchStateHis(){ |
||||
|
|
||||
|
var params={orderBy:'biz_date asc'} |
||||
|
if(this.filters.startBizDate && this.filters.endBizDate){ |
||||
|
params.startBizDate=this.filters.startBizDate; |
||||
|
params.endBizDate=this.filters.endBizDate; |
||||
|
} |
||||
|
listXmBranchStateHis(params).then(res=>{ |
||||
|
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; |
||||
|
}) |
||||
|
}, |
||||
|
open(params){ |
||||
|
this.visible=true; |
||||
|
this.filters.product=params.xmProduct |
||||
|
this.filters.project=params.xmProject |
||||
|
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.listXmBranchStateHis(); |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
drawCharts() { |
||||
|
this.myChart = this.$echarts.init(document.getElementById("iterationQuestionDayAccumulate")); |
||||
|
this.myChart.setOption( |
||||
|
{ |
||||
|
title: { |
||||
|
text: '缺陷累积图' |
||||
|
}, |
||||
|
|
||||
|
tooltip: { |
||||
|
trigger: 'axis', |
||||
|
axisPointer: { |
||||
|
type: 'cross', |
||||
|
label: { |
||||
|
backgroundColor: '#6a7985' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
legend: { |
||||
|
data: ['新提出', '执行中', '已解决', '已关闭'] |
||||
|
}, |
||||
|
grid: { |
||||
|
left: '3%', |
||||
|
right: '4%', |
||||
|
bottom: '3%', |
||||
|
containLabel: true |
||||
|
}, |
||||
|
toolbox: { |
||||
|
feature: { |
||||
|
saveAsImage: {} |
||||
|
} |
||||
|
}, |
||||
|
xAxis: { |
||||
|
type: 'category', |
||||
|
boundaryGap: false, |
||||
|
data: this.datesCpd, |
||||
|
}, |
||||
|
yAxis: { |
||||
|
type: 'value' |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name: '新提出', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.activeBugsCpd |
||||
|
}, |
||||
|
{ |
||||
|
name: '执行中', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.confirmedBugsCpd, |
||||
|
}, |
||||
|
{ |
||||
|
name: '已解决', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
data: this.resolvedBugsCpd, |
||||
|
}, |
||||
|
{ |
||||
|
name: '已关闭', |
||||
|
type: 'line', |
||||
|
stack: 'Total', |
||||
|
areaStyle: {}, |
||||
|
emphasis: { |
||||
|
focus: 'series' |
||||
|
}, |
||||
|
|
||||
|
label: { |
||||
|
show: true, |
||||
|
position: 'top' |
||||
|
}, |
||||
|
data: this.closedBugsCpd, |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
) |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
onProductSelected(product){ |
||||
|
this.filters.product=product |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onProductClear(){ |
||||
|
this.filters.product=null |
||||
|
|
||||
|
this.xmProductStateHiss=[]; |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
onIterationSelected(iteration){ |
||||
|
this.filters.iteration=iteration |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onIterationClear(){ |
||||
|
this.filters.iteration=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
} |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
/** |
||||
|
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{ |
||||
|
this.dicts=res.data.data; |
||||
|
}) |
||||
|
*/ |
||||
|
//this.charts(); |
||||
|
//this.drawCharts() |
||||
|
|
||||
|
}//end mounted |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.image { |
||||
|
width: 100%; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,280 @@ |
|||||
|
<template> |
||||
|
<section> |
||||
|
<el-dialog fullscreen :title="dialogTitle" append-to-body modal-append-to-body width="80%" top="20px" :visible.sync="visible"> |
||||
|
|
||||
|
<el-row :gutter="5" v-if="visible"> |
||||
|
<el-col :span="18"> |
||||
|
<div> |
||||
|
<div class="main" id="iterationQuestionDayTrend" |
||||
|
style="width:100%;height:600px;margin:0 auto;"></div> |
||||
|
<div class="progress"></div> |
||||
|
</div> |
||||
|
</el-col> |
||||
|
<el-col :span="6" class="border"> |
||||
|
<el-form :model="filters" class="padding"> |
||||
|
<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="listXmBranchStateHis">查询</el-button> |
||||
|
</el-form-item> |
||||
|
</el-form> |
||||
|
</el-col> |
||||
|
</el-row> |
||||
|
</el-dialog> |
||||
|
</section> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import util from '@/common/js/util';//全局公共库 |
||||
|
import { initSimpleDicts } from '@/api/mdp/meta/item';//下拉框数据查询 |
||||
|
import { mapGetters } from 'vuex' |
||||
|
|
||||
|
import { listXmBranchStateHis } from '@/api/xm/core/xmBranchStateHis'; |
||||
|
import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//产品选择界面 |
||||
|
import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect';//迭代选择界面 |
||||
|
export default { |
||||
|
|
||||
|
components: { |
||||
|
XmIterationSelect,XmProductSelect, |
||||
|
}, |
||||
|
props:['xmProduct','xmProject','xmIteration'], |
||||
|
computed: { |
||||
|
...mapGetters([ |
||||
|
'userInfo','roles' |
||||
|
]), |
||||
|
datesCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.bizDate) |
||||
|
} |
||||
|
}, |
||||
|
closedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.closedBugs) |
||||
|
} |
||||
|
}, |
||||
|
activeBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.activeBugs) |
||||
|
} |
||||
|
}, |
||||
|
confirmedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=> i.confirmedBugs) |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
resolvedBugsCpd(){ |
||||
|
if(this.xmProductStateHiss.length==0){ |
||||
|
return [] |
||||
|
}else{ |
||||
|
return this.xmProductStateHiss.map(i=>i.resolvedBugs) |
||||
|
} |
||||
|
}, |
||||
|
dialogTitle(){ |
||||
|
if(this.xmIteration && this.xmIteration.id){ |
||||
|
return (this.xmIteration?'迭代【'+this.xmIteration.iterationName+'】':'')+'缺陷每日趋势图' |
||||
|
}else { |
||||
|
return (this.filters.product?'产品【'+this.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; |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
watch: { |
||||
|
datesCpd(){ |
||||
|
|
||||
|
this.$nextTick(()=>{ |
||||
|
this.drawCharts(); |
||||
|
}) |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
filters:{ |
||||
|
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 },//查询中... |
||||
|
dateRanger:[], |
||||
|
maxTableHeight:300, |
||||
|
visible:false, |
||||
|
xmProductStateHiss:[], |
||||
|
|
||||
|
}//end return |
||||
|
},//end data |
||||
|
methods: { |
||||
|
listXmBranchStateHis(){ |
||||
|
|
||||
|
var params={orderBy:'biz_date asc'} |
||||
|
if(this.filters.startBizDate && this.filters.endBizDate){ |
||||
|
params.startBizDate=this.filters.startBizDate; |
||||
|
params.endBizDate=this.filters.endBizDate; |
||||
|
} |
||||
|
listXmBranchStateHis(params).then(res=>{ |
||||
|
this.xmProductStateHiss=res.data.tips.isOk?res.data.data:this.xmProductStateHiss; |
||||
|
}) |
||||
|
}, |
||||
|
open(params){ |
||||
|
this.visible=true; |
||||
|
this.filters.product=params.xmProduct |
||||
|
this.filters.project=params.xmProject |
||||
|
this.filters.iteration=params.xmIteration |
||||
|
if(this.$refs['xmProductSelect'])this.$refs['xmProductSelect'].clearSelect(); |
||||
|
if(this.$refs['xmIterationSelect'])this.$refs['xmIterationSelect'].clearSelect(); |
||||
|
this.$nextTick(()=>{ |
||||
|
this.listXmBranchStateHis(); |
||||
|
}) |
||||
|
|
||||
|
}, |
||||
|
drawCharts() { |
||||
|
this.myChart = this.$echarts.init(document.getElementById("iterationQuestionDayTrend")); |
||||
|
this.myChart.setOption( |
||||
|
{ |
||||
|
legend: { |
||||
|
right: 40, |
||||
|
data: ['新提出','执行中','已解决','已关闭'] |
||||
|
}, |
||||
|
xAxis: { |
||||
|
type: 'category', |
||||
|
data: this.datesCpd |
||||
|
}, |
||||
|
yAxis: { |
||||
|
type: 'value' |
||||
|
}, |
||||
|
series: [ |
||||
|
{ |
||||
|
name:'新提出', |
||||
|
data: this.activeBugsCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'orange', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'orange' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'执行中', |
||||
|
data: this.confirmedBugsCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'blue', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'blue' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'已解决', |
||||
|
data: this.resolvedBugsCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'green', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'green' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
|
||||
|
{ |
||||
|
name:'已关闭', |
||||
|
data: this.closedBugsCpd, |
||||
|
type: 'line', |
||||
|
smooth: true, |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
// 折点颜色样式 |
||||
|
color: 'red', |
||||
|
lineStyle: { |
||||
|
// 折线颜色样式 |
||||
|
color: 'red' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
) |
||||
|
}, |
||||
|
|
||||
|
onProductSelected(product){ |
||||
|
this.filters.product=product |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onProductClear(){ |
||||
|
this.filters.product=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
onIterationSelected(iteration){ |
||||
|
this.filters.iteration=iteration |
||||
|
this.xmProductStateHiss=[]; |
||||
|
}, |
||||
|
|
||||
|
onIterationClear(){ |
||||
|
this.filters.iteration=null |
||||
|
this.xmProductStateHiss=[]; |
||||
|
} |
||||
|
},//end method |
||||
|
mounted() { |
||||
|
/** |
||||
|
initSimpleDicts('all',['demandSource','demandLvl','demandType','priority','menuStatus'] ).then(res=>{ |
||||
|
this.dicts=res.data.data; |
||||
|
}) |
||||
|
*/ |
||||
|
//this.charts(); |
||||
|
//this.drawCharts(); |
||||
|
|
||||
|
}//end mounted |
||||
|
} |
||||
|
|
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
.image { |
||||
|
width: 100%; |
||||
|
display: block; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue