Browse Source

修改活动题问题

dusenyao 11 months ago
parent
commit
6effcb8324

+ 4 - 1
src/views/exercise_questions/preview/ActivityPreview.vue

@@ -51,7 +51,10 @@ export default {
     },
     // 删除文件
     handleDelete(fileId) {
-      this.answer.answer_list[0]?.accessory_file_id_list.splice(this.answer.accessory_file_id_list.indexOf(fileId), 1);
+      this.answer.answer_list[0]?.accessory_file_id_list.splice(
+        this.answer.answer_list[0]?.accessory_file_id_list.indexOf(fileId),
+        1,
+      );
     },
   },
 };

+ 0 - 3
src/views/exercise_questions/preview/RepeatPreview.vue

@@ -61,9 +61,6 @@ export default {
       immediate: true,
     },
   },
-  created() {
-    // this.handleData();
-  },
   methods: {
     // 初始化数据
     handleData() {

+ 15 - 2
src/views/home/recovery/ExerciseAnswerUserList.vue

@@ -220,8 +220,21 @@ export default {
     },
     // 得到答题记录题目信息
     getQuestionInfo_AnswerRecord() {
-      if (this.questionList[this.curQuestionIndex].type !== 'read') {
-        this.$refs.exercise?.[0].showAnswer(false, false, { answer_list: [] }, true);
+      const type = this.questionList[this.curQuestionIndex].type;
+      if (type !== 'read') {
+        let answer = {
+          answer_list: [],
+        };
+        if (type === 'activity') {
+          answer = {
+            answer_list: [
+              {
+                accessory_file_id_list: [],
+              },
+            ],
+          };
+        }
+        this.$refs.exercise?.[0].showAnswer(false, false, answer, true);
       }
       GetQuestionInfo_AnswerRecord({
         answer_record_id: this.curAnswerRecordId,