From 0110150e514c1982efe3c4b5b7d860efb56cd43e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 11 Dec 2024 11:22:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=8E=89=E5=B7=B2=E7=A6=81=E7=94=A8=E9=83=A8=E9=97=A8?= =?UTF-8?q?(IB5H7F)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/framework/web/domain/TreeSelect.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java b/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java index 2ace4e9..cf4e43c 100644 --- a/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java +++ b/src/main/java/com/ruoyi/framework/web/domain/TreeSelect.java @@ -4,6 +4,8 @@ import java.io.Serializable; import java.util.List; import java.util.stream.Collectors; import com.fasterxml.jackson.annotation.JsonInclude; +import com.ruoyi.common.constant.UserConstants; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.project.system.domain.SysDept; import com.ruoyi.project.system.domain.SysMenu; @@ -22,6 +24,9 @@ public class TreeSelect implements Serializable /** 节点名称 */ private String label; + /** 节点禁用 */ + private boolean disabled = false; + /** 子节点 */ @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; @@ -35,6 +40,7 @@ public class TreeSelect implements Serializable { this.id = dept.getDeptId(); this.label = dept.getDeptName(); + this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()); this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList()); } @@ -65,6 +71,16 @@ public class TreeSelect implements Serializable this.label = label; } + public boolean isDisabled() + { + return disabled; + } + + public void setDisabled(boolean disabled) + { + this.disabled = disabled; + } + public List getChildren() { return children;