Parcourir la source

我的考试,回答字段的修改

lidie il y a 1 an
Parent
commit
069ac7df4d

+ 5 - 1
src/views/platform/bpmn/my-test/examDetail.vue

@@ -109,10 +109,11 @@
                                         >{{ `${o.label}.${o.value}` }}</van-radio>
                                     </van-radio-group>
                                     <van-checkbox-group v-else-if="q.questionType === '多选题'" v-model="q.answer">
+
                                         <van-checkbox
                                             v-for="(o, i) in q.options"
                                             :key="`${index}${qIndex}${i}`"
-                                            :name="o.value"
+                                            :name="o.label"
                                             disabled
                                         >{{ `${o.label}.${o.value}` }}</van-checkbox>
                                     </van-checkbox-group>
@@ -247,6 +248,9 @@ export default {
             this.paperList = val
         }
     },
+    created() {
+        console.log('this.listExam', this.listExam)
+    },
 
     async mounted() {
         this.handelListData()

+ 6 - 4
src/views/platform/bpmn/my-test/examPop.vue

@@ -78,7 +78,7 @@
                             v-for="(item, index) in popList[questionsIndex].options"
                             :key="index"
                             class="radioAlign"
-                            :name="item.value"
+                            :name="item.label"
                         >{{ `${item.label}.${item.value}` }}
                         </van-checkbox>
                     </van-checkbox-group>
@@ -379,9 +379,9 @@ export default {
                                 if (item.questionType === '多选题') {
                                     o.push({
                                         label: key,
-                                        value: temp[key],
-                                        checked: false,
-                                        disabled: false
+                                        value: temp[key]
+                                        // checked: false,
+                                        // disabled: false
                                     })
                                 } else {
                                     o.push({
@@ -605,7 +605,9 @@ export default {
             const submitData = []
             const time = that.$common.getDateNow(19)
             that.popList.forEach((item, index) => {
+                // console.log('答案item', item)
                 item.answer = that.popListAnswer[index]
+                // console.log('that.popListAnswer', that.popListAnswer)
                 const autoType = ['单选题', '多选题', '判断题'].includes(item.questionType)
                 const multipleType = ['多选题', '填空题'].includes(item.questionType)
                 const selectType = ['多选题', '单选题'].includes(item.questionType)