shuishen
2023-04-23 cb4147bee9292168d7ae46913ef016dd2fd98ccb
警戒线更改
2 files modified
1 files added
27 ■■■■■ changed files
public/images/jjx.png patch | view | raw | blame | history
src/components/map/index.vue 23 ●●●●● patch | view | raw | blame | history
src/views/activity/components/publicIndex.vue 4 ●●● patch | view | raw | blame | history
public/images/jjx.png
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-04-22 09:14:55
 * @LastEditTime: 2023-04-23 20:40:15
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -471,6 +471,10 @@
        this.$EventBus.$on('layerWallAdd', (params) => {
            that.layerWallAdd(params.layerName, params.positions)
        })
        this.$EventBus.$on('rowLayerWallAdd', (params) => {
            that.rowLayerWallAdd(params.layerName, params.positions)
        })
        this.$EventBus.$on('getOverLayerID', (params) => {
@@ -1082,6 +1086,23 @@
            layersObjcect[layerName].addOverlay(wall)
        },
        rowLayerWallAdd (layerName, positions) {
            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: '/images/jjx.png',
                    color: global.DC.Namespace.Cesium.Color.fromBytes(255, 255, 0, 180),
                    repeat: { x: 20, y: 1 },
                    speed: 10
                })
            })
            layersObjcect[layerName].addOverlay(wall)
        },
        /**
         * @description: 通过ID获取图层
         * @return {*}
src/views/activity/components/publicIndex.vue
@@ -318,6 +318,8 @@
            // 加载当前活动区域
            if (params.item.activityArea && params.item.activityArea.length > 0) {
                console.log(params.item.activityArea, 36223322)
                let polyGonData = params.item.activityArea.slice(11, params.item.activityArea.length - 1)
                polyGonData = polyGonData.replace(/,/g, ";")
                polyGonData = polyGonData.replace(/ /g, ",")
@@ -332,7 +334,7 @@
                console.log(newPolyData, 456)
                this.$EventBus.$emit('layerWallAdd', {
                this.$EventBus.$emit('rowLayerWallAdd', {
                    layerName: 'polygonWallLayer',
                    positions: newPolyData
                })