소스 검색

车辆状态修改

huhao@jgai.com 4 주 전
부모
커밋
8ad9db1e1c
1개의 변경된 파일7개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 4
      entry/src/main/ets/pages/Index.ets

+ 7 - 4
entry/src/main/ets/pages/Index.ets

@@ -766,7 +766,7 @@ struct WorkshopPage {
         if (index >= 0) {
           payload = payload.slice(0, index) + '}';
         }
-        console.log('hhtest', 'messageArrived: ' + payload);
+        // console.log('hhtest', 'messageArrived: ' + payload);
         let updateData: MqttUploadData = JSON.parse(payload) as MqttUploadData;
         if (!updateData || !updateData.d || updateData.d.length <= 0) {
           console.info('hhtest', "updateData没有解析成功" + JSON.stringify(updateData));
@@ -877,7 +877,9 @@ struct WorkshopPage {
           this.stationArray[4] = device5;
           this.stationArray[5] = device6;
           this.stationArray[6] = device7;
+          this.robotArray[0] = device8
         }
+        console.info('hhtest', '---------robotArray ' + JSON.stringify(this.robotArray))
       } else {
         console.info('hhtest', "messageArrived error:" + JSON.stringify(err));
       }
@@ -1027,7 +1029,7 @@ struct lightControlDialog {
   zoneThreeLightControl: () => void = () => {}
 
   build() {
-    Column({space : 10}) {
+    Column() {
       Row() {
         Text('照明')
           .fontWeight(FontWeight.Medium)
@@ -1104,6 +1106,7 @@ struct lightControlDialog {
       Divider().vertical(false).color($r('app.color.FFFFFF'))
         .width('94.8%')
         .opacity(0.15)
+        .margin({top: 10, bottom: 10})
 
       Row({space : 5}) {
         Stack() {
@@ -1237,7 +1240,7 @@ struct robotInfoDialog {
   @Link robotArray: RobotInfo[]
 
   build() {
-    Column({space : 10}) {
+    Column() {
       Row() {
         Text('仓储机器人')
           .fontWeight(FontWeight.Medium)
@@ -1261,6 +1264,7 @@ struct robotInfoDialog {
       Divider().vertical(false).color($r('app.color.FFFFFF'))
         .width('100%')
         .opacity(0.15)
+
       Row() {
         Text('关闭')
           .fontColor($r('app.color.60FFFFFF'))
@@ -1313,7 +1317,6 @@ struct robotInfoDialog {
           }
           .width('100%')
         }
-
       }
       .width('100%')
       .height('50%')