大车逻辑优化

This commit is contained in:
lixiao 2025-04-01 16:14:56 +08:00
parent 820234fc98
commit 9b745ed52c
2 changed files with 4 additions and 11 deletions

View File

@ -299,7 +299,6 @@ struct Index {
this.examMileage = data[0] || this.examMileage
this.mfxxn = data[1] !== "1"
}
let ykItems = []
//获取当前考车的考试项目
if (this.mode === 2 && no1 == 3 && no2 == Number(carNo) && no3 == 46) {
// 夜考必考项目读取
@ -321,7 +320,6 @@ struct Index {
if (this.mode === 2 && no2 == 11) {
isRequired = false
}
console.log("lixiao allItems", no2, JSON.stringify(allItems))
if (no2 == 14) {
isRequired = false
}
@ -374,6 +372,8 @@ struct Index {
'TXT3': decodeURIComponent(systemParm.txt3),
})
})
console.log("lixiao allItems", JSON.stringify(allItems))
console.log("lixiao carNo examMileage", carNo, this.examMileage)
const projects = this.projects;
if (!projects.length) {
Prompt.showToast({
@ -858,7 +858,7 @@ struct Index {
// type: 1,
// name: 'button_media.wav'
// })
if (this.judgeConfigObj['353'] == '0') {
if (this.judgeConfigObj['353'] == '0' || this.singlePlay) {
this.endPopupVisible = true
} else {
Prompt.showToast({
@ -964,7 +964,7 @@ struct Index {
router.back()
return
}
if (this.judgeConfigObj['344'] == 1) {
if (this.judgeConfigObj['344'] == 1 && this.totalScore < 100 && !this.singlePlay) {
Prompt.showToast({
message: '考试未结束,不允许手动退出!',
duration: 4000
@ -1132,25 +1132,21 @@ struct Index {
//非行驶状态(没有速度),人工项目不能触发(按钮灰色)
if (this.carztStr === '停车') {
console.log("lixiao getIsExitManualProject 停车", index)
return false
}
//车上是否能进行人工操作(0-能1-不能人工评判2-不能人工进项目3-都不能)
if (this.judgeConfigObj['342'] === '3' || this.judgeConfigObj['342'] === '2') {
console.log("lixiao getIsExitManualProject 车上是否能进行人工操作", index)
return false
}
//不允许人工触发的项目列表
if (unExitManualProjects.includes(this.artSubject3ProjectsCodesArr[index])) {
console.log("lixiao getIsExitManualProject 不允许人工触发的项目列表", index)
return false
}
//项目进行中不能人工触发
if (this.isProjectIn && this.projectsObj['13']?.type != '2') {
console.log("lixiao getIsExitManualProject 项目进行中不能人工触发")
if (param340 == 1) {
if (this.isManualProjectIn && (this.projectsObj[projectCode].type == '2')) {
return true
@ -1163,20 +1159,17 @@ struct Index {
//项目路段信息判断
if (!this.getProjectIsInRoad(projectCode + '')) {
console.log("lixiao getIsExitManualProject 项目路段信息判断", index)
return false
}
// 直线行驶中不进其他考试项目(0-否 1-是)
if (param348 == '0' && this.projectsObj['9']?.type == '2') {
console.log("lixiao getIsExitManualProject 直线行驶中不进其他考试项目", index)
return index === 0 ? true : false
}
//项目已经做过,后续不能人工触发
if (this.mode !== 2) {
if (param307.includes(projectCode) && (projectType == '3' || projectType == '4')) {
console.log("lixiao getIsExitManualProject 项目已经做过", index)
return false
}
}