|
@@ -19,7 +19,7 @@
|
|
|
<td>{{ course.allowExamCount }}</td>
|
|
|
<td style="min-width: 180px">
|
|
|
<div style="display: grid; grid-template-columns: 1fr 1fr; grid-gap: 10px">
|
|
|
- <i-button class="qm-primary-button" :disabled="!courseInBetween(course)" @click="enterExam(course)">进入考试</i-button>
|
|
|
+ <i-button class="qm-primary-button" :disabled="!courseInBetween(course) || course.allowExamCount < 1" @click="enterExam(course)">进入考试</i-button>
|
|
|
<i-poptip trigger="hover" placement="left" class="online-exam-list-override-poptip">
|
|
|
<i-button class="qm-primary-button" style="width: 100%">客观分</i-button>
|
|
|
<ecs-online-exam-result-list slot="content" :examStudentId="course.examStudentId"></ecs-online-exam-result-list>
|
|
@@ -39,7 +39,7 @@ import { createNamespacedHelpers } from "vuex";
|
|
|
import OnlineExamResultList from "./OnlineExamResultList.vue";
|
|
|
import OnlineExamFaceCheckModal from "./OnlineExamFaceCheckModal.vue";
|
|
|
import moment from "moment";
|
|
|
-
|
|
|
+import { mapState as globalMapState } from "vuex";
|
|
|
const { mapState, mapMutations } = createNamespacedHelpers("examHomeModule");
|
|
|
|
|
|
export default {
|
|
@@ -79,6 +79,13 @@ export default {
|
|
|
|
|
|
// TODO: 待确认. 前端控制展示“是否进入考试”。后端控制不在有效期内不准访问。
|
|
|
if (course.faceEnable) {
|
|
|
+ // if 人脸检测 && 没有底照,提示,并返回
|
|
|
+ if (!this.user.photoPath) {
|
|
|
+ this.$Message.info(
|
|
|
+ "本场考试需要进行人脸检测,但是您没有上传底照,请联系老师!"
|
|
|
+ );
|
|
|
+ return;
|
|
|
+ }
|
|
|
// open face check modal, then
|
|
|
// if 人脸识别失败 && 考试开启强制人脸识别 return
|
|
|
// if 人脸识别失败 && 考试未开启强制人脸识别
|
|
@@ -112,6 +119,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
|
+ ...globalMapState(["user"]),
|
|
|
...mapState(["faceCheckModalOpen"])
|
|
|
},
|
|
|
components: {
|