#
luxiaotao1123
2024-02-22 a41b01a7ee01d96f614fe8264b39363423ec549d
#
1个文件已修改
13 ■■■■■ 已修改文件
zy-asrs-flow/src/pages/system/user/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/system/user/index.jsx
@@ -1,6 +1,6 @@
import React, { useState, useRef, useEffect } from 'react';
import { Button, message, Modal, Row, Col, Card, Tree, Input, Tag } from 'antd';
import { Button, message, Modal, Row, Col, Card, Tree, Input, Tag, Skeleton } from 'antd';
import {
    FooterToolbar,
    PageContainer,
@@ -116,13 +116,18 @@
    const [modalVisible, setModalVisible] = useState(false);
    const [currentRow, setCurrentRow] = useState();
    const [searchParam, setSearchParam] = useState({});
    const [boxHeight, setBoxHeight] = useState();
    const [deptTreeLoading, setDeptTreeLoading] = useState(false);
    const [deptTreeData, setDeptTreeData] = useState([]);
    const [deptExpandedKeys, setDeptExpandedKeys] = useState([]);
    const [pwdModalVisible, setPwdModalVisible] = useState(false);
    const loadDeptTreeData = (param) => {
        setDeptTreeLoading(true);
        Http.doPostPromise('/api/dept/tree', param, (res) => {
            setDeptTreeLoading(false);
            const rootMenu = { id: 0, name: '全部', value: 0, children: [] };
            rootMenu.children = res.data;
            // const treeData = transformTreeData([rootMenu]);
@@ -130,6 +135,8 @@
            setDeptTreeData(treeData);
            const treeAllKeys = getTreeAllKeys(treeData);
            setDeptExpandedKeys(treeAllKeys);
        }).catch((err) => {
            setDeptTreeLoading(false);
        })
    }
@@ -495,6 +502,9 @@
                            }}
                        />
                        <div style={{height: 'calc(100vh - 350px)', overflowY: 'auto' }}>
                            {deptTreeLoading ? (
                                <Skeleton active />
                            ) : (
                            <Tree
                                showLine
                                blockNode
@@ -512,6 +522,7 @@
                                    actionRef.current?.reload();
                                }}
                            />
                            )}
                        </div>
                    </Card>
                </Col>