1
guanqb
2023-02-28 7110bf3d7edd43236f1ff5fd8c3b237f1888dbda
1
2 files modified
1 files added
42 ■■■■ changed files
public/img/icon/car3.png patch | view | raw | blame | history
src/components/map/index.vue 6 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 36 ●●●● patch | view | raw | blame | history
public/img/icon/car3.png
src/components/map/index.vue
@@ -435,7 +435,7 @@
        this.$EventBus.$on('layerPointAdd', (params) => {
            // eslint-disable-next-line no-unused-vars
            that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident)
            that.layerPointAdd(params.layerName, params.type, params.layerType, params.params, params.distanceDisplayCondition, params.incident,params.mouseOverIcident)
        })
        this.$EventBus.$on('layerPolygonAdd', (params) => {
@@ -715,7 +715,7 @@
        layerPointAdd (layerName, type, layerType = 'VectorLayer', params, distanceDisplayCondition = {
            near: 0, //最近距离
            far: Number.MAX_VALUE //最远距离
        }, incident = (e) => { }) {
        }, incident = (e) => { },mouseOverIcident = (e) => { }) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, layerType)
            }
@@ -729,6 +729,8 @@
                pointElement.attrParams = params
                layersObjcect[layerName].addOverlay(pointElement)
                pointElement.on(global.DC.MouseEventType.CLICK, incident)
                pointElement.on(global.DC.MouseEventType.MOUSE_OVER, mouseOverIcident)
            } else if (type == "label") {
                labelElement = new global.DC.Label(new global.DC.Position(Number(params.lng), Number(params.lat), Number(params.alt)), params.text)
                labelElement.setStyle({
src/views/activity/index.vue
@@ -932,6 +932,7 @@
                        let coords = global.DC.GeoTools.polylineBuffer(positionNewArr, item.width != -1 ? item.width : 100)
                        let polygon = new global.DC.Polygon(coords)
                        let color = ''
                        let lineColor = ''
                        if (item.color == '') {
                            color = global.DC.Namespace.Cesium.Color.fromBytes(255, 0, 0, 150)
                        } else {
@@ -939,6 +940,7 @@
                            let g = parseInt(item.color.slice(3, 5), 16)
                            let b = parseInt(item.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)
                        }
                        let position = ''
                        // 面坐标字符串
@@ -956,7 +958,7 @@
                        let lineObj = new global.DC.Polyline(positionNewArr)
                        lineLayer.addOverlay(lineObj)
                        lineObj.setStyle({
                            'material': global.DC.Color.RED.withAlpha(0.8),
                            'material': lineColor,
                            'width': 3
                        })
                        item.lineObj = lineObj
@@ -991,7 +993,8 @@
                            layerName: 'newCarDrawLayers',
                            type: 'billboard',
                            params: positionObj,
                            incident: this.overlayTypeClick
                            incident: this.overlayTypeClick,
                            mouseOverIcident:this.pointMouseOver
                        })
                    }
                })
@@ -1132,7 +1135,7 @@
            } else if (iconName == 'policeman') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/police-people.png', id: plotId, policemanId: policeId, deptId: deptId }
            } else if (iconName == 'policecar') {
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/car.png', id: plotId, carId: policeId, deptId: deptId }
                positionObj = { lng: `${positionArr[0]}`, lat: `${positionArr[1]}`, alt: 0, url: '/img/icon/car3.png', id: plotId, carId: policeId, deptId: deptId }
            }
            return positionObj
        },
@@ -2194,6 +2197,12 @@
            return data.name.indexOf(value) !== -1
        },
        // 鼠标移入图标事件
        pointMouseOver(e){
            console.log(12345);
            console.log(e);
        },
    },
    computed: {
@@ -2206,7 +2215,26 @@
    watch: {
        searchPoliceTreeName (val) {
            this.$refs.policeTree.filter(val)
        }
        },
        choosePlotColor(val){
            console.log(val);
            // #1FBC9C
            // #1CA085
            // #2ECC70
            // #27AF60
            // #3398DB
            // #2980B9
            // #A463BF
            // #8E43AD
            // #3D556E
            // #222F3D
            // #F2C511
            // #F39C19
            // #E84B3C
            // #C0382B
            // #DDE6E8
            // #BDC3C8
        },
    },