diff --git a/src/i18n/langs/en.js b/src/i18n/langs/en.js index 68cf1ad..401bf98 100644 --- a/src/i18n/langs/en.js +++ b/src/i18n/langs/en.js @@ -101,6 +101,7 @@ module.exports = { resetbutton: 'Reset Button', obstacleavoidanceparking: 'Obstacle Avoidance Parking', safetyedgesensor: 'Safety Edge Sensor', + sensorinducedparking: 'Sensor Induced Parking', run: 'Run', abnormal: 'Abnormal' }, diff --git a/src/i18n/langs/zh.js b/src/i18n/langs/zh.js index d30051d..348cf65 100644 --- a/src/i18n/langs/zh.js +++ b/src/i18n/langs/zh.js @@ -101,6 +101,7 @@ module.exports = { resetbutton: '复位按钮', obstacleavoidanceparking: '避障停车', safetyedgesensor: '安全触边', + sensorinducedparking: '传感器停车', run: '运行', abnormal: '异常' }, diff --git a/src/images/new/state_btn_yellow.png b/src/images/new/state_btn_yellow.png new file mode 100644 index 0000000..adfeb88 Binary files /dev/null and b/src/images/new/state_btn_yellow.png differ diff --git a/src/pages/modules/login/login.vue b/src/pages/modules/login/login.vue index 888d207..87b53d9 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: 'admin', - password: '123456', + username: this.$store.getters.defaultUsername, + password: this.$store.getters.defaultPassword, baseUrl: this.$store.getters.baseUrl, setTime: this.$store.getters.setTime / 1000, disabled: false, @@ -155,6 +155,7 @@ export default { let obj = {} obj = Object.assign({}, res.result) this.$store.dispatch('userInfo', JSON.stringify(obj)) + this.$store.dispatch('setLoginInfo', {username: this.username, password: this.password}) this.hide() this.$router.push('/index/home') } else { diff --git a/src/pages/modules/vehicleinformation/vehiclecontrol.vue b/src/pages/modules/vehicleinformation/vehiclecontrol.vue index a839aaa..c5c50f4 100644 --- a/src/pages/modules/vehicleinformation/vehiclecontrol.vue +++ b/src/pages/modules/vehicleinformation/vehiclecontrol.vue @@ -16,7 +16,7 @@
{{ $t('vehiclecontrol.updatestatus') }}:
-
{{$i18n.locale === 'en-us' ? status.en_UpdateStatus_name : status.zh_UpdateStatus_name }}
+
{{$i18n.locale === 'en-us' ? status.en_UpdateStatus_name : status.zh_UpdateStatus_name }}
@@ -279,7 +279,7 @@ export default { padding-left 66px background left center url(../../../images/new/state_btn.png) no-repeat .state_item_val_disabled - background-image url(../../../images/new/state_btn_disable.png) + background-image url(../../../images/new/state_btn_yellow.png) .agv_wrap width 100% _fj() diff --git a/src/pages/modules/vehicleinformation/vehiclestatus.vue b/src/pages/modules/vehicleinformation/vehiclestatus.vue index ccf19f1..9d75d63 100644 --- a/src/pages/modules/vehicleinformation/vehiclestatus.vue +++ b/src/pages/modules/vehicleinformation/vehiclestatus.vue @@ -75,7 +75,7 @@
{{ $t('vehiclestatus.vehiclestatus') }}:
-
{{$i18n.locale === 'en-us' ? result.en_vehicle_status : result.zh_vehicle_status}}
+
{{$i18n.locale === 'en-us' ? result.en_vehicle_status : result.zh_vehicle_status}}
{{ $t('vehiclestatus.workingstatus') }}:
@@ -91,6 +91,7 @@
{{ $t('vehiclestatus.resetbutton') }}
{{ $t('vehiclestatus.obstacleavoidanceparking') }}
{{ $t('vehiclestatus.safetyedgesensor') }}
+
{{ $t('vehiclestatus.sensorinducedparking') }}
@@ -225,6 +226,8 @@ export default { background left center url(../../../images/new/state_btn.png) no-repeat .state_item_val_disabled background-image url(../../../images/new/state_btn_disable.png) +.state_item_val_disabled_1 + background-image url(../../../images/new/state_btn_yellow.png) .enClass .agv_item_wrap &:nth-child(1), &:nth-child(5) diff --git a/src/vuex/modules/com.js b/src/vuex/modules/com.js index 8da4c24..b99655e 100644 --- a/src/vuex/modules/com.js +++ b/src/vuex/modules/com.js @@ -3,9 +3,13 @@ import { getStore, setStore } from '@config/utils.js' const baseUrl = process.env.NODE_ENV === 'development' ? 'http://43.139.166.161:8018' : 'http://localhost:8018' const setTime = '1000' +const username = 'admin' +const password = '123456' const state = { baseUrl: getStore('baseUrl') || baseUrl, setTime: getStore('setTime') || setTime, + defaultUsername: getStore('defaultUsername') || username, + defaultPassword: getStore('defaultPassword') || password, loading: false, showToast: false, showAlert: false, @@ -18,6 +22,8 @@ const state = { const getters = { baseUrl: state => state.baseUrl, setTime: state => state.setTime, + defaultUsername: state => state.defaultUsername, + defaultPassword: state => state.defaultPassword, loading: state => state.loading, showToast: state => state.showToast, showAlert: state => state.showAlert @@ -29,6 +35,11 @@ const actions = { setStore('setTime', res.setTime) commit(types.COM_CONFIG, res) }, + setLoginInfo ({commit}, res) { + setStore('defaultUsername', res.username) + setStore('defaultPassword', res.password) + commit(types.COM_LOGIN_INFO, res) + }, setLoadingState ({ commit }, status) { commit(types.COM_LOADING_STATUS, status) }, @@ -58,6 +69,11 @@ const mutations = { state.setTime = res.setTime }, + [types.COM_LOGIN_INFO] (state, res) { + state.defaultUsername = res.username + state.defaultPassword = res.password + }, + [types.COM_LOADING_STATUS] (state, status) { state.loading = status }, diff --git a/src/vuex/types.js b/src/vuex/types.js index e578040..88066cb 100644 --- a/src/vuex/types.js +++ b/src/vuex/types.js @@ -7,6 +7,7 @@ export const COM_SHOW_FAIL = 'COM_SHOW_FAIL' // 显示失败toast export const COM_TOAST_MSG = 'COM_TOAST_MSG' // 显示toast文字 export const COM_SHOW_ALERT = 'COM_SHOW_ALERT' export const COM_ALERT_MSG = 'COM_ALERT_MSG' +export const COM_LOGIN_INFO = 'COM_LOGIN_INFO' // 用户 export const SET_USER_INFO = 'SET_USER_INFO'