cuiqian2004
2025-10-17 68ce9382090846dc3a03a057a18a7d09f30e45e5
pages/map/scene.vue
@@ -44,7 +44,7 @@
            <view class="tip">场景构建中</view>
            <view>
               <!-- 请操作搬运车扫描地图覆盖的区域 -->
               {{mapServerPhase=== 1  ?"场景构建服务:未启动":mapServerPhase===2 ?"场景构建服务:启动中":mapServerPhase===3  ?"场景构建中":mapServerPhase}}
               {{mapCreatePhase}}
            </view>
            <view class="text-button-group">
@@ -55,7 +55,7 @@
            <view class="tip"> “{{sceneName}}”{{opType == "extend"?"场景扩展结束"+"":"场景构建结束"}}</view>
            <!--    <view> 已成功构建“{{sceneName}}”</view> -->
            <view class="loading-view">
               构图状态:{{mapServerPhase===5?"保存成功":mapServerPhase===4?"保存中":mapServerPhase===6?"保存失败":mapServerPhase}}
               {{mapCreatePhase}}
               <view v-if="mapServerPhase === 4" class="auto-circle"></view>
            </view>
            <view class="text-button-group">
@@ -125,7 +125,22 @@
         }
      },
      computed: {
         mapCreatePhase() {
            if (this.mapServerPhase == 1) {
               return "场景构建服务:未启动"
            } else if (this.mapServerPhase == 2) {
               return "场景构建服务:启动中"
            } else if (this.mapServerPhase == 3) {
               return "场景构建中"
            } else if (this.mapServerPhase == 4) {
               return "场景构图保存中"
            } else if (this.mapServerPhase == 5) {
               return "场景构图保存成功"
            } else if (this.mapServerPhase == 6) {
               return "场景构图保存失败"
            } else
               return this.mapServerPhase
         }
      },
      watch: {
@@ -265,12 +280,12 @@
               const res = await getMapServerPhase(this.ip)
               this.mapServerPhase = res || 1
               if (this.mapServerPhase === 3) {
                  return
               }
               if (this.mapServerPhase === 5 || this.mapServerPhase === 6) {
                  this.saveMapIsOk = true
                  return
               if(this.opSceneType === "finish")
               {
                  if (this.mapServerPhase === 5 || this.mapServerPhase === 6) {
                     this.saveMapIsOk = true
                     return
                  }
               }
               setTimeout(this.checkMapServerPhase, 1000);
            } catch (ex) {
@@ -451,8 +466,8 @@
               })
               this.saveMapIsOk = false
               await stopMap(this.ip, this.sceneName)
               this.mapServerPhase = 4
               this.checkMapServerPhase();
               //this.mapServerPhase = 4
               //this.checkMapServerPhase();
               // if (this.opType == "extend") {
               //    this.opSceneType = ""
               //    const eventChannel = this.getOpenerEventChannel();
@@ -552,7 +567,11 @@
                           filedata: mapData
                        }
                     })
                     listCtrData.push({
                        method: "point_trajectory",
                        param: data.base_map.trajectoryPoints ||
                        [] //[ [[2,2],[6,2],[10,2],[14,2],[18,2],[2,6],[2,10],[2,14],[2,18],]
                     })
                  }
@@ -560,6 +579,8 @@
                     method: "point_cloud",
                     param: data.point_cloud
                  })
                  if (data.robot_pose) {
                     listCtrData.push({
                        method: "agv_laser",
@@ -586,6 +607,7 @@
                           })
                        }
                     }
                  }
                  // console.log("ctxDataStr",listCtrData.length)
                  this.ctxDataStr = JSON.stringify(listCtrData)