From 3a98e1cc66e5b36e4ebc831be528655ddfef9b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Mon, 4 Apr 2022 20:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/dateRange/index.vue | 12 +-- src/views/xm/rpt/iteration/burnout.vue | 78 ++++++++++++++++--- .../xm/rpt/product/menuDayAccumulate.vue | 10 ++- src/views/xm/rpt/product/menuDayTrend.vue | 10 ++- .../xm/rpt/product/productWorkItemDayList.vue | 11 ++- 5 files changed, 94 insertions(+), 27 deletions(-) diff --git a/src/components/dateRange/index.vue b/src/components/dateRange/index.vue index 56efe1de..50c58653 100644 --- a/src/components/dateRange/index.vue +++ b/src/components/dateRange/index.vue @@ -1,5 +1,5 @@ @@ -16,9 +35,15 @@ import { mapGetters } from 'vuex' import { listXmIterationStateHis } from '@/api/xm/core/xmIterationStateHis'; + + import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//修改界面 + + import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//新增界面 + export default { components: { + XmIterationSelect,XmProductSelect, }, props:['xmProduct','xmIteration','xmProject'], computed: { @@ -62,8 +87,10 @@ }, watch: { - xmIterationStateHiss(){ - this.drawWorkload(); + datesCpd(){ + this.$nextTick(()=>{ + this.drawCharts(); + }) } }, data() { @@ -97,7 +124,11 @@ return max; }, listXmIterationStateHis(){ - var params={iterationId:'IT2022-0001-Z5TA',orderBy:'biz_date asc'} + if(!this.filters.iteration|| !this.filters.iteration.id){ + this.$notify({position:'bottom-left',showClose:true,message:'请先选中迭代',type:'warning'}) + return; + } + var params={iterationId:this.filters.iteration.id,orderBy:'biz_date asc'} listXmIterationStateHis(params).then(res=>{ this.xmIterationStateHiss=res.data.tips.isOk?res.data.data:this.xmIterationStateHiss; }) @@ -112,7 +143,7 @@ }) }, - drawWorkload() { + drawCharts() { this.myChart = this.$echarts.init(document.getElementById("burnout")); this.myChart.setOption({ title: { @@ -188,7 +219,30 @@ }, ] }) - } + }, + + + onProductSelected(product){ + this.filters.product=product + this.xmProductStateHiss=[]; + }, + + onProductClear(){ + this.filters.product=null + this.xmProductStateHiss=[]; + + }, + + onIterationSelected(iteration){ + this.filters.iteration=iteration + this.xmProductStateHiss=[]; + this.listXmIterationStateHis(); + }, + + onIterationClear(){ + this.filters.iteration=null + this.xmProductStateHiss=[]; + }, },//end method mounted() { /** @@ -197,7 +251,7 @@ }) */ //this.charts(); - //this.drawWorkload(); + //this.drawCharts(); }//end mounted } diff --git a/src/views/xm/rpt/product/menuDayAccumulate.vue b/src/views/xm/rpt/product/menuDayAccumulate.vue index ec09b9ef..0b1cc1b4 100644 --- a/src/views/xm/rpt/product/menuDayAccumulate.vue +++ b/src/views/xm/rpt/product/menuDayAccumulate.vue @@ -38,7 +38,7 @@ components: { XmProductSelect, }, - props:['xmProduct'], + props:['xmProduct','xmProject'], computed: { ...mapGetters([ 'userInfo','roles' @@ -82,8 +82,12 @@ }, watch: { - xmProductStateHiss(){ - this.drawCharts(); + datesCpd(){ + + this.$nextTick(()=>{ + this.drawCharts(); + }) + } }, data() { diff --git a/src/views/xm/rpt/product/menuDayTrend.vue b/src/views/xm/rpt/product/menuDayTrend.vue index 4839cfd5..928f9f9d 100644 --- a/src/views/xm/rpt/product/menuDayTrend.vue +++ b/src/views/xm/rpt/product/menuDayTrend.vue @@ -40,7 +40,7 @@ components: { XmProductSelect, }, - props:['xmProduct'], + props:['xmProduct','xmProject'], computed: { ...mapGetters([ 'userInfo','roles' @@ -84,8 +84,12 @@ }, watch: { - xmProductStateHiss(){ - this.drawCharts(); + datesCpd(){ + + this.$nextTick(()=>{ + this.drawCharts(); + }) + } }, data() { diff --git a/src/views/xm/rpt/product/productWorkItemDayList.vue b/src/views/xm/rpt/product/productWorkItemDayList.vue index 18a40c23..d7ececba 100644 --- a/src/views/xm/rpt/product/productWorkItemDayList.vue +++ b/src/views/xm/rpt/product/productWorkItemDayList.vue @@ -9,7 +9,7 @@ - + @@ -38,7 +38,7 @@ components: { XmProductSelect, }, - props:['xmProduct'], + props:['xmProduct','xmProject'], computed: { ...mapGetters([ 'userInfo','roles' @@ -57,8 +57,11 @@ }, watch: { - xmProductStateHiss(){ - this.drawCharts(); + dataSetCpd(){ + this.$nextTick(()=>{ + this.drawCharts(); + }) + } }, data() {