考试结束优化

This commit is contained in:
lixiao 2025-07-24 17:31:54 +08:00
parent d1835688b6
commit 9a529fe649
2 changed files with 98 additions and 93 deletions

View File

@ -555,12 +555,40 @@ struct Index {
const {lsh,startExamTime:kskssj,jl:kslc} = this
const { carId ,examinationRoomId} = globalThis.carInfo;
await uploadExamMileage({
carId,examinationRoomId,
lsh,kskssj,kslc
carId,
examinationRoomId,
lsh,
kskssj,
kslc
})
}
}
async endExam() {
if (this.isErrorMsgEnd) {
this.judge.closeAllFiles()
router.back()
return
}
if (this.judgeConfigObj['344'] == 1) {
Prompt.showToast({
message: '考试未结束,不允许手动退出!',
duration: 4000
});
return
}
this.endPopupVisible = false;
this.loadingPopupVisible = true
clearInterval(this.timer);
clearInterval(globalThis.judgeTimer)
try {
this.judge.checkExamIsEnd(true);
} catch (e) {
this.judge.closeAllFiles()
router.back()
}
}
build() {
Column() {
Row() {
@ -890,7 +918,11 @@ struct Index {
// name: 'button_media.wav'
// })
if (this.judgeConfigObj['353'] == '0') {
if (this.getNotEndProjects().length > 0) {
this.endPopupVisible = true
return
}
this.endExam()
} else {
Prompt.showToast({
message: '车上不允许手动结束考试!',
@ -985,34 +1017,12 @@ struct Index {
//结束考试弹窗
if (this.endPopupVisible) {
EndPoPup({
title: this.getNotEndProjects().length ? `当前考试存在未完成的项目:${this.getNotEndProjects().join('、')},确定结束考试吗?` :'确定结束考试吗?',
title: `当前考试存在未完成的项目:${this.getNotEndProjects().join('、')},确定结束考试吗?`,
cancelFn: () => {
this.endPopupVisible = false;
},
confirmFn: async () => {
if(this.isErrorMsgEnd){
this.judge.closeAllFiles()
router.back()
return
}
if (this.judgeConfigObj['344'] == 1) {
Prompt.showToast({
message: '考试未结束,不允许手动退出!',
duration: 4000
});
return
}
this.endPopupVisible = false;
this.loadingPopupVisible = true
clearInterval(this.timer);
clearInterval(globalThis.judgeTimer)
try {
this.judge.checkExamIsEnd(true);
} catch (e) {
this.judge.closeAllFiles()
router.back()
}
this.endExam()
}
})
}
@ -1216,7 +1226,6 @@ struct Index {
}
return true
}
// 判断项目是否在当前路段号
getProjectIsInRoad = (projectCode: string,) => {
const {
@ -1276,7 +1285,6 @@ struct Index {
return true
}
// 获取人工项目是否已做
getIsEndManualProject = (index: number) => {
const projectName = this.artSubject3Projects[index];
@ -1287,7 +1295,6 @@ struct Index {
}
return (type == '3' || type == '4') ? `${projectName}_red` : `${projectName}_green`;
}
// 获取是否能进行人工评判
getIsManualKf = () => {
const {examSubject} = this;
@ -1317,8 +1324,6 @@ struct Index {
})
return notEndProjectsNames;
}
scroller: Scroller = new Scroller()
//页面通用字体大小
@State wayno: number = 0

View File

@ -1,7 +1,7 @@
//考试回放开关
export const judgeConfig = {
// 外壳版本号
version: "2025.05.26.01",
version: "2025.07.24.01",
//本地目录开关
isTrajectoryOpen: false,
//是否开启拍照