diff --git a/src/components/DesignForm/public/expand/rangedUserTree.vue b/src/components/DesignForm/public/expand/rangedUserTree.vue index 5564079..0725cb3 100644 --- a/src/components/DesignForm/public/expand/rangedUserTree.vue +++ b/src/components/DesignForm/public/expand/rangedUserTree.vue @@ -283,38 +283,6 @@ function filterTreeByList(treeData: string | any[], listData: any[]) { return result; } -/** - * 在树结构中查找 id 等于 targetId 的节点 - * @param {Array} tree - 树结构数据(数组形式) - * @param {string} targetId - 要查找的节点 id - * @returns {Object|null} 找到的节点对象,未找到则返回 null - */ -function findNodeById(tree: any, targetId: any) { - - if (!Array.isArray(tree)) return null; - - for (const node of tree) { - - let str = node.label + "(" + node.number + ")" - /* console.log(node) - console.log(targetId) */ - if (node.number == targetId) { - /* console.log("fdsdfafdsafdsafdsafsdadsf") - console.log(node) - console.log(targetId) */ - return node; - } - - if (node.children && node.children.length > 0) { - const found = findNodeById(node.children, targetId); - if (found) { - return found; - } - } - } - - return null; -} /** @@ -404,25 +372,10 @@ function getTree() {