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 | 63 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 30 deletions(-)
diff --git a/pages/map/teaching.vue b/pages/map/teaching.vue
index 7f11824..ff3e789 100644
--- a/pages/map/teaching.vue
+++ b/pages/map/teaching.vue
@@ -127,9 +127,9 @@
@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'">
@@ -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