diff --git a/Makefile b/Makefile index d061b0d..8962ab8 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ gitLog: - git log --since="2025-06-27 15:02" --until="2025-06-30 17:14" --pretty=format:"
%n %s%n [提交人]:%an
%n [提交时间]:%ad
%n [提交版本]:%h%n
%n" --date=format:"%Y-%m-%d %H:%M" > release_note.md \ No newline at end of file + git log --since="2025-06-30 17:14" --until="2025-07-1 17:14" --pretty=format:"
%n %s%n [提交人]:%an
%n [提交时间]:%ad
%n [提交版本]:%h%n
%n" --date=format:"%Y-%m-%d %H:%M" > release_note.md \ No newline at end of file diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index 1d101ad..120bb07 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -44,13 +44,16 @@ import { } from '../model'; import { GetSyncData } from '../utils/table/Operation'; import dayTs from '../utils/Date'; -import { CutArray, FormatTimeFlexible, GetCurrentTime } from '../utils/Common'; +import { CutArray, GetCurrentTime } from '../utils/Common'; import FileUtils from '../utils/FileUtils'; import SignalTrajectoryDialog from './Judge/SignalTrajectoryDialog'; import { DefaultJudgeConfigData } from '../mock'; import { dConsole } from '../utils/LogWorker'; import ConfirmDialog from './compontents/ConfirmDialog'; import CarLoadingDialog from './compontents/CarLoading'; +import HeaderComponent from './compontents/Header'; +import MessageComponent from './Judge/Message'; +import OperatingAreaComponent from './Judge/OperatingArea'; @Entry @@ -255,7 +258,6 @@ struct JudgePage { // 查询考车信息 async initCar() { - // const result = await getSyncData('ES_CARINFO') const result = await GetSyncData("ES_CARINFO") const carInfo = result[0] || {}; this.carName = decodeURI(carInfo.carclass!) @@ -415,7 +417,6 @@ struct JudgePage { systemParm.txt2 = systemParm.TXT2!; systemParm.txt3 = systemParm.TXT3!; } - // const { no1, no2, no3, } = systemParm; const txt1 = decodeURI(systemParm.txt1 || "") const txt2 = decodeURI(systemParm.txt2 || "") @@ -696,78 +697,43 @@ struct JudgePage { } } + // 信号区域 + @Builder + logoExpansionBuilder() { + Image($rawfile(this.isDwztRight ? 'judge/xh_green.png' : 'judge/xh_red.png')).width(50).margin({ + left: 10 + }) + } + + // 当前项目 + @Builder + backAreaBuilder() { + Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(34) + } + build() { Column() { // 顶部 - Row() { - Row() { - Image($rawfile('judge/signal_logoS.png')).width(120) - Text(this.time).fontColor('#CCB48F').fontSize(34).padding({ left: 10, right: 5 }) - Image($rawfile(this.isDwztRight ? 'judge/xh_green.png' : 'judge/xh_red.png')).width(50) - }.padding({ left: 20 }) - - Row() { - Text(`当前项目:${this.xmmcStr || '无'} `).fontColor('#E5CCA1').fontSize(34) - } - } - .width('100%') - .height('96') - .backgroundColor('#001A33') - .padding({ left: 15, right: 15 }) - .justifyContent(FlexAlign.SpaceBetween) - .alignItems(VerticalAlign.Center) - + HeaderComponent({ + logoExpansionBuilder: this.logoExpansionBuilder, + customizeReturnArea: true, + backAreaBuilder: this.backAreaBuilder + }) Row() { Row() { Column() { - Row() { - Column() { - Row() { - Text('考生姓名:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) - Text(this.name).fontColor('#FFF').fontSize(this.FONTSIZE) - }.margin({ bottom: 10 }) - - Row() { - Text('开始时间:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) - Text(this.startTime).fontColor('#FFF').fontSize(this.FONTSIZE) - }.margin({ bottom: 10 }) - - if (this.examSubject == "3") { - Row() { - Text('考试路线:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) - Text(`线路${this.wayno || 3}`).fontColor('#FFAD33').fontSize(this.FONTSIZE) - } - } - - }.width('45%').alignItems(HorizontalAlign.Start) - - Column() { - Row() { - Text('身份证号:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) - Text(this.idCard).fontColor('#FFF').fontSize(this.FONTSIZE) - }.margin({ bottom: 10 }) - - Row() { - Text('考试用时:').fontColor('#E5CCA1').fontSize(this.FONTSIZE) - Text(FormatTimeFlexible(this.examTime)).fontColor('#FFF').fontSize(this.FONTSIZE) - }.margin({ bottom: 10 }) - - if (this.examSubject == "3") { - Row() { - if (Reflect.get(this.judgeConfigObj, '375') == '0') { - Text(`应行驶:${this.examMileage}m`) - .fontColor('#E5CCA1') - .fontSize(this.FONTSIZE) - .padding({ right: 20 }) - } - Text(`已行驶:${this.jl}m`).fontColor('#FFAD33').fontSize(this.FONTSIZE) - } - } - - }.alignItems(HorizontalAlign.Start) - - }.width('100%') - + // 考生信息展示区域 + MessageComponent({ + name: this.name, + idCard: this.idCard, + startTime: this.startTime, + examTime: this.examTime, + examSubject: this.examSubject, + examMileage: this.examMileage, + jl: this.jl, + wayno: this.wayno, + judgeConfigObj: this.judgeConfigObj, + }) Column() { Row() { Text(this.carztStr).fontColor('#FFA500').fontSize(this.FONTSIZE) @@ -964,107 +930,23 @@ struct JudgePage { }.height('100%').alignItems(HorizontalAlign.Start) }.width('75%').height('100%') - Column() { - Column() { - Row() { - Text(this.totalScore <= 0 ? '0' : this.totalScore + '').fontColor('#FFEECC').fontSize(55) - Text('分').fontColor('#FFEECC').fontSize(30).padding({ top: 5 }) - } - .width(334) - .height(120) - .justifyContent(FlexAlign.Center) - .alignItems(VerticalAlign.Center) - .border({ width: 5, color: '#4D4136', radius: 30 }) - .onClick(() => { - // this.vocObj.playAudio({ - // type: 1, - // name: 'button_media.wav' - // }) - this.signalTrajectoryDialogController.open() - }) - - Row() { - Image(this.kszp).width('85%').height('85%') - } - .width(226) - .height(312) - .backgroundImage($rawfile('judge/photo_bg.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - .justifyContent(FlexAlign.Center) - .alignItems(VerticalAlign.Center) - .margin({ top: 30, bottom: 15 }) + // 操作区域,分数显示区域 + OperatingAreaComponent({ + totalScore: this.totalScore, + kszp: this.kszp, + examSubject: this.examSubject, + singlePlay: this.singlePlay, + judgeConfigObj: this.judgeConfigObj, + signalViewingClick: () => { + this.signalTrajectoryDialogController.open() + }, + artificialEvaluationClick: () => { + this.isDeductedPopShow = true + }, + endTheExamClick: () => { + this.endExamDialogController.open() } - - Column() { - if (this.getIsManualKf()) { - Row() { - Row() { - } - .width(60) - .height(60) - .backgroundImage($rawfile('judge/manual_judge.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - - Text('人工评判').fontColor('#FFF').fontSize(32).padding({ right: 12 }) - } - .width(334) - .height(110) - .justifyContent(FlexAlign.Center) - .alignItems(VerticalAlign.Center) - .backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - .margin({ bottom: 10 }) - .onClick(() => { - // this.vocObj.playAudio({ - // type: 1, - // name: 'button_media.wav' - // }) - this.isDeductedPopShow = true - }) - } - - Row() { - Row() { - } - .width(60) - .height(60) - .backgroundImage($rawfile('judge/phone.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - - Text('呼叫请求').fontColor('#FFF').fontSize(32).padding({ right: 12 }) - } - .width(334) - .height(110) - .justifyContent(FlexAlign.Center) - .alignItems(VerticalAlign.Center) - .backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - .margin({ bottom: 10 }) - - Row() { - } - .width(334) - .height(100) - .backgroundImage($rawfile('judge/anniu_nor.png'), ImageRepeat.NoRepeat) - .backgroundImageSize({ width: '100%', height: '100%' }) - .onClick(() => { - if (Reflect.get(this.judgeConfigObj, '353') == '0') { - this.endExamDialogController.open() - } else { - Prompt.showToast({ - message: '车上不允许手动结束考试!', - duration: 4000 - }); - } - }) - }.margin({ bottom: 30 }) - - } - .width('25%') - .height('100%') - .justifyContent(FlexAlign.SpaceBetween) - .alignItems(HorizontalAlign.Center) - .margin({ bottom: 20 }) + }) } .height('90%') .justifyContent(FlexAlign.Start) @@ -1395,20 +1277,5 @@ struct JudgePage { } return (type == '3' || type == '4') ? `${projectName}_red` : `${projectName}_green`; } - // 获取是否能进行人工评判 - getIsManualKf = () => { - if (this.examSubject == '3') { - //杭州训练模式不允许人工评判 - if (this.singlePlay && Reflect.get(this.judgeConfigObj, '211') == 'zjhz') { - return false - } - if (Reflect.get(this.judgeConfigObj, '342') == '0') { - return true - } - return false - } else { - return false - } - } } diff --git a/entry/src/main/ets/pages/Judge/Message.ets b/entry/src/main/ets/pages/Judge/Message.ets new file mode 100644 index 0000000..c781681 --- /dev/null +++ b/entry/src/main/ets/pages/Judge/Message.ets @@ -0,0 +1,65 @@ +import { DefaultJudgeConfigObj } from '../../model' +import { FormatTimeFlexible } from '../../utils/Common' + +@Component +export default struct MessageComponent { + @Prop name: string + @Prop startTime: string + @Prop idCard: string + @Prop examTime: number + @Prop examSubject: string + @Prop examMileage: string + @Prop jl: number + @Prop wayno: number + @Prop judgeConfigObj: DefaultJudgeConfigObj + + build() { + Row() { + Column() { + Row() { + Text('考生姓名:').fontColor('#E5CCA1').fontSize(30) + Text(this.name).fontColor('#FFF').fontSize(30) + }.margin({ bottom: 10 }) + + Row() { + Text('开始时间:').fontColor('#E5CCA1').fontSize(30) + Text(this.startTime).fontColor('#FFF').fontSize(30) + }.margin({ bottom: 10 }) + + if (this.examSubject == "3") { + Row() { + Text('考试路线:').fontColor('#E5CCA1').fontSize(30) + Text(`线路${this.wayno || 3}`).fontColor('#FFAD33').fontSize(30) + } + } + + }.width('45%').alignItems(HorizontalAlign.Start) + + Column() { + Row() { + Text('身份证号:').fontColor('#E5CCA1').fontSize(30) + Text(this.idCard).fontColor('#FFF').fontSize(30) + }.margin({ bottom: 10 }) + + Row() { + Text('考试用时:').fontColor('#E5CCA1').fontSize(30) + Text(FormatTimeFlexible(this.examTime)).fontColor('#FFF').fontSize(30) + }.margin({ bottom: 10 }) + + if (this.examSubject == "3") { + Row() { + if (Reflect.get(this.judgeConfigObj, '375') == '0') { + Text(`应行驶:${this.examMileage}m`) + .fontColor('#E5CCA1') + .fontSize(30) + .padding({ right: 20 }) + } + Text(`已行驶:${this.jl}m`).fontColor('#FFAD33').fontSize(30) + } + } + + }.alignItems(HorizontalAlign.Start) + + }.width('100%') + } +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/Judge/OperatingArea.ets b/entry/src/main/ets/pages/Judge/OperatingArea.ets new file mode 100644 index 0000000..0a9f9fe --- /dev/null +++ b/entry/src/main/ets/pages/Judge/OperatingArea.ets @@ -0,0 +1,138 @@ +import { DefaultJudgeConfigObj } from '../../model' +import Prompt from '@system.prompt' + +@Component +export default struct OperatingAreaComponent { + @Prop totalScore: number + @Prop kszp: string + @Prop examSubject: string + @Prop singlePlay: boolean + @Prop judgeConfigObj: DefaultJudgeConfigObj + // 信号查看 + signalViewingClick: () => void = () => { + } + // 人工评判 + artificialEvaluationClick: () => void = () => { + } + // 结束考试 + endTheExamClick: () => void = () => { + } + // 获取是否能进行人工评判 + getIsManualKf = () => { + if (this.examSubject == '3') { + //杭州训练模式不允许人工评判 + if (this.singlePlay && Reflect.get(this.judgeConfigObj, '211') == 'zjhz') { + return false + } + if (Reflect.get(this.judgeConfigObj, '342') == '0') { + return true + } + return false + } else { + return false + } + } + + build() { + Column() { + Column() { + Row() { + Text(this.totalScore <= 0 ? '0' : this.totalScore + '').fontColor('#FFEECC').fontSize(55) + Text('分').fontColor('#FFEECC').fontSize(30).padding({ top: 5 }) + } + .width(334) + .height(120) + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Center) + .border({ width: 5, color: '#4D4136', radius: 30 }) + .onClick(() => { + // this.signalTrajectoryDialogController.open() + this.signalViewingClick() + }) + + Row() { + Image(this.kszp).width('85%').height('85%') + } + .width(226) + .height(312) + .backgroundImage($rawfile('judge/photo_bg.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Center) + .margin({ top: 30, bottom: 15 }) + } + + Column() { + if (this.getIsManualKf()) { + Row() { + Row() { + } + .width(60) + .height(60) + .backgroundImage($rawfile('judge/manual_judge.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + + Text('人工评判').fontColor('#FFF').fontSize(32).padding({ right: 12 }) + } + .width(334) + .height(110) + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Center) + .backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + .margin({ bottom: 10 }) + .onClick(() => { + // this.vocObj.playAudio({ + // type: 1, + // name: 'button_media.wav' + // }) + // this.isDeductedPopShow = true + this.artificialEvaluationClick() + }) + } + + Row() { + Row() { + } + .width(60) + .height(60) + .backgroundImage($rawfile('judge/phone.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + + Text('呼叫请求').fontColor('#FFF').fontSize(32).padding({ right: 12 }) + } + .width(334) + .height(110) + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Center) + .backgroundImage($rawfile('judge/button_nor.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + .margin({ bottom: 10 }) + + Row() { + } + .width(334) + .height(100) + .backgroundImage($rawfile('judge/anniu_nor.png'), ImageRepeat.NoRepeat) + .backgroundImageSize({ width: '100%', height: '100%' }) + .onClick(() => { + if (Reflect.get(this.judgeConfigObj, '353') == '0') { + // this.endExamDialogController.open() + this.endTheExamClick() + } else { + Prompt.showToast({ + message: '车上不允许手动结束考试!', + duration: 4000 + }); + } + }) + }.margin({ bottom: 30 }) + + } + .width('25%') + .height('100%') + .justifyContent(FlexAlign.SpaceBetween) + .alignItems(HorizontalAlign.Center) + .margin({ bottom: 20 }) + } +} \ No newline at end of file diff --git a/entry/src/main/ets/pages/Judge/utils.ets b/entry/src/main/ets/pages/Judge/utils.ets index 21d72c0..0d66359 100644 --- a/entry/src/main/ets/pages/Judge/utils.ets +++ b/entry/src/main/ets/pages/Judge/utils.ets @@ -445,7 +445,9 @@ export function UploadRegulatoryCodeConversion( // }); } -// 获取plc数据 +/** + * 将PLC字符串转换为JSON对象 + */ export const PlcStrToJson = async (plc: string) => { const plcArr = plc.split(',') const p = plcArr.map((val, key) => { @@ -456,54 +458,6 @@ export const PlcStrToJson = async (plc: string) => { } }); const time = await systemTime.getCurrentTime() - - - // const sensor: Sensor = { - // //安全带 车门门开关 手刹 脚刹 副刹 离合器 喇叭 示宽灯 近光灯 远光灯 - // aqd: p[19], - // mkg: p[14], - // ssc: p[13], - // jsc: p[12], - // fsc: p[18], - // lhq: p[17], - // lb: p[4], - // skd: p[9], - // jgd: p[7], - // ygd: p[8], - // //左方向灯 右方向灯 双跳灯 雾灯 雨刮器 点火1 点火2 发动机转速 档位 车速 - // zfxd: p[2], - // yfxd: p[3], - // shtd: p[20], - // wd: p[10], - // ygq: p[11], - // dh1: p[5], - // dh2: p[6], - // fdjzs: p[25], - // dw: p[28], - // cs: p[23], - // // 方向盘 - // fxp: Number(plcArr[27].split('_')[0]), - // //累计脉冲 溜车脉冲 超声波左后 超声波右后 超声波右前 超声波左前 座椅 仪表盘 后视镜 倒车镜 光照 雨量 - // ljmc: p[24], - // lcmc: 0, - // csbzh: p[32], - // csbyh: p[30], - // csbyq: p[31], - // csbzq: p[29], - // zy: 0, - // tbp: 0, - // hsj: 0, - // dcj: 0, - // gx: 0, - // yl: 0, - // //TODO 数据待替换 油压 闪灯 信号灯 - // yy: 0, - // sde: 0, - // xhd: '', - // rmndg: 0, - // wav: 0, - // mndg: '' - // } const gps2: Gps = TestRealExam.gps2 const radar: Radar = TestRealExam.radar const vision: Vision = TestRealExam.vision diff --git a/entry/src/main/ets/pages/compontents/Header.ets b/entry/src/main/ets/pages/compontents/Header.ets index 1969e31..4521ad6 100644 --- a/entry/src/main/ets/pages/compontents/Header.ets +++ b/entry/src/main/ets/pages/compontents/Header.ets @@ -67,7 +67,7 @@ export default struct HeaderComponent { .fontColor("#fff") .margin({ left: 10 - }).fontSize(16) + }).fontSize(20) if (this.logoExpansionBuilder) { this.logoExpansionBuilder() } diff --git a/release_note.md b/release_note.md index c24a6f5..cc252ab 100644 --- a/release_note.md +++ b/release_note.md @@ -1,55 +1,13 @@
- fix: 档位信号处理,信号显示界面无法进入问题解决 + fix: 评判日志 [提交人]:wangzhongjie
- [提交时间]:2025-06-30 16:50
- [提交版本]:b92d31b + [提交时间]:2025-07-01 11:08
+ [提交版本]:756ced2
- fix: 档位信号处理 + fix: 补全完善类型系统 [提交人]:wangzhongjie
- [提交时间]:2025-06-30 16:41
- [提交版本]:c717b16 -
- -
- fix: 完善worker关闭性能优化,完善读取串口代码 - [提交人]:wangzhongjie
- [提交时间]:2025-06-30 09:55
- [提交版本]:078ec1a -
- -
- fix: 修改版本参数 - [提交人]:wangzhongjie
- [提交时间]:2025-06-30 09:10
- [提交版本]:fd2f75d -
- -
- fix: 解决页面有输入法会自动弹出自动聚焦影响体验问题 - [提交人]:wangzhongjie
- [提交时间]:2025-06-27 17:29
- [提交版本]:f1fc2f9 -
- -
- fix: 完善版本发布 - [提交人]:wangzhongjie
- [提交时间]:2025-06-27 16:01
- [提交版本]:e34297a -
- -
- fix: 完善版本发布 - [提交人]:wangzhongjie
- [提交时间]:2025-06-27 15:02
- [提交版本]:4705de0 -
- -
- fix: 增加调试模式设置 - [提交人]:wangzhongjie
- [提交时间]:2025-06-27 15:02
- [提交版本]:0809571 + [提交时间]:2025-06-30 17:15
+ [提交版本]:03d3f09