guanqb
2023-03-22 804eb8ca53ae3b002d96e2284f6f00632c74d9f3
警员警车预警范围显示问题修改
2 files modified
283 ■■■■ changed files
src/views/activity/components/drawBtnBox.vue 87 ●●●● patch | view | raw | blame | history
src/views/activity/index.vue 196 ●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue
@@ -683,51 +683,54 @@
            }
            if ('width' in params) {
                if (overlay.attrParams && overlay.attrParams.data && overlay.attrParams.data.type && overlay.attrParams.data.type == 3) return
                let linePosition = ''
                if ('position' in params) {
                    linePosition = params.position.replace(/,/g, ";").replace(/ /g, ",")
                if (overlay.attrParams && overlay.attrParams.data && overlay.attrParams.data.type && overlay.attrParams.data.type == 3) {
                    overlay.attrParams.data.width = params.width
                } else {
                    linePosition = overlay.attrParams.linePositionStr
                }
                let coords = global.DC.GeoTools.polylineBuffer(linePosition, params.width)
                let positionStr = ''
                coords.forEach((item, index) => {
                    if (!(index == coords.length - 1)) {
                        positionStr += item[0] + ',' + item[1] + ';'
                    let linePosition = ''
                    if ('position' in params) {
                        linePosition = params.position.replace(/,/g, ";").replace(/ /g, ",")
                    } else {
                        linePosition = overlay.attrParams.linePositionStr
                    }
                })
                positionStr = positionStr.slice(0, positionStr.length - 1)
                // 面颜色
                let color = ''
                // 线颜色
                let lineColor = ''
                if (params.color == '') {
                    color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150)
                } else {
                    let r = parseInt(params.color.slice(1, 3), 16)
                    let g = parseInt(params.color.slice(3, 5), 16)
                    let b = parseInt(params.color.slice(5, 7), 16)
                    color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150)
                    lineColor = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255)
                }
                overlay.attrParams.lineObj.setStyle({
                    "material": lineColor,
                    'width': 3
                })
                overlay.attrParams.linePositionStr = linePosition
                overlay.attrParams.polygonPositionStr = positionStr
                overlay.attrParams.color = params.color
                    let coords = global.DC.GeoTools.polylineBuffer(linePosition, params.width)
                    let positionStr = ''
                    coords.forEach((item, index) => {
                        if (!(index == coords.length - 1)) {
                            positionStr += item[0] + ',' + item[1] + ';'
                        }
                    })
                    positionStr = positionStr.slice(0, positionStr.length - 1)
                    // 面颜色
                    let color = ''
                    // 线颜色
                    let lineColor = ''
                    if (params.color == '') {
                        color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150)
                    } else {
                        let r = parseInt(params.color.slice(1, 3), 16)
                        let g = parseInt(params.color.slice(3, 5), 16)
                        let b = parseInt(params.color.slice(5, 7), 16)
                        color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150)
                        lineColor = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255)
                    }
                    overlay.attrParams.lineObj.setStyle({
                        "material": lineColor,
                        'width': 3
                    })
                    overlay.attrParams.linePositionStr = linePosition
                    overlay.attrParams.polygonPositionStr = positionStr
                    overlay.attrParams.color = params.color
                let areaPolygon = new global.DC.Polygon(positionStr)
                drawLayers.addOverlay(areaPolygon)
                areaPolygon.setStyle({
                    'material': color,
                    'height': 0.01,
                })
                areaPolygon.attrParams = overlay.attrParams
                areaPolygon.on(global.DC.MouseEventType.CLICK, this.$parent.lineOverlayTypeClick)
                overlay.remove()
                    let areaPolygon = new global.DC.Polygon(positionStr)
                    drawLayers.addOverlay(areaPolygon)
                    areaPolygon.setStyle({
                        'material': color,
                        'height': 0.01,
                    })
                    areaPolygon.attrParams = overlay.attrParams
                    areaPolygon.on(global.DC.MouseEventType.CLICK, this.$parent.lineOverlayTypeClick)
                    overlay.remove()
                }
            }
        },
