From cb081b442525ee755268cb9b0a184d145fa07c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sun, 3 Apr 2022 22:38:18 +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 --- .../xm/core/components/XmIterationSelect.vue | 5 ++ .../xm/core/components/XmProductSelect.vue | 2 +- .../xm/core/components/XmProjectSelect.vue | 2 +- src/views/xm/rpt/product/menuAttDist.vue | 51 ++++++++++++++----- 4 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/views/xm/core/components/XmIterationSelect.vue b/src/views/xm/core/components/XmIterationSelect.vue index 4cd7e7eb..87421b4b 100644 --- a/src/views/xm/core/components/XmIterationSelect.vue +++ b/src/views/xm/core/components/XmIterationSelect.vue @@ -212,6 +212,8 @@ this.$refs.table.setCurrentRow(row); this.rowClick(row) } + }else{ + this.clearSelectIteration() } }else{ this.$notify({showClose: true, message: tips.msg, type: 'error' }); @@ -247,6 +249,7 @@ this.$emit("close") }, initData(){ + if(this.productId){ var xmIterations=map.get(this.productId); if(xmIterations){ @@ -255,6 +258,8 @@ var row=this.xmIterations[0]; this.$refs.table.setCurrentRow(row); this.rowClick(row) + }else{ + this.clearSelectIteration() } }else{ this.searchXmIterations(); diff --git a/src/views/xm/core/components/XmProductSelect.vue b/src/views/xm/core/components/XmProductSelect.vue index 3a596a32..d4b99bcc 100644 --- a/src/views/xm/core/components/XmProductSelect.vue +++ b/src/views/xm/core/components/XmProductSelect.vue @@ -280,7 +280,7 @@ }, clearSelect(){ this.$refs.table.setCurrentRow(); - this.$emit("clear-select"); + this.$emit("clear"); this.selectedProduct(null); this.productVisible=false; this.moreVisible=false; diff --git a/src/views/xm/core/components/XmProjectSelect.vue b/src/views/xm/core/components/XmProjectSelect.vue index 06430432..8908e1cc 100644 --- a/src/views/xm/core/components/XmProjectSelect.vue +++ b/src/views/xm/core/components/XmProjectSelect.vue @@ -282,7 +282,7 @@ }, clearSelect(){ this.$refs.table.setCurrentRow(); - this.$emit("clear-select"); + this.$emit("clear"); this.selectedProduct(null); this.projectVisible=false; this.moreVisible=false; diff --git a/src/views/xm/rpt/product/menuAttDist.vue b/src/views/xm/rpt/product/menuAttDist.vue index ce92c636..32b059e4 100644 --- a/src/views/xm/rpt/product/menuAttDist.vue +++ b/src/views/xm/rpt/product/menuAttDist.vue @@ -15,13 +15,15 @@ - - + + + + + - - + @@ -58,11 +60,16 @@ import { mapGetters } from 'vuex' import { getXmMenuAttDist } from '@/api/xm/core/xmMenu'; + + import XmIterationSelect from '@/views/xm/core/components/XmIterationSelect.vue';//修改界面 + import XmProductSelect from '@/views/xm/core/components/XmProductSelect';//新增界面 + export default { components: { + XmIterationSelect,XmProductSelect, }, - props:['xmProduct'], + props:['xmProduct','xmIteration','xmProject'], computed: { ...mapGetters([ 'userInfo','roles' @@ -119,9 +126,8 @@ data() { return { filters:{ - category:'', - product:null, - project:null, + product:null, + iteration:null, }, groupBy:'status', groupBys:[ @@ -162,12 +168,6 @@ } } return max; - }, - getXmMenuAttDist(){ - var params={productId:'mmcloud-xm',orderBy:'biz_date asc'} - getXmMenuAttDist(params).then(res=>{ - this.xmMenuAttDists=res.data.tips.isOk?res.data.data:this.xmMenuAttDists; - }) }, open(params){ this.visible=true; @@ -239,10 +239,33 @@ params.priority=this.filters.priority } params.groupBy=this.groupBy + if(this.filters.product){ + params.productId=this.filters.product.id + } + + if(this.filters.iteration){ + params.iterationId=this.filters.iteration.id + } getXmMenuAttDist(params).then(res=>{ this.xmMenuAttDists=res.data.data }) + }, + onProductSelected(product){ + this.filters.product=product + }, + + onProductClear(){ + this.filters.product=null + + }, + + onIterationSelected(iteration){ + this.filters.iteration=iteration + }, + + onIterationClear(){ + this.filters.iteration=null } },//end method mounted() {