From d336648b14b748b66fcdfcd54692136fa0f94f86 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Thu, 7 Dec 2023 15:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en.js | 8 ++- src/i18n/langs/zh.js | 6 +- src/main.js | 3 +- src/pages/modules/login/login.vue | 15 ++++- .../vehicleinformation/vehiclestatus.vue | 67 +++++++++++++++---- src/style/common.styl | 8 ++- 6 files changed, 82 insertions(+), 25 deletions(-) diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js index 433a2b8..671dcbf 100644 --- a/src/i18n/langs/en.js +++ b/src/i18n/langs/en.js @@ -83,13 +83,14 @@ module.exports = { vehiclestatus: { vehiclestatus: 'Vehicle Status', status: 'Status', - coordinate: 'Coordinate', + xcoordinate: 'X coordinate', + ycoordinate: 'Y coordinate', headingangle: 'Heading Angle', steeringwheelangle: 'Steering Wheel Angle', - distributionspeed: 'Distribution Speed', + distributionspeed: 'Throttle Command', actualspeed: 'Actual Speed', lateraldeviation: 'Lateral Deviation', - coursedeviation: 'Course Deviation', + coursedeviation: 'Vertical Deviation', workingstatus: 'Working Status', sensorstatus: 'Sensor Status', emergencystop: 'Emergency Stop', @@ -140,6 +141,7 @@ module.exports = { oldpassword: 'Old Password', newpassword: 'New Password', operationfailed: 'Operation failed', + loading: 'Loading', toast1: 'Old password cannot be empty', toast2: 'The new password cannot be empty', toast3: 'Enter a new password', diff --git a/src/i18n/langs/zh.js b/src/i18n/langs/zh.js index 3e895ef..6c6a347 100644 --- a/src/i18n/langs/zh.js +++ b/src/i18n/langs/zh.js @@ -83,10 +83,11 @@ module.exports = { vehiclestatus: { vehiclestatus: '车辆状态', status: '状态', - coordinate: '坐标', + xcoordinate: 'X 坐标', + ycoordinate: 'Y 坐标', headingangle: '航向角', steeringwheelangle: '舵轮角度', - distributionspeed: '下发速度', + distributionspeed: '下发速度指令', actualspeed: '实际速度', lateraldeviation: '横向偏差', coursedeviation: '航向偏差', @@ -140,6 +141,7 @@ module.exports = { oldpassword: '旧的密码', newpassword: '新的密码', operationfailed: '操作失败', + loading: '加载中', toast1: '旧密码不能为空', toast2: '新密码不能为空', toast3: '输入新密码', diff --git a/src/main.js b/src/main.js index e02d9a2..a0080ee 100644 --- a/src/main.js +++ b/src/main.js @@ -9,7 +9,7 @@ import fastClick from 'fastclick' import infiniteScroll from 'vue-infinite-scroll' import VueTouchKeyboard from 'vue-touch-keyboard' import 'vue-touch-keyboard/dist/vue-touch-keyboard.css' -import { DatePicker, Select, Option, Radio, Menu, MenuItem, Tree } from 'element-ui' +import { DatePicker, Select, Option, Radio, Menu, MenuItem, Tree, Loading } from 'element-ui' import '@style/common.styl' import i18n from './i18n/i18n' import '@config/rem.js' @@ -25,6 +25,7 @@ Vue.use(Radio) Vue.use(Menu) Vue.use(MenuItem) Vue.use(Tree) +Vue.use(Loading) Vue.use(infiniteScroll) Vue.use(VueTouchKeyboard) Vue.prototype.$post = post diff --git a/src/pages/modules/login/login.vue b/src/pages/modules/login/login.vue index 0863b89..a4fff67 100644 --- a/src/pages/modules/login/login.vue +++ b/src/pages/modules/login/login.vue @@ -71,8 +71,8 @@ export default { return { selectType: '', tab: 0, - username: '', - password: '', + username: 'admin', + password: '123456', baseUrl: this.$store.getters.baseUrl, setTime: this.$store.getters.setTime / 1000, disabled: false, @@ -158,7 +158,16 @@ export default { this.$router.push('/index/home') } catch (err) { this.disabled = false - this.toast(err) + // this.toast(err) + const loading = this.$loading({ + lock: true, + text: this.$t('common.loading'), + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }) + setTimeout(() => { + loading.close() + }, 4000) } }, show (e) { diff --git a/src/pages/modules/vehicleinformation/vehiclestatus.vue b/src/pages/modules/vehicleinformation/vehiclestatus.vue index 3cff493..df04096 100644 --- a/src/pages/modules/vehicleinformation/vehiclestatus.vue +++ b/src/pages/modules/vehicleinformation/vehiclestatus.vue @@ -11,35 +11,59 @@