From 98f494cf633e3acf5c20f3e9de0d708f2a6c2045 Mon Sep 17 00:00:00 2001
From: ZhangXianQiang <1135831638@qq.com>
Date: 星期五, 05 七月 2024 09:39:59 +0800
Subject: [PATCH] feat:视频浏览

---
 src/store/modules/exam.js |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index daa8174..854eb4b 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -34,7 +34,7 @@
     examDetail.value.forEach(item => {
       total += item.questionList.length;
       item.questionList.forEach(question => {
-        grade += Number(question.score);
+        grade += Number(question.questionScore);
       });
     });
     return {
@@ -42,7 +42,6 @@
       grade,
     };
   });
-
 
   const setExamInfo = (info) => {
     examInfo.value = info;
@@ -58,6 +57,13 @@
       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;
@@ -87,6 +93,7 @@
     setExamInfo,
     setExamDetail,
     setQuestionAnswer,
+    setQuestionAnswerList,
     setProgress
   };
 });

--
Gitblit v1.8.0