| | |
| | | */ |
| | | function toggleLayerVisible(name, checked) { |
| | | const entityList = treeMap.get(name); |
| | | |
| | | console.log(`Toggling visibility for ${name}:`, checked); |
| | | |
| | | if (Array.isArray(entityList)) { |
| | | entityList.forEach((entity) => { |
| | | console.log(`Setting entity show to:`, checked); |
| | | entity.show = checked; |
| | | }); |
| | | } else if (entityList && typeof entityList.show !== "undefined") { |
| | | console.log(`Setting layer show to:`, checked); |
| | | entityList.show = checked; |
| | | } else { |
| | | console.error(`无法设置图层 ${name} 的可见性`); |
| | |
| | | */ |
| | | const getDevicetList = async () => { |
| | | await getDevicetListData().then((res) => { |
| | | console.log(res.data, "devicetList.value2"); |
| | | devicetList.value = res.data; |
| | | }); |
| | | }; |