fix: 完善型号显示界面放大字体

This commit is contained in:
wangzhongjie 2025-08-26 14:59:28 +08:00
parent 7e7900a124
commit 19d409cf54
5 changed files with 67 additions and 73 deletions

View File

@ -12,9 +12,9 @@ import { JudgeConfigType } from '../model'
//考试回放开关 //考试回放开关
export const JudgeConfig: JudgeConfigType = { export const JudgeConfig: JudgeConfigType = {
//本地目录开关 //本地目录开关
isTrajectoryOpen: true, isTrajectoryOpen: false,
//是否开启拍照 //是否开启拍照
isPhotoOpen: false, isPhotoOpen: true,
//扣分语音是否强制开启 //扣分语音是否强制开启
kfVoiceOpen: false, kfVoiceOpen: false,
//忽略的考试项目 //忽略的考试项目

View File

@ -37,20 +37,21 @@ export default struct SignalTrajectoryDialog {
}) })
} }
Scroll() { // Scroll() {
Column() { Column() {
if (this.active !== 2) { if (this.active !== 2) {
SignalDisplayComponent({ SignalDisplayComponent({
active: this.active, active: this.active,
}) heightNum: 1500
} else { })
TrajectoryViewComponent({ } else {
laneSignal: this.laneSignal TrajectoryViewComponent({
}) laneSignal: this.laneSignal
} })
}
}.height(890) }.height(890)
}.width("100%") // }.width("100%")
.height(700) .height(700)
}.width(1500) }.width(1500)

View File

