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/station/delete.vue |   34 +++++++++++++++++++++-------------
 1 files changed, 21 insertions(+), 13 deletions(-)

diff --git a/pages/station/delete.vue b/pages/station/delete.vue
index c63dab1..bfb84c8 100644
--- a/pages/station/delete.vue
+++ b/pages/station/delete.vue
@@ -10,17 +10,17 @@
 
 						<view class="item-title">{{item.name}}</view>
 						<view class="item-text">
-							瑙掑害锛歿{Math.round(item.angle *180/3.14)}}锛屽潗鏍囷紙{{Math.round(Number(item.x)*100)/100}},{{Math.round(Number(item.y)*100)/100}})
+							{{translate("angle")}}锛歿{Math.round(item.angle *180/3.14)}}锛寋{translate("coordinates")}}:锛坽{Math.round(Number(item.x)*100)/100}},{{Math.round(Number(item.y)*100)/100}})
 						</view>
 					</view>
 				</label>
 			</checkbox-group>
 		</view>
 		<view class="bottom">
-			<checkbox :checked="checkedAll" @click="onSelectAll">鍏ㄩ�</checkbox>
+			<checkbox :checked="checkedAll" @click="onSelectAll">{{translate("select_all")}}</checkbox>
 			<view class="button-group">
 
-				<a-button type="primary" class="button" @click="clickDelelte">鍒犻櫎</a-button>
+				<a-button type="primary" class="button" @click="clickDelelte">{{translate("delete")}}</a-button>
 			</view>
 
 
@@ -65,7 +65,7 @@
 		onBackPress() {
 			const eventChannel = this.getOpenerEventChannel();
 			eventChannel.emit('delete_finish', this.listDel);
-			
+
 		},
 		methods: {
 			async loadData() {
@@ -75,7 +75,7 @@
 
 				} catch (ex) {
 
-					showError(ex)
+					showError(ex, this.translate('error'))
 				}
 			},
 			async loadStations() {
@@ -83,7 +83,7 @@
 					const info = await stations(this.ip)
 					return info.station_list || []
 				} catch (ex) {
-					showError(ex)
+					showError(ex, this.translate('error'))
 					return []
 				}
 			},
@@ -122,10 +122,15 @@
 
 				}
 				if (list.length === 0) {
-					showInfo("鏈�鎷╃珯鐐癸紒")
+					showToast(this.translate("no_selected_stations"))
 					return
 				}
-				showModal("鍒犻櫎閫夋嫨鐨勭珯鐐�, "鏄惁纭鍒犻櫎锛�).then((res) => {
+				showModal({
+					title: this.translate("ask_confirm_remove"),
+					content: `${this.translate('delete_selected_station')}`,
+					confirmText: this.translate('remove'),
+					cancelText: this.translate('cancel'),
+				}).then((res) => {
 					if (res) {
 						_this.stationDelete(list)
 					}
@@ -136,22 +141,25 @@
 			async stationDelete(list) {
 				try {
 					uni.showLoading({
-						title: "姝e湪鍒犻櫎绔欑偣"
+						title: this.translate("deleting_station")
 					})
 
 					await delStation(this.ip, list)
 					this.stationList = await this.loadStations() || []
 
 					this.listDel.push(...list)
-					showToast("鍒犻櫎绔欑偣鎴愬姛")
+					showToast(this.translate("delete_station_success"))
 				} catch (ex) {
-					
-					showError(ex)
+
+					showError(ex, this.translate('error'))
 				} finally {
 					uni.hideLoading()
 				}
 			},
-
+			translate(t) {
+				if (typeof this.$t == "function") return this.$t(`page.${t}`)
+				else return t;
+			},
 		}
 	}
 </script>

--
Gitblit v1.9.1