|
@@ -3,16 +3,19 @@
|
|
|
<div style="overflow: auto">
|
|
|
<div class="question-header">
|
|
|
<Icon :type="examQuestion.isSign ? 'ios-star':'ios-star-outline'" :style="{color: '#ffcc00'}" class="star" @click="toggleSign" />
|
|
|
- <question-index :examQuestion="examQuestion" />
|
|
|
+ <question-index v-if="examQuestion.getQuestionContent" :examQuestion="examQuestion" />
|
|
|
</div>
|
|
|
- <div v-if="parentQuestionBody" class="question-view">
|
|
|
+ <div v-if="parentQuestionBody && examQuestion.getQuestionContent" class="question-view">
|
|
|
<question-body :questionBody="parentQuestionBody" :examQuestion="examQuestion" style="margin-bottom: 20px" :key="examQuestion.questionId"></question-body>
|
|
|
<div class="hr" />
|
|
|
</div>
|
|
|
+ <div v-if="!examQuestion.getQuestionContent">
|
|
|
+ 试题获取中...
|
|
|
+ </div>
|
|
|
|
|
|
<transition name="fade">
|
|
|
|
|
|
- <div v-show="question && examQuestion" class="question-view" :key="examQuestion.order">
|
|
|
+ <div v-show="question && examQuestion && examQuestion.getQuestionContent" class="question-view" :key="examQuestion.order">
|
|
|
|
|
|
<template v-if="question && question.questionType === 'SINGLE_CHOICE'">
|
|
|
<single-question-view :question="question" :examQuestion="examQuestion" :key="examQuestion.order" />
|
|
@@ -51,8 +54,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
parentQuestionBody: null,
|
|
|
- question: null,
|
|
|
- updateQuestioning: false // TODO: 更新问题时,隐藏旧内容。可能用不着
|
|
|
+ question: null
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -64,7 +66,6 @@ export default {
|
|
|
methods: {
|
|
|
...mapMutations(["updateExamQuestion"]),
|
|
|
async updateQuestion() {
|
|
|
- this.updateQuestioning = true;
|
|
|
const currentExamQuestion = this.examQuestion; // 避免以后执行时,this.examQuestion换掉了
|
|
|
const examRecordDataId = this.$route.params.examRecordDataId;
|
|
|
|
|
@@ -77,12 +78,10 @@ export default {
|
|
|
examRecordDataId
|
|
|
);
|
|
|
} catch (e) {
|
|
|
- this.updateQuestioning = false;
|
|
|
this.parentQuestionBody = null;
|
|
|
this.question = null;
|
|
|
return;
|
|
|
}
|
|
|
- this.updateQuestioning = false;
|
|
|
const question = qContentRes.data;
|
|
|
|
|
|
this.updateExamQuestion({
|