From 6a4c9ac686d0a0d3ead45e16e8a4481b7c6406f2 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 28 六月 2024 11:02:15 +0800
Subject: [PATCH] fix:对接提交试卷
---
src/views/exam/components/answer-main/answer-single/index.vue | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/views/exam/components/answer-main/answer-single/index.vue b/src/views/exam/components/answer-main/answer-single/index.vue
index 87ee164..0712750 100644
--- a/src/views/exam/components/answer-main/answer-single/index.vue
+++ b/src/views/exam/components/answer-main/answer-single/index.vue
@@ -35,7 +35,11 @@
item.isActive = true;
}
const answerList = filterAnswer();
- examStore.setQuestionAnswer(currentType.value, currentIndex.value, answerList.join(','));
+ let temp = '';
+ if(answerList) {
+ temp = answerList.prefix;
+ }
+ examStore.setQuestionAnswer(currentType.value, currentIndex.value, temp);
}
};
@@ -46,11 +50,11 @@
};
const resetAnswer = () => {
- activeQuestion.value.items.forEach(item => item.isActive = false);
+ activeQuestion.value.questionItemList.forEach(item => item.isActive = false);
};
const filterAnswer = () => {
- return activeQuestion.value.items.filter(item => item.isActive);
+ return activeQuestion.value.questionItemList.find(item => item.isActive);
}
--
Gitblit v1.8.0