浏览代码

修改心跳bug,违纪提示显示,强制阅读。增加课程层次

Michael Wang 6 年之前
父节点
当前提交
deeec8fe12

+ 13 - 0
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -6,6 +6,10 @@
       <div><img class="user-avatar" :src="user.photoPath" alt="无底照" /></div>
       <div v-if="showObjectScore && !examResult.isWarn">客观分: {{examResult.objectiveScore}}</div>
       <div v-if="examResult.isWarn">成绩待审核</div>
+      <h1 v-if="examResult.isWarn" class="">违纪提示: </h1>
+      <div v-if="examResult.isWarn" class="" style="text-align: left;  padding-bottom: 20px">
+        <p v-html="cheatingRemark"></p>
+      </div>
       <h1 class="">考后说明: </h1>
       <div class="" style="text-align: left;  padding-bottom: 20px">
         <p v-html="afterExamRemark"></p>
@@ -57,6 +61,15 @@ export default {
     );
     this.showObjectScore = showObjectScore.data || false;
 
+    if (this.examResult.isWarn) {
+      const cheatingRemark = await this.$http.get(
+        "/api/ecs_exam_work/exam/examOrgProperty/" +
+          this.$route.params.examId +
+          `/CHEATING_REMARK`
+      );
+      this.cheatingRemark = cheatingRemark.data || false;
+    }
+
     this.paperTotalScore = this.paperStruct.defaultPaper.questionGroupList
       .map(q => q.groupScore)
       .reduce((p, c) => p + c);

+ 8 - 8
src/features/OnlineExam/Examing/RemainTime.vue

@@ -19,11 +19,11 @@ export default {
     this.first = true;
     this.getRemainTimeFromServer();
     this.intervalA = setInterval(() => {
-      if (this.first) {
-        // 跳过第一次
-        this.first = false;
-        return;
-      }
+      // if (this.first) {
+      //   // 跳过第一次
+      //   this.first = false;
+      //   return;
+      // }
       this.getRemainTimeFromServer();
     }, 60 * 1000);
     this.intervalB = setInterval(
@@ -43,9 +43,9 @@ export default {
           "/api/ecs_oe_student/examControl/examHeartbeat"
         );
         this.remainTime = res.data;
-        if (this.first) {
-          this.remainTime += 60 * 1000; //补偿心跳
-        }
+        // if (this.first) {
+        //   this.remainTime += 60 * 1000; //补偿心跳
+        // }
         this.heartbeatErrorNum = 0;
       } catch (e) {
         this.heartbeatErrorNum++;

+ 2 - 0
src/features/OnlineExam/OnlineExamList.vue

@@ -5,6 +5,7 @@
         <tr class="list-header qm-primary-strong-text">
           <td>课程</td>
           <td>专业</td>
+          <td>层次</td>
           <td>考试开放时间</td>
           <td>剩余考试次数</td>
           <td style="max-width: 200px">操作</td>
@@ -12,6 +13,7 @@
 
         <tr v-for="course in courses" :key="course.examId">
           <td>{{ course.courseName }}</td>
+          <td>{{ course.courseLevel }}</td>
           <td>{{ course.specialtyName }}</td>
           <td>{{ course.startTime }} <br> ~ <br> {{ course.endTime }}</td>
           <td>{{ course.allowExamCount }}</td>

+ 2 - 1
src/features/OnlineExam/OnlineExamOverview.vue

@@ -49,12 +49,13 @@ export default {
       startInfo: null,
       paperStruct: null,
       remainTime: TOTAL_READ_TIME,
-      isForceRead: this.remainTime > FORCE_READ_TIME
+      isForceRead: true
     };
   },
   async mounted() {
     this.intervalId = setInterval(() => {
       this.remainTime = this.remainTime - 1; // 为了界面更新,不能写 this.remainTime--
+      this.isForceRead = TOTAL_READ_TIME - this.remainTime < FORCE_READ_TIME;
       if (this.remainTime === 0) {
         this.goToPaper();
       }