| | |
| | | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. |
| | | --> |
| | | <script setup> |
| | | import { getList } from "@/api/space/space" |
| | | import { getFacilityList } from "@/api/facility" |
| | | import { onUnmounted, reactive } from 'vue' |
| | | const resData = reactive({ |
| | | data: [{ |
| | |
| | | }, { |
| | | label: '防线二', |
| | | value: '2', |
| | | type: 1, |
| | | type: 2, |
| | | remark: '雨污水排口一体化闸阀、车间收集池、雨污管阀' |
| | | }, |
| | | { |
| | | label: '防线三', |
| | | value: '3', |
| | | type: 1, |
| | | type: 3, |
| | | remark: '事故应急池、雨水收集池' |
| | | } |
| | | ] |
| | |
| | | if (!addTileLayers[item.label]) { |
| | | addTileLayers[item.label] = new DC.HtmlLayer(item.label) |
| | | window.$viewer.addLayer(addTileLayers[item.label]) |
| | | getList({ |
| | | getFacilityList({ |
| | | firmId: companyInfo.id, |
| | | size: 1000, |
| | | type: item.type, |
| | | facLevel: item.type |
| | | }).then(res => { |
| | | let data = res.data.data.records |
| | | let data = res.data.data |
| | | data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => { |
| | | let iconEl = '' |
| | | if ('showPanel' in item && item.showPanel == false) { |
| | |
| | | } |
| | | } else { |
| | | iconEl = `<div class="marsBlueGradientPnl"> |
| | | <div>${item.remark}</div> </div>` |
| | | <div>${i.name}</div> </div>` |
| | | } |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(i.lng, i.lat, 0), |