|
@@ -34,7 +34,9 @@
|
|
|
<!-- 单选题、多选题的选项区域 -->
|
|
|
<div
|
|
|
v-if="
|
|
|
- examQuestionList[answerIndex].type === questionType.singleChoice ||
|
|
|
+ examQuestionList[answerIndex].type === questionType.TrueOrFalse ||
|
|
|
+ examQuestionList[answerIndex].type ===
|
|
|
+ questionType.singleChoice ||
|
|
|
examQuestionList[answerIndex].type === questionType.multipleChoice
|
|
|
"
|
|
|
class="exam-question-options"
|
|
@@ -120,7 +122,8 @@ export default {
|
|
|
questionType: {
|
|
|
singleChoice: "DanXuan", // 单选题
|
|
|
multipleChoice: "DuoXuan", // 多选题
|
|
|
- gapFilling: "TianKong" // 填空题
|
|
|
+ gapFilling: "TianKong", // 填空题
|
|
|
+ TrueOrFalse: "PanDuanTi" // 判断题
|
|
|
}, // 试题类型
|
|
|
examQuestionList: [], // 试题列表
|
|
|
answerIndex: null, // 当前试题的下标索引
|
|
@@ -244,7 +247,10 @@ export default {
|
|
|
console.log(content);
|
|
|
questionInputNum = this.getPlaceholderCount(content);
|
|
|
questionContent = content.replace("$PH$", "()");
|
|
|
- console.log(questionContent, questionInputNum);
|
|
|
+ break;
|
|
|
+ case this.questionType.TrueOrFalse:
|
|
|
+ console.log("判断题");
|
|
|
+ typeTxt = "判断题";
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
@@ -313,7 +319,8 @@ export default {
|
|
|
}
|
|
|
let answerQuestionType = this.examQuestionList[this.answerIndex].type;
|
|
|
switch (answerQuestionType) {
|
|
|
- // 单选题
|
|
|
+ // 判断题、单选题
|
|
|
+ case this.questionType.TrueOrFalse:
|
|
|
case this.questionType.singleChoice:
|
|
|
this.answerValue = [value];
|
|
|
break;
|
|
@@ -362,6 +369,7 @@ export default {
|
|
|
},
|
|
|
// 方法:判断当前题目是否正确
|
|
|
getAnswerItemResultFun(item) {
|
|
|
+ console.log(item);
|
|
|
let isSure = false;
|
|
|
let sureNum = 0;
|
|
|
item.finalAnswer.forEach(it => {
|