@ -2,19 +2,19 @@
export default struct BlockComponent { export default struct BlockComponent {
@State label: string = "发送次数" @State label: string = "发送次数"
@Prop value: string = "1" @Prop value: string = "1"
@State widthNum: number = 130 @State widthNum: number = 150
@State heightNum: number = 70 @State heightNum: number = 70
@State color: string = "#FDF5E7" @State color: string = "#FDF5E7"
build() { build() {
Row() { Row() {
Row() { Row() {
Text(this.label + ":").fontColor(this.color).fontSize(14) Text(this.label + ":").fontColor(this.color).fontSize(20)
}.width(this.widthNum).justifyContent(FlexAlign.End) }.width(this.widthNum).justifyContent(FlexAlign.End)
Row() { Row() {
Text(this.value).fontColor(this.color) Text(this.value).fontColor(this.color).fontSize(24)
}.width(80).justifyContent(FlexAlign.Start).margin({ }.width(150).justifyContent(FlexAlign.Start).margin({
left: 20 left: 20
}) })
} }

View File

@ -10,11 +10,13 @@ export default struct CoordinateComponent {
build() { build() {
Flex({ Flex({
direction: FlexDirection.Column, direction: FlexDirection.Column,
alignItems: ItemAlign.Center alignItems: ItemAlign.Center,
justifyContent: FlexAlign.Center
}) { }) {
Text("GPS坐标").fontColor("#FFB433").fontSize(20).margin({ Row() {
top: 10 Text("GPS坐标").fontColor("#FFB433").fontSize(20)
}) }.height(70)
Flex({ Flex({
wrap: FlexWrap.Wrap, wrap: FlexWrap.Wrap,
direction: this.isItHorizontal ? FlexDirection.Row : FlexDirection.Column direction: this.isItHorizontal ? FlexDirection.Row : FlexDirection.Column
@ -30,7 +32,7 @@ export default struct CoordinateComponent {
}.width("100%") }.width("100%")
} }
.width("100%") .width("100%")
.height(this.isItHorizontal ? 210 : "100%") .height(this.isItHorizontal ? 220 : "100%")
.backgroundColor("#1A1A1A") .backgroundColor("#1A1A1A")
} }
} }

View File

@ -20,6 +20,7 @@ export default struct SignalDisplayComponent {
@Prop active: number = 0 @Prop active: number = 0
// 原始数据 // 原始数据
@State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,," @State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
@State heightNum: number = 1130
aboutToAppear(): void { aboutToAppear(): void {
DifferentialAndSignal.onMsg(this.getMsg) DifferentialAndSignal.onMsg(this.getMsg)
@ -97,26 +98,26 @@ export default struct SignalDisplayComponent {
Flex({ Flex({
direction: FlexDirection.Column, direction: FlexDirection.Column,
}) { }) {
// 信号查看 Scroll() {
if (this.active === 0) { // 信号查看
// GPS信号展示 if (this.active === 0) {
GPSComponent({ Column() {
data: this.signArr // 车载信号以及车载坐标
}) CarComponent({
// 车载信号以及车载坐标 data: this.vehicleSignal,
CarComponent({ GPSData: this.signArr
data: this.vehicleSignal })
}) CoordinateComponent({
CoordinateComponent({ data: this.GPSColum
data: this.GPSColum })
}) }.height(this.heightNum)
} else if (this.active === 1) {
} else if (this.active === 1) { // 原始数据
// 原始数据 Column() {
Column() { Text(this.rawData).fontSize(20).fontColor("#fff")
Text(this.rawData).fontSize(20).fontColor("#fff") }.backgroundColor("#282828").width("100%").height("100%")
}.backgroundColor("#282828").width("100%").height("100%") }
} }.height("100%").backgroundColor("#1A1A1A")
} }
.width("100%") .width("100%")
.height("100%") .height("100%")
@ -129,8 +130,9 @@ export default struct SignalDisplayComponent {
@Component @Component
struct GPSComponent { struct CarComponent {
@Prop data: Array<string> @Prop data: Array<SignalDataType>
@Prop GPSData: Array<string>
@State ip: string = "" @State ip: string = ""
aboutToAppear(): void { aboutToAppear(): void {
@ -147,35 +149,36 @@ struct GPSComponent {
build() { build() {
Flex({ Flex({
wrap: FlexWrap.Wrap wrap: FlexWrap.Wrap,
justifyContent: FlexAlign.Center
}) { }) {
BlockComponent({ BlockComponent({
label: "发送次数", label: "发送次数",
value: this.data[49] || "-" value: this.GPSData[49] || "-"
}) })
BlockComponent({ BlockComponent({
label: "固件版本", label: "固件版本",
value: this.data[54] || "-" value: this.GPSData[54] || "-"
}) })
BlockComponent({ BlockComponent({
label: "方向盘类型", label: "方向盘类型",
value: this.data[50] || "-" value: this.GPSData[50] || "-"
}) })
BlockComponent({ BlockComponent({
label: "按键数值", label: "按键数值",
value: this.data[55] || "-" value: this.GPSData[55] || "-"
}) })
BlockComponent({ BlockComponent({
label: "GPS错误次数", label: "GPS错误次数",
value: this.data[60] || "-" value: this.GPSData[60] || "-"
}) })
BlockComponent({ BlockComponent({
label: "汽车类型", label: "汽车类型",
value: this.data[51] || "-" value: this.GPSData[51] || "-"
}) })
BlockComponent({ BlockComponent({
label: "GPS板卡类型", label: "GPS板卡类型",
value: this.data[56] || "-" value: this.GPSData[56] || "-"
}) })
BlockComponent({ BlockComponent({
label: "本机IP", label: "本机IP",
@ -183,47 +186,35 @@ struct GPSComponent {
}) })
BlockComponent({ BlockComponent({
label: "接口心跳", label: "接口心跳",
value: this.data[52] || "-" value: this.GPSData[52] || "-"
}) })
BlockComponent({ BlockComponent({
label: "GPS板卡软件版本", label: "GPS板卡软件版本",
value: this.data[57] || "-" value: this.GPSData[57] || "-"
}) })
BlockComponent({ BlockComponent({
label: "改正数次数/改正数大小", label: "改正数次数/改正数大小",
value: this.data[58] || "-" value: this.GPSData[58] || "-"
}) })
BlockComponent({ BlockComponent({
label: "已工作时长/设定工作时长", label: "已工作时长/设定工作时长",
value: this.data[61] || "-" value: this.GPSData[61] || "-"
}) })
BlockComponent({ BlockComponent({
label: "GPS数据次数/数据长度", label: "GPS数据次数/数据长度",
value: this.data[59] || "-" value: this.GPSData[59] || "-"
}) })
BlockComponent({ BlockComponent({
label: "改正数据长度*数据长度-基准站RTCM改正数类型", label: "改正数据长度*数据长度-基准站RTCM改正数类型",
value: this.data[62] || "-" value: this.GPSData[62] || "-"
}) })
}.backgroundColor("#282828").width("100%").height(140)
}
}
@Component
struct CarComponent {
@Prop data: Array<SignalDataType>
build() {
Flex({
wrap: FlexWrap.Wrap
}) {
ForEach(this.data, (item: SignalDataType) => { ForEach(this.data, (item: SignalDataType) => {
BlockComponent({ BlockComponent({
label: item.key, label: item.key,
value: item.value value: item.value
}) })
}) })
}.width("100%").backgroundColor("#282828").height(490) }.width("100%").backgroundColor("#282828")
} }
} }