src/views/activity/index.vue
@@ -161,7 +161,7 @@
                    <div class="value-name-box">预警范围:</div>
                    <div class="width-box">
                        <div class="input-width-box">
                            <input type="text"  v-model="pointAreaWidth" placeholder="请输入..." />
                            <input type="text" v-model="pointAreaWidth" placeholder="请输入..." />
                        </div>
                        <div class="units">米</div>
                    </div>
@@ -338,7 +338,7 @@
                        id: 9,
                        label: '执法记录仪',
                    }]
                },{
                }, {
                    id: 3,
                    label: '视频监控'
                },
@@ -490,8 +490,8 @@
            }],
            isNeedPolygonType: false,
            plotPointPositionStr: '',
            pointAreaWidth:100,
            dataTreeCheckedNodes:[],
            pointAreaWidth: 100,
            dataTreeCheckedNodes: [],
        }
    },
@@ -512,15 +512,15 @@
        this.getSecurityList(this.currentPage, this.pagesize)
        //摄像头
        this.getEquipmentAll({ type: 1},'')
        this.getEquipmentAll({ type: 1 }, '')
        //警车
        this.getEquipmentAll({ type: 0},'');
        this.getEquipmentAll({ type: 0 }, '')
        //手台-公网
        this.getEquipmentAll({ type: "2-1" },'');
        this.getEquipmentAll({ type: "2-1" }, '')
        //手台-专网
        this.getEquipmentAll({ type: "2-2" },'');
        this.getEquipmentAll({ type: "2-2" }, '')
        //执法记录仪
        this.getEquipmentAll({ type: 3 },'')
        this.getEquipmentAll({ type: 3 }, '')
    },
@@ -687,10 +687,10 @@
            // 警员警车列表根据活动deptid筛选
            // 获取树状警员数据
            console.log('item',item.deptId,item);
            this.getPolicemanTree({deptId:item.deptId})
            this.getCarList({deptId:item.deptId})
            console.log('item', item.deptId, item)
            this.getPolicemanTree({ deptId: item.deptId })
            this.getCarList({ deptId: item.deptId })
            // 警力资源
            this.getSecurityPoliceList(item.id, this.policeSwitch)
@@ -838,7 +838,7 @@
                            iconImgName = 'icon3'
                        }
                        position = position.split(';')[0].split(',')
                        let pointPosition = new global.DC.Position(Number(position[0]), Number(position[1]),4)
                        let pointPosition = new global.DC.Position(Number(position[0]), Number(position[1]), 4)
                        position = new global.DC.Position(Number(position[0]), Number(position[1]), 4.5)
                        chooseArrow = new global.DC.Billboard(position, `/img/icon/${iconImgName}.png`)
                        chooseArrow.size = item.type == 6 ? [24, 24] : [32, 32]
@@ -865,7 +865,7 @@
                        label.attrParams = { 'id': item.id, item }
                        this.$refs.DRAWBTNBOX.lableAllEvent(label)
                        label.setStyle({
                            'fillColor':color,
                            'fillColor': color,
                            "font": `${item.width}px sans-serif`,
                        })
                        arrowsListLayer.addOverlay(label)
