From 3a719d83620761d714fac9613d15ad02fd258fe5 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期一, 01 七月 2024 13:55:36 +0800
Subject: [PATCH] fix:修改填空题问题
---
src/store/modules/exam.js | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index ca976a6..854eb4b 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -7,7 +7,12 @@
const examType = ref({
1: '鍗曢�夐',
2: '澶氶�夐',
- 3: '闊抽棰�'
+ 3: '鍒ゆ柇棰�',
+ 4: '濉┖棰�',
+ 5: '绠�绛旈',
+ 6: '璇煶棰�',
+ 7: '璁$畻棰�',
+ 8: '鍒嗘瀽棰�',
});
const currentType = ref(1);
@@ -29,7 +34,7 @@
examDetail.value.forEach(item => {
total += item.questionList.length;
item.questionList.forEach(question => {
- grade += Number(question.score);
+ grade += Number(question.questionScore);
});
});
return {
@@ -37,7 +42,6 @@
grade,
};
});
-
const setExamInfo = (info) => {
examInfo.value = info;
@@ -50,9 +54,16 @@
const setQuestionAnswer = (type, index, answer) => {
const temp = examDetail.value.find(item => item.questionType === type);
if (temp) {
- temp.questionList[index].correct = answer;
+ temp.questionList[index].answer = answer;
}
};
+
+ const setQuestionAnswerList = (type, index, answer) => {
+ const temp = examDetail.value.find(item => item.questionType === type);
+ if (temp) {
+ temp.questionList[index].answerList = answer;
+ }
+ }
const setProgress = (progress) => {
answerProgress.value = progress;
@@ -82,6 +93,7 @@
setExamInfo,
setExamDetail,
setQuestionAnswer,
+ setQuestionAnswerList,
setProgress
};
});
--
Gitblit v1.8.0