From cc344ede1a270d5607fd20c386971b771446cc38 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 04 Mar 2022 15:58:30 +0800
Subject: [PATCH] 考试相关更改

---
 common/api/examFunc.js |   46 ++++++----------------------------------------
 1 files changed, 6 insertions(+), 40 deletions(-)

diff --git a/common/api/examFunc.js b/common/api/examFunc.js
index cbe77f3..292075c 100644
--- a/common/api/examFunc.js
+++ b/common/api/examFunc.js
@@ -12,11 +12,11 @@
 	let queTypeArr = []
 
 	quesModules.forEach((item, index) => {
-		
-		
+
+
 
 		let quesType = item.choicesType
-		
+
 		// 是否答题了
 		item.selectedFlag = false
 		// 答题的结果
@@ -24,32 +24,20 @@
 		// 题目是否做对
 		item.correctOrError = false
 
-
 		queTypeArr.push(quesType)
 
-		item.template = item.choicesType
-
-		if (item.template == 1) {
+		if (item.choicesType == 1 || item.choicesType == 3) {
 			item.dualChooseArr = []
 		}
 
 
 		item.options = item.examSubjectOptions
 
-		if (item.template == 2) {
-			item.rightAnswer = item.answer
-		}
-		
-		if (item.template == 0 || item.template == 1) {
-			item.options.forEach(it => {
-				it.newOptLetter = it.optionName
-				it.optContent = it.optionContent
-				it.optLetter = it.newOptLetter
-			})
+		if (item.choicesType == 0 || item.choicesType == 1 || item.choicesType == 3) {
 			item.options.reverse()
 		}
 
-		
+
 		questionList.push(item)
 
 	})
@@ -58,26 +46,4 @@
 
 	store.state.questionList = questionList
 
-}
-
-export const topicOptions = (options) => {
-
-	var questionList = store.state.questionList
-
-	questionList.forEach((item, index) => {
-
-	})
-
-	store.state.questionList = questionList
-
-	// for (let j = 0; j < quesModules[i].examSubjectOptions.length; j++) {
-	// 	// 解决theoryExamAnswer可能为null的问题,把它赋值为字符串
-	// 	quesModules[i].examSubjectOptions[j].tempAnswer = "" //暂存每题的答案
-	// 	quesModules[i].examSubjectOptions[j].template = quesModules[i].choicesType //防止template初始值是null
-	// 	quesModules[i].examSubjectOptions[j].recordId = store.state.examDetail
-	// 		.id //搬移recordId的位置
-	// 	quesModules[i].examSubjectOptions[j].blankArr = [] //新建blankArr属性,临时保存填空题答案
-	// 	quesModules[i].examSubjectOptions[j].dualChooseArr = [] //新建blankArr属性,临时保存填空题答案
-	// 	questionList.push(quesModules[i].examSubjectOptions[j])
-	// }
 }

--
Gitblit v1.9.3