@@ -959,7 +959,7 @@
                this.isHaveLine = res.data.data.some(item => {
                    return item.type == 1
                })
                type == 'car' && pointShow && this.addMapCarAndPersonLayers(
                    res.data.data.filter(item => item.type == 3),
                    'policecar',
@@ -1018,7 +1018,7 @@
                // circle.setStyle({
                //     "material": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 100), //颜色
                // })
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: mapLayer,
                    type: 'billboard',
@@ -1185,7 +1185,7 @@
        addCarAndRange (params) {
            addCarAndRange(params).then(res => {
                if (res.data.success) {
                    this.$refs.DRAWBTNBOX.addNewPolice(res.data.data,'policecar',params.type)
                    this.$refs.DRAWBTNBOX.addNewPolice(res.data.data, 'policecar', params.type)
                    this.$message({
                        message: '添加成功',
                        type: 'success'
@@ -1300,38 +1300,38 @@
            }
            this.dataTreeCheckedNodes = e2.checkedNodes
            this.eachDataTreeCheckedNodes(this.dataTreeCheckedNodes)
        },
        // 遍历树数据实时图标
        eachDataTreeCheckedNodes(data){
        eachDataTreeCheckedNodes (data) {
            // 清除定时器
            if(realPoliceTimer != {}) {
                for(let item in realPoliceTimer) {
                    console.log(`定时器realPoliceTimer[${item}]关闭了`);
            if (realPoliceTimer != {}) {
                for (let item in realPoliceTimer) {
                    console.log(`定时器realPoliceTimer[${item}]关闭了`)
                    clearInterval(realPoliceTimer[item])
                }
            }
            if(data != []){
                 data.some(item => {
                     return item.label == '视频监控'
                 }) ? this.iconImageShowOrHidden('/img/icon/camera.png', '',cameraList, 'activityCameraLayers') : this.clearLayerIconForMap('activityCameraLayers');
            if (data != []) {
                data.some(item => {
                    return item.label == '视频监控'
                }) ? this.iconImageShowOrHidden('/img/icon/camera.png', '', cameraList, 'activityCameraLayers') : this.clearLayerIconForMap('activityCameraLayers')
                 data.some(item => {
                     return item.label == '警车'
                 }) ? this.iconImageShowOrHidden('/img/icon/real-car.png','/img/icon/real-car-ok.png', carList, 'activityCarLayers') : this.clearLayerIconForMap('activityCarLayers');
                data.some(item => {
                    return item.label == '警车'
                }) ? this.iconImageShowOrHidden('/img/icon/real-car.png', '/img/icon/real-car-ok.png', carList, 'activityCarLayers') : this.clearLayerIconForMap('activityCarLayers')
                 data.some(item => {
                     return item.label == '公网'
                 }) ? this.iconImageShowOrHidden('/img/icon/real-public-recorder.png','/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, 'activityTalkBackEquipmentPublicLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentPublicLayers');
                data.some(item => {
                    return item.label == '公网'
                }) ? this.iconImageShowOrHidden('/img/icon/real-public-recorder.png', '/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, 'activityTalkBackEquipmentPublicLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentPublicLayers')
                 data.some(item => {
                     return item.label == '专网'
                 }) ? this.iconImageShowOrHidden('/img/icon/real-recorder.png','/img/icon/real-recorder-ok.png', talkBackEquipmentList, 'activityTalkBackEquipmentLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentLayers');
                data.some(item => {
                    return item.label == '专网'
                }) ? this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', talkBackEquipmentList, 'activityTalkBackEquipmentLayers') : this.clearLayerIconForMap('activityTalkBackEquipmentLayers')
                 data.some(item => {
                     return item.label == '执法记录仪'
                 }) ? this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png',policeCarmeraList, 'activityPoliceCameraLayers') : this.clearLayerIconForMap('activityPoliceCameraLayers');
                data.some(item => {
                    return item.label == '执法记录仪'
                }) ? this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png', policeCarmeraList, 'activityPoliceCameraLayers') : this.clearLayerIconForMap('activityPoliceCameraLayers')
            }
        },
@@ -1339,9 +1339,9 @@
         * 清除当前图层数据 
         * @param {*} layerName 图层名称
         */
         clearLayerIconForMap(layerName) {
        clearLayerIconForMap (layerName) {
            realPoliceTimer[layerName] && clearInterval(realPoliceTimer[layerName])
            console.log(`定时器realPoliceTimer[${layerName}]关闭了`);
            console.log(`定时器realPoliceTimer[${layerName}]关闭了`)
            this.$EventBus.$emit('mapClearLayer', {
                layerName: layerName,
                type: 'VectorLayer'
@@ -1354,33 +1354,33 @@
         * @param {*} data 传入的数据(摄像头,手台等集合数据)
         * @param {*} layerName 选中图层名称
         */
        iconImageShowOrHidden(img, imgOk, data, layerName, isChooseSecurity) {
            if(this.showingSecurityId && !isChooseSecurity) {
        iconImageShowOrHidden (img, imgOk, data, layerName, isChooseSecurity) {
            if (this.showingSecurityId && !isChooseSecurity) {
                // 实时图标刷新时间间隔
                let refreshTime = 60000
                this.searchRealResources(layerName)
                realPoliceTimer[layerName] = setInterval(()=> this.searchRealResources(layerName),refreshTime)
                realPoliceTimer[layerName] = setInterval(() => this.searchRealResources(layerName), refreshTime)
            } else {
                this.$EventBus.$emit('mapRemoveLayer', {
                   layerName: layerName,
                   type: 'VectorLayer'
                    layerName: layerName,
                    type: 'VectorLayer'
                })
                if (data.length > 0) {
                   data.forEach(item => {
                    if (item.longitude && item.latitude) {
                        this.$EventBus.$emit('layerPointAdd', {
                            layerName: layerName,
                            type: "billboard",
                            params: {
                                ...item,
                                lng: item.longitude,
                                lat: item.latitude,
                                alt: 1,
                                url: item.clockStatus == 0 ? img:imgOk
                            },
                        })
                    }
                   })
                    data.forEach(item => {
                        if (item.longitude && item.latitude) {
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: layerName,
                                type: "billboard",
                                params: {
                                    ...item,
                                    lng: item.longitude,
                                    lat: item.latitude,
                                    alt: 1,
                                    url: item.clockStatus == 0 ? img : imgOk
                                },
                            })
                        }
                    })
                }
            }
        },
@@ -1410,19 +1410,19 @@
        },
        // 定时查找实时警力资源
        searchRealResources(layerName){
            console.log(`定时器realPoliceTimer[${layerName}]开启了`);
        searchRealResources (layerName) {
            console.log(`定时器realPoliceTimer[${layerName}]开启了`)
            let type = ''
            if(layerName == 'activityCarLayers') {
            if (layerName == 'activityCarLayers') {
                type = 0
            }else if (layerName == 'activityTalkBackEquipmentPublicLayers'){
            } else if (layerName == 'activityTalkBackEquipmentPublicLayers') {
                type = '2-1'
            }else if (layerName == 'activityTalkBackEquipmentLayers'){
            } else if (layerName == 'activityTalkBackEquipmentLayers') {
                type = '2-2'
            }else if (layerName == 'activityPoliceCameraLayers'){
            } else if (layerName == 'activityPoliceCameraLayers') {
                type = 3
            }
            this.getEquipmentAll({ type: type ,query:this.showingSecurityId },layerName);
            this.getEquipmentAll({ type: type, query: this.showingSecurityId }, layerName)
        },
        // 大小重置
@@ -1511,7 +1511,7 @@
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    }else {
                    } else {
                        this.policeChooseCarVisible = false
                        this.addCarAndRange({
                            carId: this.policeType,
@@ -1519,7 +1519,7 @@
                            securityId: this.showingSecurityId,
                            type: type,
                            color: this.chooseCarColor,
                            width:this.pointAreaWidth
                            width: this.pointAreaWidth
                        })
                        this.policeIconIsCreated = false
                    }
@@ -1530,20 +1530,20 @@
                            message: '请选择警员',
                            type: 'warning'
                        })
                    }else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                    } else if (!(/(^[1-9]\d*$)/.test(Number(this.pointAreaWidth)))) {
                        this.$message({
                            message: '范围必须为正整数',
                            type: 'warning'
                        })
                    } else {
                        this.policeChooseVisible = false
                        this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor ,width:this.pointAreaWidth})
                        this.addActivityPolice({ policemanId: this.searchPoliceTreeId, position: position, securityId: this.showingSecurityId, type: type, color: this.choosePoliceColor, width: this.pointAreaWidth })
                        this.policeIconIsCreated = false
                    }
                }
            } else {
                if (this.policeChooseVisible == true) {
                    if (this.searchPoliceTreeId == ''|| this.searchPoliceTreeName == '') {
                    if (this.searchPoliceTreeId == '' || this.searchPoliceTreeName == '') {
                        this.$message({
                            message: '请在列表中选择警员',
                            type: 'warning'
@@ -1554,8 +1554,8 @@
                            type: 'warning'
                        })
                    } else {
                         this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor,width:this.pointAreaWidth },policeOverlayData.overlay)
                         this.policeChooseVisible = false
                        this.$refs.DRAWBTNBOX.updateActivityPolice({ id: this.policeIconId, policemanId: this.searchPoliceTreeId, color: this.choosePoliceColor, width: this.pointAreaWidth }, policeOverlayData.overlay)
                        this.policeChooseVisible = false
                    }
                } else if (this.policeChooseCarVisible == true) {
                    if (this.policeType == '') {
@@ -1569,7 +1569,7 @@
                            type: 'warning'
                        })
                    } else {
                        this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor,width:this.pointAreaWidth },policeOverlayData.overlay)
                        this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, carId: this.policeType, color: this.chooseCarColor, width: this.pointAreaWidth }, policeOverlayData.overlay)
                        this.policeChooseCarVisible = false
                    }
                }
@@ -1594,7 +1594,7 @@
            if ('policemanId' in e.overlay.attrParams.data) {
                this.policeIconId = e.overlay.attrParams.data.id
                this.policeType = e.overlay.attrParams.data.policemanId
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width : 100
                this.choosePoliceColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000'
                let choosePoliceName = this.platFn(this.policeTreeData).find(item => item.id == e.overlay.attrParams.data.policemanId).name
                this.searchPoliceTreeId = e.overlay.attrParams.data.policemanId
@@ -1605,7 +1605,7 @@
                this.policeOption = policecarOption
                this.policeIconId = e.overlay.attrParams.data.id
                this.policeType = e.overlay.attrParams.data.carId
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width :100
                this.pointAreaWidth = e.overlay.attrParams.data.width != '-1' ? e.overlay.attrParams.data.width : 100
                this.chooseCarColor = e.overlay.attrParams.data.color != '' ? e.overlay.attrParams.data.color : '#FF0000'
                this.policeIconIsCreated = true
                this.policeChooseCarVisible = true
@@ -1627,7 +1627,7 @@
            this.chooseColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#1CA085'
            this.policeIconId = e.overlay.attrParams.id
            policeOverlayData = e
            policeOverlayData = e
            curLinePosition = e.overlay.attrParams.linePositionStr
            curLinePolygonPosition = e.overlay.attrParams.polygonPositionStr
@@ -1734,7 +1734,7 @@
        // 保存巡逻路线信息
        saveLineInfo () {
            this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth },policeOverlayData.overlay)
            this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth }, policeOverlayData.overlay)
            this.lineEditVisible = false
        },
