feat:结束考试修改
This commit is contained in:
parent
eb8329a610
commit
a6fbf40140
@ -570,9 +570,20 @@ struct Index {
|
||||
router.back()
|
||||
return
|
||||
}
|
||||
if (this.judgeConfigObj['344'] == 1) {
|
||||
|
||||
//靠边停车进行中&且其它项目都已经完成 不能结束
|
||||
if(!this.singlePlay && this.projectsObj['40600']?.type == '2' && this.isRequiredProjectsEnd){
|
||||
Prompt.showToast({
|
||||
message: '考试未结束,不允许手动退出!',
|
||||
message: '靠边停车项目进行中,不允许手动退出!',
|
||||
duration: 4000
|
||||
});
|
||||
return
|
||||
}
|
||||
|
||||
//考试未结束且有扣分,不允许退出
|
||||
if (!this.singlePlay && this.judgeConfigObj['344'] == 1 && this.kfArr.length > 0 && !this.isAllProjectsEnd ) {
|
||||
Prompt.showToast({
|
||||
message: '考试未结束且有扣分,不允许手动退出!',
|
||||
duration: 4000
|
||||
});
|
||||
return
|
||||
@ -1310,20 +1321,19 @@ struct Index {
|
||||
return false
|
||||
}
|
||||
}
|
||||
// 获取必考项目里未完成的
|
||||
// 获取考试项目里未完成的
|
||||
getNotEndProjects = () => {
|
||||
const projectsObj = this.projectsObj;
|
||||
const notEndProjectsNames = [];
|
||||
Reflect.ownKeys(projectsObj).forEach((projectKey: string) => {
|
||||
const { type, isRequired ,name} = projectsObj[projectKey];
|
||||
if (isRequired) {
|
||||
if (type == undefined || type == '1' || type == '2') {
|
||||
notEndProjectsNames.push(name)
|
||||
}
|
||||
const {isEnd ,name} = projectsObj[projectKey];
|
||||
if (!isEnd) {
|
||||
notEndProjectsNames.push(name)
|
||||
}
|
||||
})
|
||||
return notEndProjectsNames;
|
||||
}
|
||||
|
||||
scroller: Scroller = new Scroller()
|
||||
//页面通用字体大小
|
||||
@State wayno: number = 0
|
||||
@ -1432,4 +1442,5 @@ struct Index {
|
||||
@State errorMsg: string = ''
|
||||
@State isErrorMsgEnd: boolean = false
|
||||
@State disConnectErrorOpen: boolean = false
|
||||
@State isAllProjectsEnd:boolean = false;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user