Compare commits
No commits in common. "d4f1f15491b61100638b8068ad878efad6dadce0" and "8772c16c9b8c097fbb4f92508efb547842d02356" have entirely different histories.
d4f1f15491
...
8772c16c9b
Binary file not shown.
Before Width: | Height: | Size: 522 B |
Binary file not shown.
Before Width: | Height: | Size: 446 B |
|
@ -15,7 +15,7 @@
|
|||
</a-col>
|
||||
<a-button class="search-btn" type="primary" @click="onSearch">
|
||||
<img src="@/assets/images/global/search.png" alt="" />
|
||||
{{$t('m.system.search')}}
|
||||
Search
|
||||
</a-button>
|
||||
<slot name="additional"></slot>
|
||||
</a-row>
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
<template>
|
||||
<div class="user-wrapper" :class="theme">
|
||||
<span class="language" @click="changeLang">
|
||||
<img :src="$i18n.locale=='zh-CN'?langIcon_en:langIcon_zh" alt="">
|
||||
<!-- <img :src=langIcon_zh alt=""> -->
|
||||
</span>
|
||||
<!-- <span @click="changeLang('zh-CN')">zh</span>
|
||||
<span style="margin-left: 10px;" @click="changeLang('en-US')">en</span> -->
|
||||
<header-notice class="action"/>
|
||||
<a-dropdown>
|
||||
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
||||
|
@ -63,15 +57,12 @@
|
|||
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
|
||||
import Vue from 'vue'
|
||||
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
||||
import i18nMixin from '@/store/i18n-mixin'
|
||||
|
||||
export default {
|
||||
name: "UserMenu",
|
||||
mixins: [mixinDevice,i18nMixin],
|
||||
mixins: [mixinDevice],
|
||||
data(){
|
||||
return{
|
||||
langIcon_zh:require('@/assets/images/header/zh.png'),
|
||||
langIcon_en:require('@/assets/images/header/en.png'),
|
||||
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
||||
searchMenuOptions:[],
|
||||
searchMenuComp: 'span',
|
||||
|
@ -99,7 +90,6 @@ import i18nMixin from '@/store/i18n-mixin'
|
|||
this.searchMenuOptions=[...lists]
|
||||
},
|
||||
mounted() {
|
||||
console.log(this.$i18n.locale);
|
||||
//如果是单点登录模式
|
||||
if (process.env.VUE_APP_SSO == 'true') {
|
||||
let depart = this.userInfo().orgCode
|
||||
|
@ -128,11 +118,6 @@ import i18nMixin from '@/store/i18n-mixin'
|
|||
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
|
||||
},
|
||||
methods: {
|
||||
changeLang() {
|
||||
let lang = this.$i18n.locale == "zh-CN" ? "en-US" : "zh-CN"
|
||||
this.$i18n.locale = lang
|
||||
this.setLang(lang)
|
||||
},
|
||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
showClick() {
|
||||
this.searchMenuVisible = true
|
||||
|
@ -251,17 +236,6 @@ import i18nMixin from '@/store/i18n-mixin'
|
|||
}
|
||||
}
|
||||
}
|
||||
.language{
|
||||
display: inline-block;
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
cursor: pointer;
|
||||
margin-right: 5px;
|
||||
img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
/* update-end author:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
|
||||
/* update_end author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
|
||||
</style>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.getItem('APP_LANGUAGE') || 'en-US',
|
||||
//this.$i18n.locale // 通过切换locale的值来实现语言切换
|
||||
messages: {
|
||||
'zh-CN': require('./lang/zh'), // 中文语言包
|
||||
'en-US': require('./lang/en') // 英文语言包
|
||||
}
|
||||
})
|
||||
|
||||
export default i18n
|
|
@ -1,15 +0,0 @@
|
|||
export const m = {
|
||||
common: {
|
||||
search: "Search",
|
||||
},
|
||||
system: {
|
||||
user: "User",
|
||||
name: "Name",
|
||||
role: "Role",
|
||||
search: "Search",
|
||||
add: "Add",
|
||||
edit: "Edit",
|
||||
delete: "Delete",
|
||||
num: "NO"
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
export const m = {
|
||||
common: {
|
||||
search: "搜索",
|
||||
},
|
||||
system: {
|
||||
user: "用户",
|
||||
name: "名称",
|
||||
role: "角色",
|
||||
search: "搜索",
|
||||
add: "添加",
|
||||
edit: "编辑",
|
||||
delete: "删除",
|
||||
num: "序号"
|
||||
}
|
||||
}
|
|
@ -7,7 +7,6 @@ import Storage from 'vue-ls'
|
|||
import router from './router'
|
||||
import store from './store/'
|
||||
import { VueAxios } from "@/utils/request"
|
||||
import i18n from './locales'
|
||||
|
||||
require('@jeecg/antd-online-mini')
|
||||
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
|
||||
|
@ -96,7 +95,6 @@ function main() {
|
|||
new Vue({
|
||||
router,
|
||||
store,
|
||||
i18n,
|
||||
mounted () {
|
||||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
||||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
import { mapState } from 'vuex'
|
||||
|
||||
const i18nMixin = {
|
||||
computed: {
|
||||
...mapState({
|
||||
currentLang: state => state.app.lang
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
setLang (lang) {
|
||||
this.$store.dispatch('setLang', lang)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default i18nMixin
|
|
@ -21,7 +21,6 @@ const app = {
|
|||
device: 'desktop',
|
||||
theme: '',
|
||||
layout: '',
|
||||
lang: 'zh-CN',
|
||||
contentWidth: '',
|
||||
fixedHeader: false,
|
||||
fixSiderbar: false,
|
||||
|
@ -79,19 +78,9 @@ const app = {
|
|||
SET_MULTI_PAGE (state, multipageFlag) {
|
||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
||||
state.multipage = multipageFlag
|
||||
},
|
||||
APP_LANGUAGE: (state, lang, antd = {}) => {
|
||||
state.lang = lang
|
||||
state._antLocale = antd
|
||||
Vue.ls.set("APP_LANGUAGE", lang)
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setLang ({ commit }, lang) {
|
||||
// return new Promise((resolve, reject) => {
|
||||
commit('APP_LANGUAGE', lang)
|
||||
// })
|
||||
},
|
||||
setSidebar: ({ commit }, type) => {
|
||||
commit('SET_SIDEBAR_TYPE', type)
|
||||
},
|
||||
|
|
|
@ -5,16 +5,15 @@
|
|||
<a-space style="float: right" class="btn-group" slot="additional">
|
||||
<a-button @click="handleAdd" type="primary">
|
||||
<img src="@/assets/images/global/add.png" alt="" />
|
||||
<!-- Add -->
|
||||
{{$t('m.system.add')}}
|
||||
Add
|
||||
</a-button>
|
||||
<a-button @click="handleEdit" type="primary">
|
||||
<img src="@/assets/images/global/edit.png" alt="" />
|
||||
{{$t('m.system.edit')}}
|
||||
Edit
|
||||
</a-button>
|
||||
<a-button @click="onDel" type="primary">
|
||||
<img src="@/assets/images/global/delete.png" alt="" />
|
||||
{{$t('m.system.delete')}}
|
||||
Delete
|
||||
</a-button>
|
||||
<a-button @click="handleReset" type="primary">
|
||||
<img src="@/assets/images/global/reset-pwd.png" alt="" />
|
||||
|
@ -267,8 +266,7 @@ export default {
|
|||
return [
|
||||
{
|
||||
type: 'a-input',
|
||||
label: this.$t('m.system.user'),
|
||||
// label: 'User',
|
||||
label: 'User',
|
||||
name: 'username',
|
||||
props: {
|
||||
style: {
|
||||
|
@ -281,7 +279,7 @@ export default {
|
|||
},
|
||||
{
|
||||
type: 'a-input',
|
||||
label: this.$t('m.system.name'),
|
||||
label: 'Name',
|
||||
name: 'realname',
|
||||
props: {
|
||||
style: {
|
||||
|
@ -294,7 +292,7 @@ export default {
|
|||
},
|
||||
{
|
||||
type: 'custom-select',
|
||||
label: this.$t('m.system.role'),
|
||||
label: 'Role',
|
||||
name: 'roleId',
|
||||
props: {
|
||||
options: this.roleOptions,
|
||||
|
|
Loading…
Reference in New Issue
Block a user