Преглед изворни кода

得到试题内容后,才能提交答案。后台限制。

Michael Wang пре 6 година
родитељ
комит
7a9bfe5438

+ 12 - 10
src/features/OnlineExam/Examing/ExamingHome.vue

@@ -213,16 +213,18 @@ export default {
       this.showFaceId = false;
     },
     async answerAllQuestions() {
-      const answers = this.examQuestionList.filter(eq => eq.dirty).map(eq => {
-        return Object.assign(
-          {
-            order: eq.order,
-            studentAnswer: eq.studentAnswer
-          },
-          eq.audioPlayTimes && { audioPlayTimes: eq.audioPlayTimes },
-          eq.isSign && { isSign: eq.isSign }
-        );
-      });
+      const answers = this.examQuestionList
+        .filter(eq => eq.dirty && eq.getQuestionContent)
+        .map(eq => {
+          return Object.assign(
+            {
+              order: eq.order,
+              studentAnswer: eq.studentAnswer
+            },
+            eq.audioPlayTimes && { audioPlayTimes: eq.audioPlayTimes },
+            eq.isSign && { isSign: eq.isSign }
+          );
+        });
       if (answers.length > 0) {
         await this.$http.post(
           "/api/ecs_oe_student/examQuestion/submitQuestionAnswer",

+ 4 - 0
src/features/OnlineExam/Examing/QuestionView.vue

@@ -61,6 +61,10 @@ export default {
         "/api/ecs_oe_student/examQuestion/getQuestionContent?questionId=" +
           this.examQuestion.questionId
       );
+      this.updateExamQuestion({
+        order: this.examQuestion.order,
+        getQuestionContent: true
+      });
       const question = res.data;
 
       const transferWellNumberAndTrustInBody = function(repQuestion) {