From bc98b72ab930c6eacfab6125e37c3b48ccd5276f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Sun, 27 Mar 2022 17:07:40 +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 | 23 +++++++--- .../xm/core/components/XmProductSelect.vue | 19 +++++++-- .../xm/core/components/XmProjectSelect.vue | 16 ++++++- .../xm/core/xmQuestion/XmQuestionMng.vue | 42 ++++++++++++++++--- 4 files changed, 84 insertions(+), 16 deletions(-) diff --git a/src/views/xm/core/components/XmIterationSelect.vue b/src/views/xm/core/components/XmIterationSelect.vue index 5a7d0a00..4cd7e7eb 100644 --- a/src/views/xm/core/components/XmIterationSelect.vue +++ b/src/views/xm/core/components/XmIterationSelect.vue @@ -59,7 +59,7 @@ - {{editForm&&editForm.id?editForm.iterationName:'选择迭代'}} + {{editForm&&editForm.id?editForm.iterationName:'选择迭代'}} @@ -133,6 +133,7 @@ maxTableHeight:300, iterationVisible:false, moreVisible:false, + hadInit:false, /**end 自定义属性请在上面加 请加备注**/ } },//end data @@ -271,7 +272,7 @@ this.searchXmIterations(); } }else{ - //his.searchXmIterations(); + this.searchXmIterations(); } }, @@ -286,15 +287,27 @@ this.iterationVisible=false; this.moreVisible=false; this.$emit('clear',null );// @row-click="rowClick" - }, + }, + referenceClick(){ + if(!this.hadInit){ + this.initData(); + this.hadInit=true; + } + this.iterationVisible=!this.iterationVisible; + } },//end methods components: { //在下面添加其它组件 }, mounted() { this.$nextTick(() => { - this.initData(); - this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); + + this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); + + if(this.autoSelect!==false){ + this.initData(); + this.hadInit=true; + } }); } diff --git a/src/views/xm/core/components/XmProductSelect.vue b/src/views/xm/core/components/XmProductSelect.vue index 1478f319..591a250b 100644 --- a/src/views/xm/core/components/XmProductSelect.vue +++ b/src/views/xm/core/components/XmProductSelect.vue @@ -74,7 +74,7 @@ - {{editForm && editForm.id?editForm.productName:'选择产品'}} + {{editForm && editForm.id?editForm.productName:'选择产品'}} @@ -215,6 +215,7 @@ pickerOptions: util.pickerOptions('datarange'), productVisible:false, moreVisible:false, + hadInit:false, /**begin 自定义属性请在下面加 请加备注**/ /**end 自定义属性请在上面加 请加备注**/ @@ -362,8 +363,7 @@ this.$emit("close"); }, - initData(){ - + initData(){ if(this.iterationId){ var xmProducts=map.get(this.iterationId); if(xmProducts){ @@ -396,6 +396,13 @@ this.searchXmProducts(); } }, + referenceClick(){ + if(!this.hadInit){ + this.initData(); + this.hadInit=true; + } + this.productVisible=!this.productVisible; + } },//end methods components: { UsersSelect, @@ -404,7 +411,11 @@ mounted() { this.$nextTick(() => { this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); - this.initData(); + if(this.autoSelect!==false){ + this.initData(); + this.hadInit=true; + } + }); } } diff --git a/src/views/xm/core/components/XmProjectSelect.vue b/src/views/xm/core/components/XmProjectSelect.vue index 072c7893..8fca7d19 100644 --- a/src/views/xm/core/components/XmProjectSelect.vue +++ b/src/views/xm/core/components/XmProjectSelect.vue @@ -74,7 +74,7 @@ - + {{editForm && editForm.id?editForm.name:'选择项目'}} @@ -148,6 +148,7 @@ pickerOptions: util.pickerOptions('datarange'), projectVisible:false, moreVisible:false, + hadInit:false, } },//end data methods: { @@ -326,6 +327,14 @@ this.searchXmProjects(); } }, + + referenceClick(){ + if(!this.hadInit){ + this.initData(); + this.hadInit=true; + } + this.projectVisible=!this.projectVisible; + } },//end methods components: { UsersSelect, @@ -334,7 +343,10 @@ mounted() { this.$nextTick(() => { this.maxTableHeight = util.calcTableMaxHeight(this.$refs.table.$el); - this.initData(); + if(this.autoSelect!==false){ + this.initData(); + this.hadInit=true; + } }); } } diff --git a/src/views/xm/core/xmQuestion/XmQuestionMng.vue b/src/views/xm/core/xmQuestion/XmQuestionMng.vue index 9362e060..40afbf15 100644 --- a/src/views/xm/core/xmQuestion/XmQuestionMng.vue +++ b/src/views/xm/core/xmQuestion/XmQuestionMng.vue @@ -115,16 +115,18 @@ - + + + + - - - - + + + + + + + + + @@ -563,6 +585,12 @@ } this.addFormVisible = true; }, + showAddAfterProjectSelect(project){ + this.$refs.xmProjectSelect.editForm=project; + this.filters.selProject=project; + this.addFormVisible = true; + this.searchXmQuestions(); + }, afterAddSubmit(){ this.addFormVisible=false; this.pageInfo.count=true; @@ -1018,6 +1046,10 @@ } }else if(fieldName==='workload'){ params={...params,...$event} + }else if(fieldName==='projectId'){ + params.projectId=$event.id + }else if(fieldName==='productId'){ + params.productId=$event.id }else{ params[fieldName]=$event }