shuishen
2023-03-06 d8679db562bb26cd185e2907def1b6b3d6e0ebae
删除无用代码
1 files modified
90 ■■■■■ changed files
src/views/activity/index.vue 90 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-06 11:29:13
 * @LastEditTime: 2023-03-06 14:56:01
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 安保活动
 *
@@ -117,7 +117,7 @@
                    <ul>
                        <li>
                            <!-- <el-button
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ></el-button>-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ></el-button>-->
                            <button @click="draw('polyline', 'policecar')" title="巡逻路线">
                                <img src="../../../public/img/icon/route1.png" style="height:100%" />
                            </button>
@@ -469,8 +469,6 @@
import { getEquipmentAll } from '@/api/home/index.js'
import flvjs from 'flv.js'
let analyseLayer = null
let analysePolygon = null
let drawLayers = null
let drawArrowLayers = null
let polylineAreaLayer = null
@@ -618,7 +616,6 @@
            policeSwitch: true,
            arrowBtnSwitch: true,
            polylineBtnSwitch: false,
            analyseInput: 100,
            activityList: [],
            activityDetails: {},
            boxShow: true,
@@ -774,11 +771,6 @@
    mounted () {
        this.$parent.$parent.resize('400px', true)
        this.$nextTick(() => {
            if (analyseLayer == null) {
                analyseLayer = new global.DC.VectorLayer('analyseLayer')
                global.viewer.addLayer(analyseLayer)
            }
            if (drawLayers == null) {
                drawLayers = new global.DC.VectorLayer('drawLayers')
                global.viewer.addLayer(drawLayers)
@@ -1378,12 +1370,21 @@
        },
        // 点击活动列表活动
        /**
         * @description: 点击活动列表活动
         * @param {*} item
         * @param {*} index
         * @return {*}
         */
        activityListClick (item, index) {
            if (this.currentClickIndex !== '' && this.currentClickIndex == index) {
                return
            }
            this.removeAll()
            this.removeAllArrow()
            arrowsListLayer.clear()
            this.showingSecurityId = item.id
            arrowsListLayer != null && arrowsListLayer.clear()
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'newDrawLayers',
                type: 'VectorLayer'
@@ -1393,10 +1394,20 @@
                layerName: 'polygonLayer',
                type: 'VectorLayer'
            })
            this.$EventBus.$emit('mapRemoveLayer', {
                layerName: 'monitoringLayers',
                type: 'VectorLayer'
            })
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'polylineLayer',
                type: 'VectorLayer'
            })
            this.showingSecurityId = item.id
            // 加载当前活动面
            if (item.activityArea && item.activityArea.length > 0) {
                let polyGonData = item.activityArea.slice(11, item.activityArea.length - 1)
                polyGonData = polyGonData.replace(/,/g, ";")
@@ -1409,31 +1420,17 @@
                })
            }
            // 警力资源
            this.getSecurityPoliceList(item.id, this.policeSwitch)
            this.getSecurityCarList(item.id, this.policeSwitch, this.polylineBtnSwitch)
            // 作战标绘
            this.getSecurityPlotList(item.id, this.arrowBtnSwitch)
            if (this.currentClickIndex !== '' && this.currentClickIndex == index) {
                return
            }
            this.analyseInput = 100
            // 巡逻路线
            this.getSecurityCarList(item.id, this.policeSwitch, this.polylineBtnSwitch)
            this.activityDetails = item
            if (analyseLayer != null) {
                analyseLayer.clear()
            }
            let positionObj = this.convertBillboardPositionDate(item, 'activity')
            let point = new global.DC.Point(`${positionObj.lng}, ${positionObj.lat}`)
            analyseLayer.addOverlay(point)
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'polylineLayer',
                type: 'VectorLayer'
            })
            this.dialogVisible = true
            if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == item.deptId) {
                this.isShowActivityEditBox = true
            } else {
@@ -1448,6 +1445,8 @@
                siteWd: positionObj.lat,
                siteGd: 1500
            })
            this.dialogVisible = true
        },
        // 切换轨警力资源显示
@@ -1467,17 +1466,6 @@
            this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch)
        },
        // 输入绘制线范围
        analyseChange (e) {
            analyseLayer.removeOverlay(analysePolygon)
            let coords = global.DC.GeoTools.pointBuffer(`${this.activityDetails.lng}, ${this.activityDetails.lat}`, e)
            analysePolygon = new global.DC.Polygon(coords)
            analysePolygon.setStyle({
                material: global.DC.Color.RED.withAlpha(0.4)
            })
            analyseLayer.addOverlay(analysePolygon)
        },
        // 分页页码变化事件
        handleCurrentChange: function (currentPage) {
            this.currentPage = currentPage
@@ -1492,7 +1480,6 @@
            this.isTrackBtnShow = false
            this.closeVideo()
            this.currentClickIndex = ''
            analyseLayer.clear()
            arrowsListLayer.clear()
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'polylineLayer',
@@ -1580,7 +1567,15 @@
        // 删除所有地图绘制元素
        removeAll () {
            drawLayers.clear()
            drawLayers != null && drawLayers.clear()
        },
        /**
         * @description: 箭头
         * @return {*}
         */
        removeAllArrow () {
            drawArrowLayers != null && drawArrowLayers.clear()
        },
        drawArrow (type, iconType) {
@@ -1676,12 +1671,6 @@
                        })
                    }
                }, { material: global.DC.Color.RED })
            }
        },
        removeAllArrow () {
            if (drawArrowLayers != null) {
                drawArrowLayers.clear()
            }
        },
@@ -2700,7 +2689,6 @@
            type: 'VectorLayer'
        })
        analyseLayer.remove()
        arrowsListLayer.remove()
        lineLayer.remove()
        if (pointCircleManLayer != null) {