|
|
@@ -1,6 +1,6 @@
|
|
|
import React, { useCallback, useEffect, useState } from 'react'
|
|
|
import styles from './index.module.scss'
|
|
|
-import { useDispatch, useSelector } from 'react-redux'
|
|
|
+import { useSelector } from 'react-redux'
|
|
|
import store, { RootState } from '@/store'
|
|
|
import { Button } from 'antd'
|
|
|
import { baseURL, iconUrl } from '@/utils/http'
|
|
|
@@ -10,8 +10,6 @@ import MyPopconfirm from '@/components/MyPopconfirm'
|
|
|
import history from '@/utils/history'
|
|
|
import { getUserInfoByIdAPI } from '@/store/action/Isystem/I7user'
|
|
|
import { RouterType } from '@/pages/Layout/data'
|
|
|
-import { treeLastIdFindFatherFu } from '@/utils/dataChange'
|
|
|
-import { I5_APIgetTree } from '@/store/action/Isystem/I5organization'
|
|
|
import A2table from './A2table'
|
|
|
import A2setStock from './A2setStock'
|
|
|
import A2editUser from './A2editUser'
|
|
|
@@ -40,12 +38,12 @@ function A2bench() {
|
|
|
}, [getUserInfo])
|
|
|
|
|
|
// 获取组织管理列表
|
|
|
- const dispatch = useDispatch()
|
|
|
- useEffect(() => {
|
|
|
- dispatch(I5_APIgetTree())
|
|
|
- }, [dispatch])
|
|
|
+ // const dispatch = useDispatch()
|
|
|
+ // useEffect(() => {
|
|
|
+ // dispatch(I5_APIgetTree())
|
|
|
+ // }, [dispatch])
|
|
|
|
|
|
- const { treeData } = useSelector((state: RootState) => state.I5organization)
|
|
|
+ // const { treeData } = useSelector((state: RootState) => state.I5organization)
|
|
|
|
|
|
const { userInfo } = useSelector((state: RootState) => state.A0Layout)
|
|
|
|
|
|
@@ -86,10 +84,8 @@ function A2bench() {
|
|
|
<div className='A2ll1_1Txt'>
|
|
|
<h1>{userInfo.realName || userInfo.userName || '匿名'}</h1>
|
|
|
<p>
|
|
|
- {userInfo.userName} 
|
|
|
- {userInfo.deptId
|
|
|
- ? treeLastIdFindFatherFu(treeData, userInfo.deptId + '', 'name').join(' / ')
|
|
|
- : '-'}
|
|
|
+ {userInfo.userName}
|
|
|
+ {userInfo.deptName ? <> {userInfo.deptName}</> : null}
|
|
|
 | {userInfo.roleName}
|
|
|
</p>
|
|
|
</div>
|