提交 | 用户 | 时间
|
71e81e
|
1 |
/** |
懒 |
2 |
* Copyright 2018-2020 stylefeng & fengshuonan (https://gitee.com/stylefeng) |
|
3 |
* <p> |
|
4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 |
* you may not use this file except in compliance with the License. |
|
6 |
* You may obtain a copy of the License at |
|
7 |
* <p> |
|
8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
|
9 |
* <p> |
|
10 |
* Unless required by applicable law or agreed to in writing, software |
|
11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
|
12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 |
* See the License for the specific language governing permissions and |
|
14 |
* limitations under the License. |
|
15 |
*/ |
|
16 |
package cn.stylefeng.guns.base.pojo.node; |
|
17 |
|
|
18 |
import lombok.Data; |
|
19 |
|
|
20 |
/** |
|
21 |
* jquery ztree 插件的节点 |
|
22 |
* |
|
23 |
* @author fengshuonan |
|
24 |
* @date 2017年2月17日 下午8:25:14 |
|
25 |
*/ |
|
26 |
@Data |
|
27 |
public class ZTreeNode { |
|
28 |
|
|
29 |
/** |
|
30 |
* 节点id |
|
31 |
*/ |
|
32 |
private Long id; |
|
33 |
|
|
34 |
public Long getId() { |
|
35 |
return id; |
|
36 |
} |
|
37 |
|
|
38 |
public void setId(Long id) { |
|
39 |
this.id = id; |
|
40 |
} |
|
41 |
|
|
42 |
public Long getPId() { |
|
43 |
return pId; |
|
44 |
} |
|
45 |
|
|
46 |
public void setPId(Long pId) { |
|
47 |
this.pId = pId; |
|
48 |
} |
|
49 |
|
|
50 |
public String getName() { |
|
51 |
return name; |
|
52 |
} |
|
53 |
|
|
54 |
public void setName(String name) { |
|
55 |
this.name = name; |
|
56 |
} |
|
57 |
|
|
58 |
public Boolean getOpen() { |
|
59 |
return open; |
|
60 |
} |
|
61 |
|
|
62 |
public void setOpen(Boolean open) { |
|
63 |
this.open = open; |
|
64 |
} |
|
65 |
|
|
66 |
public Boolean getChecked() { |
|
67 |
return checked; |
|
68 |
} |
|
69 |
|
|
70 |
public void setChecked(Boolean checked) { |
|
71 |
this.checked = checked; |
|
72 |
} |
|
73 |
|
|
74 |
public String getIconSkin() { |
|
75 |
return iconSkin; |
|
76 |
} |
|
77 |
|
|
78 |
public void setIconSkin(String iconSkin) { |
|
79 |
this.iconSkin = iconSkin; |
|
80 |
} |
|
81 |
|
|
82 |
/** |
|
83 |
* 父节点id |
|
84 |
*/ |
|
85 |
private Long pId; |
|
86 |
|
|
87 |
/** |
|
88 |
* 节点名称 |
|
89 |
*/ |
|
90 |
private String name; |
|
91 |
|
|
92 |
/** |
|
93 |
* 是否打开节点 |
|
94 |
*/ |
|
95 |
private Boolean open; |
|
96 |
|
|
97 |
/** |
|
98 |
* 是否被选中 |
|
99 |
*/ |
|
100 |
private Boolean checked; |
|
101 |
|
|
102 |
/** |
|
103 |
* 节点图标 single or group |
|
104 |
*/ |
|
105 |
private String iconSkin; |
|
106 |
|
|
107 |
/** |
|
108 |
* 创建ztree的父级节点 |
|
109 |
* |
|
110 |
* @author fengshuonan |
|
111 |
* @Date 2018/12/23 4:51 PM |
|
112 |
*/ |
|
113 |
public static ZTreeNode createParent() { |
|
114 |
ZTreeNode zTreeNode = new ZTreeNode(); |
|
115 |
zTreeNode.setChecked(true); |
|
116 |
zTreeNode.setId(0L); |
|
117 |
zTreeNode.setName("顶级"); |
|
118 |
zTreeNode.setOpen(true); |
|
119 |
zTreeNode.setPId(0L); |
|
120 |
return zTreeNode; |
|
121 |
} |
|
122 |
} |