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/task.vue |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/pages/map/task.vue b/pages/map/task.vue
index a8c0a67..d77571a 100644
--- a/pages/map/task.vue
+++ b/pages/map/task.vue
@@ -1,9 +1,9 @@
 <template>
 	<view class="pages-map-task">
 		<view class="no-content" v-if="unlinked">
-			<image class="img" src="/images/image 25.png" alt=" 鍥剧墖" mode="aspectFit" />
-			<view class="title">杞﹁締杩炴帴澶辫触</view>
-			<view class="space">璇锋鏌ヤ綘鐨勭綉缁滆缃垨閲嶆柊鍔犺浇</view>
+			<image class="img" src="/images/image_25.png" alt=" 鍥剧墖" mode="aspectFit" />
+			<view class="title">{{translate("failed_vehicle_connection")}}</view>
+			<view class="space">{{translate("check_network_or_reload")}}</view>
 		</view>
 		<view class="map-content" v-else>
 			<view class="content">
@@ -13,12 +13,12 @@
 				<view class="button-group">
 					<view type="text" class="button" @click="clickTaskSet">
 						<uni-icons class="img" type="gear-filled" size="40" color="#1890FF"></uni-icons>
-						<view class="text"> 璁剧疆浠诲姟</view>
+						<view class="text"> {{translate("task_set")}}</view>
 
 					</view>
 					<view type="text" class="button" @click="clickTaskRecord">
 						<text class="ico task-list" />
-						<view class="text"> 浠诲姟璁板綍</view>
+						<view class="text"> {{translate("task_history")}}</view>
 						
 						
 
@@ -33,7 +33,9 @@
 <script>
 	import {
 		showToast,
-		showModal
+		showModal,
+		showError,
+		showInfo
 	} from "@/comm/utils.js"
 	import {
 		Button
@@ -52,7 +54,7 @@
 		data() {
 			return {
 				vehicleIp: "",
-				navigationBarTitle: "鍦板浘浠诲姟",
+				navigationBarTitle: this.translate("task_set"),
 				unlinked: false
 			}
 		},
@@ -115,7 +117,7 @@
 					const info = await getAgvState(this.vehicleIp)
 					return info
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex,this.translate('error'))
 					return {}
 				}
 			},
@@ -124,7 +126,7 @@
 					const info = await stations(this.vehicleIp)
 					return info.station_list || []
 				} catch (ex) {
-					this.showError(ex)
+					showError(ex,this.translate('error'))
 					return []
 				}
 			},
@@ -138,14 +140,10 @@
 					url: `/pages/task/log-list?ip=${this.vehicleIp}`
 				})
 			},
-			showError(ex) {
-				let exStr = JSON.stringify(ex)
-				if (exStr == "{}")
-					exStr = ex
-				let tip = typeof ex.msg == "string" ? ex.msg : exStr
-				showModal(tip, "閿欒", false)
+			translate(t) {
+				if (typeof this.$t == "function") return this.$t(`page.${t}`)
+				else return t;
 			},
-
 
 		}
 	}
@@ -325,6 +323,8 @@
 			margin-top: 75px;
 			margin-left: 120px;
 			width: 150px;
+			max-height: 50vh;
+			overflow: auto;
 			align-items: center;
 			justify-content: center;
 			flex-direction: column;

--
Gitblit v1.9.1