diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 34cc96fd..a3f680a6 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -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) diff --git a/src/utils/constants.js b/src/utils/constants.js index b29364df..3f946575 100644 --- a/src/utils/constants.js +++ b/src/utils/constants.js @@ -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']