From 15df2c64486c61fddb7d70794d7d46577d93656c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Tue, 29 Oct 2024 17:04:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=9A=E5=8A=A1=E5=92=8C=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E6=A0=87=E7=AD=BE=E5=90=8D=E7=A7=B0=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BB=8E=E6=8E=A5=E5=8F=A3=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/app.js | 8 +++-- src/views/resource-apply/components/user.vue | 32 +++++++++----------- 2 files changed, 21 insertions(+), 19 deletions(-) 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. */