From 7d21a6787f03bda3c062d70bf7f58b01fe1940d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=AA=86=E4=B9=90?= <342503599@qq.com>
Date: Thu, 29 Sep 2022 16:20:17 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=95=99=E8=82=B2(wifi?=
=?UTF-8?q?=E5=AE=89=E5=85=A8=E6=95=99=E8=82=B2):=E5=9B=9E=E6=98=BE?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../wifiEducation/educationQuestions.vue | 21 ++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/views/projectLevel/wifiEducation/educationQuestions.vue b/src/views/projectLevel/wifiEducation/educationQuestions.vue
index 5882d1f3..5ae0dcdb 100644
--- a/src/views/projectLevel/wifiEducation/educationQuestions.vue
+++ b/src/views/projectLevel/wifiEducation/educationQuestions.vue
@@ -132,9 +132,9 @@
-
+
-
+
@@ -430,16 +430,17 @@ export default {
this.isAdd=false
this.$nextTick(()=>{
this.addFormData=JSON.parse(JSON.stringify(row))
- var optionList=this.addFormData.optionlist
+ console.log('=======回显的数据',this.addFormData)
+ var optionList=row.optionlist
this.addFormData.optionList=optionList
// this.questionIndex=index
// 多选的回显
if(row.questionType == 2){
optionList.forEach((element,index) => {
if(element.correctType==1){
- this.addEditForm.optionList[index].correctType=true
+ this.addFormData.optionList[index].correctType=true
}else{
- this.addEditForm.optionList[index].correctType=false
+ this.addFormData.optionList[index].correctType=false
}
});
}else{
@@ -506,8 +507,9 @@ export default {
}
},
resetForm(){
+ this.radio1 = -1,
this.addFormData = {
- questionType: 1,
+ questionType: "",
questionName: "",
questionAnalysis: "",
questionScore:"",
@@ -539,6 +541,10 @@ export default {
this.showDialog = true
this.isAdd=true
this.dialogTitle = "新增试题"
+ this.$nextTick(()=>{
+ this.$refs['add_form'].resetFields();
+ this.resetForm()
+ })
},
removeOptions(index){
if(this.addFormData.optionList.length < 3){
@@ -583,7 +589,8 @@ export default {
justify-content: flex-start;
margin: 10px 15px 0;
.answers_item{
- width: 25%;
+ flex:1;
+ // width: 25%;
margin: 0;
margin-bottom: 16px;
}