guanqb
2023-03-14 35d586508b6f1a12319bd4fce15cf6b1269d3d6c
警员新增渲染逻辑调整
2 files modified
18 ■■■■■ changed files
src/views/activity/components/drawBtnBox.vue 15 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 3 ●●●● patch | view | raw | blame | history
src/views/activity/components/drawBtnBox.vue
@@ -348,13 +348,17 @@
        // 删除所有地图绘制元素
        removeDraw () {
            drawLayers != null && drawLayers.clear()
            // drawLayers != null && drawLayers.clear()
            addPoliceIconOverlayData!= null && !addPoliceIconOverlayData.attrParams && addPoliceIconOverlayData.remove()
        },
        removeDrawArrow () {
            // drawArrowLayers != null && drawArrowLayers.clear()
            addPlotOverlayData != null && addPlotOverlayData.remove()
            labelOverLayerID = []
        },
        clearDrawArrow() {
            drawArrowLayers != null && drawArrowLayers.clear()
        },
        // 编辑标绘位置
@@ -473,7 +477,7 @@
        addNewPolice(data,type){
                let positionObj = this.$parent.convertBillboardPositionDate(data, type)
                let positionArr = data.position.slice(12, data.position.length - 2).split(',')[0].split(' ')
                let positionArr = data.position.slice(7, data.position.length - 2).split(',')[0].split(' ')
                let position = new global.DC.Position(Number(positionArr[0]), Number(positionArr[1]))
                let point = new global.DC.Point(position)
                let color = ''
@@ -485,14 +489,13 @@
                    let b = parseInt(data.color.slice(5, 7), 16)
                    color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 255)
                }
                console.log(positionObj,position,point,999);
                point.attrParams = positionObj
                drawLayers.addOverlay(point)
                point.setStyle({
                    "color": global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150), //颜色
                    "color": color, //颜色
                    "outlineColor": color, //边框颜色
                    "outlineWidth": 0, //边框大小,
                    "pixelSize": 82,
                    "pixelSize": 32,
                })
                point.on(global.DC.MouseEventType.CLICK, this.$parent.overlayTypeClick)
                point.on(global.DC.MouseEventType.MOUSE_OVER, this.$parent.pointMouseOver)
src/views/activity/index.vue
@@ -627,7 +627,7 @@
            this.polylineBtnSwitch = false
            this.$refs.DRAWBTNBOX.removeDraw()
            this.$refs.DRAWBTNBOX.removeDrawArrow()
            this.$refs.DRAWBTNBOX.clearDrawArrow()
            arrowsListLayer != null && arrowsListLayer.clear()
@@ -1439,6 +1439,7 @@
        // 地图绘制元素点击事件
        overlayTypeClick (e) {
            console.log(e,336633);
            if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) {
                this.isChoosePoliceElementDisabled = false
            } else {