| | |
| | | const checkedKeys = node.checkedKeys; |
| | | isHumanCheckTrigger = true; |
| | | travelTree(layerInfo.value, (layer) => { |
| | | if (layer.type === 'layer') { |
| | | if (layer.type === 'layer' || layer.type === 'equip') { |
| | | const id = layer.id; |
| | | if (!checkedKeys.includes(id)) { |
| | | layer.isVisible = false; |
| | |
| | | }; |
| | | |
| | | const handleNodeClick = () => {}; |
| | | const layerInfo = computed(() => (props.olMap as OLMap).layerInfo.value); |
| | | const layerInfo = computed(() => { |
| | | |
| | | |
| | | const info =(props.olMap as OLMap).layerInfo.value |
| | | return info; |
| | | const result = info.concat([ |
| | | { |
| | | id: 'overlays', |
| | | title: '监测设备', |
| | | children: [], |
| | | |
| | | type: 'equip', |
| | | }, |
| | | ]) |
| | | return result; |
| | | |
| | | }); |
| | | |
| | | watch( |
| | | () => layerInfo.value, |
| | |
| | | } |
| | | const keys = []; |
| | | travelTree(val, (item) => { |
| | | if (item.type === 'layer') { |
| | | if (item.type === 'layer'|| item.type === 'equip') { |
| | | if (item.isVisible) { |
| | | keys.push(item.id); |
| | | } |