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

perf: loading

parent e2719255
...@@ -53,7 +53,7 @@ import { ...@@ -53,7 +53,7 @@ import {
} from '@/services/userCenter/userManage/api'; } from '@/services/userCenter/userManage/api';
const UserManage = () => { const UserManage = () => {
const [treeLoading, setTreeLoading] = useState(true); const [treeLoading, setTreeLoading] = useState(false);
const [tableLoading, setTableLoading] = useState(false); const [tableLoading, setTableLoading] = useState(false);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
...@@ -319,7 +319,6 @@ const UserManage = () => { ...@@ -319,7 +319,6 @@ const UserManage = () => {
// 获取用户机构树 // 获取用户机构树
useEffect(() => { useEffect(() => {
setTreeLoading(true);
updateTrees(); updateTrees();
}, []); }, []);
...@@ -769,6 +768,7 @@ const UserManage = () => { ...@@ -769,6 +768,7 @@ const UserManage = () => {
return ( return (
<PageContainer className={styles.userManageContainer}> <PageContainer className={styles.userManageContainer}>
<div className={styles.contentContainer}> <div className={styles.contentContainer}>
<Spin spinning={treeLoading} tip="loading...">
<div className={styles.orgContainer}> <div className={styles.orgContainer}>
<span style={{ padding: '8px', fontSize: '16px' }}> <span style={{ padding: '8px', fontSize: '16px' }}>
机构列表 机构列表
...@@ -794,8 +794,8 @@ const UserManage = () => { ...@@ -794,8 +794,8 @@ const UserManage = () => {
/> />
</Tooltip> </Tooltip>
</span> </span>
{treeData.length > 0 && ( {treeData.length > 0 && (
<Spin spinning={treeLoading} tip="loading...">
<Tree <Tree
// showLine="true" // showLine="true"
showIcon="true" showIcon="true"
...@@ -805,9 +805,9 @@ const UserManage = () => { ...@@ -805,9 +805,9 @@ const UserManage = () => {
onSelect={onSelect} onSelect={onSelect}
treeData={treeData.map(t => mapTree(t))} treeData={treeData.map(t => mapTree(t))}
/> />
</Spin>
)} )}
</div> </div>
</Spin>
<div className={styles.userContainer}> <div className={styles.userContainer}>
<Table <Table
title={getTableTitle} 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