From 894d891b4692b81b73a51378f5f4e65ebd669343 Mon Sep 17 00:00:00 2001 From: hanshaozhuang Date: Fri, 24 Jun 2022 15:49:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug=2055897=20=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E8=87=AA=E5=8A=A8=E5=B8=A6=E5=87=BA=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E6=A0=87=E5=87=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personal/pages/my-questions/index.vue | 24 ++++++++++++++----- .../regulatoryRepository/standQA/index.vue | 24 ++++++++++++++----- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/pages/personal/pages/my-questions/index.vue b/src/pages/personal/pages/my-questions/index.vue index a6abfb1d9..efd2df19f 100644 --- a/src/pages/personal/pages/my-questions/index.vue +++ b/src/pages/personal/pages/my-questions/index.vue @@ -1321,6 +1321,7 @@ export default { answerList: [], standList: [], questionsList: [], + standMap: new Map() } }, mounted(){ @@ -1352,6 +1353,12 @@ export default { } }, methods:{ + refreshStandMap(){ + this.standMap = new Map() + this.standList.forEach(item=>{ + this.standMap.set(item.standardId,item) + }) + }, checkedRole(data){ if(data[0].id){ let asdId = sessionStorage.getItem('queId') @@ -1666,15 +1673,16 @@ export default { queBtn(){ this.fileList = [] // 清空提问 - this.standType = "INLAND" + const selectedStand = this.activestand == '0' ? this.standList[0] : this.standMap.get(this.activestand) + this.standType = selectedStand.classification this.questionForm = { - pubQue : '',//公共问题 - classification: 'INLAND', //标准类型 + pubQue : selectedStand.classification === "OTHER" ? selectedStand.standardId : '',//公共问题 + classification: selectedStand.classification, //标准类型 problemDescription: '', //问题 questioner: this.$store.getters.userInfo.userId, //提问人 - standardEncdoing: '', //标准编号 - standardName: '', //标准名称 - standardId:'', //标准id + standardEncdoing: selectedStand.standardEncdoing, //标准编号 + standardName: selectedStand.standardName, //标准名称 + standardId: selectedStand.standardId, //标准id fileList: '', } this.dialogVisible = true @@ -1720,6 +1728,7 @@ export default { _this: this }, res => { this.standList = res.data + this.refreshStandMap() }) }, //问题查询 @@ -1742,6 +1751,7 @@ export default { _this: this, }, res => { this.standList = res.data + this.refreshStandMap() this.questionClick() }) }, @@ -1754,6 +1764,7 @@ export default { _this: this }, res => { this.standList = res.data + this.refreshStandMap() this.questionClick() }, e =>{ @@ -1765,6 +1776,7 @@ export default { _this: this }, res =>{ this.standList = res.data + this.refreshStandMap() this.questionClick() }, e => { diff --git a/src/pages/regulatoryRepository/standQA/index.vue b/src/pages/regulatoryRepository/standQA/index.vue index 23df9e6a4..573318d95 100644 --- a/src/pages/regulatoryRepository/standQA/index.vue +++ b/src/pages/regulatoryRepository/standQA/index.vue @@ -777,6 +777,7 @@ export default { standList: [], standIdList: [], questionsList: [], + standMap: new Map() } }, mounted(){ @@ -819,6 +820,12 @@ export default { }); }, methods:{ + refreshStandMap(){ + this.standMap = new Map() + this.standList.forEach(item=>{ + this.standMap.set(item.standardId,item) + }) + }, changeInput:debounce(function(val){ if(val.length){ this.$http.get('lawss/AskQuestions/resemblance',{ @@ -1040,15 +1047,16 @@ export default { //提问按钮 queBtn(){ this.fileList = [] - this.standType = "INLAND" + const selectedStand = this.activestand == '0' ? this.standList[0] : this.standMap.get(this.activestand) + this.standType = selectedStand.classification this.questionForm = { - pubQue : '',//公共问题 - classification: 'INLAND', //标准类型 + pubQue : selectedStand.classification === "OTHER" ? selectedStand.standardId : '',//公共问题 + classification: selectedStand.classification, //标准类型 problemDescription: '', //问题 questioner: this.$store.getters.userInfo.userId, //提问人 - standardEncdoing: '', //标准编号 - standardName: '', //标准名称 - standardId:'', //标准id + standardEncdoing: selectedStand.standardEncdoing, //标准编号 + standardName: selectedStand.standardName, //标准名称 + standardId: selectedStand.standardId, //标准id fileList: '', } this.dialogVisible = true @@ -1076,6 +1084,7 @@ export default { _this: this }, res => { this.standList = res.data + this.refreshStandMap() }) }, //问题查询 @@ -1107,6 +1116,7 @@ export default { _this: this }, res =>{ this.standList = res.data + this.refreshStandMap() if(this.$route.query.queId){ this.activestand = this.standList[0].standardId this.queSearch() @@ -1129,6 +1139,7 @@ export default { }) if(queNumber === 0){ this.standList = res.data + this.refreshStandMap() } }, e => { @@ -1235,6 +1246,7 @@ export default { this.standSearch2() break } + this.queSearch() }, e => { })