From 311cc48341d2cb59c89dd427a6ffde65733c8066 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Fri, 12 Mar 2021 11:31:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=84=E7=BB=87=E6=9C=BA=E6=9E=84?= =?UTF-8?q?=E6=8C=89=E5=90=8D=E7=A7=B0=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/dataease/service/sys/DeptService.java | 2 +- frontend/src/views/system/dept/index.vue | 58 ++++++++++++++++--- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/sys/DeptService.java b/backend/src/main/java/io/dataease/service/sys/DeptService.java index 101533d193..290d3468af 100644 --- a/backend/src/main/java/io/dataease/service/sys/DeptService.java +++ b/backend/src/main/java/io/dataease/service/sys/DeptService.java @@ -162,7 +162,7 @@ public class DeptService { * @return */ private List upTree(List allNodes, List targetNodes){ - final Map map = targetNodes.stream().collect(Collectors.toMap(SimpleTreeNode::getId, node -> node)); + final Map map = allNodes.stream().collect(Collectors.toMap(SimpleTreeNode::getId, node -> node)); List results = targetNodes.parallelStream().flatMap(targetNode -> { //向上逐级找爹 List ids = new ArrayList<>(); diff --git a/frontend/src/views/system/dept/index.vue b/frontend/src/views/system/dept/index.vue index 1dcac01e5c..2e9b5d8cc9 100644 --- a/frontend/src/views/system/dept/index.vue +++ b/frontend/src/views/system/dept/index.vue @@ -4,7 +4,7 @@ @@ -22,7 +23,7 @@ - +