医院废弃物信息化管理平台
“mitao”
2026-04-21 2f18b3a28054c3917010f95ba84f7425280a2622
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
package cn.besteam.modules.system.vo;
 
import cn.besteam.modules.system.entity.SysPermission;
import lombok.Data;
 
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * 树形列表用到
 */
@Data
public class TreeModel implements Serializable {
 
    private static final long serialVersionUID = 4013193970046502756L;
 
    private Integer key;
 
    private String title;
 
    private String slotTitle;
 
    private Boolean isLeaf;
 
    private String icon;
 
    private Integer ruleFlag;
 
    private Map<String, String> scopedSlots;
 
    private List<TreeModel> children;
 
    private boolean disabled;
 
    public TreeModel() {
 
    }
 
    public TreeModel(SysPermission permission) {
 
        this.key = permission.getId();
        this.icon = permission.getIcon();
        this.parentId = permission.getParentId();
        this.title = permission.getName();
        this.slotTitle = permission.getName();
        this.value = permission.getId();
        this.isLeaf = permission.getIsLeaf();
        this.label = permission.getName();
        if (!permission.getIsLeaf()) {
            this.children = new ArrayList<TreeModel>();
        }
        if(permission.getId().equals(6)){
            this.disabled=true;
        }
    }
 
    public TreeModel(Integer key, Integer parentId, String slotTitle, Integer ruleFlag, boolean isLeaf) {
 
        this.key = key;
        this.parentId = parentId;
        this.ruleFlag = ruleFlag;
        this.title = slotTitle;
        this.slotTitle = slotTitle;
        Map<String, String> map = new HashMap<String, String>();
        map.put("title", "hasDatarule");
        this.scopedSlots = map;
        this.isLeaf = isLeaf;
        this.value = key;
        if (!isLeaf) {
            this.children = new ArrayList<TreeModel>();
        }
        if(key.equals(6)){
            this.disabled=true;
        }
    }
 
    private Integer parentId;
 
    private String label;
 
    private Integer value;
 
}