ZhangXianQiang
2024-06-20 966ce85c533c0128653cb144086e7219c4a676a8
fix:修改多选判断问题
2个文件已修改
41 ■■■■■ 已修改文件
src/store/modules/grade.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/grade/components/answer-main/answer-multiple/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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",
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
      }
      };
    }
  }
};