Browse Source

完善考试结果信息查找

Michael Wang 3 years ago
parent
commit
d4127e4757
1 changed files with 9 additions and 10 deletions
  1. 9 10
      src/features/OnlineExam/ExamEnd/ExamEnd.vue

+ 9 - 10
src/features/OnlineExam/ExamEnd/ExamEnd.vue

@@ -17,7 +17,7 @@ let cheatingRemark = $ref("");
 let showObjectScore = $ref(false);
 let showObjectScore = $ref(false);
 let showCheatingRemark = $ref(false);
 let showCheatingRemark = $ref(false);
 
 
-let examResult: { isWarn: boolean; objectiveScore: number } | null = null;
+let examResult: { isWarn: boolean; objectiveScore: number } | null = $ref(null);
 
 
 onMounted(async function () {
 onMounted(async function () {
   _hmt.push(["_trackEvent", "考试结束页面", "进入页面"]);
   _hmt.push(["_trackEvent", "考试结束页面", "进入页面"]);
@@ -72,13 +72,14 @@ async function getExamResult() {
         await httpApp.get(
         await httpApp.get(
           "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
           "/api/ecs_oe_student/examControl/getEndExamInfo?examRecordDataId=" +
             examRecordDataId,
             examRecordDataId,
-          { "axios-retry": { retries: 60 }, noErrorMessage: true }
+          { "axios-retry": { retries: 10 }, noErrorMessage: true }
         )
         )
       ).data;
       ).data;
-      await new Promise((res) => setTimeout(res, 5 * 1000));
+      // examResult = { isWarn: true, objectiveScore: 0.0 };
       if (examResult) {
       if (examResult) {
         break;
         break;
       }
       }
+      await new Promise((res) => setTimeout(res, 5 * 1000));
     }
     }
 
 
     logger({
     logger({
@@ -145,13 +146,11 @@ onUnmounted(() => {
         </div>
         </div>
       </div>
       </div>
 
 
-      <div v-if="showObjectScore" class="tw-text-center tw-flex-1">
-        <div v-if="examResult">
-          <div v-if="showCheatingRemark && examResult.isWarn">
-            <div class="tw-text-xl">违纪提示:</div>
-            <div style="text-align: left; padding-bottom: 20px">
-              <p v-html="cheatingRemark"></p>
-            </div>
+      <div v-if="showObjectScore && showCheatingRemark" class="tw-flex-1">
+        <div v-if="examResult?.isWarn">
+          <div class="tw-text-xl">违纪提示:</div>
+          <div style="text-align: left; padding-bottom: 20px">
+            <p v-html="cheatingRemark"></p>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>