@@ -1798,10 +1798,10 @@
                        type: 'success'
                    })
                    policeOverlayData.overlay.remove()
                    if(type == 'car' && 'pointOverlayData' in policeOverlayData.overlay.attrParams){
                    if (type == 'car' && 'pointOverlayData' in policeOverlayData.overlay.attrParams) {
                        policeOverlayData.overlay.attrParams.pointOverlayData.remove()
                    }
                    if(type == 'line' && 'lineObj' in policeOverlayData.overlay.attrParams){
                    if (type == 'line' && 'lineObj' in policeOverlayData.overlay.attrParams) {
                        policeOverlayData.overlay.attrParams.lineObj.remove()
                    }
                } else {
@@ -1818,7 +1818,7 @@
            deleteActivityPolice(id).then(res => {
                if (res.data.success) {
                    policeOverlayData.overlay.remove()
                    if('pointOverlayData' in policeOverlayData.overlay.attrParams){
                    if ('pointOverlayData' in policeOverlayData.overlay.attrParams) {
                        policeOverlayData.overlay.attrParams.pointOverlayData.remove()
                    }
                    this.$message({
@@ -1855,8 +1855,8 @@
        deleteSecurityPlot (id) {
            deleteSecurityPlot(id).then(res => {
                if (res.data.success) {
                    plotOverlayData!=null && plotOverlayData.overlay!=null && plotOverlayData.overlay.remove()
                    if (plotOverlayData!=null && plotOverlayData.overlay!=null&&'pointOverlayData' in plotOverlayData.overlay.attrParams) {
                    plotOverlayData != null && plotOverlayData.overlay != null && plotOverlayData.overlay.remove()
                    if (plotOverlayData != null && plotOverlayData.overlay != null && 'pointOverlayData' in plotOverlayData.overlay.attrParams) {
                        plotOverlayData.overlay.attrParams.pointOverlayData.remove()
                    }
                    this.$message({
@@ -1879,13 +1879,13 @@
        },
        // 获取设备列表
        getEquipmentAll (params,layerName) {
        getEquipmentAll (params, layerName) {
            getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => {
                if (params.type == 0) {
                    //警车
                    carList = res.data.data
                    if(layerName){
                        this.iconImageShowOrHidden('/img/icon/real-car.png','/img/icon/real-car-ok.png',carList, layerName,true)
                    if (layerName) {
                        this.iconImageShowOrHidden('/img/icon/real-car.png', '/img/icon/real-car-ok.png', carList, layerName, true)
                    }
                } else if (params.type == 1) {
                    //摄像头
@@ -1893,20 +1893,20 @@
                } else if (params.type == '2-1') {
                    //公网-手台
                    talkBackEquipmentPublicList = res.data.data
                    if(layerName){
                        this.iconImageShowOrHidden('/img/icon/real-public-recorder.png','/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, layerName,true)
                    if (layerName) {
                        this.iconImageShowOrHidden('/img/icon/real-public-recorder.png', '/img/icon/real-public-recorder-ok.png', talkBackEquipmentPublicList, layerName, true)
                    }
                } else if (params.type == '2-2') {
                    //专网-手台
                    talkBackEquipmentList = res.data.data
                    if(layerName){
                        this.iconImageShowOrHidden('/img/icon/real-phone.png','/img/icon/real-phone-ok.png', talkBackEquipmentList, layerName,true)
                    if (layerName) {
                        this.iconImageShowOrHidden('/img/icon/real-phone.png', '/img/icon/real-phone-ok.png', talkBackEquipmentList, layerName, true)
                    }
                } else {
                    //执法记录仪
                    policeCarmeraList = res.data.data
                    if(layerName){
                        this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', policeCarmeraList, layerName,true)
                    if (layerName) {
                        this.iconImageShowOrHidden('/img/icon/real-recorder.png', '/img/icon/real-recorder-ok.png', policeCarmeraList, layerName, true)
                    }
                }
            })
@@ -2007,11 +2007,11 @@
        }
    },
    beforeDestroy() {
    beforeDestroy () {
        // 清除定时器
        if(realPoliceTimer != {}) {
            for(let item in realPoliceTimer) {
                console.log(`定时器realPoliceTimer[${item}]关闭了`);
        if (realPoliceTimer != {}) {
            for (let item in realPoliceTimer) {
                console.log(`定时器realPoliceTimer[${item}]关闭了`)
                clearInterval(realPoliceTimer[item])
            }
        }