zhangjie 4 år sedan
förälder
incheckning
230fbe9641

+ 1 - 1
src/features/invigilation/ExamReport/ExamReport.vue

@@ -26,7 +26,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>

+ 1 - 1
src/features/invigilation/ExamReport/ReportBreach.vue

@@ -18,7 +18,7 @@
       >
       <el-table-column prop="breachStatus" label="违纪/正常">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>

+ 1 - 1
src/features/invigilation/ExamReport/ReportCancalBreach.vue

@@ -18,7 +18,7 @@
       </el-table-column>
       <el-table-column prop="breachStatus" label="违纪/正常">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>

+ 15 - 6
src/features/invigilation/InvigilationDetail/InvigilationDetail.vue

@@ -48,7 +48,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>
@@ -201,7 +201,7 @@
       <el-table-column prop="warningCount" label="预警数"></el-table-column>
       <el-table-column prop="breachStatus" label="违纪">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>
@@ -278,9 +278,16 @@ export default {
       examRooms: [],
       examCourses: [],
       dataList: [],
-      userId: this.$store.state.user.id,
     };
   },
+  computed: {
+    user() {
+      return this.$store.state.user;
+    },
+    IS_INVIGILATE() {
+      return this.user.roleCodes.includes("INVIGILATE");
+    },
+  },
   mounted() {
     this.initData();
   },
@@ -316,8 +323,7 @@ export default {
       this.toPage(1);
     },
     async getExamBatchList() {
-      const user = this.$store.state.user;
-      const userId = user.roleCodes.includes("INVIGILATE") ? user.id : null;
+      const userId = this.IS_INVIGILATE ? this.user.id : null;
       const res = await examBatchList(userId);
       this.examBatchs = res.data.data;
     },
@@ -346,8 +352,11 @@ export default {
       }
     },
     toDetail(row) {
+      const router = this.IS_INVIGILATE
+        ? "WarningDetail"
+        : "InvigilationWarningDetail";
       this.$router.push({
-        name: "WarningDetail",
+        name: router,
         params: { recordId: row.examRecordId },
       });
     },

+ 2 - 2
src/features/invigilation/OnlinePatrol/OnlinePatrol.vue

@@ -42,7 +42,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>
@@ -175,7 +175,7 @@
       <el-table-column prop="warningCount" label="预警数"></el-table-column>
       <el-table-column prop="breachStatus" label="违纪">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>

+ 6 - 0
src/features/invigilation/OnlinePatrol/PatrolWarningDetail.vue

@@ -299,6 +299,12 @@ export default {
             ? [info.remark["FACE_VERIFY_PHOTO"]]
             : "";
           info.photos = info.remark["PHOTOS"] || facePhoto;
+        } else if (info.updateTime) {
+          info.startTime = formatDate("HH:mm:ss", new Date(info.createTime));
+          info.endTime = formatDate("HH:mm:ss", new Date(info.updateTime));
+          info.durationTime = timeNumberToText(
+            info.updateTime - info.createTime
+          );
         }
         return info;
       });

+ 1 - 1
src/features/invigilation/ProgressDetail/ProgressDetail.vue

@@ -28,7 +28,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>

+ 9 - 11
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoring.vue

@@ -152,13 +152,13 @@
               >
             </el-dropdown-menu>
           </el-dropdown>
-          <el-button
+          <!-- <el-button
             type="primary"
             icon="icon icon-handle"
             @click="finishInvigilation"
             v-if="!this.IS_INSPECTION"
             >手动收卷</el-button
-          >
+          > -->
           <el-button
             type="danger"
             icon="icon icon-over"
@@ -213,7 +213,7 @@
       <el-table-column prop="warningCount" label="预警数"></el-table-column>
       <el-table-column prop="breachStatus" label="违纪">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>
@@ -240,7 +240,7 @@
       </div>
     </div>
 
-    <div class="part-page">
+    <div class="part-page" v-if="total > size">
       <el-pagination
         background
         layout="prev, pager, next,total,sizes,jumper"
@@ -326,7 +326,7 @@ export default {
       setT: null,
       current: 1,
       total: 0,
-      size: 10,
+      size: 100,
       multipleSelection: [],
       batchId: "",
       batchs: [],
@@ -363,11 +363,11 @@ export default {
     };
   },
   methods: {
-    ...mapActions("invigilation", ["updateDetailIds"]),
+    ...mapActions("invigilation", ["setDetailIds"]),
     async getList() {
       const datas = {
         ...this.filter,
-        pageNumber: this.current - 1,
+        pageNumber: this.current,
         pageSize: this.size,
       };
 
@@ -385,6 +385,8 @@ export default {
           return item;
         });
       }
+      const ids = res.data.data.records.map((item) => item.examRecordId);
+      this.setDetailIds([...new Set(ids)]);
 
       this.total = res.data.data.total;
     },
