Quellcode durchsuchen

考试明细-调卷-显示小题得分

deason vor 2 Jahren
Ursprung
Commit
e15027b28c
1 geänderte Dateien mit 32 neuen und 6 gelöschten Zeilen
  1. 32 6
      src/modules/oe/views/examPaperDetail.vue

+ 32 - 6
src/modules/oe/views/examPaperDetail.vue

@@ -74,9 +74,10 @@
                   font-weight: bold;
                 "
               >
-                <div>标准答案:</div>
+                <div>标准答案</div>
                 <span v-html="questionUnit.correctAnswer"></span>
               </div>
+
               <div
                 v-if="
                   questionUnit.answerType !== 'SINGLE_AUDIO' ||
@@ -86,7 +87,7 @@
                 "
                 style="color: blue; font-weight: bold"
               >
-                学生答案:
+                学生答案
                 <span v-html="questionUnit.studentAnswer"></span>
                 <i
                   v-show="
@@ -101,6 +102,7 @@
                   class="el-icon-close"
                 ></i>
               </div>
+
               <div
                 v-if="
                   questionUnit.answerType === 'SINGLE_AUDIO' &&
@@ -118,7 +120,7 @@
                     margin-right: 10px;
                   "
                 >
-                  学生答案:
+                  学生答案
                 </div>
                 <audio
                   v-if="
@@ -131,6 +133,18 @@
                   controls
                 ></audio>
               </div>
+
+              <div
+                style="
+                  display: flex;
+                  flex-direction: row;
+                  color: red;
+                  font-style: italic;
+                "
+              >
+                <div>得分:</div>
+                <span>{{ questionUnit.studentScore }}</span>
+              </div>
             </div>
           </div>
         </div>
@@ -189,7 +203,12 @@ export default {
           this.$http
             .get(
               "/api/ecs_oe_admin/examRecordQuestions/getExamRecordQuestions",
-              { params: { examRecordDataId: this.examRecordDataId } }
+              {
+                params: {
+                  examRecordDataId: this.examRecordDataId,
+                  withScore: true,
+                },
+              }
             )
             .then((response) => {
               this.examQuestionList = response.data.examQuestionEntities;
@@ -239,8 +258,15 @@ export default {
     },
     reOrderOptions(question, order) {
       question.order = order; //设置序号
-      var questionScore = this.examQuestionList[order - 1].questionScore;
-      var studentAnswer = this.examQuestionList[order - 1].studentAnswer;
+      var examQuestion = this.examQuestionList[order - 1];
+      var questionScore = examQuestion.questionScore;
+      var studentAnswer = examQuestion.studentAnswer;
+      if (examQuestion.studentScore || examQuestion.studentScore === 0) {
+        question.studentScore = examQuestion.studentScore + "分";
+      } else {
+        question.studentScore = "-- 分";
+      }
+
       var correctAnswer = question.rightAnswer; //从题中获取正确答案
       var optionList = question.questionOptionList;
       //单选,多选