Browse Source

考试同步以及部分bug修改

zhangjie 2 years ago
parent
commit
c5ce5cc78f

+ 3 - 0
src/api/examwork-exam.js

@@ -128,3 +128,6 @@ export function getExamRoom() {
 export function reCalcExam(examId) {
   return httpApp.post("/api/admin/exam/score/calculate?id=" + examId);
 }
+export function syncCloudMarkExam(datas) {
+  return httpApp.post("/api/admin/exam/cloud_mark/score/sync", datas);
+}

+ 20 - 3
src/features/examwork/ExamManagement/ExamManagement.vue

@@ -127,6 +127,13 @@
               }}
             </el-button>
           </el-badge>
+          <el-button
+            size="mini"
+            type="primary"
+            plain
+            @click="syncExam(scope.row)"
+            >同步</el-button
+          >
         </div>
       </el-table-column>
     </el-table>
@@ -149,7 +156,12 @@
 <script>
 import StateSelect from "@/components/StateSelect";
 import ExamTypeSelect from "@/components/ExamTypeSelect";
-import { searchExams, toggleEnableExam, reCalcExam } from "@/api/examwork-exam";
+import {
+  searchExams,
+  toggleEnableExam,
+  reCalcExam,
+  syncCloudMarkExam,
+} from "@/api/examwork-exam";
 import CopyExamDialog from "./CopyExamDialog";
 
 export default {
@@ -270,8 +282,13 @@ export default {
         })
         .catch(() => {});
     },
+    async syncExam(exam) {
+      await syncCloudMarkExam({
+        examId: exam.id,
+        yunMarkExamId: exam.yunMarkExamId,
+      });
+      this.$message.success("操作成功!");
+    },
   },
 };
 </script>
-
-<style></style>

+ 9 - 1
src/features/invigilation/RealtimeMonitoring/RealtimeMonitoringFull.vue

@@ -377,7 +377,15 @@ export default {
     async fetchWarningNotice() {
       if (!this.filter.examId) return;
       const res = await invigilationWarningMessage(this.filter.examId);
-      this.warningList = res.data.data;
+      let warningListMap = {};
+      res.data.data.forEach((item, index) => {
+        item.index = index;
+        if (!warningListMap[item.examRecordId])
+          warningListMap[item.examRecordId] = item;
+      });
+      this.warningList = Object.values(warningListMap).sort(
+        (a, b) => a.index - b.index
+      );
     },
     /** 定时刷新预警/通话待办 */
     refreshList() {

+ 2 - 2
src/styles/base.scss

@@ -749,9 +749,9 @@ body {
   width: 500px;
   height: 720px;
   background: #000;
-  right: auto;
+  right: 40px;
   bottom: auto;
-  left: 40px;
+  left: auto;
   top: 120px;
   border-radius: 10px;
   z-index: 9999;