import { Tree } from 'antd';
function DeptTree(props) {
    const { data, checkEv, checkeds } = props;
    //console.log(42,checkeds)
    //菜单选中事件


    function onCheck(checkedKeys, e) {
        checkEv(checkedKeys)
    }
    function onSelect() {

    }
    const treeData = data ? data : null;
    const defaultCheckedKeys = checkeds && checkeds.softwareMenuIds ? checkeds.softwareMenuIds.slice() : []
    return (
        <Tree
            checkable
            defaultCheckedKeys={defaultCheckedKeys}
            onCheck={onCheck}
            onSelect={onSelect}
            treeData={treeData}
        />
    )
}

export default DeptTree;