diff --git a/src/store/modules/auth/index.ts b/src/store/modules/auth/index.ts index eea3597..989b3f5 100644 --- a/src/store/modules/auth/index.ts +++ b/src/store/modules/auth/index.ts @@ -130,7 +130,6 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => { async function loginByToken(loginToken: Api.Auth.LoginToken) { // 1. stored in the localStorage, the later requests need it in headers - localStg.set('userInfo', loginToken); localStg.set('token', loginToken.token); // 2. get user info @@ -149,6 +148,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => { const { data: info, error } = await fetchGetUserInfo(); if (!error) { + localStg.set('userInfo', info); // update store Object.assign(userInfo, info); diff --git a/src/store/modules/route/index.ts b/src/store/modules/route/index.ts index 3f221d8..41f57e9 100644 --- a/src/store/modules/route/index.ts +++ b/src/store/modules/route/index.ts @@ -232,7 +232,7 @@ export const useRouteStore = defineStore(SetupStoreId.Route, () => { /** Init static auth route */ function initStaticAuthRoute() { const { authRoutes: staticAuthRoutes } = createStaticRoutes(); - const filteredRoutes = filterRoutesByPaths(staticAuthRoutes, localStg.get('userInfo').perms); + const filteredRoutes = filterRoutesByPaths(staticAuthRoutes, localStg.get('userInfo')?.perms); if (authStore.isStaticSuper) { addAuthRoutes(filteredRoutes); } else { diff --git a/src/views/systemManage/setting/index.vue b/src/views/systemManage/setting/index.vue index f26513c..4c80419 100644 --- a/src/views/systemManage/setting/index.vue +++ b/src/views/systemManage/setting/index.vue @@ -409,6 +409,7 @@ const getConfig = async () => { const matrixConfig = async () => { const {data,error} = await matrixConfigApi(curMatrix.value?.tool); if(!error){ + // curMatrix.value = data; console.log(data); } } @@ -722,7 +723,6 @@ onMounted(() => {
-

点击方框可切换等级

@@ -737,7 +737,7 @@ onMounted(() => {
S{{ 6 - row }} {{ curMatrix?.sLabels[5 - row] }}
-
风险值 = 严重性 S × 可能性 L(5×5),按分值区间定级:
+
+ + 新增 + + 风险值 = 严重性 S × 可能性 L,按分值区间定级: +
背景