From 29a49dd4ac2ef2da3bb78383d806a42511f6859f Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Fri, 15 Mar 2019 21:26:22 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E5=A4=8D=20tree=20=E8=8A=82?= =?UTF-8?q?=E7=82=B9=E6=9F=A5=E6=89=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin-web/src/pages/Admin/RoleList.js | 1 - admin-web/src/utils/tree.utils.js | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin-web/src/pages/Admin/RoleList.js b/admin-web/src/pages/Admin/RoleList.js index a9dbd646e..c17797ba8 100644 --- a/admin-web/src/pages/Admin/RoleList.js +++ b/admin-web/src/pages/Admin/RoleList.js @@ -266,7 +266,6 @@ class RoleList extends PureComponent { render() { const { list, data } = this.props; - const { pageNo, pageSize, count, roleTreeData, checkedKeys, assignModalLoading } = data; const { modalVisible, modalType, initValues, roleAssignVisible } = this.state; diff --git a/admin-web/src/utils/tree.utils.js b/admin-web/src/utils/tree.utils.js index 5733c1ad4..90e5a3601 100644 --- a/admin-web/src/utils/tree.utils.js +++ b/admin-web/src/utils/tree.utils.js @@ -22,20 +22,21 @@ function findNodes(id, nodes) { break; } else if (node.children) { const childNodes = findNodes(id, node.children); - res.push(node.key); for (let j = 0; j < childNodes.length; j += 1) { res.push(childNodes[j]); } - break; } } return res; } export function findAllNodes(resourceIds, nodes) { + console.log('resourceIds', resourceIds); + const findNodesArray = []; for (let i = 0; i < resourceIds.length; i += 1) { const findNodesData = findNodes(resourceIds[i], nodes); + console.log('findNodesData', findNodesData); if (findNodesData) { for (let j = 0; j < findNodesData.length; j += 1) { const jD = findNodesData[j];