feat: i18n与jetcache
This commit is contained in:
@@ -73,6 +73,7 @@
|
||||
"vue-easy-print": "0.0.8",
|
||||
"vue-echarts": "^5.0.0-beta.0",
|
||||
"vue-highlightjs": "^1.3.3",
|
||||
"vue-i18n": "^8.27.0",
|
||||
"vue-image-crop-upload": "^2.5.0",
|
||||
"vue-print-nb": "^1.7.5",
|
||||
"vue-router": "3.0.2",
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<el-breadcrumb class="app-breadcrumb" separator="/">
|
||||
<transition-group name="breadcrumb">
|
||||
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
|
||||
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{ item.meta.title }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
|
||||
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{ $t(item.meta.title) }}</span>
|
||||
<a v-else @click.prevent="handleLink(item)">{{ $t(item.meta.title) }}</a>
|
||||
</el-breadcrumb-item>
|
||||
</transition-group>
|
||||
</el-breadcrumb>
|
||||
@@ -37,7 +37,7 @@ export default {
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/dashboard', meta: { title: '首页' }}].concat(matched)
|
||||
matched = [{ path: '/dashboard', meta: { title: this.$t('menu.home') }}].concat(matched)
|
||||
}
|
||||
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
icon="el-icon-plus"
|
||||
@click="crud.toAdd"
|
||||
>
|
||||
新增
|
||||
{{ $t('common.Create') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.optShow.edit"
|
||||
@@ -24,7 +24,7 @@
|
||||
:disabled="crud.selections.length !== 1"
|
||||
@click="crud.toEdit(crud.selections[0])"
|
||||
>
|
||||
修改
|
||||
{{ $t('common.Update') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.optShow.del"
|
||||
@@ -38,7 +38,7 @@
|
||||
:disabled="crud.selections.length === 0"
|
||||
@click="toDelete(crud.selections)"
|
||||
>
|
||||
删除
|
||||
{{ $t('common.Delete') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="crud.optShow.download"
|
||||
@@ -49,7 +49,7 @@
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
@click="crud.doExport"
|
||||
>导出</el-button>
|
||||
>{{ $t('common.Export') }}</el-button>
|
||||
<!--右侧-->
|
||||
<slot name="right" />
|
||||
</span>
|
||||
@@ -86,7 +86,7 @@
|
||||
:indeterminate="allColumnsSelectedIndeterminate"
|
||||
@change="handleCheckAllChange"
|
||||
>
|
||||
全选
|
||||
{{ $t('common.SelectAll') }}
|
||||
</el-checkbox>
|
||||
<el-checkbox
|
||||
v-for="item in tableColumns"
|
||||
@@ -190,9 +190,9 @@ export default {
|
||||
this.tableColumns = columns
|
||||
},
|
||||
toDelete(datas) {
|
||||
this.$confirm(`确认删除选中的${datas.length}条数据?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('common.Tip1') + ` ${datas.length} ` + this.$t('common.Tip2'), this.$t('common.Tips'), {
|
||||
confirmButtonText: this.$t('common.Confirm'),
|
||||
cancelButtonText: this.$t('common.Cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.crud.delAllLoading = true
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
<el-button v-if="crud.optShow.reset" class="filter-item" size="mini" type="warning" icon="el-icon-refresh-left" @click="crud.resetQuery()">重置</el-button>
|
||||
-->
|
||||
<el-dropdown split-button type="primary" class="filter-item" @click="crud.toQuery">
|
||||
<i class="el-icon-search el-icon--left" />查询
|
||||
<i class="el-icon-search el-icon--left" />{{ $t('common.Query') }}
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item icon="el-icon-zoom-out" @click.native="crud.resetQuery()">重置</el-dropdown-item>
|
||||
<el-dropdown-item icon="el-icon-zoom-out" @click.native="crud.resetQuery()">{{ $t('common.Reset') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button v-if="isVisiableEdit" v-permission="permission.edit" type="text" :loading="crud.status.cu === 2" :disabled="disabledEdit" size="mini" icon="el-icon-edit" @click="crud.toEdit(data)">修改</el-button>
|
||||
<el-button v-if="isVisiableEdit" v-permission="permission.edit" type="text" :loading="crud.status.cu === 2" :disabled="disabledEdit" size="mini" icon="el-icon-edit" @click="crud.toEdit(data)">{{ $t('common.Update') }}</el-button>
|
||||
<el-popover v-model="pop" v-permission="permission.del" placement="top" width="180" trigger="manual" @show="onPopoverShow" @hide="onPopoverHide">
|
||||
<p>{{ msg }}</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="doCancel">取消</el-button>
|
||||
<el-button :loading="crud.dataStatus[crud.getDataId(data)].delete === 2" type="primary" size="mini" @click="crud.doDelete(data)">确定</el-button>
|
||||
<el-button size="mini" type="text" @click="doCancel">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button :loading="crud.dataStatus[crud.getDataId(data)].delete === 2" type="primary" size="mini" @click="crud.doDelete(data)">{{ $t('common.Confirm') }}</el-button>
|
||||
</div>
|
||||
<el-button v-if="isVisiableDel" slot="reference" type="text" :disabled="disabledDle" icon="el-icon-delete" size="mini" @click="toDelete">删除</el-button>
|
||||
<el-button v-if="isVisiableDel" slot="reference" type="text" :disabled="disabledDle" icon="el-icon-delete" size="mini" @click="toDelete">{{ $t('common.Delete') }}</el-button>
|
||||
</el-popover>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { download, initData } from '@/api/data'
|
||||
import { downloadFile, parseTime } from '@/utils/index'
|
||||
import Vue from 'vue'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
/**
|
||||
* CRUD配置
|
||||
@@ -84,7 +85,7 @@ function CRUD(options) {
|
||||
},
|
||||
// 标题
|
||||
get title() {
|
||||
return this.add > CRUD.STATUS.NORMAL ? `新增${crud.title}` : this.edit > CRUD.STATUS.NORMAL ? `编辑${crud.title}` : crud.title
|
||||
return this.add > CRUD.STATUS.NORMAL ? i18n.t('common.Create') + ' ' + i18n.t(`${crud.title}`) : this.edit > CRUD.STATUS.NORMAL ? i18n.t('common.Editors') + ' ' + i18n.t(`${crud.title}`) : crud.title
|
||||
}
|
||||
},
|
||||
msg: {
|
||||
|
||||
31
lms/nladmin-ui/src/i18n/index.js
Normal file
31
lms/nladmin-ui/src/i18n/index.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import locale from 'element-ui/lib/locale'
|
||||
import zh from './langs/zh-CN'
|
||||
import en from './langs/en'
|
||||
import id from './langs/id'
|
||||
import indonesian from './langs/in'
|
||||
Vue.use(VueI18n)
|
||||
const messages = {
|
||||
en: {
|
||||
...en
|
||||
},
|
||||
zh: {
|
||||
...zh
|
||||
},
|
||||
id: {
|
||||
...id
|
||||
},
|
||||
in: {
|
||||
...indonesian
|
||||
}
|
||||
}
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.lang || 'zh',
|
||||
messages,
|
||||
silentTranslationWarn: true, // 解决vue-i18n黄色警告"value of key 'xxx' is not a string"和"cannot translate the value of keypath 'xxx'.use the value of keypath as default",可忽略
|
||||
globalInjection: true, // 全局注入
|
||||
fallbackLocale: 'en'
|
||||
})
|
||||
locale.i18n((key, value) => i18n.t(key, value))
|
||||
export default i18n
|
||||
81
lms/nladmin-ui/src/i18n/langs/en.js
Normal file
81
lms/nladmin-ui/src/i18n/langs/en.js
Normal file
@@ -0,0 +1,81 @@
|
||||
import enLocale from 'element-ui/lib/locale/lang/en'
|
||||
export default {
|
||||
'lang': 'English',
|
||||
'common': {
|
||||
'Personal_center': 'Personal Center',
|
||||
'Layout_setting': 'Layout Setting',
|
||||
'Log_out': 'Log Out',
|
||||
'Personal_information': 'Personal Information',
|
||||
'username': 'UserName',
|
||||
'name': 'Name',
|
||||
'phone': 'Phone Number',
|
||||
'phone2': 'Phone',
|
||||
'sex': 'Sex',
|
||||
'email': 'E-mail',
|
||||
'Security_settings': 'Security Settings',
|
||||
'Change_password': 'Change Password',
|
||||
'User_information': 'User Information',
|
||||
'account': 'Account',
|
||||
'password': 'Password',
|
||||
'verification_code': 'Code',
|
||||
'login_rm': 'Remember Me',
|
||||
'login': 'Login',
|
||||
'login_ing': 'Logging in...',
|
||||
'Create': 'Create',
|
||||
'Update': 'Update',
|
||||
'Delete': 'Delete',
|
||||
'Export': 'Export',
|
||||
'Editors': 'Editor',
|
||||
'SelectAll': 'SelectAll',
|
||||
'Query': 'Query',
|
||||
'Reset': 'Reset',
|
||||
'Confirm': 'Confirm',
|
||||
'Cancel': 'Cancel',
|
||||
'Operate': 'Operate',
|
||||
'Tips': 'Tips',
|
||||
'Tip1': 'Confirm deletion of selected',
|
||||
'Tip2': 'Data?',
|
||||
'Tip3': 'User name not used as login',
|
||||
'Tip4': 'Mobile phone number cannot be duplicate',
|
||||
'loading': 'loading...'
|
||||
},
|
||||
// 菜单
|
||||
'menu': {
|
||||
'home': 'Dashboard'
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': 'WorkOrderCode'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': 'Please enter the code'
|
||||
}
|
||||
},
|
||||
'SysParam': {
|
||||
'table': {
|
||||
'code': 'code',
|
||||
'name': 'name',
|
||||
'values': 'value',
|
||||
'description': 'remark'
|
||||
},
|
||||
'rules': {
|
||||
'NotNull': 'Cannot be empty'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': 'System',
|
||||
'day': 'Running Day',
|
||||
'status': 'Status',
|
||||
'core': 'Core',
|
||||
'cpu': 'CPU Utilization',
|
||||
'memory': 'Memory Utilization',
|
||||
'tality': 'Tality',
|
||||
'used': 'Used',
|
||||
'leisure': 'Leisure',
|
||||
'exchange': 'Exchange Utilization',
|
||||
'disk': 'Disk Utilization',
|
||||
'cpu_monitoring': 'Cpu Utilization Monitoring',
|
||||
'memory_monitoring': 'Memory Utilization Monitoring'
|
||||
},
|
||||
...enLocale
|
||||
}
|
||||
0
lms/nladmin-ui/src/i18n/langs/id.js
Normal file
0
lms/nladmin-ui/src/i18n/langs/id.js
Normal file
81
lms/nladmin-ui/src/i18n/langs/in.js
Normal file
81
lms/nladmin-ui/src/i18n/langs/in.js
Normal file
@@ -0,0 +1,81 @@
|
||||
import idLocale from 'element-ui/lib/locale/lang/id'
|
||||
export default {
|
||||
'lang': 'in',
|
||||
'common': {
|
||||
'Personal_center': 'Pusat Pribadi',
|
||||
'Layout_setting': 'Pengaturan Bentangan',
|
||||
'Log_out': 'Log Out',
|
||||
'Personal_information': 'Informasi Pribadi',
|
||||
'account': 'Akaun',
|
||||
'username': 'Nama Pengguna',
|
||||
'name': 'Nama',
|
||||
'phone': 'Nomor Ponsel',
|
||||
'phone2': 'Ponsel',
|
||||
'sex': 'Gender',
|
||||
'Security_settings': 'Pengaturan Keamanan',
|
||||
'Change_password': 'Ubah kata sandi',
|
||||
'User_information': 'Informasi Pengguna',
|
||||
'email': 'E-mail',
|
||||
'password': 'Sandi',
|
||||
'verification_code': 'Kode',
|
||||
'login_rm': 'Ingat aku',
|
||||
'login': 'Login',
|
||||
'login_ing': 'Daftar masuk',
|
||||
'Create': 'Buat',
|
||||
'Update': 'Kemaskini',
|
||||
'Delete': 'Hapus',
|
||||
'Export': 'Ekspor',
|
||||
'Editors': 'Editor',
|
||||
'SelectAll': 'Pilih Semua',
|
||||
'Query': 'Pertanyaan',
|
||||
'Reset': 'Reset',
|
||||
'Confirm': 'konfirmasi',
|
||||
'Cancel': 'Batalkan',
|
||||
'Operate': 'operasi',
|
||||
'Tips': 'Prompt',
|
||||
'Tip1': 'Konfirmasi Penghapusan Yang Dipilih',
|
||||
'Tip2': 'Data?',
|
||||
'Tip3': 'Nama pengguna tidak digunakan sebagai daftar masuk',
|
||||
'Tip4': 'Nomor telepon ponsel tidak dapat duplikasi',
|
||||
'loading': 'Memuatkan Data...'
|
||||
},
|
||||
// 菜单
|
||||
'menu': {
|
||||
'home': 'rumah' // 首页
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': 'Kode Perintah Kerja'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': 'Silakan masukkan kode perintah kerja'
|
||||
}
|
||||
},
|
||||
'SysParam': {
|
||||
'table': {
|
||||
'code': 'kode',
|
||||
'name': 'nama',
|
||||
'values': 'nilai',
|
||||
'description': 'Catatan'
|
||||
},
|
||||
'rules': {
|
||||
'NotNull': 'Tidak dapat kosong'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': 'Sistem',
|
||||
'day': 'Proyek ini telah berjalan terus menerus',
|
||||
'status': 'Keadaan',
|
||||
'core': 'Inti',
|
||||
'cpu': 'Kadar penggunaan CPU',
|
||||
'memory': 'Kadar penggunaan ingatan',
|
||||
'tality': 'Total',
|
||||
'used': 'Digunakan',
|
||||
'leisure': 'Bebas',
|
||||
'exchange': 'Kadar penggunaan area pertukaran',
|
||||
'disk': 'Kadar penggunaan disk',
|
||||
'cpu_monitoring': 'Monitor penggunaan CPU',
|
||||
'memory_monitoring': 'Monitor penggunaan memori'
|
||||
},
|
||||
...idLocale
|
||||
}
|
||||
88
lms/nladmin-ui/src/i18n/langs/zh-CN.js
Normal file
88
lms/nladmin-ui/src/i18n/langs/zh-CN.js
Normal file
@@ -0,0 +1,88 @@
|
||||
import zhLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
export default {
|
||||
'lang': 'zh',
|
||||
'common': {
|
||||
'Layout_setting': '布局设置',
|
||||
'Personal_center': '个人中心',
|
||||
'Log_out': '退出登录',
|
||||
'Personal_information': '个人信息',
|
||||
'username': '用户姓名',
|
||||
'name': '姓名',
|
||||
'phone': '手机号码',
|
||||
'phone2': '手机号',
|
||||
'sex': '性别',
|
||||
'email': '用户邮箱',
|
||||
'Security_settings': '安全设置',
|
||||
'Change_password': '修改密码',
|
||||
'User_information': '用户资料',
|
||||
'account': '账号',
|
||||
'password': '密码',
|
||||
'verification_code': '验证码',
|
||||
'login_rm': '记住我',
|
||||
'login': '登 录',
|
||||
'login_ing': '登 录 中...',
|
||||
'Create': '新增',
|
||||
'Update': '修改',
|
||||
'Delete': '删除',
|
||||
'Export': '导出',
|
||||
'Editors': '编辑',
|
||||
'SelectAll': '全选',
|
||||
'Query': '查询',
|
||||
'Reset': '重置',
|
||||
'Confirm': '确认',
|
||||
'Cancel': '取消',
|
||||
'Operate': '操作',
|
||||
'Tips': '提示',
|
||||
'Tip1': '确认删除选中的',
|
||||
'Tip2': '条数据?',
|
||||
'Tip3': '用户姓名不作为登录使用',
|
||||
'Tip4': '手机号码不能重复',
|
||||
'loading': '数据加载中...'
|
||||
},
|
||||
// 菜单
|
||||
'menu': {
|
||||
'home': '首页', // 首页
|
||||
'SystemManagement': '系统管理',
|
||||
'SystemParam': '系统参数',
|
||||
'BasicData': '基础数据',
|
||||
'media': '媒体', // 媒体
|
||||
'data': '数据', // 数据
|
||||
'docking': '对接', // 对接
|
||||
'operator': '当前操作账号:' // 当前操作账号
|
||||
},
|
||||
'WorkOrder': {
|
||||
'form': {
|
||||
'WorkOrderCode': '工单编码'
|
||||
},
|
||||
'placeholder': {
|
||||
'WorkOrderCode': '请输入工单编码'
|
||||
}
|
||||
},
|
||||
'SysParam': {
|
||||
'table': {
|
||||
'code': '编码',
|
||||
'name': '名称',
|
||||
'values': '值',
|
||||
'description': '备注'
|
||||
},
|
||||
'rules': {
|
||||
'NotNull': '不能为空'
|
||||
}
|
||||
},
|
||||
'monitor': {
|
||||
'sys': '系统',
|
||||
'day': '项目已不间断运行',
|
||||
'status': '状态',
|
||||
'cpu': 'CPU使用率',
|
||||
'core': '核心',
|
||||
'memory': '内存使用率',
|
||||
'tality': '总量',
|
||||
'used': '已使用',
|
||||
'leisure': '空闲',
|
||||
'exchange': '交换区使用率',
|
||||
'disk': '磁盘使用率',
|
||||
'cpu_monitoring': 'CPU使用率监控',
|
||||
'memory_monitoring': '内存使用率监控'
|
||||
},
|
||||
...zhLocale
|
||||
}
|
||||
@@ -1,27 +1,27 @@
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {};
|
||||
return {}
|
||||
},
|
||||
render() {
|
||||
const { $route: { meta: { link } }, } = this;
|
||||
if ({ link }.link === "") {
|
||||
return "404";
|
||||
const { $route: { meta: { link }}} = this
|
||||
if ({ link }.link === '') {
|
||||
return '404'
|
||||
}
|
||||
let url = { link }.link;
|
||||
const height = document.documentElement.clientHeight - 94.5 + "px";
|
||||
const style = { height: height };
|
||||
const url = { link }.link
|
||||
const height = document.documentElement.clientHeight - 94.5 + 'px'
|
||||
const style = { height: height }
|
||||
|
||||
return (
|
||||
<div style={style}>
|
||||
<iframe
|
||||
src={url}
|
||||
frameborder="no"
|
||||
style="width: 100%; height: 100%"
|
||||
scrolling="auto"
|
||||
frameborder='no'
|
||||
style='width: 100%; height: 100%'
|
||||
scrolling='auto'
|
||||
></iframe>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
};
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
<template>
|
||||
<div class="navbar">
|
||||
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
||||
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
||||
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
||||
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container" />
|
||||
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container" />
|
||||
|
||||
<div class="right-menu">
|
||||
<template v-if="device!=='mobile'">
|
||||
<search id="header-search" class="right-menu-item" />
|
||||
|
||||
<!-- <el-tooltip content="项目文档" effect="dark" placement="bottom">
|
||||
<!-- <el-tooltip content="项目文档" effect="dark" placement="bottom">
|
||||
<Doc class="right-menu-item hover-effect" />
|
||||
</el-tooltip>-->
|
||||
|
||||
<el-tooltip content="全屏缩放" effect="dark" placement="bottom">
|
||||
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>
|
||||
<notice-icon class="right-menu-item"/>
|
||||
<notice-icon-reader ref="noticeIconReader"/>
|
||||
<notice-icon class="right-menu-item" />
|
||||
<notice-icon-reader ref="noticeIconReader" />
|
||||
|
||||
<!-- <el-tooltip content="布局设置" effect="dark" placement="bottom">
|
||||
<!-- <el-tooltip content="布局设置" effect="dark" placement="bottom">
|
||||
<size-select id="size-select" class="right-menu-item hover-effect" />
|
||||
</el-tooltip>-->
|
||||
|
||||
@@ -31,21 +31,31 @@
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<span style="display:block;" @click="show = true">
|
||||
<el-dropdown-item>
|
||||
布局设置
|
||||
{{ $t('common.Layout_setting') }}
|
||||
</el-dropdown-item>
|
||||
</span>
|
||||
<router-link to="/user/center">
|
||||
<el-dropdown-item>
|
||||
个人中心
|
||||
{{ $t('common.Personal_center') }}
|
||||
</el-dropdown-item>
|
||||
</router-link>
|
||||
<span style="display:block;" @click="open">
|
||||
<el-dropdown-item divided>
|
||||
退出登录
|
||||
{{ $t('common.Log_out') }}
|
||||
</el-dropdown-item>
|
||||
</span>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-dropdown class="right-menu-item" style="font-size: 14px" trigger="click" @command="langChange">
|
||||
<span class="el-dropdown-link">
|
||||
{{ language }} <i class="el-icon-caret-bottom" />
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -76,15 +86,17 @@ export default {
|
||||
Doc,
|
||||
TopNav
|
||||
},
|
||||
created() {
|
||||
this.initWebSocket()
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
Avatar: Avatar,
|
||||
dialogVisible: false
|
||||
dialogVisible: false,
|
||||
language: '简体中文'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setLang(localStorage.getItem('lang'))
|
||||
this.initWebSocket()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
@@ -110,6 +122,22 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 中英文切换
|
||||
langChange(command) {
|
||||
this.$i18n.locale = command
|
||||
localStorage.setItem('lang', command)
|
||||
this.setLang(command)
|
||||
location.reload()
|
||||
},
|
||||
setLang(command) {
|
||||
if (command === 'en') {
|
||||
this.language = 'English'
|
||||
} else if (command === 'zh') {
|
||||
this.language = '简体中文'
|
||||
} else if (command === 'in') {
|
||||
this.language = 'Indonesian'
|
||||
}
|
||||
},
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="$t(onlyOneChild.meta.title)" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="$t(item.meta.title)" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
v-for="child in item.children"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
@click.middle.native="closeSelectedTag(tag)"
|
||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
||||
>
|
||||
{{ tag.title }}
|
||||
{{ $t(tag.title) }}
|
||||
<span v-if="!tag.meta.affix" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
|
||||
</router-link>
|
||||
</scroll-pane>
|
||||
|
||||
@@ -47,6 +47,8 @@ import { addDateRange, handleTree, parseTime, resetForm, selectDictLabel, select
|
||||
import { getValueByCode } from '@/views/system/param/param'
|
||||
|
||||
import VueBus from 'vue-bus'
|
||||
// 引入i18
|
||||
import i18n from './i18n'
|
||||
|
||||
LogicFlow.use(Menu)
|
||||
|
||||
@@ -77,11 +79,19 @@ Vue.use(Element, {
|
||||
size: 'mini' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.prototype.$langPre = {
|
||||
computedProp(suffix) {
|
||||
console.log(suffix)
|
||||
return localStorage.getItem('lang') + '_' + suffix
|
||||
}
|
||||
}
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
render: h => h(App)
|
||||
})
|
||||
|
||||
@@ -5,6 +5,7 @@ import 'nprogress/nprogress.css' // progress bar style
|
||||
import { getToken } from '@/utils/auth' // getToken from cookie
|
||||
import { buildMenus } from '@/api/system/menu'
|
||||
import { filterAsyncRouter } from '@/store/modules/permission'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
NProgress.configure({ showSpinner: false })// NProgress Configuration
|
||||
|
||||
@@ -13,7 +14,7 @@ const whiteList = ['/login', '/expand']// no redirect whitelist
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
// document.title = to.meta.title + ' - ' + Config.title
|
||||
document.title = to.meta.title
|
||||
document.title = i18n.t(to.meta.title)
|
||||
}
|
||||
NProgress.start()
|
||||
if (getToken()) {
|
||||
@@ -58,7 +59,6 @@ export const loadMenus = (next, to) => {
|
||||
const sidebarRoutes = filterAsyncRouter(sdata)
|
||||
const rewriteRoutes = filterAsyncRouter(rdata, false, true)
|
||||
rewriteRoutes.push({ path: '*', redirect: '/404', hidden: true })
|
||||
|
||||
store.dispatch('GenerateRoutes', rewriteRoutes).then(() => { // 存储路由
|
||||
router.addRoutes(rewriteRoutes) // 动态添加可访问路由表
|
||||
next({ ...to, replace: true })
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Layout from '../layout/index'
|
||||
import i18n from '@/i18n'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
@@ -41,7 +42,8 @@ export const constantRouterMap = [
|
||||
path: 'dashboard',
|
||||
component: (resolve) => require(['@/views/monitor/server/index'], resolve),
|
||||
name: 'Dashboard',
|
||||
meta: { title: '首页', icon: 'index', affix: true, noCache: true }
|
||||
meta: { title: i18n.t('menu.home'), icon: 'index', affix: true, noCache: true }
|
||||
// meta: { title: '首页', icon: 'index', affix: true, noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -54,8 +56,8 @@ export const constantRouterMap = [
|
||||
{
|
||||
path: 'center',
|
||||
component: (resolve) => require(['@/views/system/user/center'], resolve),
|
||||
name: '个人中心',
|
||||
meta: { title: '个人中心' }
|
||||
name: i18n.t('common.Personal_center'),
|
||||
meta: { title: i18n.t('common.Personal_center') }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -18,10 +18,12 @@ const service = axios.create({
|
||||
// request拦截器
|
||||
service.interceptors.request.use(
|
||||
config => {
|
||||
const lang = localStorage.getItem('lang')
|
||||
if (getToken()) {
|
||||
config.headers['Authorization'] = getToken() ? 'Bearer ' + getToken() : undefined // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
config.headers['Content-Type'] = 'application/json'
|
||||
config.headers['Accept-Language'] = lang
|
||||
return config
|
||||
},
|
||||
error => {
|
||||
|
||||
@@ -4,30 +4,46 @@
|
||||
<h3 class="title">
|
||||
{{ title }}</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" :placeholder="$t('common.account')">
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码" @keyup.enter.native="handleLogin">
|
||||
<el-input v-model="loginForm.password" type="password" auto-complete="off" :placeholder="$t('common.password')" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" placeholder="验证码" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||
<el-input v-model="loginForm.code" auto-complete="off" :placeholder="$t('common.verification_code')" style="width: 63%" @keyup.enter.native="handleLogin">
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode">
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">
|
||||
记住我
|
||||
</el-checkbox>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0 0 25px 0;">
|
||||
{{ $t('common.login_rm') }}
|
||||
</el-checkbox>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-dropdown style="display: flex; justify-content: right; color: #409EFF;" trigger="click" @command="langChange">
|
||||
<span class="el-dropdown-link">
|
||||
{{ language }}
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item divided command="zh">简体中文</el-dropdown-item>
|
||||
<el-dropdown-item divided command="en">English</el-dropdown-item>
|
||||
<el-dropdown-item divided command="in">Indonesian</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
<span v-if="!loading">{{ $t('common.login') }}</span>
|
||||
<span v-else>{{ $t('common.login_ing') }}</span>
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -50,6 +66,7 @@ export default {
|
||||
name: 'Login',
|
||||
data() {
|
||||
return {
|
||||
language: '简体中文',
|
||||
title: '诺力开发平台',
|
||||
title_param: 'platform',
|
||||
Background: Background,
|
||||
@@ -80,6 +97,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.setLang(localStorage.getItem('lang'))
|
||||
this.getValueByCode(this.title_param).then(res => {
|
||||
this.title = res.value
|
||||
})
|
||||
@@ -91,6 +109,22 @@ export default {
|
||||
this.point()
|
||||
},
|
||||
methods: {
|
||||
// 中英文切换
|
||||
langChange(command) {
|
||||
this.$i18n.locale = command
|
||||
localStorage.setItem('lang', command)
|
||||
this.setLang(command)
|
||||
location.reload()
|
||||
},
|
||||
setLang(command) {
|
||||
if (command === 'en') {
|
||||
this.language = 'English'
|
||||
} else if (command === 'zh') {
|
||||
this.language = '简体中文'
|
||||
} else if (command === 'in') {
|
||||
this.language = 'Indonesian'
|
||||
}
|
||||
},
|
||||
getCode() {
|
||||
getCodeImg().then(res => {
|
||||
this.codeUrl = res.img
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<template>
|
||||
<div v-loading="!show" element-loading-text="数据加载中..." :style="!show ? 'height: 500px' : 'height: 100%'" class="app-container">
|
||||
<div v-loading="!show" :element-loading-text="$t('common.loading')" :style="!show ? 'height: 500px' : 'height: 100%'" class="app-container">
|
||||
<div v-if="show">
|
||||
<el-card class="box-card">
|
||||
<div style="color: #666;font-size: 13px;">
|
||||
<svg-icon icon-class="system" style="margin-right: 5px" />
|
||||
<span>
|
||||
系统:{{ data.sys.os }}
|
||||
{{ $t('monitor.sys') }}:{{ data.sys.os }}
|
||||
</span>
|
||||
<span>
|
||||
IP:{{ data.sys.ip }}
|
||||
</span>
|
||||
<span>
|
||||
项目已不间断运行:{{ data.sys.day }}
|
||||
{{ $t('monitor.day') }}:{{ data.sys.day }}
|
||||
</span>
|
||||
<i class="el-icon-refresh" style="margin-left: 40px" @click="init" />
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">状态</span>
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">{{ $t('monitor.status') }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" style="margin-bottom: 10px">
|
||||
<div class="title">CPU使用率</div>
|
||||
<div class="title">{{ $t('monitor.cpu') }}</div>
|
||||
<el-tooltip placement="top-end">
|
||||
<div slot="content" style="font-size: 12px;">
|
||||
<div style="padding: 3px;">
|
||||
@@ -42,20 +42,20 @@
|
||||
<el-progress type="dashboard" :percentage="parseFloat(data.cpu.used)" />
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<div class="footer">{{ data.cpu.coreNumber }} 核心</div>
|
||||
<div class="footer">{{ data.cpu.coreNumber }} {{ $t('monitor.core') }}</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" style="margin-bottom: 10px">
|
||||
<div class="title">内存使用率</div>
|
||||
<div class="title">{{ $t('monitor.memory') }}</div>
|
||||
<el-tooltip placement="top-end">
|
||||
<div slot="content" style="font-size: 12px;">
|
||||
<div style="padding: 3px;">
|
||||
总量:{{ data.memory.total }}
|
||||
{{ $t('monitor.tality') }}:{{ data.memory.total }}
|
||||
</div>
|
||||
<div style="padding: 3px">
|
||||
已使用:{{ data.memory.used }}
|
||||
{{ $t('monitor.used') }}:{{ data.memory.used }}
|
||||
</div>
|
||||
<div style="padding: 3px">
|
||||
空闲:{{ data.memory.available }}
|
||||
{{ $t('monitor.leisure') }}:{{ data.memory.available }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -65,17 +65,17 @@
|
||||
<div class="footer">{{ data.memory.used }} / {{ data.memory.total }}</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" style="margin-bottom: 10px">
|
||||
<div class="title">交换区使用率</div>
|
||||
<div class="title">{{ $t('monitor.exchange') }}</div>
|
||||
<el-tooltip placement="top-end">
|
||||
<div slot="content" style="font-size: 12px;">
|
||||
<div style="padding: 3px;">
|
||||
总量:{{ data.swap.total }}
|
||||
{{ $t('monitor.tality') }}:{{ data.swap.total }}
|
||||
</div>
|
||||
<div style="padding: 3px">
|
||||
已使用:{{ data.swap.used }}
|
||||
{{ $t('monitor.used') }}:{{ data.swap.used }}
|
||||
</div>
|
||||
<div style="padding: 3px">
|
||||
空闲:{{ data.swap.available }}
|
||||
{{ $t('monitor.leisure') }}:{{ data.swap.available }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -85,15 +85,15 @@
|
||||
<div class="footer">{{ data.swap.used }} / {{ data.swap.total }}</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="6" :lg="6" :xl="6" style="margin-bottom: 10px">
|
||||
<div class="title">磁盘使用率</div>
|
||||
<div class="title">{{ $t('monitor.disk') }}</div>
|
||||
<div class="content">
|
||||
<el-tooltip placement="top-end">
|
||||
<div slot="content" style="font-size: 12px;">
|
||||
<div style="padding: 3px">
|
||||
总量:{{ data.disk.total }}
|
||||
{{ $t('monitor.tality') }}:{{ data.disk.total }}
|
||||
</div>
|
||||
<div style="padding: 3px">
|
||||
空闲:{{ data.disk.available }}
|
||||
{{ $t('monitor.leisure') }}:{{ data.disk.available }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
@@ -111,7 +111,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 10px">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">CPU使用率监控</span>
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">{{ $t('monitor.cpu_monitoring') }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<v-chart :options="cpuInfo" />
|
||||
@@ -121,7 +121,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" style="margin-bottom: 10px">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">内存使用率监控</span>
|
||||
<span style="font-weight: bold;color: #666;font-size: 15px">{{ $t('monitor.memory_monitoring') }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<v-chart :options="memoryInfo" />
|
||||
|
||||
@@ -13,22 +13,22 @@
|
||||
width="500px"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-form-item label="编码" prop="code">
|
||||
<el-form-item :label="$t('SysParam.table.code')" prop="code">
|
||||
<el-input v-model="form.code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="名字" prop="name">
|
||||
<el-form-item :label="$t('SysParam.table.name')" prop="name">
|
||||
<el-input v-model="form.name" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="值" prop="value">
|
||||
<el-form-item :label="$t('SysParam.table.values')" prop="value">
|
||||
<el-input v-model="form.value" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="description">
|
||||
<el-form-item :label="$t('SysParam.table.description')" prop="description">
|
||||
<el-input v-model="form.remark" style="width: 380px;" rows="5" type="textarea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
<el-button type="text" @click="crud.cancelCU">{{ $t('common.Cancel') }}</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">{{ $t('common.Confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--表格渲染-->
|
||||
@@ -42,11 +42,11 @@
|
||||
>
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column v-if="false" prop="id" label="id" />
|
||||
<el-table-column prop="code" label="编码" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column prop="name" label="名称" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="value" label="值" min-width="270" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" label="备注" />
|
||||
<el-table-column v-permission="['admin','param:edit','param:del']" label="操作" width="150px" align="center">
|
||||
<el-table-column prop="code" :label="$t('SysParam.table.code')" min-width="130" show-overflow-tooltip />
|
||||
<el-table-column :prop="$langPre.computedProp('name')" :label="$t('SysParam.table.name')" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="value" :label="$t('SysParam.table.values')" min-width="270" show-overflow-tooltip />
|
||||
<el-table-column prop="remark" :label="$t('SysParam.table.description')" />
|
||||
<el-table-column v-permission="['admin','param:edit','param:del']" :label="$t('common.Operate')" width="150px" align="center">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '系统参数', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
|
||||
return CRUD({ title: 'menu.SystemParam', url: 'api/param', idField: 'id', sort: 'id,desc', crudMethod: { ...crudParam },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: true,
|
||||
@@ -102,23 +102,27 @@ export default {
|
||||
|
||||
rules: {
|
||||
id: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }
|
||||
],
|
||||
value: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
],
|
||||
create_time: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('SysParam.rules.NotNull'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
// computed: {
|
||||
// computedProp() {
|
||||
// // 在计算属性中拼接属性名
|
||||
// console.log(localStorage.getItem('lang'))
|
||||
// return localStorage.getItem('lang') + '_name'
|
||||
// }
|
||||
// },
|
||||
created() {
|
||||
// this.webSocket()
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<el-col :xs="24" :sm="24" :md="8" :lg="6" :xl="5" style="margin-bottom: 10px">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>个人信息</span>
|
||||
<span>{{ $t('common.Personal_information') }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<div style="text-align: center">
|
||||
@@ -19,15 +19,15 @@
|
||||
</div>
|
||||
</div>
|
||||
<ul class="user-info">
|
||||
<li><div style="height: 100%"><svg-icon icon-class="login" /> 登录账号<div class="user-right">{{ user.username }}</div></div></li>
|
||||
<li><svg-icon icon-class="user1" /> 用户姓名 <div class="user-right">{{ user.person_name }}</div></li>
|
||||
<li><div style="height: 100%"><svg-icon icon-class="login" /> {{ $t('common.account') }}<div class="user-right">{{ user.username }}</div></div></li>
|
||||
<li><svg-icon icon-class="user1" /> {{ $t('common.username') }} <div class="user-right">{{ user.person_name }}</div></li>
|
||||
<!-- <li><svg-icon icon-class="dept" /> 所属部门 <div class="user-right"> {{ user.dept.name }}</div></li>-->
|
||||
<li><svg-icon icon-class="phone" /> 手机号码 <div class="user-right">{{ user.phone }}</div></li>
|
||||
<li><svg-icon icon-class="email" /> 用户邮箱 <div class="user-right">{{ user.email }}</div></li>
|
||||
<li><svg-icon icon-class="phone" /> {{ $t('common.phone') }} <div class="user-right">{{ user.phone }}</div></li>
|
||||
<li><svg-icon icon-class="email" /> {{ $t('common.email') }} <div class="user-right">{{ user.email }}</div></li>
|
||||
<li>
|
||||
<svg-icon icon-class="anq" /> 安全设置
|
||||
<svg-icon icon-class="anq" /> {{ $t('common.Security_settings') }}
|
||||
<div class="user-right">
|
||||
<a @click="$refs.pass.dialog = true">修改密码</a>
|
||||
<a @click="$refs.pass.dialog = true">{{ $t('common.Change_password') }}</a>
|
||||
<!-- <a @click="$refs.email.dialog = true">修改邮箱</a>-->
|
||||
</div>
|
||||
</li>
|
||||
@@ -39,17 +39,17 @@
|
||||
<!-- 用户资料 -->
|
||||
<el-card class="box-card">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户资料" name="first">
|
||||
<el-tab-pane :label="$t('common.User_information')" name="first">
|
||||
<el-form ref="form" :model="form" :rules="rules" style="margin-top: 10px;" size="mini" label-width="65px">
|
||||
<el-form-item label="姓名" prop="person_name">
|
||||
<el-form-item :label="$t('common.name')" prop="person_name">
|
||||
<el-input v-model="form.person_name" style="width: 35%" />
|
||||
<span style="color: #C0C0C0;margin-left: 10px;">用户姓名不作为登录使用</span>
|
||||
<span style="color: #C0C0C0;margin-left: 10px;">{{ $t('common.Tip3') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-form-item :label="$t('common.phone2')" prop="phone">
|
||||
<el-input v-model="form.phone" style="width: 35%;" />
|
||||
<span style="color: #C0C0C0;margin-left: 10px;">手机号码不能重复</span>
|
||||
<span style="color: #C0C0C0;margin-left: 10px;">{{ $t('common.Tip4') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别">
|
||||
<el-form-item :label="$t('common.sex')">
|
||||
<el-radio-group v-model="form.gender" style="width: 178px">
|
||||
<el-radio label="男">男</el-radio>
|
||||
<el-radio label="女">女</el-radio>
|
||||
|
||||
@@ -8,14 +8,13 @@
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="80px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="工单编号">
|
||||
<el-form-item :label="$t('WorkOrder.form.WorkOrderCode')">
|
||||
<el-input
|
||||
v-model="query.workorder_code"
|
||||
clearable
|
||||
placeholder="工单编号"
|
||||
:placeholder="$t('WorkOrder.placeholder.WorkOrderCode')"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user