国际化
This commit is contained in:
@@ -17,7 +17,7 @@ module.exports = {
|
||||
tasknum: '任 务 数 量',
|
||||
speed: '当 前 速 度',
|
||||
error: 'AGV 故 障',
|
||||
index: '首页'
|
||||
index: '主页'
|
||||
},
|
||||
carrypoint: {
|
||||
topinfo: '搬运起点',
|
||||
|
||||
@@ -15,10 +15,10 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
nav: [
|
||||
{title: '操作', zh_title: '操作', en_title: 'Task', router: '/index/device'},
|
||||
{title: '建图', zh_title: '建图', en_title: 'Fault', router: ''},
|
||||
{title: '取消任务', zh_title: '取消任务', en_title: 'Teach', router: ''},
|
||||
{title: '地图', zh_title: '地图', en_title: 'Teach', router: ''}
|
||||
{title: '操作', zh_title: '操作', en_title: 'Operation', router: '/index/device'},
|
||||
{title: '建图', zh_title: '建图', en_title: 'Map building', router: ''},
|
||||
{title: '取消任务', zh_title: '取消任务', en_title: 'Cancel task', router: ''},
|
||||
{title: '地图', zh_title: '地图', en_title: 'Map', router: ''}
|
||||
],
|
||||
disabled: false
|
||||
}
|
||||
@@ -99,4 +99,8 @@ export default {
|
||||
.nav_item_4
|
||||
.nav_icon
|
||||
background #80372D center center / 70% auto url(../../images/new/RF4.png) no-repeat
|
||||
.enClass
|
||||
.nav_item_i
|
||||
p
|
||||
font-size 0.24rem
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="zbox relative body-container" :class="{'enClass': selectType === 'en-us'}">
|
||||
<div class="zbox relative body-container" :class="{'enClass': $i18n.locale === 'en-us'}">
|
||||
<div class="absolute login-header">
|
||||
<div class="zbox relative login_logo"></div>
|
||||
</div>
|
||||
@@ -72,7 +72,6 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
selectType: '',
|
||||
tab: 0,
|
||||
username: this.$store.getters.defaultUsername,
|
||||
password: this.$store.getters.defaultPassword,
|
||||
@@ -88,14 +87,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.$store.dispatch('materObj', {})
|
||||
if (this.$i18n.locale === 'zh-cn') {
|
||||
this.selectType = 'zh-cn'
|
||||
} else if (this.$i18n.locale === 'en-us') {
|
||||
this.selectType = 'en-us'
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
// 点对点项目分辨率 1024 * 768
|
||||
// alert(document.body.clientWidth, 'a')
|
||||
|
||||
@@ -51,9 +51,9 @@ export default {
|
||||
]
|
||||
},
|
||||
languages: [
|
||||
{label: '中文', value: 'zh'},
|
||||
{label: 'English', value: 'en'},
|
||||
{label: 'Español', value: 'es'}
|
||||
{label: '中文', value: 'zh-cn'},
|
||||
{label: 'English', value: 'en-us'}
|
||||
// {label: 'Español', value: 'es'}
|
||||
],
|
||||
visible: false,
|
||||
layout: 'normal',
|
||||
@@ -66,6 +66,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
if (this.$i18n.locale === 'zh-cn') {
|
||||
this.dataForm.selectedLanguage = 'zh-cn'
|
||||
} else if (this.$i18n.locale === 'en-us') {
|
||||
this.dataForm.selectedLanguage = 'en-us'
|
||||
}
|
||||
this.dialogVisible = true
|
||||
},
|
||||
exitUser () {
|
||||
@@ -75,6 +80,8 @@ export default {
|
||||
dataFormSubmit () {
|
||||
this.dialogVisible = false
|
||||
this.visible = false
|
||||
this.$i18n.locale = this.dataForm.selectedLanguage
|
||||
window.localStorage.setItem('locale', this.dataForm.selectedLanguage)
|
||||
},
|
||||
handleClose (done) {
|
||||
this.visible = false
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<template>
|
||||
<div class="zbox body-container" :class="{'enClass': selectType === 'en-us'}">
|
||||
<div class="zbox body-container" :class="{'enClass': $i18n.locale === 'en-us'}">
|
||||
<el-row type="flex" class="header-container" justify="space-between" align="middle">
|
||||
<el-col :span="3">
|
||||
<el-button type="primary" icon="el-icon-s-home" class="button-home" @click="$router.push('/index/home')">主页</el-button>
|
||||
<el-button type="primary" icon="el-icon-s-home" class="button-home" @click="$router.push('/index/home')">{{ $t('homeinfo.index') }}</el-button>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-row type="flex" justify="end" align="middle">
|
||||
<div class="state-item">自动模式</div>
|
||||
<div class="state-item">执行中</div>
|
||||
<div class="relative elec-qty-wrap elec-wraning">
|
||||
<div class="absolute elec-qty" style="width: 62%"></div>
|
||||
<div class="relative elec-qty-wrap">
|
||||
<div class="absolute elec-qty" style="width: 50%"></div>
|
||||
<div class="absolute elec-qty-border"></div>
|
||||
<div class="elec-txt">38%</div>
|
||||
<div class="elec-txt">50%</div>
|
||||
</div>
|
||||
<i class="el-icon-user-solid icon-user" :style="{'color': isUsed ? '#00ff29' : '#737f92'}" @click="loginModalHandle"></i>
|
||||
<i class="el-icon-s-tools icon-tools" @click="configModalHandle"></i>
|
||||
@@ -52,13 +52,6 @@ export default {
|
||||
configVisible: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (this.$i18n.locale === 'zh-cn') {
|
||||
this.selectType = 'zh-cn'
|
||||
} else if (this.$i18n.locale === 'en-us') {
|
||||
this.selectType = 'en-us'
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.checkTextOverflow()
|
||||
window.addEventListener('resize', this.checkTextOverflow)
|
||||
|
||||
@@ -123,6 +123,8 @@
|
||||
.el-select-dropdown__item
|
||||
padding 0 0.1rem
|
||||
color #fff
|
||||
.el-select-dropdown__item.hover, .el-select-dropdown__item:hover
|
||||
background-color #2D58B8
|
||||
.el-table, .el-table tr
|
||||
background-color transparent
|
||||
.el-table th
|
||||
|
||||
Reference in New Issue
Block a user