|
@@ -1,11 +1,11 @@
|
|
|
import { defineStore } from 'pinia'
|
|
|
|
|
|
-import produ from './produ/la'
|
|
|
+// import produ from './produ/la'
|
|
|
|
|
|
-localStorage.setItem(
|
|
|
- 'userInfo',
|
|
|
- JSON.stringify(produ),
|
|
|
-)
|
|
|
+// localStorage.setItem(
|
|
|
+// 'userInfo',
|
|
|
+// JSON.stringify(produ),
|
|
|
+// )
|
|
|
|
|
|
// const RoleMap = {
|
|
|
// JLD: [1, 2, 3],
|
|
@@ -28,7 +28,7 @@ export const userInfo = JSON.parse(localStorage.getItem('userInfo'))
|
|
|
// } = userInfo
|
|
|
|
|
|
export const user = {
|
|
|
- userInfo: userInfo,
|
|
|
+ userInfo,
|
|
|
token: userInfo?.token,
|
|
|
// role: org_info.dept_role.role_id * 1,
|
|
|
real_name: userInfo?.user_realname,
|
|
@@ -38,12 +38,12 @@ export const user = {
|
|
|
// RoleMap[k].includes(org_info.dept_role.role_id * 1)
|
|
|
// ) || 'None',
|
|
|
power: userInfo?.power,
|
|
|
- dept_ids: userInfo?.dept_ids,
|
|
|
- dept_id: userInfo?.dept_id,
|
|
|
- uo_id: userInfo?.uo_id,
|
|
|
- uo_name: userInfo?.uo_name,
|
|
|
- user_id: userInfo?.user_id,
|
|
|
- user_org: userInfo?.user_org,
|
|
|
+ dept_ids: userInfo?.dept_ids,
|
|
|
+ dept_id: userInfo?.dept_id,
|
|
|
+ uo_id: userInfo?.uo_id,
|
|
|
+ uo_name: userInfo?.uo_name,
|
|
|
+ user_id: userInfo?.user_id,
|
|
|
+ user_org: userInfo?.user_org,
|
|
|
}
|
|
|
export const useUserStore = defineStore('user', {
|
|
|
state: () => user,
|