From 19d409cf5441fc853a94b3ee50c3067a68eebb5c Mon Sep 17 00:00:00 2001 From: wangzhongjie Date: Tue, 26 Aug 2025 14:59:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=AE=8C=E5=96=84=E5=9E=8B=E5=8F=B7?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=95=8C=E9=9D=A2=E6=94=BE=E5=A4=A7=E5=AD=97?= =?UTF-8?q?=E4=BD=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/config/judge.ets | 4 +- .../components/SignalTrajectoryDialog.ets | 27 +++--- .../src/main/ets/pages/compontents/Block.ets | 8 +- .../main/ets/pages/compontents/Coordinate.ets | 12 +-- .../ets/pages/compontents/SignalDisplay.ets | 89 +++++++++---------- 5 files changed, 67 insertions(+), 73 deletions(-) diff --git a/entry/src/main/ets/config/judge.ets b/entry/src/main/ets/config/judge.ets index 33bb889..bbf2a18 100644 --- a/entry/src/main/ets/config/judge.ets +++ b/entry/src/main/ets/config/judge.ets @@ -12,9 +12,9 @@ import { JudgeConfigType } from '../model' //考试回放开关 export const JudgeConfig: JudgeConfigType = { //本地目录开关 - isTrajectoryOpen: true, + isTrajectoryOpen: false, //是否开启拍照 - isPhotoOpen: false, + isPhotoOpen: true, //扣分语音是否强制开启 kfVoiceOpen: false, //忽略的考试项目 diff --git a/entry/src/main/ets/pages/Judge/components/SignalTrajectoryDialog.ets b/entry/src/main/ets/pages/Judge/components/SignalTrajectoryDialog.ets index 94918de..1e25e92 100644 --- a/entry/src/main/ets/pages/Judge/components/SignalTrajectoryDialog.ets +++ b/entry/src/main/ets/pages/Judge/components/SignalTrajectoryDialog.ets @@ -37,20 +37,21 @@ export default struct SignalTrajectoryDialog { }) } - Scroll() { - Column() { - if (this.active !== 2) { - SignalDisplayComponent({ - active: this.active, - }) - } else { - TrajectoryViewComponent({ - laneSignal: this.laneSignal - }) - } + // Scroll() { + Column() { + if (this.active !== 2) { + SignalDisplayComponent({ + active: this.active, + heightNum: 1500 + }) + } else { + TrajectoryViewComponent({ + laneSignal: this.laneSignal + }) + } - }.height(890) - }.width("100%") + }.height(890) + // }.width("100%") .height(700) }.width(1500) diff --git a/entry/src/main/ets/pages/compontents/Block.ets b/entry/src/main/ets/pages/compontents/Block.ets index daa4044..6a76a23 100644 --- a/entry/src/main/ets/pages/compontents/Block.ets +++ b/entry/src/main/ets/pages/compontents/Block.ets @@ -2,19 +2,19 @@ export default struct BlockComponent { @State label: string = "发送次数" @Prop value: string = "1" - @State widthNum: number = 130 + @State widthNum: number = 150 @State heightNum: number = 70 @State color: string = "#FDF5E7" build() { Row() { Row() { - Text(this.label + ":").fontColor(this.color).fontSize(14) + Text(this.label + ":").fontColor(this.color).fontSize(20) }.width(this.widthNum).justifyContent(FlexAlign.End) Row() { - Text(this.value).fontColor(this.color) - }.width(80).justifyContent(FlexAlign.Start).margin({ + Text(this.value).fontColor(this.color).fontSize(24) + }.width(150).justifyContent(FlexAlign.Start).margin({ left: 20 }) } diff --git a/entry/src/main/ets/pages/compontents/Coordinate.ets b/entry/src/main/ets/pages/compontents/Coordinate.ets index 4c0bd4e..de7d106 100644 --- a/entry/src/main/ets/pages/compontents/Coordinate.ets +++ b/entry/src/main/ets/pages/compontents/Coordinate.ets @@ -10,11 +10,13 @@ export default struct CoordinateComponent { build() { Flex({ direction: FlexDirection.Column, - alignItems: ItemAlign.Center + alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center }) { - Text("GPS坐标").fontColor("#FFB433").fontSize(20).margin({ - top: 10 - }) + Row() { + Text("GPS坐标").fontColor("#FFB433").fontSize(20) + }.height(70) + Flex({ wrap: FlexWrap.Wrap, direction: this.isItHorizontal ? FlexDirection.Row : FlexDirection.Column @@ -30,7 +32,7 @@ export default struct CoordinateComponent { }.width("100%") } .width("100%") - .height(this.isItHorizontal ? 210 : "100%") + .height(this.isItHorizontal ? 220 : "100%") .backgroundColor("#1A1A1A") } } \ No newline at end of file diff --git a/entry/src/main/ets/pages/compontents/SignalDisplay.ets b/entry/src/main/ets/pages/compontents/SignalDisplay.ets index 787d19b..cf5a818 100644 --- a/entry/src/main/ets/pages/compontents/SignalDisplay.ets +++ b/entry/src/main/ets/pages/compontents/SignalDisplay.ets @@ -20,6 +20,7 @@ export default struct SignalDisplayComponent { @Prop active: number = 0 // 原始数据 @State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,," + @State heightNum: number = 1130 aboutToAppear(): void { DifferentialAndSignal.onMsg(this.getMsg) @@ -97,26 +98,26 @@ export default struct SignalDisplayComponent { Flex({ direction: FlexDirection.Column, }) { - // 信号查看 - if (this.active === 0) { - // GPS信号展示 - GPSComponent({ - data: this.signArr - }) - // 车载信号以及车载坐标 - CarComponent({ - data: this.vehicleSignal - }) - CoordinateComponent({ - data: this.GPSColum - }) - - } else if (this.active === 1) { - // 原始数据 - Column() { - Text(this.rawData).fontSize(20).fontColor("#fff") - }.backgroundColor("#282828").width("100%").height("100%") - } + Scroll() { + // 信号查看 + if (this.active === 0) { + Column() { + // 车载信号以及车载坐标 + CarComponent({ + data: this.vehicleSignal, + GPSData: this.signArr + }) + CoordinateComponent({ + data: this.GPSColum + }) + }.height(this.heightNum) + } else if (this.active === 1) { + // 原始数据 + Column() { + Text(this.rawData).fontSize(20).fontColor("#fff") + }.backgroundColor("#282828").width("100%").height("100%") + } + }.height("100%").backgroundColor("#1A1A1A") } .width("100%") .height("100%") @@ -129,8 +130,9 @@ export default struct SignalDisplayComponent { @Component -struct GPSComponent { - @Prop data: Array +struct CarComponent { + @Prop data: Array + @Prop GPSData: Array @State ip: string = "" aboutToAppear(): void { @@ -147,35 +149,36 @@ struct GPSComponent { build() { Flex({ - wrap: FlexWrap.Wrap + wrap: FlexWrap.Wrap, + justifyContent: FlexAlign.Center }) { BlockComponent({ label: "发送次数", - value: this.data[49] || "-" + value: this.GPSData[49] || "-" }) BlockComponent({ label: "固件版本", - value: this.data[54] || "-" + value: this.GPSData[54] || "-" }) BlockComponent({ label: "方向盘类型", - value: this.data[50] || "-" + value: this.GPSData[50] || "-" }) BlockComponent({ label: "按键数值", - value: this.data[55] || "-" + value: this.GPSData[55] || "-" }) BlockComponent({ label: "GPS错误次数", - value: this.data[60] || "-" + value: this.GPSData[60] || "-" }) BlockComponent({ label: "汽车类型", - value: this.data[51] || "-" + value: this.GPSData[51] || "-" }) BlockComponent({ label: "GPS板卡类型", - value: this.data[56] || "-" + value: this.GPSData[56] || "-" }) BlockComponent({ label: "本机IP", @@ -183,47 +186,35 @@ struct GPSComponent { }) BlockComponent({ label: "接口心跳", - value: this.data[52] || "-" + value: this.GPSData[52] || "-" }) BlockComponent({ label: "GPS板卡软件版本", - value: this.data[57] || "-" + value: this.GPSData[57] || "-" }) BlockComponent({ label: "改正数次数/改正数大小", - value: this.data[58] || "-" + value: this.GPSData[58] || "-" }) BlockComponent({ label: "已工作时长/设定工作时长", - value: this.data[61] || "-" + value: this.GPSData[61] || "-" }) BlockComponent({ label: "GPS数据次数/数据长度", - value: this.data[59] || "-" + value: this.GPSData[59] || "-" }) BlockComponent({ label: "改正数据长度*数据长度-基准站RTCM改正数类型", - value: this.data[62] || "-" + value: this.GPSData[62] || "-" }) - }.backgroundColor("#282828").width("100%").height(140) - } -} - -@Component -struct CarComponent { - @Prop data: Array - - build() { - Flex({ - wrap: FlexWrap.Wrap - }) { ForEach(this.data, (item: SignalDataType) => { BlockComponent({ label: item.key, value: item.value }) }) - }.width("100%").backgroundColor("#282828").height(490) + }.width("100%").backgroundColor("#282828") } }