This commit is contained in:
lvyuankang 2024-09-14 09:18:33 +08:00
commit 808692d5eb
2 changed files with 12 additions and 10 deletions

View File

@ -397,8 +397,10 @@ struct Index {
// 断点续考判断 // 断点续考判断
async goDdxkItems() { async goDdxkItems() {
const judgeConfigObj = this.judgeConfigObj const judgeConfigObj = this.judgeConfigObj
const examSubject = this.examSubject
if (judgeConfigObj['432'] != 0) { //科目二强制开始断点续考
if (judgeConfigObj['432'] != 0 || examSubject == 2) {
//断点续考判断 //断点续考判断
let currentParams: any = router.getParams(); let currentParams: any = router.getParams();
const examItems: string = currentParams?.examItems; const examItems: string = currentParams?.examItems;
@ -409,7 +411,7 @@ struct Index {
const startTime = examItemsArrs[0] const startTime = examItemsArrs[0]
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || [] const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || [] const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
if (judgeConfigObj['432'] == 2) { if (judgeConfigObj['432'] == 2 || examSubject == 2) {
//TODO 带项目带里程 //TODO 带项目带里程
if (ddxkKsxmArr?.length) { if (ddxkKsxmArr?.length) {
//断点续考 //断点续考

View File

@ -206,11 +206,11 @@ export default class Judge {
} }
//实时计算gps经纬度距离 //实时计算gps经纬度距离
handDistance= async ()=>{ handDistance= async ()=>{
const {jd,wd,hxj,dwzt} = this.tempData.gps; const {jd,wd,hxj,dwzt,jdzt} = this.tempData.gps;
const tJD = convertGpsCoord2(jd) const tJD = convertGpsCoord2(jd)
const tWD = convertGpsCoord2(wd) const tWD = convertGpsCoord2(wd)
const {prevJd,prevWd} = this const {prevJd,prevWd} = this
if(prevJd && dwzt == 4){ if(prevJd && dwzt == 4 && jdzt == 3){
const distance = await examCalcGpsDistance({ const distance = await examCalcGpsDistance({
jd1:prevJd, jd1:prevJd,
wd1:prevWd, wd1:prevWd,
@ -248,7 +248,7 @@ export default class Judge {
const sdkver = await examJudgeVersion(); const sdkver = await examJudgeVersion();
const initInfo = { const initInfo = {
sdkver, sdkver,
appven:globalThis.version, appver:globalThis.version,
kskm: examSubject * 1, kskm: examSubject * 1,
kchp: plateNo, kchp: plateNo,
kchm: carId * 1, kchm: carId * 1,
@ -1445,13 +1445,13 @@ export default class Judge {
const str = await senorToWXDataStr(msg); const str = await senorToWXDataStr(msg);
usbService.sendUSB(str) usbService.sendUSB(str)
} }
this.judgeUI.isDwztRight = plcData.gps.dwzt == 4; this.judgeUI.isDwztRight = (plcData.gps.dwzt == 4 && plcData.gps.jdzt == 3);
const param350 = judgeUI.judgeConfigObj['350'] const param350 = judgeUI.judgeConfigObj['350']
//@ts-ignore //@ts-ignore
this.judgeUI.sd = ((param350 == 0? plcData.gps.sd :plcData.sensor.cs) as number * 1.852).toFixed(0) + '' this.judgeUI.sd = ((param350 == 0? plcData.gps.sd :plcData.sensor.cs) as number * 1.852).toFixed(0) + ''
this.judgeUI.dw = (Math.floor(plcData.sensor.dw as number) || 0) + '' this.judgeUI.dw = (Math.floor(plcData.sensor.dw as number) || 0) + ''
//TODO 暂时关闭差分检测异常 //TODO 暂时关闭差分检测异常
await this.checkDwzt(plcData.gps.dwzt); await this.checkDwzt(plcData.gps.dwzt,plcData.gps.jdzt);
if(!isExamEnd){ if(!isExamEnd){
await examJudgeRealExam(plcData) await examJudgeRealExam(plcData)
} }
@ -1524,7 +1524,7 @@ export default class Judge {
num++ num++
// 4.过程数据 // 4.过程数据
this.tempData = msg this.tempData = msg
this.judgeUI.isDwztRight = msg?.gps?.dwzt == 4; this.judgeUI.isDwztRight = (msg?.gps?.dwzt == 4 && msg?.gps?.jdzt == 3);
this.judgeUI.sd = Math.floor(msg?.gps?.sd * 1.852) + ''; this.judgeUI.sd = Math.floor(msg?.gps?.sd * 1.852) + '';
this.judgeUI.dw = Math.floor(msg?.sensor?.dw) + '' this.judgeUI.dw = Math.floor(msg?.sensor?.dw) + ''
this.plcData = msg this.plcData = msg
@ -1579,7 +1579,7 @@ export default class Judge {
} }
// 检测差分状态 // 检测差分状态
checkDwzt = async (dwzt) => { checkDwzt = async (dwzt,jdzt) => {
const {avPlayer} = this; const {avPlayer} = this;
const judgeConfig = this.judgeUI.judgeConfig; const judgeConfig = this.judgeUI.judgeConfig;
// const param499 = judgeConfig['499'] // const param499 = judgeConfig['499']
@ -1589,7 +1589,7 @@ export default class Judge {
this.judgeUI.dwztErrorVisible = true; this.judgeUI.dwztErrorVisible = true;
avPlayer.playAudio([`voice/差分状态异常.mp3`],true) avPlayer.playAudio([`voice/差分状态异常.mp3`],true)
} }
if(dwzt != 4){ if(dwzt != 4 || jdzt != 3){
this.dwztNum += 1 this.dwztNum += 1
}else{ }else{
this.dwztNum = 0; this.dwztNum = 0;