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

perf: loginName

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