dev #63
@ -41,8 +41,8 @@ export default class GetDistance {
|
||||
console.info('surenjun',str)
|
||||
const contentArr = content.split('\n').filter(item => item)
|
||||
console.info('surenjun contentArr',JSON.stringify(contentArr))
|
||||
this.totalDistance += str
|
||||
contentArr[contentArr.length - 1] = `程序启动时间:${timeStr} 累计行驶距离:${this.totalDistance}m`+ '\n'
|
||||
this.totalDistance += str * 1
|
||||
contentArr[contentArr.length - 1] = `程序启动时间:${timeStr} 累计行驶距离:${(this.totalDistance).toFixed(2)}m`+ '\n'
|
||||
console.info('surenjun',contentArr.join('\n'))
|
||||
await fileUtil.addFile(
|
||||
`${folderPath}/${date}.txt`,contentArr.join('\n')
|
||||
|
||||
@ -8,7 +8,7 @@ import AmplifyPopup from './compontents/judge/AmplifyPopup';
|
||||
import Judge from './judgeSDK/judge';
|
||||
import { defaultJudgeConfigObj } from './judgeSDK/utils//judgeCommon';
|
||||
import {uploadExamMileage} from '../api/judge'
|
||||
|
||||
import DwztErrorPopup from './compontents/judge/DwztErrorPopup'
|
||||
import {
|
||||
CARINFO,
|
||||
CDSBInfo,
|
||||
@ -874,7 +874,6 @@ struct Index {
|
||||
}.width('100%').height('100%').position({ y: 0 }).backgroundColor('rgba(0,0,0,0.6)')
|
||||
}
|
||||
|
||||
|
||||
//科目三人工项目确认框
|
||||
if (this.isAmplifyPopShow && this.examSubject == 3) {
|
||||
AmplifyPopup({
|
||||
@ -920,6 +919,20 @@ struct Index {
|
||||
title: '正在生成考试记录,请稍后...',
|
||||
})
|
||||
}
|
||||
|
||||
if(this.dwztErrorVisible){
|
||||
DwztErrorPopup({
|
||||
title:'当前差分状态异常,学员将无法正常进行考试评判,请将车辆行驶到开阔地,等待程序自检,差分正常后会自动关闭该对话框',
|
||||
cancelFn:()=>{
|
||||
this.dwztErrorVisible = false;
|
||||
},
|
||||
confirmFn:()=>{
|
||||
clearInterval(this.timer);
|
||||
clearInterval(globalThis.judgeTimer)
|
||||
this.judge.checkExamIsEnd(true);
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
.height('100%').backgroundColor('#000').justifyContent(FlexAlign.Start)
|
||||
}
|
||||
@ -995,6 +1008,7 @@ struct Index {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取是否能人工进项目
|
||||
getIsExitManualProject = (index: number) => {
|
||||
const {
|
||||
@ -1077,6 +1091,7 @@ struct Index {
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// 判断项目是否在当前路段号
|
||||
getProjectIsInRoad = (projectCode: string,) => {
|
||||
const {
|
||||
@ -1136,6 +1151,7 @@ struct Index {
|
||||
return true
|
||||
|
||||
}
|
||||
|
||||
// 获取人工项目是否已做
|
||||
getIsEndManualProject = (index: number) => {
|
||||
const projectName = this.artSubject3Projects[index];
|
||||
@ -1146,6 +1162,7 @@ struct Index {
|
||||
}
|
||||
return (type == '3' || type == '4') ? `${projectName}_red` : `${projectName}_green`;
|
||||
}
|
||||
|
||||
scroller: Scroller = new Scroller()
|
||||
//页面通用字体大小
|
||||
@State wayno: number = 0
|
||||
@ -1244,4 +1261,5 @@ struct Index {
|
||||
@State sd: string = ''
|
||||
@State mileageTimer: number = 0;
|
||||
@State passingScore: number = 80
|
||||
@State dwztErrorVisible: boolean = false;
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
|
||||
@Component
|
||||
export default struct DwztErrorPop{
|
||||
constructor() {
|
||||
super()
|
||||
}
|
||||
|
||||
private title:string = ''
|
||||
private cancelFn:(event?: ClickEvent) => void
|
||||
private confirmFn:(event?: ClickEvent) => void
|
||||
|
||||
build(){
|
||||
Column(){
|
||||
Column(){
|
||||
Text(this.title).fontSize(36).margin({bottom:20})
|
||||
Row(){}.height(100)
|
||||
Row(){
|
||||
Text('继续考试').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(95).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).onClick(this.cancelFn)
|
||||
Text('结束考试').backgroundImage($rawfile('judge/end-btn.png'),ImageRepeat.NoRepeat).backgroundImageSize({width:'100%',height:'100%'}).width(250).height(95).fontSize(28).fontColor('#FFF').textAlign(TextAlign.Center).margin({left:45}).onClick(this.confirmFn)
|
||||
}
|
||||
}.width('75%').height('70%').backgroundColor('#E6E3DF').borderRadius(38).position({y:'12%',x:'12.5%'}).justifyContent(FlexAlign.Center)
|
||||
|
||||
}.width('100%').height('100%').position({y:0}).backgroundColor('rgba(0,0,0,0.7)')
|
||||
}
|
||||
}
|
||||
@ -208,4 +208,6 @@ export interface LANE {
|
||||
|
||||
export interface ProjectObj {
|
||||
[k: string]: Project
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -558,7 +558,7 @@ export const testUIAllitems = [
|
||||
]
|
||||
|
||||
export const wuxiKm3Items = [
|
||||
//3,5,9,12,14,15,16,
|
||||
//3,5,9,12,14,15,16,
|
||||
{projectCode:'1',projectCodeCenter:'40100',name:'上车准备',abbreviation:'上车准备'},
|
||||
{projectCode:'2',projectCodeCenter:'40200',name:'起步',abbreviation:'起步'},
|
||||
{projectCode:'3',projectCodeCenter:'40300',name:'直线行驶',abbreviation:'直线行驶'},
|
||||
|
||||
@ -72,7 +72,6 @@ export default class Judge {
|
||||
this.xmmcCode = '';
|
||||
this.carztStr = '';
|
||||
this.testKmItems = {};
|
||||
|
||||
// 考试回放配置
|
||||
const {isTrajectoryOpen,modelPath,trajectoryPath} = judgeConfig
|
||||
this.isTrajectoryOpen = isTrajectoryOpen;
|
||||
@ -91,7 +90,6 @@ export default class Judge {
|
||||
// status: projectsCenterObj[item.code]?.isRequired ? 1 : 0
|
||||
}
|
||||
})
|
||||
|
||||
console.info(judgeTag+'testKmItems',JSON.stringify(this.testKmItems))
|
||||
this.isExamEnd = false;
|
||||
}
|
||||
@ -164,7 +162,7 @@ export default class Judge {
|
||||
await fileLog.setExamJudgeData(beginExamInfo)
|
||||
await examJudgeBeginExam(beginExamInfo);
|
||||
console.info(judgeTag, '6.开始考试注册完成')
|
||||
avPlayer.playAudio([globalThis.singlePlay?'voice/ksks.WAV':'voice/监管成功.mp3'])
|
||||
avPlayer.playAudio([globalThis.singlePlay ? 'voice/ksks.WAV' : 'voice/监管成功.mp3'])
|
||||
this.judgeUI.draw = true
|
||||
// 处理轨迹plc信息
|
||||
if (isTrajectoryOpen) {
|
||||
@ -178,6 +176,8 @@ export default class Judge {
|
||||
handleUdp(msg)
|
||||
})
|
||||
|
||||
|
||||
|
||||
//TODO 监听远程扣分
|
||||
}
|
||||
|
||||
@ -380,7 +380,7 @@ export default class Judge {
|
||||
case 5:
|
||||
this.ksjs = ksjs;
|
||||
await fileLog.setExamJudgeData({
|
||||
method: 'examjudgeEndExam',
|
||||
method: 'examJudgeEndExam',
|
||||
})
|
||||
break;
|
||||
|
||||
@ -504,8 +504,9 @@ export default class Judge {
|
||||
case 3:
|
||||
//扣分时实时播报语音(0-否+1-是)
|
||||
const currentKf = kf[kfLen -1];
|
||||
if (judgeConfigObj['418'] == '1' && judgeConfig.kfVoiceOpen) {
|
||||
avPlayer.playAudio([`voice/${currentKf.markcatalog}.mp3`])
|
||||
if (judgeConfig.kfVoiceOpen ||(examSubject == 2 && judgeConfigObj['618'] == '1') || (examSubject== 3&& judgeConfigObj['418'] == '1') ) {
|
||||
avPlayer.playAudio([`voice/${currentKf.markcatalog}.mp3`,`voice/mark_${Math.abs(currentKf.score)}.mp3`])
|
||||
|
||||
}
|
||||
const isStart = await checkProjectIsStart(currentKf.xmdm,2,currentKf);
|
||||
if(isStart){
|
||||
@ -662,7 +663,7 @@ export default class Judge {
|
||||
const project = getProjectInfo(ksxm);
|
||||
//科目三夜间行驶.模拟灯光、上车准备出现通用评判,ksxm为当前进行的项目
|
||||
const checkProjects = ['17', '41', '1'];
|
||||
//获取正在进行的项目
|
||||
//获取正在进行的项目
|
||||
const inProjects = Reflect.ownKeys(projectsObj).filter(projectKey => projectsObj[projectKey].type == 2);
|
||||
|
||||
let commonKsxm = '';
|
||||
@ -709,7 +710,7 @@ export default class Judge {
|
||||
const photoBase64 = await getPhoto();
|
||||
const carInfo = globalThis.carInfo;
|
||||
const { examSubject,plateNo,carNo } = carInfo;
|
||||
const {lsh,idCard,serialNumber,projectsObj,ksdd} = judgeUI;
|
||||
const {lsh,idCard,serialNumber,projectsObj,ksdd,judgeConfigObj} = judgeUI;
|
||||
const {sensor,gps} = plcData
|
||||
const project = projectsObj[ksxm]
|
||||
|
||||
@ -724,7 +725,7 @@ export default class Judge {
|
||||
zpsj: time,
|
||||
//@ts-ignore
|
||||
zp: photoBase64,
|
||||
cs: Math.floor(gps.sd * 1.852),
|
||||
cs: Math.floor((judgeConfigObj['350'] == 0?gps.sd:sensor.cs) * 1.852),
|
||||
ksdd: encodeURI(ksdd)
|
||||
}
|
||||
};
|
||||
@ -761,77 +762,77 @@ export default class Judge {
|
||||
// 校验考试是否结束
|
||||
checkExamIsEnd =
|
||||
async (isManual?: boolean) => {
|
||||
const {judgeUI,avPlayer,isExamEnd,isEndTip} = this;
|
||||
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore} = judgeUI;
|
||||
const {judgeUI,avPlayer,isExamEnd,isEndTip} = this;
|
||||
const {isAllProjectsEnd,examSubject,singlePlay,totalScore,judgeConfigObj,passingScore} = judgeUI;
|
||||
|
||||
if (isExamEnd) {
|
||||
return
|
||||
}
|
||||
//及格分
|
||||
let passingGrade = passingScore
|
||||
if (isManual) {
|
||||
if (isAllProjectsEnd) {
|
||||
if (isExamEnd) {
|
||||
return
|
||||
}
|
||||
//及格分
|
||||
let passingGrade = passingScore
|
||||
if (isManual) {
|
||||
if (isAllProjectsEnd) {
|
||||
// 考试合格
|
||||
if (totalScore >= passingGrade) {
|
||||
// 考试合格
|
||||
if (totalScore >= passingGrade) {
|
||||
// 考试合格
|
||||
await examJudgeEndExam();
|
||||
this.isExamEnd = true
|
||||
}
|
||||
} else {
|
||||
// 考试不合格
|
||||
await examJudgeEndExam();
|
||||
this.isExamEnd = true
|
||||
}
|
||||
} else {
|
||||
// 考试不合格
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
}
|
||||
this.isManual = true
|
||||
|
||||
} else {
|
||||
//单机模式
|
||||
if (singlePlay) {
|
||||
console.info(judgeTag + ' isAllProjectsEnd => ',isAllProjectsEnd)
|
||||
if (isAllProjectsEnd) {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
}
|
||||
this.isManual = true
|
||||
|
||||
} else {
|
||||
//单机模式
|
||||
if (singlePlay) {
|
||||
console.info(judgeTag + ' isAllProjectsEnd => ',isAllProjectsEnd)
|
||||
if (isAllProjectsEnd) {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
//成绩不合格
|
||||
if (totalScore < passingGrade) {
|
||||
//科目三不合格报靠边停车
|
||||
if(examSubject == 3 && param302 ==1){
|
||||
avPlayer.playAudio([`voice/考试结束.mp3`]);
|
||||
return
|
||||
}
|
||||
} else {
|
||||
const param302 = judgeConfigObj['302'];
|
||||
const param342 = judgeConfigObj['342'];
|
||||
const param512 = (judgeConfigObj['512'] || '').split(',');
|
||||
//成绩不合格
|
||||
if (totalScore < passingGrade) {
|
||||
//科目三不合格报靠边停车
|
||||
if(examSubject == 3 && param302 ==1){
|
||||
avPlayer.playAudio([`voice/考试结束.mp3`]);
|
||||
return
|
||||
}
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
//成绩合格
|
||||
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
|
||||
|
||||
//考试合格自动退出
|
||||
if(examSubject == 3 && param302 == 4){
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
//成绩合格
|
||||
if (isAllProjectsEnd && totalScore >= passingGrade && !isEndTip) {
|
||||
|
||||
//考试合格自动退出
|
||||
if(examSubject == 3 && param302 == 4){
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
return
|
||||
}
|
||||
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if(param512[7] != 0){
|
||||
avPlayer.playAudio(['voice/综合评判.mp3'])
|
||||
this.judgeUI.isDeductedPopShow = true
|
||||
this.judgeUI.defaultTabIndex = 1
|
||||
this.isEndTip = true
|
||||
}
|
||||
} else {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
if (examSubject == 3 && (param342 == 0 || param342 == 2) && (param302 != 6 || param302 != 7 || param302 != 8)) {
|
||||
if(param512[7] != 0){
|
||||
avPlayer.playAudio(['voice/综合评判.mp3'])
|
||||
this.judgeUI.isDeductedPopShow = true
|
||||
this.judgeUI.defaultTabIndex = 1
|
||||
this.isEndTip = true
|
||||
}
|
||||
} else {
|
||||
await examJudgeEndExam()
|
||||
this.isExamEnd = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理考试结束
|
||||
public handEndExam = async (ksjs: KSJS) => {
|
||||
@ -870,7 +871,7 @@ export default class Judge {
|
||||
}
|
||||
}
|
||||
await handleSEP(306);
|
||||
avPlayer.playAudio(['voice/exam_waiting.mp3'], true, async () => {
|
||||
avPlayer.playAudio(['voice/exam_waiting.mp3'], globalThis.singlePlay, async () => {
|
||||
try {
|
||||
if (!singlePlay) {
|
||||
const bytes = await this.getMessageHeartbeat(true);
|
||||
@ -1054,7 +1055,7 @@ export default class Judge {
|
||||
getSbxh
|
||||
} = this;
|
||||
const singlePlay = globalThis.singlePlay
|
||||
const {lsh,startHourTime,totalScore,examTime} = judgeUI;
|
||||
const {lsh,startHourTime,totalScore,examTime,judgeConfigObj} = judgeUI;
|
||||
const {fourInOneScreen:{gpsDigit}} = judgeConfig
|
||||
const examType = examSubject == 2?2:3
|
||||
const {sensor,gps} = tempData;
|
||||
@ -1062,12 +1063,12 @@ export default class Judge {
|
||||
return
|
||||
}
|
||||
const {zfxd,yfxd,shtd,ygd,jgd,skd,dh1,dh2,lhq,jsc,ssc,fsc,lb,mkg,aqd,ygq,cs,fdjzs,dw} = sensor
|
||||
const {jd,wd, hxj, fyj, hbg,} = gps
|
||||
const {jd,wd, hxj, fyj, hbg,sd} = gps
|
||||
const translateProject = getTranslateProject();
|
||||
const sbxh = getSbxh(xmdm, xmxh)
|
||||
const {carzt,dcjl,qjjl,dxjl,bxjl} = performInfo || {};
|
||||
const asclshArr = stringToASC(
|
||||
fillZero((singlePlay?1111111111111:lsh) || 0, 13)
|
||||
fillZero((singlePlay ? 1111111111111 : lsh) || 0, 13)
|
||||
);
|
||||
//13不足要补0
|
||||
const ascksyhArr = stringToASC(fillZero(ksyh || 0, 13))
|
||||
@ -1081,8 +1082,16 @@ export default class Judge {
|
||||
const translateWd = convertGpsCoord2(jd).toFixed(gpsDigit) * Math.pow(10, gpsDigit)
|
||||
//@ts-ignore
|
||||
const translateProjects = translateProject.map(numStr => string2Bytes(parseInt(numStr, 2), 8)[0])
|
||||
|
||||
//@ts-ignore
|
||||
let tempSd = ((judgeConfigObj['350'] ==0 ? sd : cs) * 1.852).toFixed(0) * 1
|
||||
console.info(judgeTag + "prevSD",tempSd);
|
||||
if(tempSd < 1){
|
||||
tempSd = 0
|
||||
}
|
||||
|
||||
const arr = [
|
||||
//考生号
|
||||
//考生号
|
||||
asclshArr.map(lsh => string2Bytes(lsh, 8)[0]),
|
||||
//考试员号
|
||||
ascksyhArr.map(ksyh => string2Bytes(ksyh, 8)[0]),
|
||||
@ -1094,7 +1103,7 @@ export default class Judge {
|
||||
translateSignals,
|
||||
//速度 发动机转速 GPS纬度 GPS经度 主天线位置
|
||||
//@ts-ignore
|
||||
string2Bytes(cs * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8), string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8),
|
||||
string2Bytes(tempSd * 100, 2 * 8), string2Bytes(fdjzs / 100, 8), string2Bytes(translateJd, 4 * 8), string2Bytes(translateWd, 4 * 8), string2Bytes(1, 8),
|
||||
//GPS东向距离
|
||||
string2Bytes(dxjl < 0 ? (dxjl + 4294967296) : dxjl, 4 * 8),
|
||||
//GPS北向距离
|
||||
@ -1316,7 +1325,7 @@ export default class Judge {
|
||||
// 处理udp plc信号
|
||||
handleUdp = async (msg) => {
|
||||
console.info('plc信号', msg)
|
||||
const {fileLog,getPlcData,usbService,isUdpEnd,isExamEnd} = this
|
||||
const {fileLog,getPlcData,usbService,isUdpEnd,isExamEnd,judgeUI} = this
|
||||
const stachArr = msg.split(',')
|
||||
if (stachArr[0] != '#DN_GD' || isUdpEnd) {
|
||||
return
|
||||
@ -1330,8 +1339,12 @@ export default class Judge {
|
||||
usbService.sendUSB(str)
|
||||
}
|
||||
this.judgeUI.isDwztRight = plcData.gps.dwzt == 4;
|
||||
this.judgeUI.sd = (Math.floor(((plcData.gps.sd as number) || 0) * 1.852)) + '';
|
||||
const param350 = judgeUI.judgeConfigObj['350']
|
||||
//@ts-ignore
|
||||
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) + ''
|
||||
|
||||
await this.checkDwzt(plcData.gps.dwzt);
|
||||
if(!isExamEnd){
|
||||
await examJudgeRealExam(plcData)
|
||||
}
|
||||
@ -1401,7 +1414,7 @@ export default class Judge {
|
||||
// 4.过程数据
|
||||
this.tempData = msg
|
||||
this.judgeUI.isDwztRight = msg?.gps?.dwzt == 4;
|
||||
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.plcData = msg
|
||||
// this.judgeUI.isDwztRight = msg.gps.dwzt == 4;
|
||||
@ -1454,10 +1467,22 @@ export default class Judge {
|
||||
this.mndgStr = mndgStr
|
||||
}
|
||||
|
||||
// 路段信息处理
|
||||
setRoadAndLane = async (lane) => {
|
||||
const {road,num,count} = lane;
|
||||
|
||||
// 检测差分状态
|
||||
checkDwzt = async (dwzt) => {
|
||||
const {avPlayer} = this;
|
||||
const judgeConfig = this.judgeUI.judgeConfig;
|
||||
// const param499 = judgeConfig['499']
|
||||
//10秒内dwzt不为4;
|
||||
const dwztNum = this.dwztNum
|
||||
if(dwztNum != 0 && (dwztNum % (5 * 10) == 0)){
|
||||
this.judgeUI.dwztErrorVisible = true;
|
||||
avPlayer.playAudio([`voice/差分状态异常.mp3`],true)
|
||||
}
|
||||
if(dwzt != 4){
|
||||
this.dwztNum += 1
|
||||
}else{
|
||||
this.dwztNum = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public plcStr: string
|
||||
@ -1465,6 +1490,7 @@ export default class Judge {
|
||||
private fileLog
|
||||
private filePath
|
||||
private totalScore: number
|
||||
private dwztNum:number = 0
|
||||
private folderPath: string
|
||||
private modelPath: string
|
||||
private avPlayer
|
||||
|
||||
@ -69,13 +69,13 @@ export function getDwStatusType(dw){
|
||||
// 中心实时项目状态转换
|
||||
export function getCenterProjectStatus(status){
|
||||
switch (status){
|
||||
//不考
|
||||
//不考
|
||||
case 0:return '00'
|
||||
//未考
|
||||
//未考
|
||||
case 1:return '01'
|
||||
//正在考
|
||||
//正在考
|
||||
case 2:return '10'
|
||||
//已考
|
||||
//已考
|
||||
case 3:return '11'
|
||||
|
||||
default :return '00'
|
||||
@ -102,35 +102,35 @@ export function getKmProjectVoice(
|
||||
return projectCode
|
||||
}
|
||||
switch (projectCode*1){
|
||||
//直线行驶
|
||||
//直线行驶
|
||||
case 40300: return type === 1 ? 403001 : 403002
|
||||
//变更车道
|
||||
//变更车道
|
||||
case 40500: return type === 1 ? 405001 : 405002
|
||||
//左转
|
||||
//左转
|
||||
case 40800 : return type === 1 ? 408001 : undefined
|
||||
//右转
|
||||
//右转
|
||||
case 40900 : return type === 1 ? 409001 : undefined
|
||||
//会车 506-6为1都报
|
||||
//会车 506-6为1都报
|
||||
case 41300 : return type === 1
|
||||
? 413001
|
||||
: (param506Str[5] == 1 ? undefined : 413002)
|
||||
//超车
|
||||
//超车
|
||||
case 41400 : return type === 1
|
||||
? (param405Str == 1 && (num == count)?undefined:414001)
|
||||
: undefined
|
||||
//直线行驶
|
||||
//直线行驶
|
||||
case 40700 : return type === 1 ? 407001 : undefined
|
||||
//TODO 通过学校 结束param544Str
|
||||
//TODO 通过学校 结束param544Str
|
||||
case 41100 : return type === 1 ? (param512Str[2] ==3 ? 411001 : undefined):undefined
|
||||
//通过车站
|
||||
//通过车站
|
||||
case 41200 : return type === 1 ? (param512Str[2] ==3 ? 412001 : undefined):undefined
|
||||
//通过人行横道
|
||||
//通过人行横道
|
||||
case 41000 : return type === 1? (param512Str[2] == 3 ? 410001 : undefined):undefined
|
||||
//靠边停车
|
||||
//靠边停车
|
||||
case 40600 : return type === 1 ? 406001 : undefined
|
||||
//掉头
|
||||
//掉头
|
||||
case 41500 : return type === 1 ? 415001:undefined
|
||||
//加减挡为
|
||||
//加减挡为
|
||||
case 40400 : return type === 1 ? undefined : undefined
|
||||
|
||||
default :return undefined
|
||||
@ -153,8 +153,8 @@ export function getKmProjectCancelVoice(projectCode){
|
||||
}
|
||||
// 上传监管数据code转换
|
||||
export function promptWxCode(
|
||||
jkid:'17C51'|'17C52' | '17C54' |'17C55' | '17C53' | '17C56',
|
||||
code:number
|
||||
jkid:'17C51'|'17C52' | '17C54' |'17C55' | '17C53' | '17C56',
|
||||
code:number
|
||||
){
|
||||
let toast = '';
|
||||
|
||||
@ -163,23 +163,23 @@ export function promptWxCode(
|
||||
return
|
||||
}
|
||||
switch (jkid){
|
||||
//考试开始
|
||||
//考试开始
|
||||
case '17C51':
|
||||
switch (code){
|
||||
case -1:toast = '无预约信息';break;
|
||||
case -2:toast = '约考不是今天';break;
|
||||
case -2:toast = '已满当天允许考试次数';break;
|
||||
case -2:toast = '考生身份不合法';break;
|
||||
case -2:toast = '科目考试系统不合法';break;
|
||||
case -2:toast = '无考生分组信息';break;
|
||||
case -2:toast = '分组考官和考生不四配';break;
|
||||
case -8:toast = '考场信息合法';break;
|
||||
case -9:toast = '考试员信息不合法';break;
|
||||
case -10:toast = '科目考试系统时间不合法';break;
|
||||
case -90:toast = '已进行了考试身份验证,无需重复验证!';break;
|
||||
}
|
||||
switch (code){
|
||||
case -1:toast = '无预约信息';break;
|
||||
case -2:toast = '约考不是今天';break;
|
||||
case -2:toast = '已满当天允许考试次数';break;
|
||||
case -2:toast = '考生身份不合法';break;
|
||||
case -2:toast = '科目考试系统不合法';break;
|
||||
case -2:toast = '无考生分组信息';break;
|
||||
case -2:toast = '分组考官和考生不四配';break;
|
||||
case -8:toast = '考场信息合法';break;
|
||||
case -9:toast = '考试员信息不合法';break;
|
||||
case -10:toast = '科目考试系统时间不合法';break;
|
||||
case -90:toast = '已进行了考试身份验证,无需重复验证!';break;
|
||||
}
|
||||
|
||||
//项目开始
|
||||
//项目开始
|
||||
case '17C52':
|
||||
switch (code){
|
||||
case 0:toast = '存在作弊嫌疑,已被取消或暂停考试';break;
|
||||
@ -200,7 +200,7 @@ export function promptWxCode(
|
||||
default:toast = '';break;
|
||||
}
|
||||
break;
|
||||
//过程照片
|
||||
//过程照片
|
||||
case '17C54':
|
||||
switch (code){
|
||||
case -1:toast = '无当前科目考试信息';break;
|
||||
@ -211,7 +211,7 @@ export function promptWxCode(
|
||||
case -6:toast = '存在未结束的考试项目!';break;
|
||||
}
|
||||
break;
|
||||
//项目结束
|
||||
//项目结束
|
||||
case '17C55':
|
||||
switch (code){
|
||||
case -1:toast = '无当前考试项目开始信息';break;
|
||||
@ -230,7 +230,7 @@ export function promptWxCode(
|
||||
default:break;
|
||||
}
|
||||
break;
|
||||
//扣分
|
||||
//扣分
|
||||
case '17C53':
|
||||
switch (code){
|
||||
case 0:toast = '已存在同一时间的同一扣分记录';break
|
||||
@ -247,7 +247,7 @@ export function promptWxCode(
|
||||
default:toast = '';break
|
||||
}
|
||||
break;
|
||||
//考试结束
|
||||
//考试结束
|
||||
case '17C56':
|
||||
switch (code){
|
||||
case -1:toast = '无当前科目考试信息';break;
|
||||
@ -339,9 +339,9 @@ export const plcStrToWXJson = async (plc:string) =>{
|
||||
}
|
||||
const judgeSignal = [
|
||||
// 车门 安全带 熄火 发动机启动 左转向 右转向 前照灯近灯 前照灯远灯
|
||||
p[14], p[19], p[5], p[6], p[2], p[3], p[7], p[8],
|
||||
p[14], p[19], p[5], p[6], p[2], p[3], p[7], p[8],
|
||||
// 注车制动 行车制动 离合器 副制动 喇叭 雨刷 危险报警灯 示廓灯 系统未涉及的传感器信号
|
||||
p[13], p[12], p[17], p[18], p[4], p[11], p[20], p[9], 0
|
||||
p[13], p[12], p[17], p[18], p[4], p[11], p[20], p[9], 0
|
||||
]
|
||||
const judgeAnotherSignal = [
|
||||
// 低三挡位 左侧单边桥1 左侧单边桥2 右侧单边桥1 右侧单边桥2 雾灯
|
||||
@ -355,7 +355,7 @@ export const plcStrToWXJson = async (plc:string) =>{
|
||||
//前天线可用星数 后天线可用星数 东向坐标位置 北向位置坐标 天向位置坐标 东向速度 北向速度 天向速度
|
||||
'', '', '', '', '', '', '', '',
|
||||
//@ts-ignore 评判信号1 评判信号2 发动机转速
|
||||
(judgeSignal.join('')*1).toString(16), (judgeAnotherSignal.join('')*1).toString(16) , p[25],
|
||||
(judgeSignal.join('')*1).toString(16), (judgeAnotherSignal.join('')*1).toString(16) , p[25],
|
||||
'0xFFFFFFF'
|
||||
]
|
||||
const wuXiDataStr = wuXiData.join(',')
|
||||
@ -434,25 +434,25 @@ export function sendRed(){
|
||||
}
|
||||
|
||||
export const defaultJudgeConfigObj = {
|
||||
//结束考试方式 0-不合格继续 1-考试不合格报靠边停车 2-不合格不报靠边 3-训练不合格报靠边 4-自动退出 5-不合格自动退出
|
||||
//结束考试方式 0-不合格继续 1-考试不合格报靠边停车 2-不合格不报靠边 3-训练不合格报靠边 4-自动退出 5-不合格自动退出
|
||||
302:'5',
|
||||
332:'',
|
||||
//是否能进行人工操作 0-不能人工评判 1-不能人工进项目 3-都不能
|
||||
//是否能进行人工操作 0-不能人工评判 1-不能人工进项目 3-都不能
|
||||
342:'',
|
||||
//有项目未结束时可以靠边停车 0-否 1-是
|
||||
//有项目未结束时可以靠边停车 0-否 1-是
|
||||
343:'1',
|
||||
//考试未结束且有扣分,是否可以退出
|
||||
//考试未结束且有扣分,是否可以退出
|
||||
344:'0',
|
||||
//直线行驶中是否可以进其它项目 0-否 1-是
|
||||
//直线行驶中是否可以进其它项目 0-否 1-是
|
||||
348:'0',
|
||||
//车上是否能点结束考试 0:否 1:是
|
||||
//车上是否能点结束考试 0:否 1:是
|
||||
353:'0',
|
||||
//是否启动断电续考 0:否 1:是
|
||||
//是否启动断电续考 0:否 1:是
|
||||
369:'1',
|
||||
//是否显示应考里程
|
||||
//是否显示应考里程
|
||||
375:'0',
|
||||
//里程不够允许手工点靠边停车
|
||||
//里程不够允许手工点靠边停车
|
||||
387:'0',
|
||||
//监管模式有扣分续考(0-否++1-是+把上次未考完的扣分带下来重新考试)
|
||||
//监管模式有扣分续考(0-否++1-是+把上次未考完的扣分带下来重新考试)
|
||||
432:'1'
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user