feat:评判优化

This commit is contained in:
surenjun 2024-09-27 09:50:29 +08:00
parent d2d13502c3
commit 9ba033954b
4 changed files with 72 additions and 70 deletions

View File

@ -43,11 +43,11 @@ export default class EntryAbility extends UIAbility {
// globalThis.judgeVersion = '2023.07.10.1' // globalThis.judgeVersion = '2023.07.10.1'
/***************** 杭州科目二 ******************/ /***************** 杭州科目二 ******************/
globalThis.version = '2024.11.22.44' globalThis.version = '2022 03 14 01'
globalThis.judgeVersion = '2024.11.22.44' globalThis.judgeVersion = '2022 03 17 1'
/***********************************/ /****************** 济南科目三 *****************/
// globalThis.version = '2023.12.13.01'//济南 // globalThis.version = '2023.12.13.01'//济南科目三
// globalThis.judgeVersion = '2023.09.30.1' // globalThis.judgeVersion = '2023.09.30.1'
globalThis.videoVersion= '1.0' globalThis.videoVersion= '1.0'

View File

@ -102,17 +102,17 @@ struct Index {
const carInfo = result[0] || {}; const carInfo = result[0] || {};
this.carName = decodeURI(carInfo.carclass) this.carName = decodeURI(carInfo.carclass)
this.carType = carInfo.kscx this.carType = carInfo.kscx
this.carinfoArrr.push({ this.carinfoArr.push({
CARID: carInfo.carid, CARID: carInfo.carid,
IPADDR: '', IPADDR: '',
CARCLASS: decodeURI(carInfo.carclass), CARCLASS: decodeURI(carInfo.carclass),
KSCX: carInfo.kscx, KSCX: carInfo.kscx,
CARNAME: decodeURI(carInfo.carclass), CARNAME: decodeURI(carInfo.carname),
FLAG: carInfo.flag, FLAG: carInfo.flag,
BK1: carInfo.bk1, BK1: carInfo.bk1,
BK2: carInfo.bk2, BK2: carInfo.bk2,
}) })
console.info('surenjun =>carinfoArrr',JSON.stringify( this.carinfoArrr)) console.info('surenjun =>carinfoArrr',JSON.stringify( this.carinfoArr))
} }
// 获取考生信息 // 获取考生信息
@ -189,7 +189,7 @@ struct Index {
} }
//科目三应行驶距离参数 //科目三应行驶距离参数
if (sys.v_no == '303') { if (sys.v_no == '303') {
this.examMileage = sys.v_value + ''; this.examMileage = this.examMileage == '0'?(sys.v_value + ''): this.examMileage;
} }
//364 绕车一周评判时机(1-开始考试后判 2-开始考试前判) //364 绕车一周评判时机(1-开始考试后判 2-开始考试前判)
@ -259,13 +259,17 @@ struct Index {
if (txt1 === carName) { if (txt1 === carName) {
carNo = no2 carNo = no2
this.carlist = carNo this.carlist = carNo
console.info('surenjun carNo => ',carNo)
} }
} }
//获取及格分数线 //获取及格分数线
if(no1 == 3 && no3 == 3 && carNo === no2){ if(no1 == 3 && no3 == 3 && carNo === no2){
this.passingScore = Number(txt1) || 0; this.passingScore = Number(txt1) || 0;
} }
//根据车型获取应行驶里程数
if(no1 == 3 && no3 ==15 && carNo === no2){
this.examMileage = ((decodeURI(systemParm.txt1)) || '').split('^')[0];
}
//获取当前考车的考试项目 //获取当前考车的考试项目
if (carNo !== '' && no1 == 3 && no2 == carNo && no3 == 10) { if (carNo !== '' && no1 == 3 && no2 == carNo && no3 == 10) {
allItems = decodeURIComponent(systemParm.txt1).split(',').filter(txt => txt !== '') allItems = decodeURIComponent(systemParm.txt1).split(',').filter(txt => txt !== '')
@ -1287,7 +1291,7 @@ struct Index {
//科目三评判初始化数据 //科目三评判初始化数据
@State systemparmArr: SYSTEMPARMARR[] = [] @State systemparmArr: SYSTEMPARMARR[] = []
@State mapPointItemArr: MAPITEMPOINTITEM[] = [] @State mapPointItemArr: MAPITEMPOINTITEM[] = []
@State carinfoArrr: CARINFO[] = [] @State carinfoArr: CARINFO[] = []
@State mapPointArr: MAPPOINT[] = [] @State mapPointArr: MAPPOINT[] = []
//手动项目是否在进行中 //手动项目是否在进行中
@State isManualProjectIn: boolean = false; @State isManualProjectIn: boolean = false;

View File

@ -231,7 +231,7 @@ export default class Judge {
const carInfo = globalThis.carInfo; const carInfo = globalThis.carInfo;
const { examSubject,plateNo,carId } = carInfo; const { examSubject,plateNo,carId } = carInfo;
const judgeUI = this.judgeUI const judgeUI = this.judgeUI
const {projectsObj,itemInfoObj,markRuleListObj,carType,carName,systemparmArr} = judgeUI const {projectsObj,itemInfoObj,markRuleListObj,carType,carName,systemparmArr,carinfoArr} = judgeUI
const examType = examSubject == 2 ? 'km2' : 'km3' const examType = examSubject == 2 ? 'km2' : 'km3'
let allitems = []; let allitems = [];
@ -262,7 +262,8 @@ export default class Judge {
mark: Reflect.ownKeys(markRuleListObj).map(ruleKey => (markRuleListObj[ruleKey])) || testMarkRules, mark: Reflect.ownKeys(markRuleListObj).map(ruleKey => (markRuleListObj[ruleKey])) || testMarkRules,
sysset: judgeUI.judgeConfig, sysset: judgeUI.judgeConfig,
itemInfoObj, itemInfoObj,
carlist:judgeUI.carlist carlist:judgeUI.carlist,
carinfo: carinfoArr,
}; };
let km3Config = {} let km3Config = {}
@ -532,9 +533,7 @@ export default class Judge {
kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true) kmCode && avPlayer.playAudio([`voice/${kmCode}.mp3`],true)
} }
} }
if(param512[7] != 0){ setTimeout(()=>{if(param512[7] != 0){this.judgeUI.isDeductedPopShow = true}},200)
this.judgeUI.isDeductedPopShow = true
}
//项目已考不上传监管信息 //项目已考不上传监管信息
if (!isEnd) { if (!isEnd) {
judgeTask.addTask(async () => { judgeTask.addTask(async () => {
@ -1416,9 +1415,8 @@ export default class Judge {
//获取科目三的评判初始化配置 //获取科目三的评判初始化配置
getKm3JudgeInitConfig = async () => { getKm3JudgeInitConfig = async () => {
const {judgeUI,getModelData} = this; const {judgeUI,getModelData} = this;
const {carinfoArrr,mapPointArr,mapPointItemArr} = judgeUI; const {mapPointArr,mapPointItemArr} = judgeUI;
return { return {
carinfo: carinfoArrr,
map_point: mapPointArr, map_point: mapPointArr,
map_point_item: mapPointItemArr, map_point_item: mapPointItemArr,
//科目三暂时为空 //科目三暂时为空
@ -1538,7 +1536,7 @@ export default class Judge {
const bytes = await this.getMessageHeartbeat(); const bytes = await this.getMessageHeartbeat();
bytes && globalThis.judgeUdp.send(bytes) bytes && globalThis.judgeUdp.send(bytes)
}, 50) }, 200)
globalThis.judgeTimer = judgeTimer; globalThis.judgeTimer = judgeTimer;
} }