| | |
| | | <template> |
| | | <div class="layer-tree"> |
| | | <<<<<<< HEAD <el-tree ref="treeRef" style="max-width: 600px" show-checkbox node-key="label" :default-checked-keys="defaultSelectedKeys" @check-change="handleCheckChange" :data="treeData" /> |
| | | ======= |
| | | <el-tree ref="treeRef" style="max-width: 600px" show-checkbox node-key="label" :default-checked-keys="defaultSelectedKeys" @check-change="handleCheckChange" :data="treeData" /> |
| | | >>>>>>> f82eb01fe65e513fb43342db0e25cafa0e0d2db8 |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | ]); |
| | | |
| | | function initDevicePoint() { |
| | | function initDevicePoint () { |
| | | let list = []; |
| | | |
| | | devicetList.value.forEach((item) => { |
| | |
| | | }, |
| | | ]); |
| | | |
| | | function initDistrictPoint() { |
| | | function initDistrictPoint () { |
| | | let list = []; |
| | | districtList.value.forEach((item) => { |
| | | item.showBillboard = true; |
| | |
| | | |
| | | let divPointList = []; |
| | | |
| | | function initDuanmianPoint() { |
| | | function initDuanmianPoint () { |
| | | getDuanMainData().then((res) => { |
| | | const duanmianList = res.data; |
| | | const list = []; |
| | |
| | | divPoint.item.show = false; |
| | | console.log(divPoint); |
| | | |
| | | divPointList.push(divPoint.item); |
| | | }); |
| | | treeMap.set("孙胡沟仿真标注地物", list); |
| | | divPointList.push(divPoint.item); |
| | | }); |
| | | treeMap.set("孙胡沟仿真标注地物", list); |
| | | }); |
| | | } |
| | | |
| | | function addTetrahedron(visible) { |
| | | function addTetrahedron (visible) { |
| | | const emergencyAreaList = []; |
| | | |
| | | loadAreaPolygon("/json/emergency_area.geojson", true).then((entities) => { |
| | |
| | | }); |
| | | treeMap.set("避险点", emergencyAreaList); |
| | | } |
| | | function toggleLayerVisible(name, checked) { |
| | | function toggleLayerVisible (name, checked) { |
| | | const entityList = treeMap.get(name); |
| | | if (Array.isArray(entityList) && entityList.length > 0) { |
| | | entityList.forEach((entity) => { |
| | |
| | | treeMap.set(name, entityList); |
| | | } |
| | | |
| | | function getData() { |
| | | function getData () { |
| | | initDevicePoint(); |
| | | initDistrictPoint(); |
| | | initDuanmianPoint(); |