智慧园区前端大屏
shuishen
2025-09-07 43c674c969395805d3841969e6598033e77848e0
src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-31 10:47:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-08-18 18:49:54
 * @LastEditTime: 2025-09-07 20:23:17
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -149,6 +149,7 @@
        label: '企业分布',
        type: 'layer',
        subType: 'labelPoint',
        customWx: true,
        method: getPage,
        params: {
            size: 1000
@@ -212,6 +213,7 @@
                label: '应急池',
                type: 'layer',
                subType: 'labelPoint',
                customWx: true,
                method: getList,
                params: {
                    type: 2,
@@ -738,6 +740,60 @@
    label: 'label',
}
let curAddClassDoms = []
watch(
    () => mapStore.needSelectID,
    (newValue, oldValue) => {
        if (curAddClassDoms.length > 0) {
            curAddClassDoms.forEach(dom => {
                dom.classList.remove('is-need-item')
            })
            curAddClassDoms = []
        }
        if (newValue.length > 0) {
            addTileLayers['qyfb']?.getOverlays().forEach(item => {
                newValue.forEach(id => {
                    if (item.attrParams.id == id) {
                        let dom = item.delegate.children[0]
                        dom.classList.add('is-need-item')
                        curAddClassDoms.push(dom)
                    }
                })
            })
            addTileLayers['sg-yjc']?.getOverlays().forEach(item => {
                newValue.forEach(id => {
                    if (item.attrParams.id == id) {
                        let dom = item.delegate.children[0]
                        dom.classList.add('is-need-item')
                        curAddClassDoms.push(dom)
                    }
                })
            })
            addTileLayers['zb']?.getOverlays().forEach(item => {
                newValue.forEach(id => {
                    if (item.attrParams.id == id) {
                        let dom = item.delegate.children[0]
                        dom.classList.add('is-need-item')
                        curAddClassDoms.push(dom)
                    }
                })
            })
        }
    }
)
const checkType = (value) => {
    if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
        return 'obj'