|
@@ -68,7 +68,11 @@ export default {
|
|
process.env.NODE_ENV === "production" &&
|
|
process.env.NODE_ENV === "production" &&
|
|
/^\d+$/.test(this.$route.query.faceVerifyMinute)
|
|
/^\d+$/.test(this.$route.query.faceVerifyMinute)
|
|
) {
|
|
) {
|
|
- // TODO: 根据remaintime,计算是否还继续做活检。后台也可以计算。
|
|
|
|
|
|
+ const enoughTimeForFaceId = this.remainTime // 如果remainTime取到了的话
|
|
|
|
+ ? this.remainTime / (60 * 1000) - 1 > this.$route.query.faceVerifyMinute
|
|
|
|
+ : true;
|
|
|
|
+ if (!enoughTimeForFaceId) return;
|
|
|
|
+
|
|
this.faceIdMsgTimeout = setTimeout(() => {
|
|
this.faceIdMsgTimeout = setTimeout(() => {
|
|
this.toggleSnapNow();
|
|
this.toggleSnapNow();
|
|
this.$Message.info("30秒后开始活体检测");
|
|
this.$Message.info("30秒后开始活体检测");
|
|
@@ -192,6 +196,17 @@ export default {
|
|
exam.practiceType = practiceType;
|
|
exam.practiceType = practiceType;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ try {
|
|
|
|
+ let freezeTimeData = await this.$http.get(
|
|
|
|
+ "/api/ecs_exam_work/exam/examOrgProperty/" +
|
|
|
|
+ this.$route.params.examId +
|
|
|
|
+ `/FREEZE_TIME`
|
|
|
|
+ );
|
|
|
|
+ exam.freezeTime = freezeTimeData.data;
|
|
|
|
+ } catch (error) {
|
|
|
|
+ console.log("获取考试冻结时间失败--忽略");
|
|
|
|
+ }
|
|
|
|
+
|
|
// init subNumber
|
|
// init subNumber
|
|
let questionId = null;
|
|
let questionId = null;
|
|
let i = 1;
|
|
let i = 1;
|
|
@@ -301,6 +316,18 @@ export default {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (
|
|
|
|
+ this.exam.freezeTime &&
|
|
|
|
+ this.remainTime >
|
|
|
|
+ (this.exam.duration - this.exam.freezeTime) * 60 * 1000
|
|
|
|
+ ) {
|
|
|
|
+ this.$Message.info({
|
|
|
|
+ content: `考试开始${this.exam.freezeTime}分钟后才允许交卷。`,
|
|
|
|
+ duration: 5
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
const answered = this.examQuestionList.filter(
|
|
const answered = this.examQuestionList.filter(
|
|
q => q.studentAnswer !== null
|
|
q => q.studentAnswer !== null
|
|
).length;
|
|
).length;
|
|
@@ -390,7 +417,8 @@ export default {
|
|
"examQuestionList",
|
|
"examQuestionList",
|
|
"snapNow",
|
|
"snapNow",
|
|
"snapProcessingCount",
|
|
"snapProcessingCount",
|
|
- "shouldSubmitPaper"
|
|
|
|
|
|
+ "shouldSubmitPaper",
|
|
|
|
+ "remainTime"
|
|
]),
|
|
]),
|
|
previousQuestionOrder: vm => {
|
|
previousQuestionOrder: vm => {
|
|
if (vm.examQuestion().order > 1) {
|
|
if (vm.examQuestion().order > 1) {
|