From 966ce85c533c0128653cb144086e7219c4a676a8 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期四, 20 六月 2024 10:28:43 +0800
Subject: [PATCH] fix:修改多选判断问题

---
 src/store/modules/grade.js                                       |   31 +++++++++++++++++++++++++++++++
 src/views/grade/components/answer-main/answer-multiple/index.vue |   10 +++++++---
 2 files changed, 38 insertions(+), 3 deletions(-)

diff --git a/src/store/modules/grade.js b/src/store/modules/grade.js
index 3042188..00c0abe 100644
--- a/src/store/modules/grade.js
+++ b/src/store/modules/grade.js
@@ -179,6 +179,37 @@
             }
           ],
           "analyze": "闂皬鏈嬪弸",
+          "correct": "A,B,D",
+          "right": "B,C",
+          "score": "5",
+          "difficult": 5,
+          "isRight": false
+        },
+        {
+          "id": null,
+          "questionType": 1,
+          "gradeLevel": null,
+          "subjectId": 2,
+          "title": "1+1=锛�",
+          "items": [
+            {
+              "prefix": "A",
+              "content": "1"
+            },
+            {
+              "prefix": "B",
+              "content": "2"
+            },
+            {
+              "prefix": "C",
+              "content": "3"
+            },
+            {
+              "prefix": "D",
+              "content": "4"
+            }
+          ],
+          "analyze": "闂皬鏈嬪弸",
           "correct": "B,C",
           "right": "B,C",
           "score": "5",
diff --git a/src/views/grade/components/answer-main/answer-multiple/index.vue b/src/views/grade/components/answer-main/answer-multiple/index.vue
index 7cb346a..c54ecdc 100644
--- a/src/views/grade/components/answer-main/answer-multiple/index.vue
+++ b/src/views/grade/components/answer-main/answer-multiple/index.vue
@@ -36,14 +36,14 @@
 </template>
 
 <script setup>
-import { ref,computed } from 'vue';
+import { ref, computed } from 'vue';
 import { storeToRefs } from 'pinia';
 import ExamInfo from '@/components/ExamInfo/index.vue';
 import { useExamStore } from '@/store/index.js';
 
 const examStore = useExamStore();
 
-const {  currentIndex } = storeToRefs(examStore);
+const { currentIndex } = storeToRefs(examStore);
 
 const activeQuestion = ref(examStore.getActiveQuestion);
 
@@ -74,12 +74,16 @@
         return {
           wrong: true
         };
+      } else if (!flag1 && flag2) {
+        return {
+          right: true
+        };
       }
     } else {
       return {
         right: flag2,
         wrong: flag1
-      }
+      };
     }
   }
 };

--
Gitblit v1.8.0