Browse Source

重新算分

Michael Wang 4 years ago
parent
commit
7ccd723d07

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

@@ -117,3 +117,7 @@ export function saveExam({
 export function getExamRoom() {
   return httpApp.post("/api/admin/sys/examRoom/query");
 }
+
+export function reCalcExam(examId) {
+  return httpApp.post("/api/admin/exam/score/calculate?id=" + examId);
+}

+ 46 - 22
src/features/examwork/ExamManagement/ExamEdit.vue

@@ -163,27 +163,43 @@
           <el-row>
             <h2>开考检测</h2>
             <el-form-item label="">
-              <el-radio v-model="form.entryAuthenticationPolicy" label="OFF">
-                安全级别:无
-              </el-radio>
-              <el-radio
-                v-model="form.entryAuthenticationPolicy"
-                label="FACE_VERIFY_OPTIONAL"
-              >
-                安全级别:低
-              </el-radio>
-              <el-radio
-                v-model="form.entryAuthenticationPolicy"
-                label="FACE_VERIFY_FORCE"
-              >
-                安全级别:中
-              </el-radio>
-              <el-radio
-                v-model="form.entryAuthenticationPolicy"
-                label="LIVENESS"
-              >
-                安全级别:高
-              </el-radio>
+              <div class="d-flex flex-column" style="padding-left: 80px;">
+                <el-radio v-model="form.entryAuthenticationPolicy" label="OFF">
+                  安全级别:<span style="color: #202b4b; font-size: 20px;">
+                    无
+                  </span>
+                  <span class="desc-txt">
+                    开考无检测
+                  </span>
+                </el-radio>
+                <el-radio
+                  v-model="form.entryAuthenticationPolicy"
+                  label="FACE_VERIFY_OPTIONAL"
+                >
+                  安全级别:<span style="color: #fe5863; font-size: 20px;">
+                    低
+                  </span>
+                  <span class="desc-txt"> 开考人脸比对,不强制比对 </span>
+                </el-radio>
+                <el-radio
+                  v-model="form.entryAuthenticationPolicy"
+                  label="FACE_VERIFY_FORCE"
+                >
+                  安全级别:<span style="color: #ff9f43; font-size: 20px;">
+                    中
+                  </span>
+                  <span class="desc-txt"> 开考人脸强制比对 </span>
+                </el-radio>
+                <el-radio
+                  v-model="form.entryAuthenticationPolicy"
+                  label="LIVENESS"
+                >
+                  安全级别:<span style="color: #1cd1a1; font-size: 20px;">
+                    高
+                  </span>
+                  <span class="desc-txt"> 开考人脸比对及活体验证 </span>
+                </el-radio>
+              </div>
             </el-form-item>
           </el-row>
           <h2>过程监控</h2>
@@ -438,4 +454,12 @@ export default {
 };
 </script>
 
-<style></style>
+<style>
+.desc-txt {
+  color: #fe5863;
+  border: 1px solid #fe5863;
+  border-radius: 4px;
+  padding: 4px;
+  margin-left: 10px;
+}
+</style>

+ 27 - 2
src/features/examwork/ExamManagement/ExamManagement.vue

@@ -78,7 +78,12 @@
           >
             场次设置
           </el-button>
-          <el-button size="mini" type="primary" plain>
+          <el-button
+            size="mini"
+            type="primary"
+            @click="reCalcBtn(scope.row)"
+            plain
+          >
             重新算分
           </el-button>
         </div>
@@ -102,7 +107,7 @@
 <script>
 import StateSelect from "@/components/StateSelect";
 import ExamTypeSelect from "@/components/ExamTypeSelect";
-import { searchExams, toggleEnableExam } from "@/api/examwork-exam";
+import { searchExams, toggleEnableExam, reCalcExam } from "@/api/examwork-exam";
 import CopyExamDialog from "./CopyExamDialog";
 
 export default {
@@ -199,6 +204,26 @@ export default {
         params: { examId: exam.id },
       });
     },
+    reCalcBtn(exam) {
+      this.$confirm(
+        `<div>批次ID:${exam.id}</div><div>批次名称:${exam.name}</div>`,
+        "是否重新计算该批次成绩?",
+        {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          dangerouslyUseHTMLString: true,
+        }
+      )
+        .then(() => {
+          reCalcExam(exam.id);
+          this.$message({
+            type: "success",
+            message: "重新算分任务已启动!",
+          });
+        })
+        .catch(() => {});
+    },
   },
 };
 </script>