From 4e927ee0a11350814b020fb757ad26f278919641 Mon Sep 17 00:00:00 2001 From: liwenxuan <1298531568@qq.com> Date: Tue, 21 Oct 2025 09:51:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=94=A8=E6=88=B7,=E6=A0=91,?= =?UTF-8?q?=E5=8F=AF=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../public/expand/rangedUserTree.vue | 51 +------------------ 1 file changed, 2 insertions(+), 49 deletions(-) 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() {