提交 | 用户 | 时间
|
1ac2bc
|
1 |
package cn.stylefeng.guns.base.pojo.node; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.roses.core.util.ToolUtil; |
|
4 |
import cn.stylefeng.roses.kernel.model.tree.Tree; |
|
5 |
import lombok.Data; |
|
6 |
|
|
7 |
import java.util.ArrayList; |
|
8 |
import java.util.List; |
|
9 |
|
|
10 |
/** |
|
11 |
* layui属性组件节点 |
|
12 |
* |
|
13 |
* @author stylefeng |
|
14 |
* @Date 2019-8-26 14:01 |
|
15 |
*/ |
|
16 |
@Data |
|
17 |
public class LayuiTreeNode implements Tree { |
|
18 |
|
|
19 |
/** |
|
20 |
* 节点id |
|
21 |
*/ |
|
22 |
private Long id; |
|
23 |
|
|
24 |
/** |
|
25 |
* 父级节点id |
|
26 |
*/ |
|
27 |
private Long pid; |
|
28 |
|
|
29 |
/** |
|
30 |
* 节点名称 |
|
31 |
*/ |
|
32 |
private String title; |
|
33 |
|
|
34 |
/** |
|
35 |
* 节点是否初始展开 |
|
36 |
*/ |
|
37 |
private Boolean spread; |
|
38 |
|
|
39 |
/** |
|
40 |
* 节点是否初始为选中状态 |
|
41 |
*/ |
|
42 |
private Boolean checked; |
|
43 |
|
|
44 |
/** |
|
45 |
* 节点是否为禁用状态 |
|
46 |
*/ |
|
47 |
private Boolean disabled; |
|
48 |
|
|
49 |
private List<LayuiTreeNode> children = new ArrayList<>(); |
|
50 |
|
|
51 |
@Override |
|
52 |
public String getNodeId() { |
|
53 |
if (ToolUtil.isNotEmpty(id)) { |
|
54 |
return String.valueOf(id); |
|
55 |
} else { |
|
56 |
return null; |
|
57 |
} |
|
58 |
} |
|
59 |
|
|
60 |
@Override |
|
61 |
public String getNodeParentId() { |
|
62 |
if (ToolUtil.isNotEmpty(pid)) { |
|
63 |
return String.valueOf(pid); |
|
64 |
} else { |
|
65 |
return null; |
|
66 |
} |
|
67 |
} |
|
68 |
|
|
69 |
@Override |
|
70 |
public void setChildrenNodes(List childrenNodes) { |
|
71 |
this.children = childrenNodes; |
|
72 |
} |
|
73 |
|
|
74 |
} |