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

perf: loginName

parent 661986c6
......@@ -52,7 +52,7 @@ import {
} from '@/services/userCenter/userManage/api';
const UserManage = () => {
const [treeLoading, setTreeLoading] = useState(false);
const [treeLoading, setTreeLoading] = useState(true);
const [tableLoading, setTableLoading] = useState(false);
const [loading, setLoading] = useState(true);
......@@ -261,8 +261,8 @@ const UserManage = () => {
const updateTrees = () =>
getUserTree(-1, -1)
.then(res => {
setTreeLoading(false);
if (res.length > 0) {
setTreeLoading(false);
setTreeData1(res);
setTreeData(res);
// 第一次加载,默认选择第一个组织
......@@ -717,15 +717,16 @@ const UserManage = () => {
</Tooltip>
</span>
{treeData.length > 0 && (
<Tree
showLine="true"
showIcon="true"
defaultExpandAll="true"
selectedKeys={[currentSelectOrg]}
loading={treeLoading}
onSelect={onSelect}
treeData={treeData.map(t => mapTree(t))}
/>
<Spin spinning={treeLoading} tip="loading">
<Tree
showLine="true"
showIcon="true"
defaultExpandAll="true"
selectedKeys={[currentSelectOrg]}
onSelect={onSelect}
treeData={treeData.map(t => mapTree(t))}
/>
</Spin>
)}
</div>
<div className={styles.userContainer}>
......@@ -1039,7 +1040,7 @@ const UserManage = () => {
>
<p>
即将{+currentUser.state ? '激活' : '冻结'}用户{' '}
<span className={styles.redText}>{currentUser.userName}</span>
<span className={styles.redText}>{currentUser.loginName}</span>
,是否确认
{+currentUser.state ? '激活' : '冻结'}
</p>
......@@ -1054,7 +1055,7 @@ const UserManage = () => {
>
<p>
将删除用户
<span className={styles.redText}>{currentUser.userName}</span>,
<span className={styles.redText}>{currentUser.loginName}</span>,
是否确认删除?
</p>
</Modal>
......
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