语言切换时自动请求数据字典
This commit is contained in:
parent
e19d2da93e
commit
19848df78e
@ -173,12 +173,14 @@ export default {
|
|||||||
...mapActions('app', ['reload']),
|
...mapActions('app', ['reload']),
|
||||||
...mapMutations('app', ['SET_SCENE_ID', 'SET_SCENE_INFO', 'SET_MENUS_CHOSE']),
|
...mapMutations('app', ['SET_SCENE_ID', 'SET_SCENE_INFO', 'SET_MENUS_CHOSE']),
|
||||||
...mapMutations('user', ['SET_ROLES', 'SET_USER_ID', 'SET_USERNAME']),
|
...mapMutations('user', ['SET_ROLES', 'SET_USER_ID', 'SET_USERNAME']),
|
||||||
|
...mapActions('dict', ['getDict']),
|
||||||
handleSelect(key) {
|
handleSelect(key) {
|
||||||
this.SET_MENUS_CHOSE(key)
|
this.SET_MENUS_CHOSE(key)
|
||||||
},
|
},
|
||||||
changeLocale(lang) {
|
changeLocale(lang) {
|
||||||
this.$i18n.locale = lang
|
this.$i18n.locale = lang
|
||||||
localStorage.setItem('locale', lang)
|
localStorage.setItem('locale', lang)
|
||||||
|
this.getDict()
|
||||||
// 处理gis上已添加的entity
|
// 处理gis上已添加的entity
|
||||||
viewer.entities.values.forEach(el => {
|
viewer.entities.values.forEach(el => {
|
||||||
if (el.id.includes('area')) {
|
if (el.id.includes('area')) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user