<el-tree
:default-expand-all="true"
class="trees"
:data="cameraData"
:props="defaultProps"
@node-click="handleNodeClick"
:highlight-current="true"
>
</el-tree>
defaultProps: {
children: "children",
label: "label",
},
this.cameraData = res.datas.cameraList.map((ele) => {
ele.label = ele.floor;
ele.children = ele.cameraValue.map((v) => {
v.label = v.compartmentRoomName;
v.value = v.compartmentRoomName;
v.children = v.cameraDetail.map((o) => {
o.label = o.name;
o.status = o.deviceId;
o.loading = false;
o.isSelectEd = false;
o.timer = null;
return o;
});
return v;
});
return ele;
});