|
@@ -7,6 +7,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="question-info">
|
|
<div class="question-info">
|
|
<el-popover
|
|
<el-popover
|
|
|
|
+ v-if="!isStart && !isSubmit"
|
|
v-model="isShowQuestionList"
|
|
v-model="isShowQuestionList"
|
|
:width="200"
|
|
:width="200"
|
|
:disabled="isStart"
|
|
:disabled="isStart"
|
|
@@ -15,13 +16,13 @@
|
|
>
|
|
>
|
|
<ul class="question-list">
|
|
<ul class="question-list">
|
|
<li
|
|
<li
|
|
- v-for="({ id, type: question_type }, i) in questionList"
|
|
|
|
|
|
+ v-for="({ id, type: question_type, additional_type }, i) in questionList"
|
|
:key="id"
|
|
:key="id"
|
|
:class="[{ active: i === curQuestionIndex }]"
|
|
:class="[{ active: i === curQuestionIndex }]"
|
|
@click="selectQuestion(i)"
|
|
@click="selectQuestion(i)"
|
|
>
|
|
>
|
|
<span>{{ i + 1 }}.</span>
|
|
<span>{{ i + 1 }}.</span>
|
|
- <span>{{ exerciseNames[question_type] }}</span>
|
|
|
|
|
|
+ <span>{{ getExerciseName('list', question_type, additional_type) }}</span>
|
|
</li>
|
|
</li>
|
|
</ul>
|
|
</ul>
|
|
|
|
|
|
@@ -32,7 +33,7 @@
|
|
>
|
|
>
|
|
<SvgIcon icon-class="list" />
|
|
<SvgIcon icon-class="list" />
|
|
<span>{{ curQuestionIndex + 1 }} / {{ questionList.length }}</span>
|
|
<span>{{ curQuestionIndex + 1 }} / {{ questionList.length }}</span>
|
|
- <span>{{ curQuestionIndex < 0 ? '' : exerciseNames[questionList[curQuestionIndex].type] }}</span>
|
|
|
|
|
|
+ <span>{{ getExerciseName('cur') }}</span>
|
|
</div>
|
|
</div>
|
|
</el-popover>
|
|
</el-popover>
|
|
<div v-if="!isTeacherAnnotations" class="round primary">
|
|
<div v-if="!isTeacherAnnotations" class="round primary">
|
|
@@ -316,10 +317,10 @@ export default {
|
|
this.time = answer_time_limit_minute * 60;
|
|
this.time = answer_time_limit_minute * 60;
|
|
this.correct_answer_show_mode = correct_answer_show_mode;
|
|
this.correct_answer_show_mode = correct_answer_show_mode;
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
|
+ this.answer_mode = answer_mode;
|
|
// 如果已经存在答题记录,则直接显示答题报告
|
|
// 如果已经存在答题记录,则直接显示答题报告
|
|
if (this.user_answer_record_info.is_exist_answer_record === 'true') {
|
|
if (this.user_answer_record_info.is_exist_answer_record === 'true') {
|
|
this.answer_record_id = this.user_answer_record_info.answer_record_id;
|
|
this.answer_record_id = this.user_answer_record_info.answer_record_id;
|
|
- this.answer_mode = answer_mode;
|
|
|
|
this.isSubmit = true;
|
|
this.isSubmit = true;
|
|
}
|
|
}
|
|
if (!this.isTeacher) {
|
|
if (!this.isTeacher) {
|
|
@@ -558,6 +559,7 @@ export default {
|
|
.then(() => {
|
|
.then(() => {
|
|
this.isSubmit = true;
|
|
this.isSubmit = true;
|
|
this.curQuestionIndex = -1;
|
|
this.curQuestionIndex = -1;
|
|
|
|
+ this.user_answer_record_info.is_exist_answer_record = 'true';
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
@@ -593,6 +595,23 @@ export default {
|
|
this.isPopover = false;
|
|
this.isPopover = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getExerciseName(type, question_type, additional_type) {
|
|
|
|
+ if (type === 'cur') {
|
|
|
|
+ if (this.curQuestionIndex < 0) return '';
|
|
|
|
+ let { type: _type, additional_type: _additional_type } = this.questionList[this.curQuestionIndex];
|
|
|
|
+ if (_type === 'select') {
|
|
|
|
+ return _additional_type === 'single' ? '单选题' : '多选题';
|
|
|
|
+ }
|
|
|
|
+ return this.exerciseNames[_type];
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (type === 'list') {
|
|
|
|
+ if (question_type === 'select') {
|
|
|
|
+ return additional_type === 'single' ? '单选题' : '多选题';
|
|
|
|
+ }
|
|
|
|
+ return this.exerciseNames[question_type];
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|