feat:评判优化

This commit is contained in:
surenjun 2024-10-09 09:15:36 +08:00
parent 9ba033954b
commit 68d93b3b55
4 changed files with 44 additions and 34 deletions

View File

@ -10,5 +10,28 @@ export const GlobalConfig={
comoonfileWriteAddress:'/mnt/hmdfs/100/account/device_view/local/files', comoonfileWriteAddress:'/mnt/hmdfs/100/account/device_view/local/files',
picSavePath:'/storage/cloud/100/files/Photo/', picSavePath:'/storage/cloud/100/files/Photo/',
videoSavePath:'/storage/cloud/100/files/Videos/', videoSavePath:'/storage/cloud/100/files/Videos/',
host:'http://172.37.55.1912:8082' host:'http://172.37.55.1912:8082',
version:{
//杭州
hz:{
km2:['2022.03.14.01','2022.03.17.1'],
km3:[],
},
//黑龙江
hlg:{
km2:['2024.03.19.01','2024.01.05.1'],
km3:['2023.09.23.01','2023.09.23.01'],
},
//济南
jn:{
km2:[],
km3:['2023.12.13.01','2023.09.30.1']
},
//洛阳
ly:{
km2:['2022.06.29.01','2022.12.18.1'],
km3:['2022.08.13.01','2022.12.05.1'],
}
}
} }

View File

@ -6,6 +6,7 @@ import abilityAccessCtrl, { Permissions } from '@ohos.abilityAccessCtrl';
// import featureAbility from '@ohos.ability.featureAbility' // import featureAbility from '@ohos.ability.featureAbility'
import { makedir } from '../common/service/fileService' import { makedir } from '../common/service/fileService'
import {Array2Byte} from '../common/utils/tools' import {Array2Byte} from '../common/utils/tools'
import {GlobalConfig} from '../config/global'
export default class EntryAbility extends UIAbility { export default class EntryAbility extends UIAbility {
onCreate(want, launchParam) { onCreate(want, launchParam) {
@ -28,31 +29,12 @@ export default class EntryAbility extends UIAbility {
globalThis.examinerInfo = {} globalThis.examinerInfo = {}
globalThis.deviceNo = ''; globalThis.deviceNo = '';
globalThis.hasAuth = false globalThis.hasAuth = false
// globalThis.version = '2022.08.13.01'//洛阳
// globalThis.judgeVersion = '2022.12.05.1'
// globalThis.version = '2022.06.29.01'//洛阳科目二 globalThis.version = GlobalConfig.version.jn.km3[0];
// globalThis.judgeVersion = '2022.12.18.1' globalThis.judgeVersion = GlobalConfig.version.jn.km3[1];
/***************** 黑龙江科目二 ******************/
// globalThis.version = '2024.03.19.01'
// globalThis.judgeVersion = '2024.01.05.1'
/***************** 黑龙江科目三 ******************/
// globalThis.version = '2023.09.23.01'
// globalThis.judgeVersion = '2023.07.10.1'
/***************** 杭州科目二 ******************/
globalThis.version = '2022 03 14 01'
globalThis.judgeVersion = '2022 03 17 1'
/****************** 济南科目三 *****************/
// globalThis.version = '2023.12.13.01'//济南科目三
// globalThis.judgeVersion = '2023.09.30.1'
globalThis.videoVersion= '1.0' globalThis.videoVersion= '1.0'
// globalThis.videoVersion= '1.0'
// globalThis.version = '2022.03.14.01'
//视频遮挡 //视频遮挡
globalThis.spzd={ globalThis.spzd={
spzd1:false, spzd1:false,
@ -107,4 +89,4 @@ export default class EntryAbility extends UIAbility {
makedir('/testFile'); makedir('/testFile');
} }
} }

View File

@ -1018,7 +1018,7 @@ struct Index {
isManualProjectIn, isManualProjectIn,
getIsExitManualProject, getIsExitManualProject,
artSubject3ProjectsCodesArr, artSubject3ProjectsCodesArr,
currentXmdm, projectsObj
} = this; } = this;
const projectCode = artSubject3ProjectsCodesArr[index]; const projectCode = artSubject3ProjectsCodesArr[index];
if(index === 5) { if(index === 5) {
@ -1026,13 +1026,16 @@ struct Index {
} }
if (getIsExitManualProject(index)) { if (getIsExitManualProject(index)) {
// 正在进行的项目 取消项目 // 正在进行的项目 取消项目
if (isManualProjectIn && projectCode === currentXmdm) { if (isManualProjectIn && projectsObj[projectCode].type == '2') {
await this.judge.setJudgeItem(currentXmdm, 2); //判断人工是否能取消项目 && 当前项目有扣分的不能取消
Prompt.showToast({ if(judgeConfigObj['340'] == 1 && projectsObj[projectCode].type != '5'){
message: '项目取消', await this.judge.setJudgeItem(projectCode, 2);
duration: 2000 Prompt.showToast({
}) message: '项目取消',
return duration: 2000
})
return
}
} }
// 靠边停车时候可以触发 // 靠边停车时候可以触发
@ -1073,7 +1076,6 @@ struct Index {
carztStr, carztStr,
isManualProjectIn, isManualProjectIn,
isProjectIn, isProjectIn,
currentXmdm,
getProjectIsInRoad getProjectIsInRoad
} = this; } = this;
const projectCode = artSubject3ProjectsCodesArr[index]; const projectCode = artSubject3ProjectsCodesArr[index];
@ -1113,7 +1115,7 @@ struct Index {
//项目进行中不能人工触发 //项目进行中不能人工触发
if (isProjectIn) { if (isProjectIn) {
if (param340 == 1) { if (param340 == 1) {
if (isManualProjectIn && (currentXmdm == projectCode)) { if (isManualProjectIn && (projectsObj[projectCode].type == '2')) {
return true return true
} else { } else {
return false return false

View File

@ -412,6 +412,9 @@ export default class Judge {
type: kf.type type: kf.type
}) })
this.judgeUI.totalScore += thisKf.score * 1; this.judgeUI.totalScore += thisKf.score * 1;
if(kf.xmdm != 20){
judgeUI.projectsObj[kf.xmdm].type = '5';
}
break; break;
//考车状态 //考车状态
@ -489,7 +492,6 @@ export default class Judge {
//语音播报 //语音播报
this.goVoiceAnnounce(event, xmdm, this.kfArr, xmjs, ksjs,xmxh) this.goVoiceAnnounce(event, xmdm, this.kfArr, xmjs, ksjs,xmxh)
//更新UI //更新UI
if (event == 1 || event == 2 || event == 3 || event == 6) { if (event == 1 || event == 2 || event == 3 || event == 6) {
const copyProjectsObj = this.judgeUI.projectsObj; const copyProjectsObj = this.judgeUI.projectsObj;
@ -574,6 +576,7 @@ export default class Judge {
// 扣分 // 扣分
case 3: case 3:
console.info('surenjun','扣分开始')
//扣分时实时播报语音0-否+1-是) //扣分时实时播报语音0-否+1-是)
const currentKf = kf[kfLen -1]; const currentKf = kf[kfLen -1];
if (judgeConfig.kfVoiceOpen ||(examSubject == 2 && judgeConfigObj['618'] == '1') || (examSubject== 3&& judgeConfigObj['418'] == '1') ) { if (judgeConfig.kfVoiceOpen ||(examSubject == 2 && judgeConfigObj['618'] == '1') || (examSubject== 3&& judgeConfigObj['418'] == '1') ) {