sov
This commit is contained in:
@@ -2,6 +2,7 @@ import axios from 'axios'
|
|||||||
import { Dialog } from './utils.js'
|
import { Dialog } from './utils.js'
|
||||||
import store from '../vuex/store'
|
import store from '../vuex/store'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
import i18n from '../i18n/i18n'
|
||||||
|
|
||||||
axios.defaults.timeout = 50000
|
axios.defaults.timeout = 50000
|
||||||
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
@@ -19,6 +20,7 @@ axios.interceptors.request.use(
|
|||||||
config.data = config.data.formData
|
config.data = config.data.formData
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
config.headers.post['Accept-Language'] = i18n.locale === 'en-us' ? 'en' : 'zh'
|
||||||
return config
|
return config
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|||||||
@@ -3,9 +3,11 @@ module.exports = {
|
|||||||
passwordlogin: 'Login',
|
passwordlogin: 'Login',
|
||||||
configuration: 'Configuration',
|
configuration: 'Configuration',
|
||||||
password: 'Password',
|
password: 'Password',
|
||||||
domainnameaddress: 'Domain address',
|
domainnameaddress: 'Domain Address',
|
||||||
refreshtime: 'Refresh time(s)',
|
refreshtime: 'Refresh Time(s)',
|
||||||
login: 'Login'
|
login: 'Login',
|
||||||
|
toast1: 'Please enter one user name',
|
||||||
|
toast2: 'Please enter password'
|
||||||
},
|
},
|
||||||
homeinfo: {
|
homeinfo: {
|
||||||
topinfo: 'Device Information',
|
topinfo: 'Device Information',
|
||||||
@@ -44,71 +46,78 @@ module.exports = {
|
|||||||
solution: 'Solution'
|
solution: 'Solution'
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
usermanagement: 'User management',
|
usermanagement: 'User Management',
|
||||||
fullname: 'Full name',
|
fullname: 'Full Name',
|
||||||
phone: 'Phone',
|
phone: 'Phone',
|
||||||
gender: 'Gender',
|
gender: 'Gender',
|
||||||
creationdate: 'Creation date',
|
creationdate: 'Creation Date',
|
||||||
adduser: 'Add user',
|
adduser: 'Add User',
|
||||||
question1: 'Are you sure you want to reset your password?',
|
question1: 'Are you sure you want to reset your password?',
|
||||||
question2: 'Are you sure you want to delete this user?'
|
question2: 'Are you sure you want to delete this user?',
|
||||||
|
toast1: 'The username cannot be empty',
|
||||||
|
toast2: 'Password cannot be empty'
|
||||||
},
|
},
|
||||||
role: {
|
role: {
|
||||||
rolemanagement: 'Role management',
|
rolemanagement: 'Role Management',
|
||||||
rolename: 'Role name',
|
rolename: 'Role Name',
|
||||||
role: 'Role',
|
role: 'Role',
|
||||||
describe: 'Describe',
|
describe: 'Describe',
|
||||||
creationdate: 'Creation date',
|
creationdate: 'Creation Date',
|
||||||
addrole: 'Add role'
|
addrole: 'Add Role',
|
||||||
|
toast1: 'Role name cannot be empty'
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
systemmanagement: 'System management',
|
systemmanagement: 'System Management',
|
||||||
code: 'Code',
|
code: 'Code',
|
||||||
value: 'Value',
|
value: 'Value',
|
||||||
addparameter: 'Add parameter',
|
addparameter: 'Add Parameter',
|
||||||
question1: 'Are you sure to delete it?'
|
question1: 'Are you sure to delete it?',
|
||||||
|
toast1: 'Encoding cannot be empty',
|
||||||
|
toast2: 'Name cannot be empty',
|
||||||
|
toast3: 'Value cannot be empty'
|
||||||
},
|
},
|
||||||
developer: {
|
developer: {
|
||||||
developeroptions: 'Developer options'
|
developeroptions: 'Developer Options'
|
||||||
},
|
},
|
||||||
vehiclestatus: {
|
vehiclestatus: {
|
||||||
vehiclestatus: 'Vehicle status',
|
vehiclestatus: 'Vehicle Status',
|
||||||
status: 'Status',
|
status: 'Status',
|
||||||
coordinate: 'coordinate',
|
coordinate: 'Coordinate',
|
||||||
headingangle: 'Heading angle',
|
headingangle: 'Heading Angle',
|
||||||
steeringwheelangle: 'Steering wheel angle',
|
steeringwheelangle: 'Steering Wheel Angle',
|
||||||
distributionspeed: 'Distribution speed',
|
distributionspeed: 'Distribution Speed',
|
||||||
actualspeed: 'Actual speed',
|
actualspeed: 'Actual Speed',
|
||||||
lateraldeviation: 'Lateral deviation',
|
lateraldeviation: 'Lateral Deviation',
|
||||||
coursedeviation: 'Course deviation',
|
coursedeviation: 'Course Deviation',
|
||||||
workingstatus: 'Working status',
|
workingstatus: 'Working Status',
|
||||||
sensorstatus: 'Sensor status',
|
sensorstatus: 'Sensor Status',
|
||||||
emergencystop: 'Emergency stop',
|
emergencystop: 'Emergency Stop',
|
||||||
obstacleavoidancedeceleration: 'Obstacle avoidance deceleration',
|
obstacleavoidancedeceleration: 'Obstacle Avoidance Deceleration',
|
||||||
resetbutton: 'Reset button',
|
resetbutton: 'Reset Button',
|
||||||
obstacleavoidanceparking: 'Obstacle avoidance parking',
|
obstacleavoidanceparking: 'Obstacle Avoidance Parking',
|
||||||
safetyedgesensor: 'Safety edge sensor',
|
safetyedgesensor: 'Safety Edge Sensor',
|
||||||
run: 'Run',
|
run: 'Run',
|
||||||
abnormal: 'Abnormal'
|
abnormal: 'Abnormal'
|
||||||
},
|
},
|
||||||
vehiclecontrol: {
|
vehiclecontrol: {
|
||||||
vehiclecontrol: 'Vehicle control',
|
vehiclecontrol: 'Vehicle Control',
|
||||||
Status: 'Status',
|
status: 'Status',
|
||||||
Control: 'Control',
|
control: ' Control',
|
||||||
control: ' control',
|
deviationstate: 'Deviation State',
|
||||||
deviationstate: 'Deviation state',
|
updatestatus: 'Update Status',
|
||||||
updatestatus: 'Update status',
|
displaycontrol: 'Display Control',
|
||||||
displaycontrol: 'Display control',
|
initializecoordinates: 'Initialize Coordinates',
|
||||||
initializecoordinates: 'Initialize coordinates',
|
coordinateinformation: 'Coordinate Information',
|
||||||
coordinateinformation: 'Coordinate information',
|
skipthestart: 'Skip The Start',
|
||||||
skipthestart: 'Skip the start',
|
initializecoordinate: 'Initialize Coordinate',
|
||||||
initializecoordinate: 'Initialize coordinate',
|
fullscreen: 'Full Screen',
|
||||||
fullscreen: 'Full screen',
|
|
||||||
quit: 'Quit',
|
quit: 'Quit',
|
||||||
poweroff: 'Power Off',
|
poweroff: 'Power Off',
|
||||||
softwarerestart: 'Software restart',
|
softwarerestart: 'Software Restart',
|
||||||
restart: 'Restart',
|
restart: 'Restart',
|
||||||
skipdetection: 'Skip detection'
|
skipdetection: 'Skip Detection',
|
||||||
|
toast1: 'Please select coordinates',
|
||||||
|
toast2: 'RC control and Joy control cannot be turned on simultaneously'
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
cancel: 'Cancel',
|
cancel: 'Cancel',
|
||||||
@@ -117,17 +126,22 @@ module.exports = {
|
|||||||
modify: 'Modify',
|
modify: 'Modify',
|
||||||
delete: 'Delete',
|
delete: 'Delete',
|
||||||
exit: 'Exit',
|
exit: 'Exit',
|
||||||
resetpassword: 'Reset password'
|
resetpassword: 'Reset Password'
|
||||||
},
|
},
|
||||||
common: {
|
common: {
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
username: 'User name',
|
username: 'User Name',
|
||||||
number: 'S/N',
|
number: 'S/N',
|
||||||
operate: 'Operate',
|
operate: 'Operate',
|
||||||
remark: 'Remark',
|
remark: 'Remark',
|
||||||
changepassword: 'Change password',
|
changepassword: 'Change Password',
|
||||||
exit: 'Exit',
|
exit: 'Exit',
|
||||||
oldpassword: 'Old password',
|
oldpassword: 'Old Password',
|
||||||
newpassword: 'New password'
|
newpassword: 'New Password',
|
||||||
|
operationfailed: 'Operation failed',
|
||||||
|
toast1: 'Old password cannot be empty',
|
||||||
|
toast2: 'The new password cannot be empty',
|
||||||
|
toast3: 'Enter a new password',
|
||||||
|
toast4: 'The new password input is inconsistent, please re-enter it'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ module.exports = {
|
|||||||
password: '密码',
|
password: '密码',
|
||||||
domainnameaddress: '域名地址',
|
domainnameaddress: '域名地址',
|
||||||
refreshtime: '刷新时间(秒)',
|
refreshtime: '刷新时间(秒)',
|
||||||
login: '登录'
|
login: '登录',
|
||||||
|
toast1: '请输入用户名',
|
||||||
|
toast2: '请输入密码'
|
||||||
},
|
},
|
||||||
homeinfo: {
|
homeinfo: {
|
||||||
topinfo: '设备信息',
|
topinfo: '设备信息',
|
||||||
@@ -51,7 +53,9 @@ module.exports = {
|
|||||||
creationdate: '创建日期',
|
creationdate: '创建日期',
|
||||||
adduser: '添加用户',
|
adduser: '添加用户',
|
||||||
question1: '确定重置密码吗?',
|
question1: '确定重置密码吗?',
|
||||||
question2: '确定删除该用户吗?'
|
question2: '确定删除该用户吗?',
|
||||||
|
toast1: '用户名不能为空',
|
||||||
|
toast2: '密码不能为空'
|
||||||
},
|
},
|
||||||
role: {
|
role: {
|
||||||
rolemanagement: '角色管理',
|
rolemanagement: '角色管理',
|
||||||
@@ -59,14 +63,18 @@ module.exports = {
|
|||||||
role: '角色',
|
role: '角色',
|
||||||
describe: '描述',
|
describe: '描述',
|
||||||
creationdate: '创建日期',
|
creationdate: '创建日期',
|
||||||
addrole: '新增角色'
|
addrole: '新增角色',
|
||||||
|
toast1: '角色名称不能为空'
|
||||||
},
|
},
|
||||||
system: {
|
system: {
|
||||||
systemmanagement: '系统管理',
|
systemmanagement: '系统管理',
|
||||||
code: '编码',
|
code: '编码',
|
||||||
value: '值',
|
value: '值',
|
||||||
addparameter: '添加参数',
|
addparameter: '添加参数',
|
||||||
question1: '确定删除吗?'
|
question1: '确定删除吗?',
|
||||||
|
toast1: '编码不能为空',
|
||||||
|
toast2: '名字不能为空',
|
||||||
|
toast3: '数值不能为空'
|
||||||
},
|
},
|
||||||
developer: {
|
developer: {
|
||||||
developeroptions: '开发者选项'
|
developeroptions: '开发者选项'
|
||||||
@@ -93,8 +101,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
vehiclecontrol: {
|
vehiclecontrol: {
|
||||||
vehiclecontrol: '车辆控制',
|
vehiclecontrol: '车辆控制',
|
||||||
Status: '状态',
|
status: '状态',
|
||||||
Control: '控制',
|
|
||||||
control: '控制',
|
control: '控制',
|
||||||
deviationstate: '偏离状态',
|
deviationstate: '偏离状态',
|
||||||
updatestatus: '更新状态',
|
updatestatus: '更新状态',
|
||||||
@@ -108,7 +115,9 @@ module.exports = {
|
|||||||
poweroff: '关机',
|
poweroff: '关机',
|
||||||
softwarerestart: '软启动',
|
softwarerestart: '软启动',
|
||||||
restart: '重启',
|
restart: '重启',
|
||||||
skipdetection: '跳过检测'
|
skipdetection: '跳过检测',
|
||||||
|
toast1: '请选择坐标',
|
||||||
|
toast2: 'RC控制与Joy控制不能同时开启'
|
||||||
},
|
},
|
||||||
button: {
|
button: {
|
||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
@@ -128,6 +137,11 @@ module.exports = {
|
|||||||
changepassword: '修改密码',
|
changepassword: '修改密码',
|
||||||
exit: '退出',
|
exit: '退出',
|
||||||
oldpassword: '旧的密码',
|
oldpassword: '旧的密码',
|
||||||
newpassword: '新的密码'
|
newpassword: '新的密码',
|
||||||
|
operationfailed: '操作失败',
|
||||||
|
toast1: '旧密码不能为空',
|
||||||
|
toast2: '新密码不能为空',
|
||||||
|
toast3: '输入新密码',
|
||||||
|
toast4: '新密码输入不一致,请重新输入'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,12 +135,14 @@ export default {
|
|||||||
saveLogin () {
|
saveLogin () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.username) {
|
if (!this.username) {
|
||||||
this.toast('请输入用户名')
|
// this.toast('请输入用户名')
|
||||||
|
this.toast(this.$t('login.toast1'))
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.password) {
|
if (!this.password) {
|
||||||
this.toast('请输入密码')
|
// this.toast('请输入密码')
|
||||||
|
this.toast(this.$t('login.toast2'))
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,9 +49,9 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
tabs () {
|
tabs () {
|
||||||
let arr = [{id: '1', label: 'ifconfig'}, {id: '2', label: '日志列表'}, {id: '3', label: 'ROS运行列表'}, {id: '4', label: '芯片温度/主频'}, {id: '5', label: '调试信息'}, {id: '6', label: '软/硬件版本'}]
|
let arr = [{id: '1', label: 'Ifconfig'}, {id: '2', label: '日志列表'}, {id: '3', label: 'ROS运行列表'}, {id: '4', label: '芯片温度/主频'}, {id: '5', label: '调试信息'}, {id: '6', label: '软/硬件版本'}]
|
||||||
if (this.$i18n.locale === 'en-us') {
|
if (this.$i18n.locale === 'en-us') {
|
||||||
arr = [{id: '1', label: 'ifconfig'}, {id: '2', label: 'Log list'}, {id: '3', label: 'ROS run list'}, {id: '4', label: 'Chip temperature/main frequency'}, {id: '5', label: 'Debugging information'}, {id: '6', label: 'Software/Hardware Version'}]
|
arr = [{id: '1', label: 'Ifconfig'}, {id: '2', label: 'Log List'}, {id: '3', label: 'ROS Run List'}, {id: '4', label: 'Chip Temperature/Main Frequency'}, {id: '5', label: 'Debugging Information'}, {id: '6', label: 'Software/Hardware Version'}]
|
||||||
}
|
}
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
@@ -163,7 +163,7 @@ export default {
|
|||||||
z-index 2
|
z-index 2
|
||||||
.tabs_item
|
.tabs_item
|
||||||
padding 0 10px
|
padding 0 10px
|
||||||
width 200px
|
width 202px
|
||||||
height 46px
|
height 46px
|
||||||
box-sizing border-box
|
box-sizing border-box
|
||||||
line-height 46px
|
line-height 46px
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="main-container">
|
<div class="main-container">
|
||||||
{{ aa }}
|
|
||||||
<div class="right_side">
|
<div class="right_side">
|
||||||
<div class="content_wrap">
|
<div class="content_wrap">
|
||||||
<div class="title_wrap">
|
<div class="title_wrap">
|
||||||
@@ -20,8 +19,8 @@
|
|||||||
<!-- <td>
|
<!-- <td>
|
||||||
<div class="radio__input icon_radio_checked"><i class="icon_radio"></i></div>
|
<div class="radio__input icon_radio_checked"><i class="icon_radio"></i></div>
|
||||||
</td> -->
|
</td> -->
|
||||||
<td @click="toCheck(e)">{{ e.name }}</td>
|
<td @click="toCheck(e)">{{ $i18n.locale === 'en-us' ? e.en_name : e.zh_name }}</td>
|
||||||
<td @click="toCheck(e)">{{ e.remark }}</td>
|
<td @click="toCheck(e)">{{ $i18n.locale === 'en-us' ? e.en_remark : e.zh_remark }}</td>
|
||||||
<td @click="toCheck(e)">{{ e.createTime }}</td>
|
<td @click="toCheck(e)">{{ e.createTime }}</td>
|
||||||
<td width="330px">
|
<td width="330px">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -82,7 +81,7 @@
|
|||||||
<div v-if="active1" class="dialog_wrapper">
|
<div v-if="active1" class="dialog_wrapper">
|
||||||
<div class="dialog dialog_1">
|
<div class="dialog dialog_1">
|
||||||
<div class="dialog_header">
|
<div class="dialog_header">
|
||||||
<span class="dialog_title">{{ pkObj.name }}</span>
|
<span class="dialog_title">{{ $i18n.locale === 'en-us' ? pkObj.en_name : pkObj.zh_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="dialog_body dialog_body_1">
|
<div class="dialog_body dialog_body_1">
|
||||||
<div class="tree_wrapper">
|
<div class="tree_wrapper">
|
||||||
@@ -153,10 +152,10 @@ export default {
|
|||||||
type (val) {
|
type (val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case '1':
|
case '1':
|
||||||
this.title = '添加角色'
|
this.title = this.$i18n.locale === 'en-us' ? 'Add Role' : '添加角色'
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
this.title = '修改角色'
|
this.title = this.$i18n.locale === 'en-us' ? 'Modify Role' : '修改角色'
|
||||||
break
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.title = ''
|
this.title = ''
|
||||||
@@ -199,8 +198,8 @@ export default {
|
|||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
this.pkObj = e
|
this.pkObj = e
|
||||||
this.rolename = e.name
|
this.rolename = this.$i18n.locale === 'en-us' ? e.en_name : e.zh_name
|
||||||
this.remark = e.remark
|
this.remark = this.$i18n.locale === 'en-us' ? e.en_remark : e.zh_remark
|
||||||
if (this.rolename === '') {
|
if (this.rolename === '') {
|
||||||
this.unclick = true
|
this.unclick = true
|
||||||
} else {
|
} else {
|
||||||
@@ -233,7 +232,8 @@ export default {
|
|||||||
async _sysRoleAdd () {
|
async _sysRoleAdd () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.rolename) {
|
if (!this.rolename) {
|
||||||
this.toast('角色名称不能为空')
|
// this.toast('角色名称不能为空')
|
||||||
|
this.toast(this.$t('role.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,8 @@ export default {
|
|||||||
async _sysRoleEdit () {
|
async _sysRoleEdit () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.rolename) {
|
if (!this.rolename) {
|
||||||
this.toast('角色名称不能为空')
|
// this.toast('角色名称不能为空')
|
||||||
|
this.toast(this.$t('role.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,11 +17,11 @@
|
|||||||
<th>{{ $t('common.operate') }}</th>
|
<th>{{ $t('common.operate') }}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(e, i) in datalist" :key="i">
|
<tr v-for="(e, i) in datalist" :key="i">
|
||||||
<td>{{ e.id }}</td>
|
<td>{{ i + 1 }}</td>
|
||||||
<td>{{ e.code }}</td>
|
<td>{{ e.code }}</td>
|
||||||
<td>{{ e.name }}</td>
|
<td>{{ $i18n.locale === 'en-us' ? e.en_name : e.zh_name }}</td>
|
||||||
<td>{{ e.value }}</td>
|
<td>{{ $i18n.locale === 'en-us' ? e.en_value : e.zh_value }}</td>
|
||||||
<td>{{ e.remark }}</td>
|
<td>{{ $i18n.locale === 'en-us' ? e.en_remark : e.zh_remark }}</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button class="button button--primary grid_button" @click="showDialog('2', e)">{{ $t('button.modify') }}</button>
|
<button class="button button--primary grid_button" @click="showDialog('2', e)">{{ $t('button.modify') }}</button>
|
||||||
@@ -130,10 +130,10 @@ export default {
|
|||||||
type (val) {
|
type (val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case '1':
|
case '1':
|
||||||
this.title = '添加参数'
|
this.title = this.$i18n.locale === 'en-us' ? 'Add Parameter' : '添加参数'
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
this.title = '修改参数'
|
this.title = this.$i18n.locale === 'en-us' ? 'Modify Parameter' : '修改参数'
|
||||||
break
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.title = ''
|
this.title = ''
|
||||||
@@ -185,9 +185,9 @@ export default {
|
|||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
this.code = e.code
|
this.code = e.code
|
||||||
this.name = e.name
|
this.name = this.$i18n.locale === 'en-us' ? e.en_name : e.zh_name
|
||||||
this.value = e.value
|
this.value = this.$i18n.locale === 'en-us' ? e.en_value : e.zh_value
|
||||||
this.remark = e.remark
|
this.remark = this.$i18n.locale === 'en-us' ? e.en_remark : e.zh_remark
|
||||||
if (!this.code || !this.name || !this.value) {
|
if (!this.code || !this.name || !this.value) {
|
||||||
this.unclick = true
|
this.unclick = true
|
||||||
} else {
|
} else {
|
||||||
@@ -221,17 +221,20 @@ export default {
|
|||||||
async _paramAdd () {
|
async _paramAdd () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.code) {
|
if (!this.code) {
|
||||||
this.toast('编码不能为空')
|
// this.toast('编码不能为空')
|
||||||
|
this.toast(this.$t('system.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.name) {
|
if (!this.name) {
|
||||||
this.toast('名字不能为空')
|
// this.toast('名字不能为空')
|
||||||
|
this.toast(this.$t('system.toast2'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.value) {
|
if (!this.value) {
|
||||||
this.toast('数值不能为空')
|
// this.toast('数值不能为空')
|
||||||
|
this.toast(this.$t('system.toast3'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -251,17 +254,20 @@ export default {
|
|||||||
async _paramEdit () {
|
async _paramEdit () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.code) {
|
if (!this.code) {
|
||||||
this.toast('编码不能为空')
|
// this.toast('编码不能为空')
|
||||||
|
this.toast(this.$t('system.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.name) {
|
if (!this.name) {
|
||||||
this.toast('名字不能为空')
|
// this.toast('名字不能为空')
|
||||||
|
this.toast(this.$t('system.toast2'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.value) {
|
if (!this.value) {
|
||||||
this.toast('数值不能为空')
|
// this.toast('数值不能为空')
|
||||||
|
this.toast(this.$t('system.toast3'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
<th width="430px">{{ $t('common.operate')}}</th>
|
<th width="430px">{{ $t('common.operate')}}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="(e, i) in datalist" :key="i">
|
<tr v-for="(e, i) in datalist" :key="i">
|
||||||
<td>{{ e.userId }}</td>
|
<td>{{ i + 1 }}</td>
|
||||||
<td>{{ e.username }}</td>
|
<td>{{ e.username }}</td>
|
||||||
<td>{{ e.personName }}</td>
|
<td>{{ $i18n.locale === 'en-us' ? e.en_person_name : e.zh_person_name }}</td>
|
||||||
<td>{{ e.phone }}</td>
|
<td>{{ e.phone }}</td>
|
||||||
<td>{{ $i18n.locale === 'en-us' ? e.en_gender : e.zh_gender }}</td>
|
<td>{{ $i18n.locale === 'en-us' ? e.en_gender : e.zh_gender }}</td>
|
||||||
<td>{{ e.createTime }}</td>
|
<td>{{ e.createTime }}</td>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.roleId"
|
:key="item.roleId"
|
||||||
:label="item.name"
|
:label="$i18n.locale === 'en-us' ? item.en_name : item.zh_name"
|
||||||
:value="item.roleId">
|
:value="item.roleId">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -146,7 +146,6 @@ export default {
|
|||||||
username: '',
|
username: '',
|
||||||
phone: '',
|
phone: '',
|
||||||
name: '',
|
name: '',
|
||||||
sexArr: [{label: '男', value: '男'}, {label: '女', value: '女'}],
|
|
||||||
sex: '',
|
sex: '',
|
||||||
password: '',
|
password: '',
|
||||||
options: [],
|
options: [],
|
||||||
@@ -163,14 +162,25 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
sexArr () {
|
||||||
|
let res = []
|
||||||
|
if (this.$i18n.locale === 'en-us') {
|
||||||
|
res = [{label: 'Male', value: 'Male'}, {label: 'Female', value: 'Female'}]
|
||||||
|
} else {
|
||||||
|
res = [{label: '男', value: '男'}, {zh_label: '女', value: '女'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
type (val) {
|
type (val) {
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case '1':
|
case '1':
|
||||||
this.title = '添加用户'
|
this.title = this.$i18n.locale === 'en-us' ? 'Add User' : '添加用户'
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
this.title = '修改用户'
|
this.title = this.$i18n.locale === 'en-us' ? 'Modify User' : '修改用户'
|
||||||
break
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.title = ''
|
this.title = ''
|
||||||
@@ -229,8 +239,8 @@ export default {
|
|||||||
this.pkObj = e
|
this.pkObj = e
|
||||||
this.username = e.username
|
this.username = e.username
|
||||||
this.phone = e.phone
|
this.phone = e.phone
|
||||||
this.name = e.personName
|
this.name = this.$i18n.locale === 'en-us' ? e.en_person_name : e.zh_person_name
|
||||||
this.sex = e.gender
|
this.sex = this.$i18n.locale === 'en-us' ? e.en_gender : e.zh_gender
|
||||||
this.options.map(el => {
|
this.options.map(el => {
|
||||||
if (el.roleId === e.roles[0].roleId) {
|
if (el.roleId === e.roles[0].roleId) {
|
||||||
this.value = el.roleId
|
this.value = el.roleId
|
||||||
@@ -278,12 +288,14 @@ export default {
|
|||||||
async _usersAdd () {
|
async _usersAdd () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.username) {
|
if (!this.username) {
|
||||||
this.toast('用户名不能为空')
|
// this.toast('用户名不能为空')
|
||||||
|
this.toast(this.$t('user.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.password) {
|
if (!this.password) {
|
||||||
this.toast('密码不能为空')
|
// this.toast('密码不能为空')
|
||||||
|
this.toast(this.$t('user.toast2'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -309,7 +321,8 @@ export default {
|
|||||||
async _usersEdit () {
|
async _usersEdit () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.username) {
|
if (!this.username) {
|
||||||
this.toast('用户名不能为空')
|
// this.toast('用户名不能为空')
|
||||||
|
this.toast(this.$t('user.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="page_container">
|
<div class="page_container">
|
||||||
<div class="state_title-wrap">
|
<div class="state_title-wrap">
|
||||||
<h3>{{ $t('vehiclecontrol.Status') }}</h3>
|
<h3>{{ $t('vehiclecontrol.status') }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="state_wrap">
|
<div class="state_wrap">
|
||||||
<div class="state_item_wrap">
|
<div class="state_item_wrap">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<button class="switch_item switch_item_8" @click="switchDown('12', '0')" :disabled="disabled">{{ $t('vehiclecontrol.skipdetection') }}</button>
|
<button class="switch_item switch_item_8" @click="switchDown('12', '0')" :disabled="disabled">{{ $t('vehiclecontrol.skipdetection') }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="state_title-wrap">
|
<div class="state_title-wrap">
|
||||||
<h3>{{ $t('vehiclecontrol.Control') }}</h3>
|
<h3>{{ $t('vehiclecontrol.control') }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="control_wrap">
|
<div class="control_wrap">
|
||||||
<div class="control_item">
|
<div class="control_item">
|
||||||
@@ -157,12 +157,14 @@ export default {
|
|||||||
switchDown (type, bool) {
|
switchDown (type, bool) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (type === '5' && this.switch4 === '0' && this.switch5 === '1') {
|
if (type === '5' && this.switch4 === '0' && this.switch5 === '1') {
|
||||||
this.toast('RC控制与Joy控制不能同时开启')
|
// this.toast('RC控制与Joy控制不能同时开启')
|
||||||
|
this.toast(this.$t('vehiclecontrol.toast2'))
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (type === '6' && this.switch4 === '1' && this.switch5 === '0') {
|
if (type === '6' && this.switch4 === '1' && this.switch5 === '0') {
|
||||||
this.toast('RC控制与Joy控制不能同时开启')
|
// this.toast('RC控制与Joy控制不能同时开启')
|
||||||
|
this.toast(this.$t('vehiclecontrol.toast2'))
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -197,7 +199,7 @@ export default {
|
|||||||
this.refresh()
|
this.refresh()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
this.toast('操作失败')
|
this.toast(this.$t('common.operationfailed'))
|
||||||
this.refresh()
|
this.refresh()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -222,7 +224,8 @@ export default {
|
|||||||
async _restCoordinate () {
|
async _restCoordinate () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (JSON.stringify(this.obj) === '{}') {
|
if (JSON.stringify(this.obj) === '{}') {
|
||||||
this.toast('请选择坐标')
|
// this.toast('请选择坐标')
|
||||||
|
this.toast(this.$t('vehiclecontrol.toast1'))
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -405,6 +408,9 @@ export default {
|
|||||||
.enClass
|
.enClass
|
||||||
.state_item_label
|
.state_item_label
|
||||||
font-size 26px
|
font-size 26px
|
||||||
|
width 200px
|
||||||
|
.state_item_val
|
||||||
|
width calc(100% - 200px)
|
||||||
.control_label
|
.control_label
|
||||||
font-size 24px
|
font-size 24px
|
||||||
.switch_item
|
.switch_item
|
||||||
|
|||||||
@@ -308,22 +308,26 @@ export default {
|
|||||||
async _updatePass () {
|
async _updatePass () {
|
||||||
this.$refs.child.disabled = true
|
this.$refs.child.disabled = true
|
||||||
if (!this.oldpassword) {
|
if (!this.oldpassword) {
|
||||||
this.toast('旧密码不能为空')
|
// this.toast('旧密码不能为空')
|
||||||
|
this.toast(this.$t('common.toast1'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.newpassword1) {
|
if (!this.newpassword1) {
|
||||||
this.toast('新密码不能为空')
|
// this.toast('新密码不能为空')
|
||||||
|
this.toast(this.$t('common.toast2'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (!this.newpassword2) {
|
if (!this.newpassword2) {
|
||||||
this.toast('输入新密码')
|
// this.toast('输入新密码')
|
||||||
|
this.toast(this.$t('common.toast3'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.newpassword1 !== this.newpassword2) {
|
if (this.newpassword1 !== this.newpassword2) {
|
||||||
this.toast('新密码输入不一致,请重新输入')
|
// this.toast('新密码输入不一致,请重新输入')
|
||||||
|
this.toast(this.$t('common.toast4'))
|
||||||
this.$refs.child.disabled = false
|
this.$refs.child.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user