<el-tree ref="JigoutreeRef" :default-checked-keys="defJigouKeys" @node-expand="handleNodeClick" :props="defaultProps"
:load="getOrgList" node-key="xzqbm" lazy show-checkbox></el-tree>
defaultProps: { label: 'xzqmc', isLeaf: 'isLeaf' },
getOrgList(node, resolve) { let self = this if (node.level == 0) { MenuAndUser.getJIgouNode('') .then(res => { let treeData = [] res.data.forEach(e => { treeData.push(e) }) resolve(treeData) }) .catch(res => { resolve([]) }) } else { console.log(node) MenuAndUser.getJIgouNode(node.data.xzqbm) .then(res => { let mylist = [] mylist = JSON.parse(JSON.stringify(res.data)) resolve(mylist) }) .catch(res => { resolve([]) }) } },