| | |
| | | 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;
|
| | |
|
| | |
| | | /** 节点名称 */
|
| | | private String label;
|
| | |
|
| | | /** 节点ID */
|
| | | private Long value;
|
| | |
|
| | | /** 节点禁用 */
|
| | | private boolean disabled = false;
|
| | |
|
| | | /** 子节点 */
|
| | | @JsonInclude(JsonInclude.Include.NON_EMPTY)
|
| | | private List<TreeSelect> children;
|
| | |
| | | public TreeSelect(SysDept dept)
|
| | | {
|
| | | this.id = dept.getDeptId();
|
| | | this.value = 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());
|
| | | }
|
| | |
|
| | |
| | | this.label = label;
|
| | | }
|
| | |
|
| | | public boolean isDisabled()
|
| | | {
|
| | | return disabled;
|
| | | }
|
| | |
|
| | | public void setDisabled(boolean disabled)
|
| | | {
|
| | | this.disabled = disabled;
|
| | | }
|
| | |
|
| | | public List<TreeSelect> getChildren()
|
| | | {
|
| | | return children;
|
| | |
| | | {
|
| | | this.children = children;
|
| | | }
|
| | |
|
| | | public Long getValue() {
|
| | | return value;
|
| | | }
|
| | |
|
| | | public void setValue(Long value) {
|
| | | this.value = value;
|
| | | }
|
| | | }
|