From d918bbe8b39891a91c4c05e3d2154525769ada91 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 1 Aug 2022 09:52:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=AB=E9=83=BD=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/dv/apps/components/AiGrid.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/project/dv/apps/components/AiGrid.vue b/project/dv/apps/components/AiGrid.vue index 5a525352..30d0e5df 100644 --- a/project/dv/apps/components/AiGrid.vue +++ b/project/dv/apps/components/AiGrid.vue @@ -114,9 +114,7 @@ if (res.code === 0) { this.treeData = res.data.filter(e => !e.parentGirdId) const parentGirdId = this.treeData[0].id - const arr = res.data.filter(v => { - return v.parentGirdId === parentGirdId || !v.parentGirdId - }) + this.treeData.map(p => this.addChild(p, res.data.map(v => { if (v.id === parentGirdId) { this.defaultExpandedKeys.push(v.id)