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-col>
|
||||||
<a-button class="search-btn" type="primary" @click="onSearch">
|
<a-button class="search-btn" type="primary" @click="onSearch">
|
||||||
<img src="@/assets/images/global/search.png" alt="" />
|
<img src="@/assets/images/global/search.png" alt="" />
|
||||||
{{$t('m.system.search')}}
|
Search
|
||||||
</a-button>
|
</a-button>
|
||||||
<slot name="additional"></slot>
|
<slot name="additional"></slot>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
|
@ -1,11 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="user-wrapper" :class="theme">
|
<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"/>
|
<header-notice class="action"/>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
<span class="action action-full ant-dropdown-link user-dropdown-menu">
|
||||||
|
@ -62,16 +56,13 @@
|
||||||
import { mixinDevice } from '@/utils/mixin.js'
|
import { mixinDevice } from '@/utils/mixin.js'
|
||||||
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
|
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
||||||
import i18nMixin from '@/store/i18n-mixin'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserMenu",
|
name: "UserMenu",
|
||||||
mixins: [mixinDevice,i18nMixin],
|
mixins: [mixinDevice],
|
||||||
data(){
|
data(){
|
||||||
return {
|
return{
|
||||||
langIcon_zh:require('@/assets/images/header/zh.png'),
|
|
||||||
langIcon_en:require('@/assets/images/header/en.png'),
|
|
||||||
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
// update-begin author:sunjianlei date:20200219 for: 头部菜单搜索规范命名 --------------
|
||||||
searchMenuOptions:[],
|
searchMenuOptions:[],
|
||||||
searchMenuComp: 'span',
|
searchMenuComp: 'span',
|
||||||
|
@ -96,10 +87,9 @@ import i18nMixin from '@/store/i18n-mixin'
|
||||||
created() {
|
created() {
|
||||||
let lists = []
|
let lists = []
|
||||||
this.searchMenus(lists,this.permissionMenuList)
|
this.searchMenus(lists,this.permissionMenuList)
|
||||||
this.searchMenuOptions = [...lists]
|
this.searchMenuOptions=[...lists]
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log(this.$i18n.locale);
|
|
||||||
//如果是单点登录模式
|
//如果是单点登录模式
|
||||||
if (process.env.VUE_APP_SSO == 'true') {
|
if (process.env.VUE_APP_SSO == 'true') {
|
||||||
let depart = this.userInfo().orgCode
|
let depart = this.userInfo().orgCode
|
||||||
|
@ -127,12 +117,7 @@ import i18nMixin from '@/store/i18n-mixin'
|
||||||
},
|
},
|
||||||
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
|
// update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框
|
||||||
},
|
},
|
||||||
methods: {
|
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: 做头部菜单栏导航*/
|
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||||
showClick() {
|
showClick() {
|
||||||
this.searchMenuVisible = true
|
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:sunjianlei date:20191220 for: 解决全局样式冲突问题 */
|
||||||
/* update_end author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
|
/* update_end author:zhaoxin date:20191129 for: 让搜索框颜色能随主题颜色变换*/
|
||||||
</style>
|
</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 router from './router'
|
||||||
import store from './store/'
|
import store from './store/'
|
||||||
import { VueAxios } from "@/utils/request"
|
import { VueAxios } from "@/utils/request"
|
||||||
import i18n from './locales'
|
|
||||||
|
|
||||||
require('@jeecg/antd-online-mini')
|
require('@jeecg/antd-online-mini')
|
||||||
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
|
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
|
||||||
|
@ -96,7 +95,6 @@ function main() {
|
||||||
new Vue({
|
new Vue({
|
||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
i18n,
|
|
||||||
mounted () {
|
mounted () {
|
||||||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
||||||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
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',
|
device: 'desktop',
|
||||||
theme: '',
|
theme: '',
|
||||||
layout: '',
|
layout: '',
|
||||||
lang: 'zh-CN',
|
|
||||||
contentWidth: '',
|
contentWidth: '',
|
||||||
fixedHeader: false,
|
fixedHeader: false,
|
||||||
fixSiderbar: false,
|
fixSiderbar: false,
|
||||||
|
@ -79,19 +78,9 @@ const app = {
|
||||||
SET_MULTI_PAGE (state, multipageFlag) {
|
SET_MULTI_PAGE (state, multipageFlag) {
|
||||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
||||||
state.multipage = multipageFlag
|
state.multipage = multipageFlag
|
||||||
},
|
|
||||||
APP_LANGUAGE: (state, lang, antd = {}) => {
|
|
||||||
state.lang = lang
|
|
||||||
state._antLocale = antd
|
|
||||||
Vue.ls.set("APP_LANGUAGE", lang)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setLang ({ commit }, lang) {
|
|
||||||
// return new Promise((resolve, reject) => {
|
|
||||||
commit('APP_LANGUAGE', lang)
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
setSidebar: ({ commit }, type) => {
|
setSidebar: ({ commit }, type) => {
|
||||||
commit('SET_SIDEBAR_TYPE', type)
|
commit('SET_SIDEBAR_TYPE', type)
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,16 +5,15 @@
|
||||||
<a-space style="float: right" class="btn-group" slot="additional">
|
<a-space style="float: right" class="btn-group" slot="additional">
|
||||||
<a-button @click="handleAdd" type="primary">
|
<a-button @click="handleAdd" type="primary">
|
||||||
<img src="@/assets/images/global/add.png" alt="" />
|
<img src="@/assets/images/global/add.png" alt="" />
|
||||||
<!-- Add -->
|
Add
|
||||||
{{$t('m.system.add')}}
|
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="handleEdit" type="primary">
|
<a-button @click="handleEdit" type="primary">
|
||||||
<img src="@/assets/images/global/edit.png" alt="" />
|
<img src="@/assets/images/global/edit.png" alt="" />
|
||||||
{{$t('m.system.edit')}}
|
Edit
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="onDel" type="primary">
|
<a-button @click="onDel" type="primary">
|
||||||
<img src="@/assets/images/global/delete.png" alt="" />
|
<img src="@/assets/images/global/delete.png" alt="" />
|
||||||
{{$t('m.system.delete')}}
|
Delete
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button @click="handleReset" type="primary">
|
<a-button @click="handleReset" type="primary">
|
||||||
<img src="@/assets/images/global/reset-pwd.png" alt="" />
|
<img src="@/assets/images/global/reset-pwd.png" alt="" />
|
||||||
|
@ -267,8 +266,7 @@ export default {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
label: this.$t('m.system.user'),
|
label: 'User',
|
||||||
// label: 'User',
|
|
||||||
name: 'username',
|
name: 'username',
|
||||||
props: {
|
props: {
|
||||||
style: {
|
style: {
|
||||||
|
@ -281,7 +279,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'a-input',
|
type: 'a-input',
|
||||||
label: this.$t('m.system.name'),
|
label: 'Name',
|
||||||
name: 'realname',
|
name: 'realname',
|
||||||
props: {
|
props: {
|
||||||
style: {
|
style: {
|
||||||
|
@ -294,7 +292,7 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'custom-select',
|
type: 'custom-select',
|
||||||
label: this.$t('m.system.role'),
|
label: 'Role',
|
||||||
name: 'roleId',
|
name: 'roleId',
|
||||||
props: {
|
props: {
|
||||||
options: this.roleOptions,
|
options: this.roleOptions,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user