Commit efc7024d authored by 陈前坚's avatar 陈前坚

perf: loading

parent e2719255
......@@ -53,7 +53,7 @@ import {
} from '@/services/userCenter/userManage/api';
const UserManage = () => {
const [treeLoading, setTreeLoading] = useState(true);
const [treeLoading, setTreeLoading] = useState(false);
const [tableLoading, setTableLoading] = useState(false);
const [loading, setLoading] = useState(true);
......@@ -319,7 +319,6 @@ const UserManage = () => {
// 获取用户机构树
useEffect(() => {
setTreeLoading(true);
updateTrees();
}, []);
......@@ -769,33 +768,34 @@ const UserManage = () => {
return (
<PageContainer className={styles.userManageContainer}>
<div className={styles.contentContainer}>
<div className={styles.orgContainer}>
<span style={{ padding: '8px', fontSize: '16px' }}>
机构列表
<Tooltip title="查找用户">
<SearchOutlined
style={{
fontSize: '18px',
float: 'right',
margin: '4px 4px 0px 12px',
color: '#1890FF',
}}
onClick={searchUser}
/>
</Tooltip>
<Tooltip title="添加下级机构">
<FolderAddTwoTone
style={{
fontSize: '18px',
float: 'right',
marginTop: '4px',
}}
onClick={e => addSubOrg(e, '根目录', '-1')}
/>
</Tooltip>
</span>
{treeData.length > 0 && (
<Spin spinning={treeLoading} tip="loading...">
<Spin spinning={treeLoading} tip="loading...">
<div className={styles.orgContainer}>
<span style={{ padding: '8px', fontSize: '16px' }}>
机构列表
<Tooltip title="查找用户">
<SearchOutlined
style={{
fontSize: '18px',
float: 'right',
margin: '4px 4px 0px 12px',
color: '#1890FF',
}}
onClick={searchUser}
/>
</Tooltip>
<Tooltip title="添加下级机构">
<FolderAddTwoTone
style={{
fontSize: '18px',
float: 'right',
marginTop: '4px',
}}
onClick={e => addSubOrg(e, '根目录', '-1')}
/>
</Tooltip>
</span>
{treeData.length > 0 && (
<Tree
// showLine="true"
showIcon="true"
......@@ -805,9 +805,9 @@ const UserManage = () => {
onSelect={onSelect}
treeData={treeData.map(t => mapTree(t))}
/>
</Spin>
)}
</div>
)}
</div>
</Spin>
<div className={styles.userContainer}>
<Table
title={getTableTitle}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment