From 2af5f043b60c1f7ac38ecccc8f5bf44743134325 Mon Sep 17 00:00:00 2001
From: cuiqian2004 <cuiqian2004@163.com>
Date: 星期五, 12 十二月 2025 18:08:00 +0800
Subject: [PATCH] test

---
 pages/map/teaching.vue |   71 ++++++++++++++++++-----------------
 1 files changed, 37 insertions(+), 34 deletions(-)

diff --git a/pages/map/teaching.vue b/pages/map/teaching.vue
index bb5182d..ff3e789 100644
--- a/pages/map/teaching.vue
+++ b/pages/map/teaching.vue
@@ -122,14 +122,14 @@
 				<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>
 				<view class="text-button-group">
-					<a-button class="button" @click="clickStationNameCancel">鍙栨秷</a-button>
+					<a-button class="button" @click="clickStationNameCancel">{{translate('cancel')}}</a-button>
 					<a-button type="primary" class="button" :disabled="stationEdit.name.trim() == ''"
-						@click="clickStationNameOK">纭畾</a-button>
+						@click="clickStationNameOK">{{translate('ok')}}</a-button>
 				</view>
 			</view>
 			<view class="bottom-content" v-else-if="mapOperationType =='add_station_pos'">
@@ -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>
@@ -214,11 +214,11 @@
 						<view class="img-button-group">
 							<view fill="none" class="button" @click.stop="clickTeachingEdit">
 								<text class="ico edit-line"></text>
-								<view class="text">缂栬緫</view>
+								<view class="text">{{translate('edit')}}</view>
 							</view>
 							<view fill="none" class="button" @click.stop="clickTeachingDelete">
 								<text class="ico red delete-outline "></text>
-								<view class="text">鍒犻櫎</view>
+								<view class="text">{{translate('delete')}}</view>
 							</view>
 
 						</view>
@@ -480,7 +480,7 @@
 						bgProgressPercent: 0,
 						bgLoading: false
 					})
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async loadAgvState() {
@@ -488,7 +488,7 @@
 					const info = await getAgvState(this.vehicleIp)
 					return info
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 					return {}
 				}
 			},
@@ -497,7 +497,7 @@
 					const info = await stations(this.vehicleIp)
 					return info.station_list || []
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 					return []
 				}
 			},
@@ -506,7 +506,7 @@
 					const info = await getMapUrl(this.vehicleIp, id)
 					return info
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 					return {}
 				}
 			},
@@ -521,7 +521,7 @@
 					}
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 					return {
 						Public: [],
 						Stations: []
@@ -542,7 +542,7 @@
 					])
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 
 				}
 			},
@@ -703,7 +703,7 @@
 						param: item,
 					}])
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async removeTeachingModeData(data) {
@@ -711,7 +711,7 @@
 					await delTeachingModeData(this.vehicleIp, data)
 					this.reloadTeachingMode()
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			clickPublicTeaching() {
@@ -753,7 +753,7 @@
 					}])
 					this.mapOperationType = 'public_teaching'
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async stationAdd(item) {
@@ -770,7 +770,7 @@
 
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async teachingStart(mode) {
@@ -814,7 +814,7 @@
 					}
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 
 			},
@@ -832,7 +832,7 @@
 						this.askTeachingBiDirection(this.teachingModeCur)
 					}
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 
 			},
@@ -858,7 +858,7 @@
 					}
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 
@@ -872,7 +872,7 @@
 					}])
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 
@@ -902,7 +902,7 @@
 										stationTeaching.splice(curIndex, 1)
 										_this.teachingStart("Stations")
 									} catch (ex) {
-										showError(ex)
+										showError(ex,this.translate('error'))
 									}
 
 								} else {
@@ -927,7 +927,7 @@
 					}
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			clickTeachingEnd() {
@@ -950,7 +950,7 @@
 							_this.reloadTeachingMode()
 
 						} catch (ex) {
-							showError(ex)
+							showError(ex,this.translate('error'))
 						}
 					} else {
 						_this.teachingStatus = "save"
@@ -962,7 +962,7 @@
 
 				this.teachingStatus = "save"
 				try {} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 
 			},
@@ -1147,7 +1147,7 @@
 
 					}
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 
@@ -1174,7 +1174,7 @@
 
 					}
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			askTeachingBiDirection(teachingMode) {
@@ -1195,7 +1195,7 @@
 					this.reloadTeachingMode()
 					this.teachingStatus = "end"
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			clickBackTeaching() {
@@ -1245,7 +1245,7 @@
 					}
 
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 
 			},
@@ -1408,7 +1408,7 @@
 						}
 					}])
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async clickShowTeachingPath() {
@@ -1441,7 +1441,7 @@
 					])
 					console.log(this.ctxDataStr)
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
 			async clickPositionStation() {
@@ -1471,10 +1471,13 @@
 
 					])
 				} catch (ex) {
-					showError(ex)
+					showError(ex,this.translate('error'))
 				}
 			},
-
+			translate(t) {
+				if (typeof this.$t == "function") return this.$t(`page.${t}`)
+				else return t;
+			},
 
 		}
 	}

--
Gitblit v1.9.1