fix: 完善型号显示界面放大字体
This commit is contained in:
		
							parent
							
								
									7e7900a124
								
							
						
					
					
						commit
						19d409cf54
					
				| @ -12,9 +12,9 @@ import { JudgeConfigType } from '../model' | ||||
| //考试回放开关 | ||||
| export const JudgeConfig: JudgeConfigType = { | ||||
|   //本地目录开关 | ||||
|   isTrajectoryOpen: true, | ||||
|   isTrajectoryOpen: false, | ||||
|   //是否开启拍照 | ||||
|   isPhotoOpen: false, | ||||
|   isPhotoOpen: true, | ||||
|   //扣分语音是否强制开启 | ||||
|   kfVoiceOpen: false, | ||||
|   //忽略的考试项目 | ||||
|  | ||||
| @ -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) | ||||
| 
 | ||||
|  | ||||
| @ -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 | ||||
|       }) | ||||
|     } | ||||
|  | ||||
| @ -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") | ||||
|   } | ||||
| } | ||||
| @ -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<string> | ||||
| struct CarComponent { | ||||
|   @Prop data: Array<SignalDataType> | ||||
|   @Prop GPSData: Array<string> | ||||
|   @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<SignalDataType> | ||||
| 
 | ||||
|   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") | ||||
|   } | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user