shuishen
2023-03-22 535c16b409fbfa2d25b34104ba93d54a5cb91fa6
活动流动墙
2 files modified
46 ■■■■ changed files
src/components/map/index.vue 24 ●●●●● patch | view | raw | blame | history
src/views/activity/index.vue 22 ●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 17:00:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-03-21 09:53:10
 * @LastEditTime: 2023-03-22 16:17:41
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -480,6 +480,10 @@
            that.layerPolylineAdd(params.layerName, params.positions, params.material, params.width, params.params, params.incident)
        })
        this.$EventBus.$on('layerWallAdd', (params) => {
            that.layerWallAdd(params.layerName, params.positions, params.imgUrl)
        })
        this.$EventBus.$on('getOverLayerID', (params) => {
            that.getOverLayerID(params.layerName, params.ids, params.cb)
        })
@@ -916,6 +920,24 @@
            layersObjcect[layerName].addOverlay(polyline)
        },
        layerWallAdd (layerName, positions, imgUrl) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, 'VectorLayer')
            }
            let wall = new global.DC.Wall(positions)
            wall.setStyle({
                material: new global.DC.WallImageTrailMaterialProperty({
                    image: imgUrl,
                    color: global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 200),
                    repeat: { x: 3, y: 1 },
                    speed: 4
                })
            })
            layersObjcect[layerName].addOverlay(wall)
        },
        /**
         * @description: 通过ID获取图层
         * @return {*}
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-22 15:24:17
 * @LastEditTime: 2023-03-22 16:11:13
 * @FilePath: \srs-police-affairs\src\views\activity\index.vue
 * @Description: 电子沙盘
 *
@@ -677,11 +677,21 @@
                let polyGonData = item.activityArea.slice(11, item.activityArea.length - 1)
                polyGonData = polyGonData.replace(/,/g, ";")
                polyGonData = polyGonData.replace(/ /g, ",")
                let newPolyData = polyGonData.split(';').map(item => {
                    let lngOrlat = item.split(',')
                    lngOrlat.push(140)
                this.$EventBus.$emit('layerPolygonAdd', {
                    layerName: 'polygonLayer',
                    positions: polyGonData,
                    material: global.DC.Namespace.Cesium.Color.fromBytes(139, 195, 74, 100)
                    lngOrlat = lngOrlat.join(',')
                    return lngOrlat
                }).join(';')
                console.log(newPolyData, 9599666)
                this.$EventBus.$emit('layerWallAdd', {
                    layerName: 'polygonWallLayer',
                    positions: newPolyData,
                    imgUrl: '/img/bg/jj.png'
                })
            }
@@ -2049,7 +2059,7 @@
        })
        this.$EventBus.$emit('mapRemoveLayer', {
            layerName: 'polygonLayer',
            layerName: 'polygonWallLayer',
            type: 'VectorLayer'
        })