CN-710 feat: 用户登录时,存默认下钻table配置在localstorage中

This commit is contained in:
chenjinsong
2022-09-20 14:52:24 +08:00
parent 2510299540
commit bf601b5e8f
2 changed files with 8 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
import { post } from '@/utils/http'
import { get, post } from '@/utils/http'
import router from '@/router'
import { sortByOrderNum, getWelcomeMenu } from '@/permission'
import { ElMessage } from 'element-plus' // dependent on utc plugin
@@ -77,6 +77,11 @@ const user = {
}
}
})
get(api.config, { ckey: 'drill_down_table_config' }).then(res => {
if (res.code === 200 && res.page.list && res.page.list.length > 0) {
localStorage.setItem(storageKey.drillDownTableConfig, res.page.list[0].cvalue)
}
})
},
logoutSuccess (store, res) {
localStorage.removeItem(storageKey.username)

View File

@@ -29,7 +29,8 @@ export const storageKey = {
entitySearchHistory: 'cn-entity-search-history',
echartLegendFontSize: 'echartLegendFontSize',
echartLabelFontSize: 'echartLabelFontSize',
tokenExpireCurrentPath: 'token-expire-current-path'
tokenExpireCurrentPath: 'token-expire-current-path',
drillDownTableConfig: 'cn-drill-down-table-config'
}
export const largeCountryList = ['CN', 'US', 'RU', 'AU', 'CA', 'KZ', 'IN', 'BR']