|
@@ -30,6 +30,7 @@
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
+ <Spin size="large" fix v-if="spinShow">{{processingMessage}}</Spin>
|
|
<OnlineExamFaceCheckModal :open="faceCheckModalOpen" :course="selectedCourse"></OnlineExamFaceCheckModal>
|
|
<OnlineExamFaceCheckModal :open="faceCheckModalOpen" :course="selectedCourse"></OnlineExamFaceCheckModal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -45,7 +46,12 @@ const { mapState, mapMutations } = createNamespacedHelpers("examHomeModule");
|
|
export default {
|
|
export default {
|
|
name: "EcsOnlineList",
|
|
name: "EcsOnlineList",
|
|
data() {
|
|
data() {
|
|
- return { now: new Date(), selectedCourse: null };
|
|
|
|
|
|
+ return {
|
|
|
|
+ now: new Date(),
|
|
|
|
+ selectedCourse: null,
|
|
|
|
+ spinShow: false,
|
|
|
|
+ processingMessage: ""
|
|
|
|
+ };
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
courses: Array
|
|
courses: Array
|
|
@@ -69,10 +75,14 @@ export default {
|
|
);
|
|
);
|
|
},
|
|
},
|
|
async enterExam(course) {
|
|
async enterExam(course) {
|
|
|
|
+ this.spinShow = true;
|
|
|
|
+ this.processingMessage = "正在检测IP合法性...";
|
|
const ipLimit = (await this.$http.get(
|
|
const ipLimit = (await this.$http.get(
|
|
"/api/ecs_exam_work/exam/ipLimit/" + course.examId
|
|
"/api/ecs_exam_work/exam/ipLimit/" + course.examId
|
|
)).data;
|
|
)).data;
|
|
|
|
+ // await new Promise(resolve => setTimeout(() => resolve(), 3000));
|
|
if (ipLimit.limited) {
|
|
if (ipLimit.limited) {
|
|
|
|
+ this.spinShow = false;
|
|
this.$Message.error("IP受限,请到中心指定地点进行考试!");
|
|
this.$Message.error("IP受限,请到中心指定地点进行考试!");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -81,21 +91,25 @@ export default {
|
|
if (course.faceEnable) {
|
|
if (course.faceEnable) {
|
|
// if 人脸检测 && 没有底照,提示,并返回
|
|
// if 人脸检测 && 没有底照,提示,并返回
|
|
if (!this.user.photoPath) {
|
|
if (!this.user.photoPath) {
|
|
|
|
+ this.spinShow = false;
|
|
this.$Message.info(
|
|
this.$Message.info(
|
|
"本场考试需要进行人脸检测,但是您没有上传底照,请联系老师!"
|
|
"本场考试需要进行人脸检测,但是您没有上传底照,请联系老师!"
|
|
);
|
|
);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ this.processingMessage = "正在获取考试设置...";
|
|
const faceLiveness = await this.$http.get(
|
|
const faceLiveness = await this.$http.get(
|
|
"/api/ecs_exam_work/exam/examOrgProperty/" +
|
|
"/api/ecs_exam_work/exam/examOrgProperty/" +
|
|
course.examId +
|
|
course.examId +
|
|
`/IS_FACE_VERIFY`
|
|
`/IS_FACE_VERIFY`
|
|
);
|
|
);
|
|
if (faceLiveness.data) {
|
|
if (faceLiveness.data) {
|
|
|
|
+ this.processingMessage = "正在检测底照是否满足活体检测标准...";
|
|
const checkBasePhoto = (await this.$http.get(
|
|
const checkBasePhoto = (await this.$http.get(
|
|
"/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness"
|
|
"/api/ecs_oe_student/examFaceLivenessVerify/checkFaceLiveness"
|
|
)).data;
|
|
)).data;
|
|
|
|
+ this.spinShow = false;
|
|
if (!checkBasePhoto.success) {
|
|
if (!checkBasePhoto.success) {
|
|
this.$Message.error(
|
|
this.$Message.error(
|
|
"您上传的底照不符合活体检测的要求,请联系老师!"
|
|
"您上传的底照不符合活体检测的要求,请联系老师!"
|
|
@@ -103,7 +117,7 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ this.spinShow = false;
|
|
// open face check modal, then
|
|
// open face check modal, then
|
|
// if 人脸识别失败 && 考试开启强制人脸识别 return
|
|
// if 人脸识别失败 && 考试开启强制人脸识别 return
|
|
// if 人脸识别失败 && 考试未开启强制人脸识别
|
|
// if 人脸识别失败 && 考试未开启强制人脸识别
|
|
@@ -111,6 +125,7 @@ export default {
|
|
this.selectedCourse = course;
|
|
this.selectedCourse = course;
|
|
this.toggleFaceCheckModal(true);
|
|
this.toggleFaceCheckModal(true);
|
|
} else {
|
|
} else {
|
|
|
|
+ this.spinShow = false;
|
|
this.$router.push(
|
|
this.$router.push(
|
|
`/online-exam/exam/${course.examId}/overview?examStudentId=${
|
|
`/online-exam/exam/${course.examId}/overview?examStudentId=${
|
|
course.examStudentId
|
|
course.examStudentId
|