From 0820ac658c30227860b1e0c503e4a523ed71ce0d Mon Sep 17 00:00:00 2001 From: lvyuankang <1344032923@qq.com> Date: Tue, 21 Jan 2025 16:52:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B6=A6=E5=92=8C=E8=81=94=E7=BD=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/.DS_Store | Bin 0 -> 6148 bytes entry/src/main/.DS_Store | Bin 0 -> 6148 bytes entry/src/main/ets/pages/Index.ets | 18 +++++----- entry/src/main/ets/pages/Judge.ets | 2 +- entry/src/main/ets/pages/SignDisplay.ets | 2 ++ .../ets/pages/compontents/SignDisplayCom.ets | 32 +++++++++--------- .../ets/pages/compontents/judge/RealTime.ets | 1 + .../src/main/ets/pages/judgeSDK/api/index.ts | 14 ++++++++ entry/src/main/ets/pages/judgeSDK/judge.ts | 10 +++++- .../ets/pages/judgeSDK/utils/fileModel.ts | 1 + .../ets/pages/judgeSDK/utils/judgeConfig.ts | 8 ++--- 11 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 entry/src/.DS_Store create mode 100644 entry/src/main/.DS_Store diff --git a/entry/src/.DS_Store b/entry/src/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..aba2928397001cdab0b66a907a0cb8828b58bb21 GIT binary patch literal 6148 zcmeHK%}T>S5Z-O0O({YS3Oz1(EtpC{ikA@U3mDOZN=-=7V45vWY7V84v%Zi|;`2DO zyAg}^Dq?3~_nY6{><8H&#u)b(ai1}VF=j(UAbZ-nbOfn+JF`_b`MX8LyelxMZ z4*2aBo3fB4Ec^QX(JW2!!gb$yqiOBzw(OSOvG0OMSq4Q|EOI}b-=K9VWg69b7+ock za_sD%$*c&IY%*5`Nj!m++v_BYW$DXB7U!xq&;h$`x5rL*xg5BIp6I*oswbAiW49-U zC&SgMZ66#SonDNe(rG4NG@%^$Rwpfg<B5Q9#GH1fnqL8LTuy1cd8SKwZks z6NBq=@C%dY8LTwwa>munFpinIe!OrsJNSi4XWY|BJuyHGtTWKmri17IIs7skANlJg zWDx_zz&~SvTccp)!=lXD`fYi5)(U9%&`>b1LIni$wMzgPxQ}#IP{#%8kmnh!G~y`e RSLJ|o5m1CsM-2P|10SHqN<{zw literal 0 HcmV?d00001 diff --git a/entry/src/main/.DS_Store b/entry/src/main/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2a71647743b9814cedc30d8deae35b135d652462 GIT binary patch literal 6148 zcmeHK-AcnS6i&A3GKSC#gjB$S%j~H_pV*(l?N2Ni~-56@wWJHc*6!R!k5m@ih+{S)8 z;J3F~!b(;|tFPamrA6twAH3D>?Cf?$SMi#5D~VpsDLEb>g{58$b@>nuWIfEXYKh=KpjfISyP z|9{g!t0xACfd&R}e~{1+J&Tn=y>&o`*Jq4(5K%zKw*;cJ=vk}`LIi}HQb1G6?GuBW za_~!==UJ=_nsUbV%rK6fxqiHGJv;cNPG{URNIfw?3~V#dHl~B;|2h0JjgS2860(Q^ zV&IQ4z&q1m>cgV!+4^mHc-Bg2_s~!X7GItPJ8P=-1_d ObP>>mP)7{>00W<$pGk@U literal 0 HcmV?d00001 diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index edc3d43d..501cfab3 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -16,7 +16,7 @@ import promptAction from '@ohos.promptAction'; import errorMsgDialog from './compontents/errorMsgDialog'; import GetDistance from '../common/utils/GetDistance'; import UdpEvent from '../common/utils/UdpEvent'; -import { delPic } from '../common/service/videoService'; +// import { delPic } from '../common/service/videoService'; import imageBtn from './compontents/imageBtn'; import VoiceAnnounce from './judgeSDK/utils/voiceAnnouncements'; @@ -395,8 +395,8 @@ struct Index { console.log('syssyssyssys') // this.delLoading=true // globalThis.param854Str=sys.v_value - delPic(Number(sys.v_value), 1) - delPic(Number(sys.v_value), 2) + // delPic(Number(sys.v_value), 1) + // delPic(Number(sys.v_value), 2) // this.delLoading=false } @@ -618,12 +618,12 @@ struct Index { getTCP() this.deviceId = globalThis.carInfo.carNo await setCurrentTime(); - if (!globalThis.distanceClass) { - const distanceClass = new GetDistance(globalThis.context) - await distanceClass.initFolder() - globalThis.distanceClass = distanceClass - console.info('surenjun', 'distanceClass=>初始化完成') - } + // if (!globalThis.distanceClass) { + // const distanceClass = new GetDistance(globalThis.context) + // await distanceClass.initFolder() + // globalThis.distanceClass = distanceClass + // console.info('surenjun', 'distanceClass=>初始化完成') + // } this.carNum = globalThis.carInfo.plateNo; this.version = globalThis.version; this.hasAuth = globalThis.hasAuth; diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index 75be0715..b7eef9a1 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -542,7 +542,7 @@ struct Index { globalThis.carInfo.examSubject = this.examSubject this.singlePlay = beginDataObj.exam == 0; this.carName = initDataObj.name; - globalThis.singlePlay = beginDataObj.exam == 0; + // globalThis.singlePlay = beginDataObj.exam == 0; await this.initSystemParam(initDataObj.systemparm) await this.initMarkRules(initDataObj.mark); await this.initSysset(initDataObj.sysset); diff --git a/entry/src/main/ets/pages/SignDisplay.ets b/entry/src/main/ets/pages/SignDisplay.ets index 86e8331b..ef0150ef 100644 --- a/entry/src/main/ets/pages/SignDisplay.ets +++ b/entry/src/main/ets/pages/SignDisplay.ets @@ -1,6 +1,7 @@ import { GPSData, SignalData } from '../mock'; import { SignalDataType } from '../model'; import signDisplayCom from './compontents/signDisplayCom'; +import TopLogo from './compontents/TopLogo'; @Entry @Component @@ -18,6 +19,7 @@ export default struct Index { // @State gpsList: Array = [] build() { Column() { + TopLogo({ outFlag: $outFlag }).margin({ bottom: 25.5 * this.ratio }) signDisplayCom({ showBack: true }) diff --git a/entry/src/main/ets/pages/compontents/SignDisplayCom.ets b/entry/src/main/ets/pages/compontents/SignDisplayCom.ets index 60dbe634..f721433d 100644 --- a/entry/src/main/ets/pages/compontents/SignDisplayCom.ets +++ b/entry/src/main/ets/pages/compontents/SignDisplayCom.ets @@ -37,7 +37,7 @@ export default struct SignDisplayCom { Column() { Flex({ justifyContent: FlexAlign.SpaceBetween }) { Row() { - Image($r('app.media.signal_logoS')).width(30 * this.ratio).height(24 * this.ratio) + // Image($r('app.media.signal_logoS')).width(30 * this.ratio).height(24 * this.ratio) Row() { Text('PLC信号').fontColor(this.active == 0 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio) } @@ -51,7 +51,7 @@ export default struct SignDisplayCom { }) - if (this.showTrajectory) { + if (this.showTrajectory||true) { Row() { Text('实时轨迹').fontColor(this.active == 1 ? '#FFAD33' : '#e7cba3').fontSize(20 * this.ratio) } @@ -82,20 +82,20 @@ export default struct SignDisplayCom { }) } - Row() { - if (this.showBack) { - Image($r('app.media.topB_back')).height('12.2%') - .onClick(() => { - router.back() - // this.url='back' - // this.vocObj.playAudio({ - // type: 1, - // name: 'media_button.wav' - // }) - this.outFlag = true - }) - } - } + // Row() { + // if (this.showBack) { + // Image($r('app.media.topB_back')).height('12.2%') + // .onClick(() => { + // router.back() + // // this.url='back' + // // this.vocObj.playAudio({ + // // type: 1, + // // name: 'media_button.wav' + // // }) + // this.outFlag = true + // }) + // } + // } }.width(936 * this.ratio) Column() { diff --git a/entry/src/main/ets/pages/compontents/judge/RealTime.ets b/entry/src/main/ets/pages/compontents/judge/RealTime.ets index bb4c7a05..ed2c1ce0 100644 --- a/entry/src/main/ets/pages/compontents/judge/RealTime.ets +++ b/entry/src/main/ets/pages/compontents/judge/RealTime.ets @@ -78,6 +78,7 @@ export default struct RealTime { .height(this.heightNumber) .onLoad(() => { libJudgeSdk.examJudgeMapSetDrawing(true); //停止绘制地图轨迹,false:表示结束绘制 + }) .onDestroy(() => { libJudgeSdk.examJudgeMapSetDrawing(false); //停止绘制地图轨迹,false:表示结束绘制 diff --git a/entry/src/main/ets/pages/judgeSDK/api/index.ts b/entry/src/main/ets/pages/judgeSDK/api/index.ts index b444ac28..860e3748 100644 --- a/entry/src/main/ets/pages/judgeSDK/api/index.ts +++ b/entry/src/main/ets/pages/judgeSDK/api/index.ts @@ -64,7 +64,11 @@ export async function examJudgeSetRealExamCallback(fn){ * @desc 设置轨迹图像回调函数 */ export async function examJudgeMapImageSetCallback(fn){ + console.log('examJudgeMapexamJudgeMapImageSetCallbackStart') + const temp = libJudgeSdk.examJudgeMapImageSetCallback(fn); + console.log('examJudgeMapexamJudgeMapImageSetCallbackEnd') + return await handle(temp,'examJudgeMapImageSetCallback') } @@ -105,7 +109,10 @@ export async function examJudgeArtificialItem( * @desc 设置地图轨迹图像绘制的开关 */ export async function examJudgeMapSetDrawing(fn){ + console.log('examJudgeMapexamJudgeMapSetDrawingStart') const temp = libJudgeSdk.examJudgeMapSetDrawing(fn); + console.log('examJudgeMapexamJudgeMapSetDrawingEnd') + return await handle(temp,'examJudgeMapSetDrawing') } @@ -151,7 +158,11 @@ export async function examJudgeDestroy(){ * */ export async function examJudgeMapSetParam(width:number,height:number){ + console.log('examJudgeMapSetstart') + const temp = libJudgeSdk.examJudgeMapSetParam(width,height ); + console.log('examJudgeMapSetEnd') + return await handle(temp,'examJudgeMapSetParam') } @@ -160,7 +171,10 @@ export async function examJudgeMapSetParam(width:number,height:number){ * */ export async function examJudgeMapSetScaling(scaling?:number){ + console.log('examJudgeMapscanl') const temp = libJudgeSdk.examJudgeMapSetScaling(scaling || 1); + console.log('examJudgeMapscanlend') + return await handle(temp,'examJudgeMapSetScaling') } diff --git a/entry/src/main/ets/pages/judgeSDK/judge.ts b/entry/src/main/ets/pages/judgeSDK/judge.ts index 2291d3bf..6ccc18c9 100644 --- a/entry/src/main/ets/pages/judgeSDK/judge.ts +++ b/entry/src/main/ets/pages/judgeSDK/judge.ts @@ -151,6 +151,7 @@ export default class Judge { } //获取科目三的评判初始化配置 getKm3JudgeInitConfig = async () => { + console.log('modelsmodels00') const {judgeUI,getModelData} = this; const {mapPointArr,mapPointItemArr} = judgeUI; return { @@ -702,6 +703,7 @@ export default class Judge { // 获取评判初始化数据 getJudgeInitData = async () => { + console.log('modelsmodels0000') const {getModelData,getKm3JudgeInitConfig} = this const carInfo = globalThis.carInfo; const { examSubject,plateNo,carId } = carInfo; @@ -721,6 +723,8 @@ export default class Judge { } //获取版本号 const sdkver = await examJudgeVersion(); + console.info(judgeTag, '3.1获取评判初始化数据完成') + const initInfo = { sdkver, appver: globalThis.version, @@ -1640,8 +1644,10 @@ export default class Judge { // 获取模型数据 getModelData = (modelName) => { + console.log('modelsmodels0') const modelPath = this.modelPath const fileModel = this.fileModel; + console.log('modelsmodels',modelPath,fileModel) const modelData = fileModel.getModelContent(modelPath, modelName); return modelData } @@ -1742,12 +1748,13 @@ export default class Judge { let strArr = []; if (isTrajectoryOpen) { const folderPath = await this.fileUtil.initFolder(trajectoryPath); + console.log('surenjun','folderPath',folderPath) const str = await fileUtil.readFile(folderPath) strArr = str.split('\n') } //日志回调 console.info(judgeTag, '1.进入评判入口') - await examJudgeSetLogCallback(3, async (level, info, len) => { + await examJudgeSetLogCallback(6, async (level, info, len) => { console.log('评判日志:' + info) await fileLog.setExamJudgeLogData(info); }) @@ -1812,6 +1819,7 @@ export default class Judge { // } this.judgeUI.draw = true + // 处理轨迹plc信息 if (isTrajectoryOpen) { handleTrajectoryUdp(strArr); diff --git a/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts b/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts index 4b43662a..a3230bb6 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/fileModel.ts @@ -22,6 +22,7 @@ export default class FileModel{ const {fileUtil} = this await fileUtil.initFolder(`/models/model_enc`); const folderPath = await fileUtil.initFolder(`/models`); + console.log('surenjun','modelsmodels',folderPath) this.folderPath = folderPath; } diff --git a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts index a8e1b4f1..57d6c4ec 100644 --- a/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts +++ b/entry/src/main/ets/pages/judgeSDK/utils/judgeConfig.ts @@ -1,21 +1,21 @@ //考试回放开关 export const judgeConfig = { //本地目录开关 - isTrajectoryOpen: false, + isTrajectoryOpen: true, //是否开启拍照 - isPhotoOpen: true, + isPhotoOpen: false, //扣分语音是否强制开启 kfVoiceOpen: false, //忽略的考试项目 ignoreProjects:[], // 是否忽略考试前熄火、车门检查 - isCheckFireOpen: false, + isCheckFireOpen: true, //轨迹回放是否开启Udp udpOpen:true, // 本地模型地址 modelPath: 'models/model_enc', // 济南科目三 - trajectoryPath: 'logs/2024_12_26/2024_12_26_14_12_51_2412505941910_370125200404041910_赵宇/judge_exam_data.txt', + trajectoryPath: 'logs/2024_10_12/2024_10_12_11_50_10_9999427676823_744299437502336256_隋统/judge_exam_data.txt', //四合一画面配置 fourInOneScreen:{ //gps位数