Pārlūkot izejas kodu

临时修改考试属性

Michael Wang 5 gadi atpakaļ
vecāks
revīzija
42875a76f4

+ 2 - 2
src/features/OfflineExam/OfflineExamUpload.vue

@@ -56,12 +56,12 @@ export default {
   },
   async created() {
     const res = await this.$http.get(
-      "/api/ecs_exam_work/exam/examOrgProperty/" +
+      "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
         this.course.examId +
         `/OFFLINE_UPLOAD_FILE_TYPE`
     );
 
-    this.uploadFileFormat = res.data || [];
+    this.uploadFileFormat = res.data.OFFLINE_UPLOAD_FILE_TYPE || [];
     this.uploadFileFormat = this.uploadFileFormat.map(v => v.toLowerCase());
     this.uploadFileAccept = this.uploadFileFormat
       .map(v => "application/" + v)

+ 2 - 2
src/features/OnlineExam/Examing/ExamPaper.vue

@@ -94,11 +94,11 @@ export default {
   methods: {
     async initData() {
       const practiceType = (await this.$http.get(
-        "/api/ecs_exam_work/exam/examOrgProperty/" +
+        "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
           this.examId +
           `/PRACTICE_TYPE`
       )).data;
-      this.practiceType = practiceType; // IN_PRACTICE NO_ANSWER
+      this.practiceType = practiceType.PRACTICE_TYPE; // IN_PRACTICE NO_ANSWER
 
       const [
         examData,

+ 6 - 6
src/features/OnlineExam/Examing/ExamingEnd.vue

@@ -127,25 +127,25 @@ export default {
         return;
       }
       const afterExamRemark = await this.$http.get(
-        "/api/ecs_exam_work/exam/examOrgProperty/" +
+        "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
           examId +
           `/AFTER_EXAM_REMARK`
       );
-      this.afterExamRemark = afterExamRemark.data || "";
+      this.afterExamRemark = afterExamRemark.data.AFTER_EXAM_REMARK || "";
       const showObjectScore = await this.$http.get(
-        "/api/ecs_exam_work/exam/examOrgProperty/" +
+        "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
           examId +
           `/IS_OBJ_SCORE_VIEW`
       );
-      this.showObjectScore = showObjectScore.data || false;
+      this.showObjectScore = showObjectScore.data.IS_OBJ_SCORE_VIEW || false;
 
       if (this.examResult.isWarn) {
         const cheatingRemark = await this.$http.get(
-          "/api/ecs_exam_work/exam/examOrgProperty/" +
+          "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
             examId +
             `/CHEATING_REMARK`
         );
-        this.cheatingRemark = cheatingRemark.data || "";
+        this.cheatingRemark = cheatingRemark.data.CHEATING_REMARK || "";
       }
     } catch (error) {
       this.$Message.error({

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

@@ -112,7 +112,7 @@ export default {
     let faceEnable;
     try {
       faceEnable = await this.$http.get(
-        "/api/ecs_exam_work/exam/examOrgProperty/" +
+        "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
           this.$route.params.examId +
           `/IS_FACE_ENABLE`
       );
@@ -126,7 +126,7 @@ export default {
       return;
     }
 
-    if (faceEnable.data) {
+    if (faceEnable.data.IS_FACE_ENABLE) {
       this.faceEnable = true;
 
       // setTimeout(() => {
@@ -160,7 +160,7 @@ export default {
 
       try {
         const snapshotInterval = await this.$http.get(
-          "/api/ecs_exam_work/exam/examOrgProperty/" +
+          "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
             this.$route.params.examId +
             `/SNAPSHOT_INTERVAL`
         );
@@ -169,10 +169,12 @@ export default {
           this.snapInterval = setInterval(() => {
             this.serverLog(
               "debug/S-002001",
-              "根据抓拍间隔抓拍:抓拍间隔=" + snapshotInterval.data + "分钟"
+              "根据抓拍间隔抓拍:抓拍间隔=" +
+                snapshotInterval.data.SNAPSHOT_INTERVAL +
+                "分钟"
             );
             this.toggleSnapNow();
-          }, snapshotInterval.data * 60 * 1000);
+          }, snapshotInterval.data.SNAPSHOT_INTERVAL * 60 * 1000);
         }
       } catch (error) {
         this.$Message.error({
@@ -304,21 +306,21 @@ export default {
 
       if (exam.examType === "PRACTICE") {
         const practiceType = (await this.$http.get(
-          "/api/ecs_exam_work/exam/examOrgProperty/" +
+          "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
             this.$route.params.examId +
             `/PRACTICE_TYPE`
         )).data;
-        this.practiceType = practiceType; // IN_PRACTICE NO_ANSWER
-        exam.practiceType = practiceType;
+        this.practiceType = practiceType.SNAPSHOT_INTERVAL; // IN_PRACTICE NO_ANSWER
+        exam.practiceType = practiceType.SNAPSHOT_INTERVAL;
       }
 
       try {
         let freezeTimeData = await this.$http.get(
-          "/api/ecs_exam_work/exam/examOrgProperty/" +
+          "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
             this.$route.params.examId +
             `/FREEZE_TIME`
         );
-        exam.freezeTime = freezeTimeData.data;
+        exam.freezeTime = freezeTimeData.data.FREEZE_TIME;
       } catch (error) {
         console.log("获取考试冻结时间失败--忽略");
       }

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

@@ -170,7 +170,7 @@ export default {
         let faceLiveness = null;
         try {
           faceLiveness = await this.$http.get(
-            "/api/ecs_exam_work/exam/examOrgProperty/" +
+            "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
               course.examId +
               `/IS_FACE_VERIFY`
           );
@@ -183,7 +183,7 @@ export default {
           });
           return;
         }
-        if (faceLiveness.data) {
+        if (faceLiveness.data.IS_FACE_VERIFY) {
           this.processingMessage = "正在检测底照是否满足活体检测标准...";
           let checkBasePhoto;
           try {

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

@@ -76,11 +76,11 @@ export default {
 
     try {
       const exam = await this.$http.get(
-        "/api/ecs_exam_work/exam/examOrgProperty/" +
+        "/api/ecs_exam_work/exam/examOrgPropertyFromCache4StudentSession/" +
           this.$route.params.examId +
           `/BEFORE_EXAM_REMARK`
       );
-      this.beforeExamRemark = exam.data || "";
+      this.beforeExamRemark = exam.data.BEFORE_EXAM_REMARK || "";
       const res = await this.$http.get(
         "/api/ecs_oe_student/examControl/startExam?examStudentId=" +
           this.$route.query.examStudentId