guanqb
2023-03-16 815518df3b82838ed9fbb9e0fd506fa024bfa5d7
src/views/activity/index.vue
@@ -258,7 +258,6 @@
let loading = null
let overlayObj = {}
let lineObjdata = null
let plotOverlayData = null
let policeOverlayData = null
let policecarOption = []
@@ -669,7 +668,6 @@
            this.getSecurityPlotList(item.id, this.policeSwitch, 'billboard')
            this.getSecurityPlotList(item.id, this.arrowBtnSwitch, 'plot')
            this.activityDetails = item
            let positionObj = this.convertBillboardPositionDate(item, 'activity')
@@ -883,7 +881,7 @@
         * @return {*}
         */
        getSecurityCarList (securityId, pointShow, polylineShow, type = 'all') {
            this.$refs.DRAWBTNBOX.removeDraw()
            this.$refs.DRAWBTNBOX.clearDraw()
            if (type == 'car') {
                pointCircleManLayer != null && pointCircleManLayer.clear()
@@ -1460,7 +1458,7 @@
        cancelSaveLine () {
            this.lineEditVisible = false
            // this.$refs.DRAWBTNBOX.removeDraw()
            this.$refs.DRAWBTNBOX.removeDraw()
        },
        // 巡逻路线面点击事件
@@ -1471,10 +1469,10 @@
            this.chooseColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#1CA085'
            this.policeIconId = e.overlay.attrParams.id
            policeOverlayData = e
            curLinePosition = e.overlay.attrParams.linePositionStr
            curLinePolygonPosition = e.overlay.attrParams.polygonPositionStr
            lineObjdata = e.overlay.attrParams.lineObj
            if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) {
                this.lineEditTitle = '修改巡逻路线'
@@ -1578,7 +1576,7 @@
        // 保存巡逻路线信息
        saveLineInfo () {
            this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth })
            this.$refs.DRAWBTNBOX.updateActivityCar({ id: this.policeIconId, color: this.chooseColor, width: this.lineWidth },policeOverlayData.overlay)
            this.lineEditVisible = false
        },
@@ -1591,7 +1589,7 @@
                color: this.chooseColor,
                width: this.lineWidth
            })
            this.cancelSaveLine()
            this.lineEditVisible = false
        },
        // 修改巡逻路线位置信息
@@ -1602,7 +1600,7 @@
                type: 'VectorLayer'
            })
            this.$refs.DRAWBTNBOX.plotEdit(lineObjdata, 'line')
            this.$refs.DRAWBTNBOX.plotEdit(policeOverlayData.overlay, 'line')
        },
        // 保存绘制区域
@@ -1642,8 +1640,11 @@
                        type: 'success'
                    })
                    policeOverlayData.overlay.remove()
                    if('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){
                        policeOverlayData.overlay.attrParams.lineObj.remove()
                    }
                } else {
                    this.$message({
@@ -1651,7 +1652,6 @@
                        type: 'error'
                    })
                }
                // this.getSecurityCarList(this.showingSecurityId, this.policeSwitch, this.polylineBtnSwitch, type)
            })
        },