diff --git a/src/store/modules/app.js b/src/store/modules/app.js index a16d678..a66c9eb 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -15,7 +15,7 @@ const state = { sidebarColor: '' }, pageConfig: {}, - systemConfig: {}, + systemConfig: JSON.parse(localStorage.getItem('systemConfig')) || {}, userData: null, appPath: '', operateTime: '', @@ -65,6 +65,10 @@ const mutations = { state.pageConfig = data }, SETTING_SYSTEM_CONFIG(state, data) { + // 为什么不用 csc 的方式 管理端父传子是异步方式 可能导致表格列渲染完成后接口还没返回 + data.projectConfigLabel = data.projectConfigLabel || '项目' + data.serviceConfigLabel = data.serviceConfigLabel || '业务' + localStorage.setItem('systemConfig', JSON.stringify(data)) state.systemConfig = data }, SETTING_THEME(state, data) { @@ -110,7 +114,7 @@ const actions = { } }, async GetSystemConfigs({ commit }) { - const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime' }); + const data = await getSystemConfigs({ codes: 'pwdStrength,lockScreenTime,serviceConfigLabel,projectConfigLabel' }); if (data.success) { commit('SETTING_SYSTEM_CONFIG', data.data); } diff --git a/src/views/resource-apply/components/user.vue b/src/views/resource-apply/components/user.vue index 3e306bd..6baf6fa 100644 --- a/src/views/resource-apply/components/user.vue +++ b/src/views/resource-apply/components/user.vue @@ -1,6 +1,4 @@ -/** -* Created by HaijunZhang on 2019/4/28. -*/ +/** * Created by HaijunZhang on 2019/4/28. */