|
@@ -5,10 +5,10 @@
|
|
|
<div class="stu-answer"> {{studentAnswer}}</div>
|
|
|
<div class="score">({{question.questionScore}}分)</div>
|
|
|
</div>
|
|
|
- <div v-for="(option, index) in question.options" :key="option.id" class="option" @click="toggleAnswer(index)">
|
|
|
+ <div v-for="(option, index) in question.questionOptionList" :key="option.id" class="option" @click="toggleAnswer(index)">
|
|
|
<input type="checkbox" name="question" value="optionName[index]" :checked="studentAnswer && studentAnswer.includes(optionName[index])" />
|
|
|
<span style="padding: 0 10px;">{{optionName[index]}}: </span>
|
|
|
- <span class="question-options" v-html="option.content"></span>
|
|
|
+ <span class="question-options" v-html="option.body"></span>
|
|
|
</div>
|
|
|
<div class="reset">
|
|
|
<i-button type="warning" size="large" @click="() => answerQuestion(examQuestion.id, null)">重置答案</i-button>
|
|
@@ -57,7 +57,7 @@ export default {
|
|
|
) {
|
|
|
if (
|
|
|
["KeyA", "KeyB", "KeyC", "KeyD", "KeyE", "KeyF", "KeyG"]
|
|
|
- .slice(0, this.question.options.length)
|
|
|
+ .slice(0, this.question.questionOptionList.length)
|
|
|
.includes(e.code)
|
|
|
) {
|
|
|
if (this.studentAnswer.includes(e.code[3])) {
|
|
@@ -90,11 +90,17 @@ export default {
|
|
|
realAnswer = null;
|
|
|
}
|
|
|
if (realAnswer !== this.examQuestion.studentAnswer) {
|
|
|
- await this.$http.put("/api/exam_question/" + examQuestionId, {
|
|
|
- studentAnswer: realAnswer
|
|
|
- });
|
|
|
+ await this.$http.post(
|
|
|
+ "/api/ecs_oe_student/examQuestion/submitQuestionAnswer",
|
|
|
+ [
|
|
|
+ {
|
|
|
+ order: this.examQuestion.order,
|
|
|
+ studentAnswer: realAnswer
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ );
|
|
|
this.updateExamQuestion({
|
|
|
- examQuestionId,
|
|
|
+ order: this.$route.params.order,
|
|
|
studentAnswer: realAnswer
|
|
|
});
|
|
|
}
|