From 2fab8e8add4721e42b5897941e37617c8f7c6b3f Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期三, 19 六月 2024 17:07:36 +0800 Subject: [PATCH] feat:查看试卷答题卡 --- src/views/grade/components/answer-sheet/index.vue | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/views/grade/components/answer-sheet/index.vue b/src/views/grade/components/answer-sheet/index.vue index fef8708..31a83a6 100644 --- a/src/views/grade/components/answer-sheet/index.vue +++ b/src/views/grade/components/answer-sheet/index.vue @@ -19,16 +19,17 @@ <script setup> import { ref } from 'vue'; import {storeToRefs} from 'pinia'; -import {useExamStore} from '@/store/index.js'; -const examStore = useExamStore(); +import {useGradeStore} from '@/store/index.js'; +const gradeStore = useGradeStore(); -const {examType, examDetail,currentType,currentIndex} = storeToRefs(examStore); +const {examType, examDetail,currentType,currentIndex} = storeToRefs(gradeStore); const activeNames = ref(examDetail.value.map(item => item.questionType)); const itemClass = (question,type,index) => { return { - answer: question.correct, + right: question.isRight, + wrong: !question.isRight, active: currentType.value === type && currentIndex.value === index } } @@ -55,9 +56,13 @@ .active { border-color: #3680fa; } -.answer { - border-color: #3680fa !important; - background-color: #3680fa !important; + +.right { + background-color: #67C23A !important; + color: #fff !important; +} +.wrong { + background-color: #F56C6C !important; color: #fff !important; } </style> \ No newline at end of file -- Gitblit v1.8.0