| | |
| | | <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.correct ? activeQuestion.correct: '未作答' }}</div> |
| | | </div> |
| | | |
| | | <div class="analysis-item analysis-right"> |
| | |
| | | </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'; |
| | | import { useGradeStore } from '@/store/index.js'; |
| | | const gradeStore = useGradeStore(); |
| | | |
| | | const examStore = useExamStore(); |
| | | const { currentIndex } = storeToRefs(gradeStore); |
| | | |
| | | const { currentIndex } = storeToRefs(examStore); |
| | | |
| | | const activeQuestion = ref(examStore.getActiveQuestion); |
| | | const activeQuestion = ref(gradeStore.getActiveQuestion); |
| | | |
| | | const formatAnswer = (answer) => { |
| | | return answer.split(','); |
| | |
| | | return { |
| | | wrong: true |
| | | }; |
| | | } else if (!flag1 && flag2) { |
| | | return { |
| | | right: true |
| | | }; |
| | | } |
| | | } else { |
| | | return { |
| | | right: flag2, |
| | | wrong: flag1 |
| | | } |
| | | }; |
| | | } |
| | | } |
| | | }; |