智慧园区前端大屏
linwe
2024-11-13 51082cbb62be0df2bf90a5f49983ff6a98781c78
src/views/companyInfo/components/box/dataContent.vue
@@ -9,7 +9,7 @@
 * 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: [{
@@ -20,13 +20,13 @@
    }, {
        label: '防线二',
        value: '2',
        type: 1,
        type: 2,
        remark: '雨污水排口一体化闸阀、车间收集池、雨污管阀'
    },
    {
        label: '防线三',
        value: '3',
        type: 1,
        type: 3,
        remark: '事故应急池、雨水收集池'
    }
    ]
@@ -41,12 +41,12 @@
            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) {
@@ -60,7 +60,7 @@
                            }
                        } 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),