zhangjie 3 年之前
父節點
當前提交
474ba3ff0b

+ 9 - 9
src/constant/constants.js

@@ -53,15 +53,6 @@ export const STUDENT_ONLINE_STATUS = {
   EXAMING: "考试中",
   BREAK_OFF: "通讯故障",
 };
-// 推流通讯
-export const STUDENT_EXAM_STATUS = {
-  FIRST_PREPARE: "首次候考",
-  ANSWERING: "正在答题",
-  BREAK_OFF: "",
-  RESUME_PREPARE: "",
-  FINISHED: "",
-  PERSISTED: "",
-};
 // 违纪、缺考
 export const STUDENT_BEHAVIOR_STATUS = {
   0: "违纪",
@@ -135,6 +126,15 @@ export const MONITOR_STATUS_SOURCE = {
   START: 1,
   FINISH: 0,
 };
+// 考试记录状态
+export const EXAM_RECORD_STATUS = {
+  FIRST_PREPARE: "首次候考",
+  ANSWERING: "正在答题",
+  BREAK_OFF: "已中断",
+  RESUME_PREPARE: "断点恢复候考",
+  FINISHED: "已结束考试",
+  PERSISTED: "数据已保存",
+};
 
 export const IMPORT_EXPORT_TASKS = [
   { code: "CALCULATE_EXAM_SCORE", name: "考试重新算分" },

+ 10 - 8
src/features/examwork/ExamManagement/ExamEdit.vue

@@ -106,7 +106,7 @@
             <el-form-item v-if="enableBreakProxy" label="断点次数">
               <el-input-number
                 v-model.trim="form.breakResumeCount"
-                :min="0"
+                :min="1"
                 :max="10000"
               ></el-input-number>
             </el-form-item>
@@ -609,7 +609,7 @@ export default {
       set(v) {
         if (v) {
           this.form.breakResumeCount = 1;
-          this.form.breakExpireSeconds = 0;
+          this.form.breakExpireSeconds = 60;
         } else {
           this.form.breakResumeCount = null;
           this.form.breakExpireSeconds = null;
@@ -796,12 +796,14 @@ export default {
           validator: (rule, value) => {
             // console.log(value);
             return new Promise((resolve, reject) => {
-              if (
-                this.enableBreakProxy &&
-                this.form.monitorRecord.length &&
-                value > 25 * 60
-              ) {
-                reject("开启回放情况下,断点时长不得超过25分钟");
+              if (this.enableBreakProxy) {
+                if (this.form.monitorRecord.length && value > 25 * 60) {
+                  reject("开启回放情况下,断点时长不得超过25分钟");
+                } else if (!value) {
+                  reject("请设置断点时长");
+                } else {
+                  resolve();
+                }
               } else {
                 resolve();
               }

+ 3 - 1
src/features/examwork/StudentManagement/StudentManagementDialog.vue

@@ -37,7 +37,9 @@
           <span slot-scope="scope">{{ scope.row.courseName }}</span>
         </el-table-column>
         <el-table-column width="100" label="状态">
-          <span slot-scope="scope">{{ scope.row.status }}</span>
+          <span slot-scope="scope">{{
+            scope.row.status | examRecordStatusFilter
+          }}</span>
         </el-table-column>
         <el-table-column width="100" label="操作">
           <template slot-scope="scope">

+ 0 - 1
src/features/invigilation/RealtimeMonitoring/VideoCommunication.vue

@@ -228,7 +228,6 @@ export default {
 
       let initLocalStreamResult = true;
       await localStream.initialize().catch((error) => {
-        console.dir(error);
         console.log(errorTips[error.name]);
         this.notifyError(errorTips[error.name] || "未知错误");
         initLocalStreamResult = false;

+ 5 - 1
src/filters/index.js

@@ -1,6 +1,6 @@
 import Vue from "vue";
 import { dateFormatForAPI } from "@/utils/utils";
-import { APPROVE_STATUS } from "@/constant/constants";
+import { APPROVE_STATUS, EXAM_RECORD_STATUS } from "@/constant/constants";
 
 Vue.filter("booleanYesNoFilter", function (val) {
   if (val === null) return "无";
@@ -60,3 +60,7 @@ Vue.filter("zeroOneApproveStatusFilter", function (val) {
   if (val === null) return "";
   return APPROVE_STATUS[val];
 });
+Vue.filter("examRecordStatusFilter", function (val) {
+  if (val === null) return "";
+  return EXAM_RECORD_STATUS[val];
+});