@@ -393,10 +395,6 @@ export default {
       this.getList();
     },
     toSearch() {
-      this.updateDetailIds({
-        filterData: this.filter,
-        fetchFunc: invigilateList,
-      });
       this.toPage(1);
     },
     async getMonitorCallCount() {

+ 13 - 7
src/features/invigilation/RealtimeMonitoring/StudentBreachDialog.vue

@@ -11,7 +11,7 @@
   >
     <div class="tips-info tips-error">
       <i class="el-icon-warning"></i>
-      <p v-if="modalForm.status">
+      <p v-if="modalForm.breachStatus">
         本操作记录考生的违规事实,并对考生进行违纪处理,请监考老师仔细核对好考生的信息,谨慎操作!
       </p>
       <p v-else>
@@ -78,8 +78,9 @@ const initModalForm = {
   identity: "",
   courseNameCode: "",
   description: "",
-  examRecordId: 0,
-  status: 0,
+  examRecordId: [],
+  breachStatus: 0,
+  status: 1,
   type: "",
 };
 
@@ -114,13 +115,18 @@ export default {
   },
   methods: {
     opened() {
+      // breachStatus: 0:违纪,1:正常
       this.modalForm = Object.assign({}, initModalForm, this.instance);
-      this.reasonTitle = this.modalForm.status ? "违规类型:" : "撤销原因:";
-      this.descTitle = this.modalForm.status ? "违规描述:" : "原因详述:";
-      this.rules.type[0].message = this.modalForm.status
+      this.reasonTitle = this.modalForm.breachStatus
+        ? "违规类型:"
+        : "撤销原因:";
+      this.descTitle = this.modalForm.breachStatus
+        ? "违规描述:"
+        : "原因详述:";
+      this.rules.type[0].message = this.modalForm.breachStatus
         ? "请选择违规类型"
         : "请选择撤销原因";
-      const options = this.modalForm.status
+      const options = this.modalForm.breachStatus
         ? BREACH_REASON_TYPE
         : BREACH_REPEAL_TYPE;
       let typeList = [];

+ 3 - 2
src/features/invigilation/RealtimeMonitoring/VideoCommunication.vue

@@ -19,9 +19,9 @@
           <div class="student-item">
             <div class="student-cover">
               <img
-                :src="item.examStudentAvatar"
+                :src="item.basePhotoPath"
                 :alt="item.examStudentId"
-                v-if="item.examStudentAvatar"
+                v-if="item.basePhotoPath"
               />
               <div class="avatar-default" v-else>
                 <i class="el-icon-user-solid"></i>
@@ -260,6 +260,7 @@ export default {
     background: #fff;
     border-radius: 10px;
     text-align: center;
+    margin-bottom: 20px;
     .el-button {
       margin-bottom: 12px;
     }

+ 15 - 5
src/features/invigilation/RealtimeMonitoring/WarningDetail.vue

@@ -160,13 +160,16 @@
             <span></span>
             <span>
               <b>违纪状态:</b>
-              <b :class="{ 'color-danger': detailInfo.breachStatus }">
+              <b :class="{ 'color-danger': !detailInfo.breachStatus }">
                 {{ !detailInfo.breachStatus ? "违纪" : "正常" }}
               </b>
             </span>
           </p>
-          <el-button type="danger" icon="icon icon-stop" @click="toBreach"
-            >违纪处理</el-button
+          <el-button
+            :type="!detailInfo.breachStatus ? 'success' : 'danger'"
+            icon="icon icon-stop"
+            @click="toBreach"
+            >{{ !detailInfo.breachStatus ? "撤销违纪" : "违纪处理" }}</el-button
           >
           <el-button type="warning" icon="icon icon-forbide" @click="toFinish"
             >强制收卷</el-button
@@ -219,6 +222,7 @@
     <!-- student-breach-dialog -->
     <student-breach-dialog
       :instance="curDetail"
+      @modified="breachFinish"
       ref="StudentBreachDialog"
     ></student-breach-dialog>
     <!-- warning-text-message-dialog -->
@@ -468,8 +472,11 @@ export default {
         identity: this.detailInfo.identity,
         courseNameCode: this.detailInfo.courseNameCode,
         description: "",
-        examRecordId: this.detailInfo.examRecordId,
-        status: 1,
+        examRecordId: [this.detailInfo.examRecordId],
+        breachStatus: this.detailInfo.breachStatus,
+        status: this.detailInfo.breachStatus ? 0 : 1,
+        // 状态,0:新建,1:撤销
+        // 违纪状态:正常(1)=>新建,违纪(0)=>撤销
         type: "",
       };
       this.$refs.StudentBreachDialog.open();
@@ -501,6 +508,9 @@ export default {
     toSendAudioMsg() {
       this.$refs.AudioRecordDialog.open();
     },
+    breachFinish() {
+      this.getInvigilateDetail();
+    },
     // video relative
     initSubscribeVideo() {
       if (this.firstViewVideo.id) this.firstViewVideoReady = true;

+ 1 - 1
src/features/invigilation/ReexamApply/ReexamApply.vue

@@ -29,7 +29,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>

+ 1 - 1
src/features/invigilation/ReexamChecked/ReexamChecked.vue

@@ -29,7 +29,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>

+ 8 - 2
src/features/invigilation/ReexamPending/ReexamPending.vue

@@ -29,7 +29,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>
@@ -148,7 +148,7 @@
 
     <check-reexam-dialog
       :instance="curReexam"
-      @modified="getList"
+      @modified="checkReexamFinish"
       ref="CheckReexamDialog"
     ></check-reexam-dialog>
   </div>
@@ -162,6 +162,7 @@ import {
 } from "@/api/invigilation";
 import { REEXAM_REASON } from "@/constant/constants";
 import CheckReexamDialog from "./CheckReexamDialog";
+import { mapActions } from "vuex";
 
 export default {
   name: "reexam-pending",
@@ -195,6 +196,7 @@ export default {
     this.initData();
   },
   methods: {
+    ...mapActions("invigilation", ["fetchReexamPendingCount"]),
     async initData() {
       await this.getExamBatchList();
       this.filter.examId = this.examBatchs[0] && this.examBatchs[0].id;
@@ -246,6 +248,10 @@ export default {
       this.curReexam = { ...row };
       this.$refs.CheckReexamDialog.open();
     },
+    checkReexamFinish() {
+      this.getList();
+      this.fetchReexamPendingCount();
+    },
   },
 };
 </script>

+ 1 - 1
src/features/invigilation/StudentLogManage/StudentLogManage.vue

@@ -44,7 +44,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>

+ 15 - 5
src/features/invigilation/WarningManage/WarningManage.vue

@@ -32,7 +32,7 @@
             >
               <el-option
                 v-for="item in examRooms"
-                :key="item.roomCode"
+                :key="item.id"
                 :value="item.roomCode"
                 :label="item.roomName"
               ></el-option>
@@ -155,7 +155,7 @@
       <el-table-column prop="warningCount" label="预警数"></el-table-column>
       <el-table-column prop="breachStatus" label="是否违纪">
         <template slot-scope="scope">
-          <span :class="{ 'color-danger': scope.row.breachStatus }">
+          <span :class="{ 'color-danger': !scope.row.breachStatus }">
             {{ !scope.row.breachStatus ? "违纪" : "正常" }}
           </span>
         </template>
@@ -234,6 +234,14 @@ export default {
       dataList: [],
     };
   },
+  computed: {
+    user() {
+      return this.$store.state.user;
+    },
+    IS_INVIGILATE() {
+      return this.user.roleCodes.includes("INVIGILATE");
+    },
+  },
   mounted() {
     this.initData();
   },
@@ -269,8 +277,7 @@ export default {
       this.toPage(1);
     },
     async getExamBatchList() {
-      const user = this.$store.state.user;
-      const userId = user.roleCodes.includes("INVIGILATE") ? user.id : null;
+      const userId = this.IS_INVIGILATE ? this.user.id : null;
       const res = await examBatchList(userId);
       this.examBatchs = res.data.data;
     },
@@ -317,8 +324,11 @@ export default {
           warningIds: [row.warningId],
         });
       }
+      const router = this.IS_INVIGILATE
+        ? "WarningDetail"
+        : "InvigilationWarningDetail";
       this.$router.push({
-        name: "WarningDetail",
+        name: router,
         params: { recordId: row.examRecordId },
       });
     },

+ 11 - 0
src/router/invigilation.js

@@ -89,6 +89,17 @@ const routes = [
         /* webpackChunkName: "invigilation" */ "../features/invigilation/InvigilationDetail/InvigilationDetail"
       ),
   },
+  {
+    path: "invigilation-warning-detail/:recordId",
+    name: "InvigilationWarningDetail",
+    component: () =>
+      import(
+        /* webpackChunkName: "invigilation" */ "../features/invigilation/OnlinePatrol/PatrolWarningDetail"
+      ),
+    meta: {
+      relate: "InvigilationDetail",
+    },
+  },
   {
     path: "warning-manage",
     name: "WarningManage",

+ 1 - 1
src/store/modules/invigilation.js

@@ -53,7 +53,7 @@ const actions = {
   async updateDetailIds({ commit }, { filterData, fetchFunc }) {
     const res = await fetchFunc({
       ...filterData,
-      pageNumber: 0,
+      pageNumber: 1,
       pageSize: 1000,
     });
     const ids = res.data.data.records.map((item) => item.examRecordId);

+ 3 - 5
src/views/Layout/Layout.vue

@@ -144,11 +144,9 @@ export default {
       });
 
       const user = this.$store.state.user;
-      const datas =
-        user.roleCodes.includes("INVIGILATE") ||
-        user.roleCodes.includes("INSPECTION")
-          ? { userId: user.id }
-          : {};
+      const datas = user.roleCodes.includes("INVIGILATE")
+        ? { userId: user.id }
+        : {};
 
       validNavNames.forEach((item) => {
         if (validNav[item].valid) validNav[item].func.call(this, datas);