diff --git a/src/pages/personal/pages/my-questions/index.vue b/src/pages/personal/pages/my-questions/index.vue index 441f7146a..e24339956 100644 --- a/src/pages/personal/pages/my-questions/index.vue +++ b/src/pages/personal/pages/my-questions/index.vue @@ -1673,17 +1673,31 @@ export default { queBtn(){ this.fileList = [] // 清空提问 - const selectedStand = this.activestand == '0' ? this.standList[0] : this.standMap.get(this.activestand) - this.standType = selectedStand.classification - this.questionForm = { - pubQue : selectedStand.classification === "OTHER" ? selectedStand.standardId : '',//公共问题 - classification: selectedStand.classification, //标准类型 - problemDescription: '', //问题 - questioner: this.$store.getters.userInfo.userId, //提问人 - standardEncdoing: selectedStand.standardEncdoing, //标准编号 - standardName: selectedStand.standardName, //标准名称 - standardId: selectedStand.standardId, //标准id - fileList: '', + if(this.standList.length === 0){ + this.standType = !this.activeType ? 'INLAND' : this.activeType + this.questionForm = { + pubQue : '',//公共问题 + classification: !this.activeType ? 'INLAND' : this.activeType, //标准类型 + problemDescription: '', //问题 + questioner: this.$store.getters.userInfo.userId, //提问人 + standardEncdoing: '', //标准编号 + standardName: '', //标准名称 + standardId:'', //标准id + fileList: '', + } + }else{ + const selectedStand = this.activestand == '0' || this.activeType === 'INLAND' ? this.standList[0] : this.standMap.get(this.activestand) + this.standType = selectedStand.classification + this.questionForm = { + pubQue : selectedStand.classification === "OTHER" ? selectedStand.standardId : '',//公共问题 + classification: selectedStand.classification, //标准类型 + problemDescription: '', //问题 + questioner: this.$store.getters.userInfo.userId, //提问人 + standardEncdoing: selectedStand.standardEncdoing, //标准编号 + standardName: selectedStand.standardName, //标准名称 + standardId: selectedStand.standardId, //标准id + fileList: '', + } } this.dialogVisible = true }, diff --git a/src/pages/regulatoryRepository/standQA/index.vue b/src/pages/regulatoryRepository/standQA/index.vue index 573318d95..1c0fe93f9 100644 --- a/src/pages/regulatoryRepository/standQA/index.vue +++ b/src/pages/regulatoryRepository/standQA/index.vue @@ -1047,9 +1047,22 @@ export default { //提问按钮 queBtn(){ this.fileList = [] - const selectedStand = this.activestand == '0' ? this.standList[0] : this.standMap.get(this.activestand) - this.standType = selectedStand.classification - this.questionForm = { + if(this.standList.length === 0){ + this.standType = !this.activeType ? 'INLAND' : this.activeType + this.questionForm = { + pubQue : '',//公共问题 + classification: !this.activeType ? 'INLAND' : this.activeType, //标准类型 + problemDescription: '', //问题 + questioner: this.$store.getters.userInfo.userId, //提问人 + standardEncdoing: '', //标准编号 + standardName: '', //标准名称 + standardId:'', //标准id + fileList: '', + } + }else{ + const selectedStand = this.activestand == '0' || this.activeType === 'INLAND' ? this.standList[0] : this.standMap.get(this.activestand) + this.standType = selectedStand.classification + this.questionForm = { pubQue : selectedStand.classification === "OTHER" ? selectedStand.standardId : '',//公共问题 classification: selectedStand.classification, //标准类型 problemDescription: '', //问题 @@ -1058,6 +1071,7 @@ export default { standardName: selectedStand.standardName, //标准名称 standardId: selectedStand.standardId, //标准id fileList: '', + } } this.dialogVisible = true },