修改已知bug1
This commit is contained in:
@@ -291,13 +291,6 @@
|
||||
console.log('刷新失败', e)
|
||||
})
|
||||
},
|
||||
queryAllDictItemsByCut() {
|
||||
getAction('/sys/dict/queryAllDictItemsByCut', {}).then((res) => {
|
||||
if (res.success) {
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
})
|
||||
},
|
||||
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||
moment,
|
||||
changeLocale(localeval) {
|
||||
@@ -310,25 +303,29 @@
|
||||
localStorage.setItem('language', 'en-us')
|
||||
break
|
||||
}
|
||||
store.dispatch('GetPermissionList').then(res => {
|
||||
const menuData = res.result.menu
|
||||
resetRouter()
|
||||
let constRoutes = []
|
||||
constRoutes = generateIndexRouter(menuData)
|
||||
router.addRoutes(constRoutes)
|
||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||
this.isLoading = false
|
||||
this.localeval = localeval
|
||||
if (localeval === EN) {
|
||||
moment.locale(EN)
|
||||
this.$i18n.locale = EN
|
||||
this.locale = enUS
|
||||
this.queryAllDictItemsByCut()
|
||||
} else {
|
||||
moment.locale(ZH)
|
||||
this.$i18n.locale = ZH
|
||||
this.locale = zhCN
|
||||
this.queryAllDictItemsByCut()
|
||||
getAction('/sys/dict/queryAllDictItemsByCut', {}).then((res) => {
|
||||
if (res.success) {
|
||||
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
|
||||
store.dispatch('GetPermissionList').then(res => {
|
||||
const menuData = res.result.menu
|
||||
resetRouter()
|
||||
let constRoutes = []
|
||||
constRoutes = generateIndexRouter(menuData)
|
||||
router.addRoutes(constRoutes)
|
||||
this.$root.Bus.$emit('switchLanguage', localeval)
|
||||
this.isLoading = false
|
||||
this.localeval = localeval
|
||||
if (localeval === EN) {
|
||||
moment.locale(EN)
|
||||
this.$i18n.locale = EN
|
||||
this.locale = enUS
|
||||
} else {
|
||||
moment.locale(ZH)
|
||||
this.$i18n.locale = ZH
|
||||
this.locale = zhCN
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user