From 574b6dd35438f9f7e009d13e2407859ea6b51cbd Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 1 Feb 2024 11:16:32 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9F=E0=B8=B1?= =?UTF-8?q?=E0=B8=87=E0=B8=81=E0=B9=8C=E0=B8=8A=E0=B8=B1=E0=B9=88=E0=B8=99?= =?UTF-8?q?=E0=B8=A5=E0=B8=9A=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA?= =?UTF-8?q?=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_organizationalNew/components/mainTree.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/02_organizationalNew/components/mainTree.vue b/src/modules/02_organizationalNew/components/mainTree.vue index 0e56865bd..44642d618 100644 --- a/src/modules/02_organizationalNew/components/mainTree.vue +++ b/src/modules/02_organizationalNew/components/mainTree.vue @@ -170,9 +170,12 @@ async function deleteUpdate(rootId: string, treeId: string) { function deleteNode(treeNode: any, rootId: string, treeId: string): boolean { if (treeNode.orgTreeId === rootId) { + const childrenNew = treeNode.children.filter( + (x: any) => x.orgTreeId != treeId + ); let newData = { ...treeNode, - children: [], + children: childrenNew, }; Object.assign(treeNode, newData);