|
@@ -194,19 +194,13 @@ onMounted(async () => {
|
|
});
|
|
});
|
|
|
|
|
|
// beforeDestroy() {
|
|
// beforeDestroy() {
|
|
-// clearInterval(this.initSnapInterval);
|
|
|
|
-// clearInterval(this.snapInterval);
|
|
|
|
// this.updateExamState({
|
|
// this.updateExamState({
|
|
// exam: null,
|
|
// exam: null,
|
|
// paperStruct: null,
|
|
// paperStruct: null,
|
|
// examQuestionList: null,
|
|
// examQuestionList: null,
|
|
// questionAnswerFileUrl: [],
|
|
// questionAnswerFileUrl: [],
|
|
// pictureAnswer: {},
|
|
// pictureAnswer: {},
|
|
-// snapNow: false,
|
|
|
|
-// snapProcessingCount: 0,
|
|
|
|
// });
|
|
// });
|
|
-// // TODO: 是否是个错误点?this.$Modal 不存在?
|
|
|
|
-// this.$Modal.remove();
|
|
|
|
// // 避免macos上下塘动。避免产生滚动条。
|
|
// // 避免macos上下塘动。避免产生滚动条。
|
|
// document.body.classList.toggle("hide-body-scroll", false);
|
|
// document.body.classList.toggle("hide-body-scroll", false);
|
|
// },
|
|
// },
|
|
@@ -463,18 +457,15 @@ function onAudioAnswer(event: MessageEvent<string>) {
|
|
let { snapId, doSnap, showSnapResult } = useFaceCompare();
|
|
let { snapId, doSnap, showSnapResult } = useFaceCompare();
|
|
let { showFaceId } = useFaceLive(doSnap);
|
|
let { showFaceId } = useFaceLive(doSnap);
|
|
|
|
|
|
-function onCompareResult({
|
|
|
|
- hasError,
|
|
|
|
- fileName,
|
|
|
|
-}: {
|
|
|
|
- hasError: boolean;
|
|
|
|
- fileName: string;
|
|
|
|
-}) {
|
|
|
|
|
|
+const cmpResMap = new Map<string, boolean>();
|
|
|
|
+type CompareResult = { hasError: boolean; fileName: string };
|
|
|
|
+function onCompareResult({ hasError, fileName }: CompareResult) {
|
|
if (hasError) {
|
|
if (hasError) {
|
|
// 60秒后重试抓拍
|
|
// 60秒后重试抓拍
|
|
addInterval(doSnap, 60 * 1000);
|
|
addInterval(doSnap, 60 * 1000);
|
|
} else {
|
|
} else {
|
|
- showSnapResult(fileName, examRecordDataId);
|
|
|
|
|
|
+ cmpResMap.set(fileName, false);
|
|
|
|
+ showSnapResult(fileName, examRecordDataId, cmpResMap);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -601,6 +592,16 @@ function realSubmitPaper() {
|
|
addTimeout(() => {
|
|
addTimeout(() => {
|
|
store.decreaseGlobalMaskCount("realSubmitPaper");
|
|
store.decreaseGlobalMaskCount("realSubmitPaper");
|
|
store.spinMessage = "";
|
|
store.spinMessage = "";
|
|
|
|
+ const allFinished = [...cmpResMap].every((v) => v[1]);
|
|
|
|
+ const remained = [...cmpResMap].filter((v) => !v[1]);
|
|
|
|
+ logger({
|
|
|
|
+ cnl: ["server"],
|
|
|
|
+ act: "交卷前检测抓拍照片数量",
|
|
|
|
+ dtl: allFinished ? "完全检测" : "不完全检测",
|
|
|
|
+ ext: {
|
|
|
|
+ remainCount: remained.length,
|
|
|
|
+ },
|
|
|
|
+ });
|
|
void router.push({
|
|
void router.push({
|
|
name: "SubmitPaper",
|
|
name: "SubmitPaper",
|
|
params: { examId, examRecordDataId },
|
|
params: { examId, examRecordDataId },
|