|
@@ -4,8 +4,10 @@ import java.io.Serializable; |
|
@@ -4,8 +4,10 @@ import java.io.Serializable; |
|
4
|
import java.util.List;
|
4
|
import java.util.List;
|
|
5
|
import java.util.stream.Collectors;
|
5
|
import java.util.stream.Collectors;
|
|
6
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
6
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
7
|
+import com.ruoyi.common.constant.UserConstants;
|
|
7
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
8
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
|
8
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
9
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
|
|
|
10
|
+import com.ruoyi.common.utils.StringUtils;
|
|
9
|
|
11
|
|
|
10
|
/**
|
12
|
/**
|
|
11
|
* Treeselect树结构实体类
|
13
|
* Treeselect树结构实体类
|
|
@@ -22,6 +24,9 @@ public class TreeSelect implements Serializable |
|
@@ -22,6 +24,9 @@ public class TreeSelect implements Serializable |
|
22
|
/** 节点名称 */
|
24
|
/** 节点名称 */
|
|
23
|
private String label;
|
25
|
private String label;
|
|
24
|
|
26
|
|
|
|
|
27
|
+ /** 节点禁用 */
|
|
|
|
28
|
+ private boolean disabled = false;
|
|
|
|
29
|
+
|
|
25
|
/** 子节点 */
|
30
|
/** 子节点 */
|
|
26
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
31
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
|
27
|
private List<TreeSelect> children;
|
32
|
private List<TreeSelect> children;
|
|
@@ -35,6 +40,7 @@ public class TreeSelect implements Serializable |
|
@@ -35,6 +40,7 @@ public class TreeSelect implements Serializable |
|
35
|
{
|
40
|
{
|
|
36
|
this.id = dept.getDeptId();
|
41
|
this.id = dept.getDeptId();
|
|
37
|
this.label = dept.getDeptName();
|
42
|
this.label = dept.getDeptName();
|
|
|
|
43
|
+ this.disabled = StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus());
|
|
38
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
44
|
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
|
|
39
|
}
|
45
|
}
|
|
40
|
|
46
|
|
|
@@ -65,6 +71,16 @@ public class TreeSelect implements Serializable |
|
@@ -65,6 +71,16 @@ public class TreeSelect implements Serializable |
|
65
|
this.label = label;
|
71
|
this.label = label;
|
|
66
|
}
|
72
|
}
|
|
67
|
|
73
|
|
|
|
|
74
|
+ public boolean isDisabled()
|
|
|
|
75
|
+ {
|
|
|
|
76
|
+ return disabled;
|
|
|
|
77
|
+ }
|
|
|
|
78
|
+
|
|
|
|
79
|
+ public void setDisabled(boolean disabled)
|
|
|
|
80
|
+ {
|
|
|
|
81
|
+ this.disabled = disabled;
|
|
|
|
82
|
+ }
|
|
|
|
83
|
+
|
|
68
|
public List<TreeSelect> getChildren()
|
84
|
public List<TreeSelect> getChildren()
|
|
69
|
{
|
85
|
{
|
|
70
|
return children;
|
86
|
return children;
|