fix: 优化考试过程信号查看的界面

This commit is contained in:
wangzhongjie 2025-06-20 16:00:50 +08:00
parent ee0b96125c
commit 0be3e1b970
4 changed files with 55 additions and 31 deletions

View File

@ -1,15 +1,44 @@
import SignalDisplayComponent from '../compontents/SignalDisplay'
import TabComponent from '../compontents/Tab'
@CustomDialog
export default struct SignalTrajectoryDialog {
@State active: number = 0
private controller?: CustomDialogController
build() {
Row() {
SignalDisplayComponent()
}.width(1200).height(1200).border({
width: 1,
color: "red"
})
// Scroll() {
Column() {
Flex(
{
justifyContent: FlexAlign.SpaceBetween,
alignItems: ItemAlign.Center
}
) {
TabComponent({
isShowTrajectory: true,
activeIndex: this.active,
onchange: (index: number) => {
this.active = index
}
})
// 关闭按钮
Image($rawfile('judge/close.png')).height(50).onClick(() => {
this.controller?.close()
})
}
Scroll() {
Column() {
SignalDisplayComponent({
active: this.active
})
}.height(890)
}.width("100%")
.height(700)
}.width(1500)
// }.width(1200).height(900)
}
}

View File

@ -25,7 +25,6 @@ struct SignDisplayPage {
right: 10
})
TabComponent({
isShowTrajectory: true,
activeIndex: this.active,
onchange: (index: number) => {
this.active = index
@ -42,8 +41,7 @@ struct SignDisplayPage {
}.width("100%").height(100)
SignalDisplayComponent({
active: this.active,
isShowTrajectory: true
active: this.active
})
}
.width('100%')

View File

@ -19,8 +19,6 @@ export default struct SignalDisplayComponent {
@State rawData: string = "$GPS,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"
// 车道信息
@State laneSignal: PerLane = InitialPerLane
// 是否现实轨迹
@State isShowTrajectory: boolean = false
aboutToAppear(): void {
DifferentialAndSignal.onMsg((data: string) => {
@ -111,29 +109,27 @@ export default struct SignalDisplayComponent {
Text(this.rawData).fontSize(20).fontColor("#fff")
}.backgroundColor("#282828").width("100%").height("100%")
} else {
if (this.isShowTrajectory) {
// 轨迹查看
Flex() {
Column() {
CoordinateComponent({
isItHorizontal: false,
heightNum: 40,
data: this.GPSColum
})
}.width("20%")
// 轨迹查看
Flex() {
Column() {
CoordinateComponent({
isItHorizontal: false,
heightNum: 40,
data: this.GPSColum
})
}.width("20%")
Column() {
LaneComponent({
laneSignal: this.laneSignal
})
}.width("20%")
Column() {
LaneComponent({
laneSignal: this.laneSignal
})
}.width("20%")
Column() {
trajectoryComponent()
}.height("100%").width("60%")
Column() {
trajectoryComponent()
}.height("100%").width("60%")
}.backgroundColor("#282828").width("100%").height("100%")
}
}.backgroundColor("#282828").width("100%").height("100%")
}
}
.width("100%")

View File

@ -50,6 +50,7 @@ struct TabItemComponent {
topLeft: 20,
topRight: 20,
})
.backgroundColor("#262420")
.border({
width: { top: 1, left: 1, right: 1 },
color: this.active ? "#ECAD5C" : "#DDCBAC"