| | |
| | | label: "三维服务", |
| | | children: [ |
| | | { label: "模型数据" }, |
| | | { label: "地形数据" }, // 确保这里的 label 是 "地形数据" |
| | | { label: "地形数据" }, |
| | | { label: "影像数据" }, |
| | | ], |
| | | }, |
| | |
| | | { label: "孙胡沟隐患点" }, |
| | | { label: "综合监测设备信息" }, |
| | | { label: "孙胡沟断面" }, |
| | | { label: "避险点" }, |
| | | { label: "避险场所" }, |
| | | ], |
| | | }, |
| | | ]); |
| | |
| | | case "泥石流隐患点面数据": |
| | | case "综合监测设备信息": |
| | | case "孙胡沟断面": |
| | | case "避险点": |
| | | case "避险场所": |
| | | console.log(label, checked, indeterminate); |
| | | break; |
| | | } |
| | |
| | | */ |
| | | 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); |
| | | // 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; |
| | | }); |
| | | }; |
| | |
| | | districtList.value.forEach((item) => { |
| | | item.showBillboard = true; |
| | | item.className = "district"; |
| | | item.type = "泥石流"; |
| | | // item.type = "泥石流"; //数据icon设置 |
| | | const entity = createPoint(item); |
| | | entity.show = false; |
| | | list.push(entity); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 添加避险点 |
| | | * 添加避险场所 |
| | | */ |
| | | function addTetrahedron(visible) { |
| | | const emergencyAreaList = []; |
| | | // 加载避险点底层面片 |
| | | // 加载避险场所底层面片 |
| | | loadAreaPolygon("/json/emergency_area.geojson", true).then((entities) => { |
| | | emergencyAreaList.push(...entities); |
| | | |
| | | // 默认隐藏避险点 |
| | | // 默认隐藏避险场所 |
| | | entities.forEach((entity) => { |
| | | entity.show = false; |
| | | }); |
| | | |
| | | // 将避险点实体存储到 treeMap |
| | | treeMap.set("避险点", entities); |
| | | // 将避险场所实体存储到 treeMap |
| | | treeMap.set("避险场所", entities); |
| | | }); |
| | | } |
| | | |
| | |
| | | .layer-tree { |
| | | background: url("@/assets/img/tools/plotting_new.png"); |
| | | width: 200px; |
| | | height: 200px; |
| | | // height: 200px; |
| | | z-index: 99; |
| | | overflow: hidden; |
| | | } |
| | | /deep/ .el-tree { |
| | | overflow: hidden !important; |
| | | } |
| | | </style> |