From b3fedd4221b807a07058be9d5d5d8ba8998adbcb Mon Sep 17 00:00:00 2001 From: Bang Hu <hu_bang@hotmail.com> Date: 星期四, 11 九月 2025 21:35:31 +0800 Subject: [PATCH] Bug修改代码提交 --- src/stores/modules/userInfo.ts | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/stores/modules/userInfo.ts b/src/stores/modules/userInfo.ts index 22e00c0..b6a7371 100644 --- a/src/stores/modules/userInfo.ts +++ b/src/stores/modules/userInfo.ts @@ -1,9 +1,6 @@ // 鐢ㄦ埛淇℃伅鐘舵�佺鐞� -import { update } from 'lodash' import { defineStore } from 'pinia' import { UserInfo } from '@/stores/interface' -import router from '@/router/index' -import { updateUserDetail } from '@/api/userInfo' export const useUserInfo = defineStore('userInfo', { state: (): UserInfo => { @@ -17,6 +14,7 @@ empCode:'', userId:'', unitId:'',//绉熸埛ID + departmentId: '', roleCodes:[], userInfo:{ adminToken: '', // 绠$悊鍚庡彴鐨則oken @@ -69,6 +67,7 @@ this.fullUnitName = user.fullUnitName this.userId = user.id this.unitId = user.unitId + this.departmentId = user.departmentId this.roleCodes = user.roleCodes this.userInfo=user }, @@ -116,6 +115,9 @@ getUnitId: (state) => { return state.unitId }, + getDepartmentId: (state) => { + return state.departmentId + }, getRoleCodes: (state) => { return state.roleCodes }, -- Gitblit v1.8.0