From 68ce9382090846dc3a03a057a18a7d09f30e45e5 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 17 十月 2025 17:39:03 +0800
Subject: [PATCH] test
---
pages/map/teaching.vue | 86 ++++++++++++++++++++-----------------------
1 files changed, 40 insertions(+), 46 deletions(-)
diff --git a/pages/map/teaching.vue b/pages/map/teaching.vue
index 482b381..7f11824 100644
--- a/pages/map/teaching.vue
+++ b/pages/map/teaching.vue
@@ -122,7 +122,7 @@
<view class="tip">璇疯緭鍏ョ珯鐐瑰悕绉�/view>
<view class="name-input">
<input ref="refInputName" :focus="true" placeholder="杈撳叆绔欑偣鍚嶇О" :value="stationEdit.name"
- @input="onInputStationName"></input>
+ @input="onInputStationName"/>
<uni-icons class="clear" color="#ccc" type="clear" size="20" v-if="stationEdit.name"
@click="clickClearStationName"></uni-icons>
</view>
@@ -138,14 +138,14 @@
<view class="coordinate">
<text class="name">妯潗鏍�</text>
<input ref="refInputX" class="number-input" type="number" :value="stationEdit.x"
- @input="onInputStationX" :maxlength="4"></input>
+ @input="onInputStationX" :maxlength="4"/>
<uni-icons class="clear" color="#ccc" type="clear" size="20"
v-if="stationEdit.x && stationEdit.x!='0'" @click="clickClearStationX"></uni-icons>
</view>
<view class="coordinate">
<text class="name">绔栧潗鏍�</text>
<input ref="refInputX" class="number-input" type="number" :value="stationEdit.y"
- @input="onInputStationY" :maxlength="4"></input>
+ @input="onInputStationY" :maxlength="4"/>
<uni-icons class="clear" color="#ccc" type="clear" size="20"
v-if="stationEdit.y&& stationEdit.y!='0'" @click="clickClearStationY"></uni-icons>
</view>
@@ -154,7 +154,7 @@
<view class="tip">璋冭妭鏈濆悜</view>
<view class="angle-group">
<image class="img-angle" :src="angleSvg" alt="SVG 鍥剧墖" />
- <image class="img-angle-pos" src="/images/Frame 153.svg" alt="SVG 鍥剧墖"
+ <image class="img-angle-pos" src="/images/Frame_153.svg" alt="SVG 鍥剧墖"
@touchstart="handleAngleTouchStart" @touchmove="handleAngleTouchMove" />
</view>
</view>
@@ -234,7 +234,9 @@
<script>
import {
showToast,
- showModal
+ showModal,
+ showError,
+ showInfo
} from "@/comm/utils.js"
// import OIFabric from "@/components/oi-fabric/index.vue"
import {
@@ -463,7 +465,7 @@
},
{
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: infoAgv.x,
y: infoAgv.y
@@ -478,7 +480,7 @@
bgProgressPercent: 0,
bgLoading: false
})
- this.showError(ex)
+ showError(ex)
}
},
async loadAgvState() {
@@ -486,7 +488,7 @@
const info = await getAgvState(this.vehicleIp)
return info
} catch (ex) {
- this.showError(ex)
+ showError(ex)
return {}
}
},
@@ -495,7 +497,7 @@
const info = await stations(this.vehicleIp)
return info.station_list || []
} catch (ex) {
- this.showError(ex)
+ showError(ex)
return []
}
},
@@ -504,7 +506,7 @@
const info = await getMapUrl(this.vehicleIp, id)
return info
} catch (ex) {
- this.showError(ex)
+ showError(ex)
return {}
}
},
@@ -519,7 +521,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
return {
Public: [],
Stations: []
@@ -540,7 +542,7 @@
])
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -701,7 +703,7 @@
param: item,
}])
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async removeTeachingModeData(data) {
@@ -709,7 +711,7 @@
await delTeachingModeData(this.vehicleIp, data)
this.reloadTeachingMode()
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
clickPublicTeaching() {
@@ -751,7 +753,7 @@
}])
this.mapOperationType = 'public_teaching'
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async stationAdd(item) {
@@ -768,7 +770,7 @@
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async teachingStart(mode) {
@@ -812,7 +814,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -830,7 +832,7 @@
this.askTeachingBiDirection(this.teachingModeCur)
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -856,7 +858,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -870,7 +872,7 @@
}])
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -900,7 +902,7 @@
stationTeaching.splice(curIndex, 1)
_this.teachingStart("Stations")
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
} else {
@@ -925,7 +927,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
clickTeachingEnd() {
@@ -948,7 +950,7 @@
_this.reloadTeachingMode()
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
} else {
_this.teachingStatus = "save"
@@ -960,7 +962,7 @@
this.teachingStatus = "save"
try {} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -1145,7 +1147,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -1172,7 +1174,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
askTeachingBiDirection(teachingMode) {
@@ -1193,7 +1195,7 @@
this.reloadTeachingMode()
this.teachingStatus = "end"
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
clickBackTeaching() {
@@ -1233,7 +1235,7 @@
method: "edit_station_pos",
param: this.stationEdit
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: agv.x,
y: agv.y
@@ -1243,7 +1245,7 @@
}
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
@@ -1267,7 +1269,7 @@
method: "update_station",
param: [this.stationEdit]
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: this.stationEdit.x,
y: this.stationEdit.y
@@ -1282,7 +1284,7 @@
method: "update_station",
param: [this.stationEdit]
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: this.stationEdit.x,
y: this.stationEdit.y
@@ -1295,7 +1297,7 @@
method: "update_station",
param: [this.stationEdit]
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: this.stationEdit.x,
y: this.stationEdit.y
@@ -1308,7 +1310,7 @@
method: "update_station",
param: [this.stationEdit]
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: this.stationEdit.x,
y: this.stationEdit.y
@@ -1399,14 +1401,14 @@
method: "update_agv_state",
param: infoAgv
}, {
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: infoAgv.x,
y: infoAgv.y
}
}])
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async clickShowTeachingPath() {
@@ -1439,7 +1441,7 @@
])
console.log(this.ctxDataStr)
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
},
async clickPositionStation() {
@@ -1459,7 +1461,7 @@
param: [this.stationEdit]
},
{
- method: "move_canvas",
+ method: "move_pt_center",
param: {
x: infoAgv.x,
y: infoAgv.y
@@ -1469,16 +1471,8 @@
])
} catch (ex) {
- this.showError(ex)
+ showError(ex)
}
- },
-
- showError(ex) {
- let exStr = JSON.stringify(ex)
- if (exStr == "{}")
- exStr = ex
- let tip = typeof ex.msg == "string" ? ex.msg : exStr
- showModal(tip, "閿欒", false, "纭畾")
},
--
Gitblit v1.9.1