From fb026e6052b4d843d327312db398cf791ac57ab9 Mon Sep 17 00:00:00 2001
From: cyy <cuiqian2004@163.com>
Date: 星期日, 28 九月 2025 22:43:29 +0800
Subject: [PATCH] test
---
pages/map/scene.vue | 46 ++++++++++++++++++++++++----------------------
1 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/pages/map/scene.vue b/pages/map/scene.vue
index 99fd981..8f93cbf 100644
--- a/pages/map/scene.vue
+++ b/pages/map/scene.vue
@@ -1,7 +1,7 @@
<template>
<view class="pages-scene">
<view class="map-content" v-if="opSceneType =='' ">
- <image v-if="opType != 'extend'" class="img" src="/images/image 25.png" alt=" 鍥剧墖" mode="aspectFit" />
+ <image v-if="opType != 'extend'" class="img" src="/images/image_25.png" alt=" 鍥剧墖" mode="aspectFit" />
<image v-else class="img" :src="extendBase64Img" alt=" 鍥剧墖" mode="aspectFit" />
<view v-if="opType != 'extend'" class="space">娌℃湁鎵惧埌绗﹀悎鏉′欢鐨勫湴鍥�/view>
<!-- <view class="loading-view">{{mapserverIsOk?"鏋勫浘绋嬪簭鍑嗗灏辩华":"绛夊緟鏋勫浘绋嬪簭灏辩华..."}}
@@ -29,7 +29,7 @@
<view class="tip">璇疯緭鍏ュ満鏅悕绉�/view>
<view class="name-input">
<input ref="refInputName" :focus="true" placeholder="璇疯緭鍏ュ満鏅悕绉� :value="sceneName"
- @input="onInputName"></input>
+ @input="onInputName" />
<uni-icons class="clear" color="#ccc" type="clear" size="20" v-if="showClearName"
@click="clickClearName"></uni-icons>
</view>
@@ -51,13 +51,13 @@
</view>
</view>
<view class="bottom-content" v-else-if="opSceneType =='finish'">
- <view class="tip">鍦烘櫙鏋勫缓瀹屾垚</view>
- <view>宸叉垚鍔熸瀯寤衡�{{sceneName}}鈥�/view>
- <!-- <view class="loading-view">{{saveMapIsOk?"鏋勫浘淇濆瓨瀹屾垚":"绛夊緟鏋勫浘淇濆瓨瀹屾垚..."}}
+ <view class="tip"> 鈥渰{sceneName}}鈥漿{opType == "extend"?"鍦烘櫙鎵╁睍瀹屾垚"+"":"鍦烘櫙鏋勫缓瀹屾垚"}}</view>
+ <!-- <view> 宸叉垚鍔熸瀯寤衡�{{sceneName}}鈥�/view> -->
+ <view class="loading-view">{{saveMapIsOk?"鏋勫浘淇濆瓨瀹屾垚":"绛夊緟鏋勫浘淇濆瓨瀹屾垚..."}}
<view v-if="!saveMapIsOk" class="auto-circle"></view>
- </view> !saveMapIsOk ||-->
+ </view>
<view class="text-button-group">
- <a-button type="primary" class="button" :disabled=" loading" @click="clickFinish">鏋勫缓瀹屾垚</a-button>
+ <a-button type="primary" class="button" :disabled=" !saveMapIsOk || loading" @click="clickFinish">{{opType == "extend"?"鎵╁睍瀹屾垚":"鏋勫缓瀹屾垚"}}</a-button>
</view>
</view>
</view>
@@ -124,6 +124,7 @@
},
onLoad(option) {
+ console.log("scene load")
const _this = this
this.ip = option.ip || ""
uni.getSystemInfo({
@@ -139,7 +140,7 @@
},
onUnload() {
-
+ console.log("scene unload")
},
onBackPress() {
@@ -360,7 +361,7 @@
}
} else if (param.method == "cancel_positioning_agv") {
- this.positioningAgv = false
+ //this.positioningAgv = false
} else if (param.method == "show_log") {
const listLog = session.getValue("request_log") || []
listLog.unshift(param.data)
@@ -474,15 +475,16 @@
await stopMap(this.ip, this.sceneName)
// await startOrStopMapServer(this.ip, 2)
// this.checkSaveMapState();
- if (this.opType == "extend") {
- this.opSceneType = ""
- const eventChannel = this.getOpenerEventChannel();
- eventChannel.emit('create_finish', this.sceneName);
- uni.navigateBack({
- delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
- })
- }
-
+ // if (this.opType == "extend") {
+ // this.opSceneType = ""
+ // const eventChannel = this.getOpenerEventChannel();
+ // eventChannel.emit('create_finish', this.sceneName);
+ // uni.navigateBack({
+ // delta: 1, //杩斿洖灞傛暟锛�鍒欎笂涓婇〉
+ // })
+ // }
+ setTimeout(() => {this.saveMapIsOk = true}, 5000);
+
} catch (ex) {
console.log(ex)
showModal("璇锋鏌ヨ溅杈嗚繛鎺ワ紝骞堕噸鏂板紑濮嬫瀯寤哄満鏅�, "鍦烘櫙鏋勫缓澶辫触", false, "纭畾").then((res) => {
@@ -522,7 +524,7 @@
const info = await getMapLaserData(this.ip, this.mapId)
return info
} catch (ex) {
- showError(ex)
+ showToast(ex)
return {}
}
},
@@ -531,15 +533,15 @@
if (this.opSceneType === "scan") {
const data = await this.loadMapLaserData()
-
+
const listCtrData = []
let newMap = false
if (data.base_map?.image_base64) {
this.robotPos = {}
newMap = true
- const mapData = data.base_map.image_base64 //this.mapId ?"terdy":
+ const mapData = data.base_map.image_base64 //this.mapId ?"terdy":
this.mapId = data.base_map.map_id
-
+
listCtrData.push({
method: "background",
param: {
--
Gitblit v1.9.1