| | |
| | | examDetail.value.forEach(item => { |
| | | total += item.questionList.length; |
| | | item.questionList.forEach(question => { |
| | | grade += Number(question.score); |
| | | grade += Number(question.questionScore); |
| | | }); |
| | | }); |
| | | return { |
| | |
| | | grade, |
| | | }; |
| | | }); |
| | | |
| | | |
| | | const setExamInfo = (info) => { |
| | | examInfo.value = info; |
| | |
| | | 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; |
| | |
| | | setExamInfo, |
| | | setExamDetail, |
| | | setQuestionAnswer, |
| | | setQuestionAnswerList, |
| | | setProgress |
| | | }; |
| | | }); |