From bf601b5e8f5ce24f857ed9b9eeddd6df47ab804e Mon Sep 17 00:00:00 2001 From: chenjinsong <523037378@qq.com> Date: Tue, 20 Sep 2022 14:52:24 +0800 Subject: [PATCH] =?UTF-8?q?CN-710=20feat:=20=E7=94=A8=E6=88=B7=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=B6=EF=BC=8C=E5=AD=98=E9=BB=98=E8=AE=A4=E4=B8=8B?= =?UTF-8?q?=E9=92=BBtable=E9=85=8D=E7=BD=AE=E5=9C=A8localstorage=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.js | 7 ++++++- src/utils/constants.js | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) 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']