Compare commits
No commits in common. "32d8f2e5fb1517cf0e94c3534e57a5e16e675bd5" and "b724a835e5f7786d3a4df9e425412db176d10c17" have entirely different histories.
32d8f2e5fb
...
b724a835e5
@ -32,7 +32,6 @@
|
||||
"sockjs-client": "^1.5.1",
|
||||
"stompjs": "^2.3.3",
|
||||
"vue": "^2.6.11",
|
||||
"vue-i18n": "^8.28.2",
|
||||
"vue-router": "^3.1.5",
|
||||
"vuex": "^3.1.2",
|
||||
"vuex-persistedstate": "^4.1.0"
|
||||
|
||||
@ -1,29 +0,0 @@
|
||||
// English translations
|
||||
export default {
|
||||
app: {
|
||||
title: 'Skyeye Twin System',
|
||||
},
|
||||
header: {
|
||||
login: 'Login',
|
||||
logout: 'Logout',
|
||||
},
|
||||
login: {
|
||||
username: 'Please enter username',
|
||||
password: 'Please enter password',
|
||||
title: 'Login',
|
||||
submit: 'Log In',
|
||||
validation: {
|
||||
required: 'Cannot be empty',
|
||||
passwordMin: 'Password must be at least 6 characters',
|
||||
},
|
||||
},
|
||||
common: {
|
||||
capsLockOn: 'Caps lock is On',
|
||||
},
|
||||
menu: {
|
||||
device: 'Device Management',
|
||||
task: 'Task Management',
|
||||
picture: 'Picture Management',
|
||||
user: 'User Management'
|
||||
}
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import zh from './zh';
|
||||
import en from './en';
|
||||
Vue.use(VueI18n)
|
||||
|
||||
// load locale messages
|
||||
const messages = {
|
||||
zh,
|
||||
en,
|
||||
}
|
||||
|
||||
const locale = localStorage.getItem('locale') || 'zh'
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale,
|
||||
fallbackLocale: 'zh',
|
||||
messages,
|
||||
})
|
||||
|
||||
export default i18n
|
||||
@ -1,29 +0,0 @@
|
||||
// Chinese translations
|
||||
export default {
|
||||
app: {
|
||||
title: '空域快视系统',
|
||||
},
|
||||
header: {
|
||||
login: '登录',
|
||||
logout: '退出登录',
|
||||
},
|
||||
login: {
|
||||
username: '请输入用户名',
|
||||
password: '请输入用户密码',
|
||||
title: '登录',
|
||||
submit: '登 录',
|
||||
validation: {
|
||||
required: '不能为空',
|
||||
passwordMin: '密码不少于6位字符',
|
||||
},
|
||||
},
|
||||
common: {
|
||||
capsLockOn: '大写锁定已打开',
|
||||
},
|
||||
menu: {
|
||||
device: '设备管理',
|
||||
task: '任务管理',
|
||||
picture: '图片管理',
|
||||
user: '用户管理'
|
||||
}
|
||||
}
|
||||
@ -18,7 +18,7 @@ export default {
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (value.length < 6) {
|
||||
callback(new Error(this.$t('login.validation.passwordMin')))
|
||||
callback(new Error('密码不少于6位字符'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
loginRules: {
|
||||
username: [
|
||||
// { required: true, trigger: 'blur', validator: validateUsername }
|
||||
{ required: true, message: this.$t('login.username'), trigger: 'blur' }
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: 'blur', validator: validatePassword }
|
||||
@ -67,22 +67,22 @@ export default {
|
||||
activeIndex: '1',
|
||||
menus: [
|
||||
{
|
||||
key: 'device',
|
||||
label: "设备管理",
|
||||
value: '2',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
key: 'task',
|
||||
label: "任务管理",
|
||||
value: '3',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
key: 'picture',
|
||||
label: "图片管理",
|
||||
value: '4',
|
||||
show: true
|
||||
},
|
||||
{
|
||||
key: 'user',
|
||||
label: "用户管理",
|
||||
value: '5',
|
||||
show: true
|
||||
},
|
||||
@ -175,10 +175,6 @@ export default {
|
||||
handleSelect(key) {
|
||||
this.SET_MENUS_CHOSE(key)
|
||||
},
|
||||
changeLocale(lang) {
|
||||
this.$i18n.locale = lang
|
||||
localStorage.setItem('locale', lang)
|
||||
},
|
||||
goHome() {
|
||||
this.SET_MENUS_CHOSE('1')
|
||||
},
|
||||
|
||||
@ -25,7 +25,7 @@ $light_gray: #eee;
|
||||
align-items: center;
|
||||
|
||||
.logo {
|
||||
width: 350px;
|
||||
width: 250px;
|
||||
height: 32px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
@ -129,7 +129,7 @@ $light_gray: #eee;
|
||||
}
|
||||
|
||||
.header-nav-r {
|
||||
width: 350px;
|
||||
width: 250px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="logo" @click="goHome">
|
||||
<img src="@/assets/img/common/logo3.png" alt />
|
||||
<!--span :class="tokenKey">灵动孪生智控系统</span-->
|
||||
<span :class="tokenKey">{{ $t('app.title') }}</span>
|
||||
<span :class="tokenKey">空域快视系统</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-nav-c">
|
||||
@ -19,17 +19,14 @@
|
||||
v-if="item.show"
|
||||
:index="item.value"
|
||||
:key="item.value"
|
||||
>{{ $t('menu.' + item.key) }}</el-menu-item
|
||||
>{{ item.label }}</el-menu-item
|
||||
>
|
||||
</template>
|
||||
</el-menu>
|
||||
</div>
|
||||
<ul class="header-nav-r">
|
||||
<!-- <li class="lang-select">
|
||||
<a @click.prevent="changeLocale('zh')">中文</a> | <a @click.prevent="changeLocale('en')">EN</a>
|
||||
</li> -->
|
||||
<li v-if="roleIdsLocale.indexOf(2) !== -1">
|
||||
<span class="user-login" @click="showLogin">{{ $t('header.login') }}</span>
|
||||
<span class="user-login" @click="showLogin">登录</span>
|
||||
</li>
|
||||
<li v-if="roleIdsLocale.indexOf(2) === -1">
|
||||
<span class="user-photo">
|
||||
@ -45,14 +42,14 @@
|
||||
<!-- <el-dropdown-item command="modifyPassword"
|
||||
>修改密码</el-dropdown-item
|
||||
> -->
|
||||
<el-dropdown-item command="logout">{{ $t('header.logout') }}</el-dropdown-item>
|
||||
<el-dropdown-item command="logout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<dt-dialog
|
||||
:title="$t('header.login')"
|
||||
title="登录"
|
||||
:visible.sync="visible.login"
|
||||
top="20vh"
|
||||
width="22%"
|
||||
@ -73,7 +70,7 @@
|
||||
class="username"
|
||||
clearable
|
||||
v-model="loginForm.username"
|
||||
:placeholder="$t('login.username')"
|
||||
placeholder="请输入用户名"
|
||||
name="username"
|
||||
type="text"
|
||||
size="mini"
|
||||
@ -85,7 +82,7 @@
|
||||
|
||||
<el-tooltip
|
||||
v-model="capsTooltip"
|
||||
:content="$t('common.capsLockOn')"
|
||||
content="Caps lock is On"
|
||||
placement="right"
|
||||
manual
|
||||
>
|
||||
@ -96,7 +93,7 @@
|
||||
class="password"
|
||||
v-model="loginForm.password"
|
||||
:type="passwordType"
|
||||
:placeholder="$t('login.password')"
|
||||
placeholder="请输入用户密码"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
size="mini"
|
||||
@ -125,7 +122,8 @@
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
@click.native.prevent="handleLogin"
|
||||
>{{ $t('login.submit') }}</el-button>
|
||||
>登 录</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</dt-dialog>
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import appLoader from './App.Loader';
|
||||
import i18n from '@/lang/index';
|
||||
(async () => {
|
||||
await appLoader.install()
|
||||
Promise.all([
|
||||
@ -18,7 +17,6 @@ import i18n from '@/lang/index';
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
render: h => h(App)
|
||||
})
|
||||
})
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
label-position="left"
|
||||
>
|
||||
<div class="title-container">
|
||||
<h3 class="title">{{ $t('login.title') }}</h3>
|
||||
<h3 class="title">登录</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="username">
|
||||
@ -25,7 +25,7 @@
|
||||
ref="username"
|
||||
class="username"
|
||||
v-model="loginForm.username"
|
||||
:placeholder="$t('login.username')"
|
||||
placeholder="请输入用户名"
|
||||
name="username"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
@ -36,7 +36,7 @@
|
||||
|
||||
<el-tooltip
|
||||
v-model="capsTooltip"
|
||||
:content="$t('common.capsLockOn')"
|
||||
content="Caps lock is On"
|
||||
placement="right"
|
||||
manual
|
||||
>
|
||||
@ -52,7 +52,7 @@
|
||||
class="password"
|
||||
v-model="loginForm.password"
|
||||
:type="passwordType"
|
||||
:placeholder="$t('login.password')"
|
||||
placeholder="请输入用户密码"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
autocomplete="on"
|
||||
@ -77,7 +77,7 @@
|
||||
type="primary"
|
||||
round
|
||||
@click.native.prevent="handleLogin"
|
||||
>{{ $t('login.submit') }}</el-button
|
||||
>登 录</el-button
|
||||
>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (value.length < 6) {
|
||||
callback(new Error(this.$t('login.validation.passwordMin')))
|
||||
callback(new Error('密码不少于6位字符'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
],
|
||||
password: [
|
||||
// { required: true, trigger: 'blur', validator: validatePassword }
|
||||
{ required: true, trigger: 'blur', message: this.$t('login.validation.required') },
|
||||
{ required: true, trigger: 'blur', message: '请输入密码' },
|
||||
],
|
||||
},
|
||||
passwordType: 'password',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user