diff --git a/src/pages/Zone/Card/ZoneLocationsTree.vue b/src/pages/Zone/Card/ZoneLocationsTree.vue index 751d8d11d..650047e40 100644 --- a/src/pages/Zone/Card/ZoneLocationsTree.vue +++ b/src/pages/Zone/Card/ZoneLocationsTree.vue @@ -75,6 +75,7 @@ const onNodeExpanded = async (nodeKeysArray) => { if (response.data) { node.childs = response.data.map((n) => { if (n.sons > 0) n.childs = [{}]; + n.selected = isSelected(n.selected); return n; }); } @@ -115,6 +116,10 @@ function getNodeIds(node) { return ids; } +function isSelected(selected) { + if (typeof selected === 'number') return !!selected; +} + watch( () => store.data, async (val) => {