|
@@ -71,7 +71,7 @@ export default {
|
|
showFaceId: false,
|
|
showFaceId: false,
|
|
faceEnable: false,
|
|
faceEnable: false,
|
|
timeouted: false,
|
|
timeouted: false,
|
|
- PRODUCTION: process.env.NODE_ENV === "production"
|
|
|
|
|
|
+ PRODUCTION: process.env.NODE_ENV === "production",
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
@@ -93,7 +93,7 @@ export default {
|
|
this.$Message.info({
|
|
this.$Message.info({
|
|
content: "30秒后开始活体检测",
|
|
content: "30秒后开始活体检测",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
}, this.$route.query.faceVerifyMinute * 60 * 1000 - 30 * 1000); // 活体检测提醒
|
|
}, this.$route.query.faceVerifyMinute * 60 * 1000 - 30 * 1000); // 活体检测提醒
|
|
this.faceIdDivTimeout = setTimeout(() => {
|
|
this.faceIdDivTimeout = setTimeout(() => {
|
|
@@ -120,7 +120,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "获取人脸检测设置失败",
|
|
content: "获取人脸检测设置失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
this.logout("?LogoutReason=获取人脸检测设置失败");
|
|
this.logout("?LogoutReason=获取人脸检测设置失败");
|
|
return;
|
|
return;
|
|
@@ -178,7 +178,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "获取人脸抓拍间隔设置失败",
|
|
content: "获取人脸抓拍间隔设置失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
this.logout("?LogoutReason=获取人脸抓拍间隔设置失败");
|
|
this.logout("?LogoutReason=获取人脸抓拍间隔设置失败");
|
|
return;
|
|
return;
|
|
@@ -191,7 +191,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "获取试卷信息失败,退出登录",
|
|
content: "获取试卷信息失败,退出登录",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
this.logout("?LogoutReason=获取试卷信息失败");
|
|
this.logout("?LogoutReason=获取试卷信息失败");
|
|
return;
|
|
return;
|
|
@@ -255,7 +255,7 @@ export default {
|
|
exam: null,
|
|
exam: null,
|
|
paperStruct: null,
|
|
paperStruct: null,
|
|
examQuestionList: null,
|
|
examQuestionList: null,
|
|
- questionAudioFileUrl: []
|
|
|
|
|
|
+ questionAudioFileUrl: [],
|
|
});
|
|
});
|
|
this.$Modal.remove();
|
|
this.$Modal.remove();
|
|
},
|
|
},
|
|
@@ -268,20 +268,20 @@ export default {
|
|
"updateExamQuestion",
|
|
"updateExamQuestion",
|
|
"toggleSnapNow",
|
|
"toggleSnapNow",
|
|
"updateExamResult",
|
|
"updateExamResult",
|
|
- "resetExamQuestionDirty"
|
|
|
|
|
|
+ "resetExamQuestionDirty",
|
|
]),
|
|
]),
|
|
async initData() {
|
|
async initData() {
|
|
const [
|
|
const [
|
|
examData,
|
|
examData,
|
|
paperStructData,
|
|
paperStructData,
|
|
- examQuestionListData
|
|
|
|
|
|
+ examQuestionListData,
|
|
] = await Promise.all([
|
|
] = await Promise.all([
|
|
this.$http.get("/api/ecs_exam_work/exam/" + this.$route.params.examId),
|
|
this.$http.get("/api/ecs_exam_work/exam/" + this.$route.params.examId),
|
|
this.$http.get(
|
|
this.$http.get(
|
|
"/api/ecs_oe_student/examRecordPaperStruct/getExamRecordPaperStruct?examRecordDataId=" +
|
|
"/api/ecs_oe_student/examRecordPaperStruct/getExamRecordPaperStruct?examRecordDataId=" +
|
|
this.$route.params.examRecordDataId
|
|
this.$route.params.examRecordDataId
|
|
),
|
|
),
|
|
- this.$http.get("/api/ecs_oe_student/examQuestion/findExamQuestionList")
|
|
|
|
|
|
+ this.$http.get("/api/ecs_oe_student/examQuestion/findExamQuestionList"),
|
|
]);
|
|
]);
|
|
const [exam, paperStruct] = [examData.data, paperStructData.data];
|
|
const [exam, paperStruct] = [examData.data, paperStructData.data];
|
|
|
|
|
|
@@ -295,7 +295,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "获取试卷信息失败",
|
|
content: "获取试卷信息失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
this.logout("?LogoutReason=获取试卷信息失败");
|
|
this.logout("?LogoutReason=获取试卷信息失败");
|
|
return;
|
|
return;
|
|
@@ -370,7 +370,7 @@ export default {
|
|
eq.mainNumber - 1
|
|
eq.mainNumber - 1
|
|
].questionWrapperList.find(q => q.questionId === eq.questionId);
|
|
].questionWrapperList.find(q => q.questionId === eq.questionId);
|
|
return Object.assign(eq, {
|
|
return Object.assign(eq, {
|
|
- limitedPlayTimes: paperStructQuestion.limitedPlayTimes
|
|
|
|
|
|
+ limitedPlayTimes: paperStructQuestion.limitedPlayTimes,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
@@ -379,7 +379,7 @@ export default {
|
|
paperStruct: paperStruct,
|
|
paperStruct: paperStruct,
|
|
examQuestionList: examQuestionList,
|
|
examQuestionList: examQuestionList,
|
|
allAudioPlayTimes: JSON.parse(examQuestionList[0].audioPlayTimes) || [],
|
|
allAudioPlayTimes: JSON.parse(examQuestionList[0].audioPlayTimes) || [],
|
|
- questionAudioFileUrl: []
|
|
|
|
|
|
+ questionAudioFileUrl: [],
|
|
});
|
|
});
|
|
// console.log(examQuestionList);
|
|
// console.log(examQuestionList);
|
|
// console.log(examQuestionList.find(v => v.answerType === "SINGLE_AUDIO"));
|
|
// console.log(examQuestionList.find(v => v.answerType === "SINGLE_AUDIO"));
|
|
@@ -414,7 +414,7 @@ export default {
|
|
return Object.assign(
|
|
return Object.assign(
|
|
{
|
|
{
|
|
order: eq.order,
|
|
order: eq.order,
|
|
- studentAnswer: eq.studentAnswer
|
|
|
|
|
|
+ studentAnswer: eq.studentAnswer,
|
|
},
|
|
},
|
|
eq.audioPlayTimes && { audioPlayTimes: eq.audioPlayTimes },
|
|
eq.audioPlayTimes && { audioPlayTimes: eq.audioPlayTimes },
|
|
eq.isSign && { isSign: eq.isSign }
|
|
eq.isSign && { isSign: eq.isSign }
|
|
@@ -432,7 +432,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "提交答案失败",
|
|
content: "提交答案失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
window._hmt.push([
|
|
window._hmt.push([
|
|
"_trackEvent",
|
|
"_trackEvent",
|
|
@@ -440,7 +440,7 @@ export default {
|
|
"提交答案失败",
|
|
"提交答案失败",
|
|
error.message +
|
|
error.message +
|
|
" |||| " +
|
|
" |||| " +
|
|
- (((error.response || {}).data || {}).desc || "")
|
|
|
|
|
|
+ (((error.response || {}).data || {}).desc || ""),
|
|
]);
|
|
]);
|
|
this.serverLog(
|
|
this.serverLog(
|
|
"debug/S-008001",
|
|
"debug/S-008001",
|
|
@@ -465,7 +465,7 @@ export default {
|
|
this.$Message.info({
|
|
this.$Message.info({
|
|
content: `考试开始${this.exam.freezeTime}分钟后才允许交卷。`,
|
|
content: `考试开始${this.exam.freezeTime}分钟后才允许交卷。`,
|
|
duration: 5,
|
|
duration: 5,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -480,14 +480,14 @@ export default {
|
|
this.$Modal.confirm({
|
|
this.$Modal.confirm({
|
|
title: "确认交卷",
|
|
title: "确认交卷",
|
|
content: `<p>已答题目:${answered}</p><p>未答题目:${unanswered}</p><p>标记题目:${signed}</p>`,
|
|
content: `<p>已答题目:${answered}</p><p>未答题目:${unanswered}</p><p>标记题目:${signed}</p>`,
|
|
- onOk: this.realSubmitPaper
|
|
|
|
|
|
+ onOk: this.realSubmitPaper,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
async realSubmitPaper() {
|
|
async realSubmitPaper() {
|
|
this.$Spin.show({
|
|
this.$Spin.show({
|
|
render: () => {
|
|
render: () => {
|
|
return <div style="font-size: 44px">正在交卷,请耐心等待...</div>;
|
|
return <div style="font-size: 44px">正在交卷,请耐心等待...</div>;
|
|
- }
|
|
|
|
|
|
+ },
|
|
});
|
|
});
|
|
if (this.faceEnable) {
|
|
if (this.faceEnable) {
|
|
this.serverLog("debug/S-002001", "交卷前抓拍");
|
|
this.serverLog("debug/S-002001", "交卷前抓拍");
|
|
@@ -525,7 +525,7 @@ export default {
|
|
);
|
|
);
|
|
if (res.status === 200) {
|
|
if (res.status === 200) {
|
|
this.$router.replace({
|
|
this.$router.replace({
|
|
- path: `/online-exam/exam/${examId}/examRecordData/${examRecordDataId}/end`
|
|
|
|
|
|
+ path: `/online-exam/exam/${examId}/examRecordData/${examRecordDataId}/end`,
|
|
});
|
|
});
|
|
// 确保交卷成功后,不会再次交卷
|
|
// 确保交卷成功后,不会再次交卷
|
|
this.submitLock = true;
|
|
this.submitLock = true;
|
|
@@ -535,7 +535,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "交卷失败",
|
|
content: "交卷失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
this.submitLock = false;
|
|
this.submitLock = false;
|
|
@@ -543,7 +543,7 @@ export default {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "交卷失败",
|
|
content: "交卷失败",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
console.log(e);
|
|
console.log(e);
|
|
}
|
|
}
|
|
@@ -564,10 +564,10 @@ export default {
|
|
"_trackEvent",
|
|
"_trackEvent",
|
|
"正在考试页面",
|
|
"正在考试页面",
|
|
"页面加载失败",
|
|
"页面加载失败",
|
|
- "reload"
|
|
|
|
|
|
+ "reload",
|
|
]);
|
|
]);
|
|
window.location.reload();
|
|
window.location.reload();
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState([
|
|
...mapState([
|
|
@@ -578,7 +578,7 @@ export default {
|
|
"snapProcessingCount",
|
|
"snapProcessingCount",
|
|
"shouldSubmitPaper",
|
|
"shouldSubmitPaper",
|
|
"remainTime",
|
|
"remainTime",
|
|
- "questionAudioFileUrl"
|
|
|
|
|
|
+ "questionAudioFileUrl",
|
|
]),
|
|
]),
|
|
previousQuestionOrder: vm => {
|
|
previousQuestionOrder: vm => {
|
|
if (vm.examQuestion().order > 1) {
|
|
if (vm.examQuestion().order > 1) {
|
|
@@ -593,7 +593,7 @@ export default {
|
|
} else {
|
|
} else {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
$route: function() {
|
|
$route: function() {
|
|
@@ -615,31 +615,31 @@ export default {
|
|
{
|
|
{
|
|
examRecordDataId,
|
|
examRecordDataId,
|
|
filePath: q.audioFileUrl,
|
|
filePath: q.audioFileUrl,
|
|
- order: q.order
|
|
|
|
|
|
+ order: q.order,
|
|
}
|
|
}
|
|
)
|
|
)
|
|
.then(() => {
|
|
.then(() => {
|
|
that.updateExamQuestion({
|
|
that.updateExamQuestion({
|
|
order: q.order,
|
|
order: q.order,
|
|
- studentAnswer: q.audioFileUrl
|
|
|
|
|
|
+ studentAnswer: q.audioFileUrl,
|
|
});
|
|
});
|
|
q.saved = true;
|
|
q.saved = true;
|
|
this.$Message.info({
|
|
this.$Message.info({
|
|
content: "音频题作答已更新",
|
|
content: "音频题作答已更新",
|
|
duration: 5,
|
|
duration: 5,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$Message.error({
|
|
this.$Message.error({
|
|
content: "更新音频题答案失败!",
|
|
content: "更新音频题答案失败!",
|
|
duration: 15,
|
|
duration: 15,
|
|
- closable: true
|
|
|
|
|
|
+ closable: true,
|
|
});
|
|
});
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
// examQuestionList(val, oldVal) {
|
|
// examQuestionList(val, oldVal) {
|
|
// // console.log(val, oldVal);
|
|
// // console.log(val, oldVal);
|
|
// }
|
|
// }
|
|
@@ -653,8 +653,8 @@ export default {
|
|
QuestionNavView,
|
|
QuestionNavView,
|
|
FaceRecognition,
|
|
FaceRecognition,
|
|
FaceId,
|
|
FaceId,
|
|
- FaceTracking
|
|
|
|
- }
|
|
|
|
|
|
+ FaceTracking,
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|