From 4800366c4ae36b4900b34b7f183390fd9cd0d33b Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期一, 28 十月 2024 18:45:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into test
---
src/views/grade/components/answer-main/answer-single/index.vue | 33 ++++++++++++++-------------------
1 files changed, 14 insertions(+), 19 deletions(-)
diff --git a/src/views/grade/components/answer-main/answer-single/index.vue b/src/views/grade/components/answer-main/answer-single/index.vue
index 8da3bf0..9b6e3aa 100644
--- a/src/views/grade/components/answer-main/answer-single/index.vue
+++ b/src/views/grade/components/answer-main/answer-single/index.vue
@@ -4,9 +4,9 @@
<ExamInfo class="mb-5" :questionIndex="currentIndex" :activeQuestion="activeQuestion"></ExamInfo>
<div class="answer-content">
- <div class="answer-item flex" v-for="item, index in activeQuestion.items" :class="answerState(item)">
+ <div class="answer-item flex" v-for="item, index in activeQuestion.questionItemList" :class="answerState(item)">
<div class="answer-icon flex flex-col justify-center items-center flex-shrink-0">{{ item.prefix }}</div>
- <div class="answer-text text-gray-700">{{ item.content }}</div>
+ <div class="answer-text text-gray-700" v-html="item.content"></div>
</div>
</div>
</el-scrollbar>
@@ -15,19 +15,17 @@
<div class="analysis-container">
<div class="analysis-item" :class="analysisState">
<div class="item-label">鎮ㄧ殑绛旀</div>
- <div class="item-info">{{ activeQuestion.correct }}</div>
+ <div class="item-info">{{ activeQuestion.answer }}</div>
</div>
<div class="analysis-item analysis-right">
<div class="item-label">姝g‘绛旀</div>
- <div class="item-info">{{ activeQuestion.right }}</div>
+ <div class="item-info">{{ activeQuestion.questionAnswer }}</div>
</div>
<div class="analysis-item text-gray-700">
<div class="item-label">瑙f瀽</div>
- <div class="item-info">Lorem ipsum dolor sit amet consectetur adipisicing elit. Exercitationem beatae possimus
- nostrum facere inventore aliquid vero fuga minus, mollitia temporibus harum commodi, dolores odio nulla
- aliquam maiores eligendi quis? Ad.</div>
+ <div class="item-info" v-html="activeQuestion.analyze"></div>
</div>
</div>
</el-scrollbar>
@@ -38,31 +36,28 @@
import { computed, ref } from 'vue';
import { storeToRefs } from 'pinia';
import ExamInfo from '@/components/ExamInfo/index.vue';
-import { useExamStore } from '@/store/index.js';
-const examStore = useExamStore();
+import { useGradeStore } from '@/store/index.js';
+const gradeStore = useGradeStore();
-const { currentIndex } = storeToRefs(examStore);
+const { currentIndex } = storeToRefs(gradeStore);
-const activeQuestion = ref(examStore.getActiveQuestion);
+const activeQuestion = ref(gradeStore.getActiveQuestion);
const answerState = (item) => {
- if (item.prefix === activeQuestion.value.correct) {
- const flag = checkRight(activeQuestion.value.correct, activeQuestion.value.right);
+ const flag = activeQuestion.value.answer === activeQuestion.value.questionAnswer;
+ if (item.prefix === activeQuestion.value.answer) {
return {
right: flag,
wrong: !flag
};
- }
- if (item.prefix === activeQuestion.value.right) {
+ } else if(item.prefix === activeQuestion.value.questionAnswer) {
return {
- right: true
+ right: !flag,
+ wrong: flag
};
}
};
-const checkRight = (currentAnswer, rightAnswer) => {
- return currentAnswer === rightAnswer;
-};
const analysisState = computed(() => {
return {
--
Gitblit v1.8.0