双宇设置
This commit is contained in:
@@ -58,20 +58,11 @@
|
|||||||
// 自己配置多语言适配
|
// 自己配置多语言适配
|
||||||
this.$root.Bus.$on('switchLanguage', value => {
|
this.$root.Bus.$on('switchLanguage', value => {
|
||||||
let router_path = this.$route.path
|
let router_path = this.$route.path
|
||||||
switch (value) {
|
|
||||||
case 'zh-cn':
|
|
||||||
localStorage.setItem('language', 'zh-cn')
|
|
||||||
break
|
|
||||||
case 'en-us':
|
|
||||||
localStorage.setItem('language', 'en-us')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
this.isRouterAlive = false //先关闭,
|
this.isRouterAlive = false //先关闭,
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
this.isRouterAlive = true //再打开
|
this.isRouterAlive = true //再打开
|
||||||
})
|
})
|
||||||
|
|
||||||
// 系统组件适配
|
// 系统组件适配
|
||||||
let lang = localStorage.language
|
let lang = localStorage.language
|
||||||
if (lang == 'zh-cn') {
|
if (lang == 'zh-cn') {
|
||||||
|
|||||||
@@ -292,6 +292,14 @@
|
|||||||
moment,
|
moment,
|
||||||
changeLocale(localeval) {
|
changeLocale(localeval) {
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
switch (localeval) {
|
||||||
|
case 'zh-cn':
|
||||||
|
localStorage.setItem('language', 'zh-cn')
|
||||||
|
break
|
||||||
|
case 'en-us':
|
||||||
|
localStorage.setItem('language', 'en-us')
|
||||||
|
break
|
||||||
|
}
|
||||||
store.dispatch('GetPermissionList').then(res => {
|
store.dispatch('GetPermissionList').then(res => {
|
||||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
@@ -301,17 +309,11 @@
|
|||||||
this.$i18n.locale = EN
|
this.$i18n.locale = EN
|
||||||
this.locale = enUS
|
this.locale = enUS
|
||||||
this.queryAllDictItemsByCut()
|
this.queryAllDictItemsByCut()
|
||||||
this.GetPermissionList()
|
|
||||||
// localStorage.setItem('language', EN)
|
|
||||||
// location.reload();
|
|
||||||
} else {
|
} else {
|
||||||
moment.locale(ZH)
|
moment.locale(ZH)
|
||||||
this.$i18n.locale = ZH
|
this.$i18n.locale = ZH
|
||||||
this.locale = zhCN
|
this.locale = zhCN
|
||||||
this.queryAllDictItemsByCut()
|
this.queryAllDictItemsByCut()
|
||||||
this.GetPermissionList()
|
|
||||||
// localStorage.setItem('language', ZH)
|
|
||||||
// location.reload();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
list: '/sys/sysAnnouncementSend/getMyAnnouncementSend',
|
||||||
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
editCementSend: 'sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||||
readAllMsg: 'sys/sysAnnouncementSend/read',
|
readAllMsg: 'sys/sysAnnouncementSend/read',
|
||||||
deleteUrl: ''
|
deleteUrl: 'sys/sysAnnouncementSend/deleteBatch'
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
openPath: '',
|
openPath: '',
|
||||||
|
|||||||
Reference in New Issue
Block a user