guanqb
2022-09-27 08c2dad37344c308330c70627bbfa32b42e93c5b
责任区名称添加
1 files modified
30 ■■■■ changed files
src/views/home/index.vue 30 ●●●● patch | view | raw | blame | history
src/views/home/index.vue
@@ -342,7 +342,7 @@
                {
                    policeStationId: 1,
                    areaCheckId: 101,
                    areaCheckname: '责任区1',
                    areaCheckName: '责任区1',
                    position: [
                        [116.015526, 28.647454, 0],
                        [116.285670, 28.732610, 0],
@@ -354,7 +354,7 @@
                {
                    policeStationId: 1,
                    areaCheckId: 102,
                    areaCheckname: '责任区2',
                    areaCheckName: '责任区2',
                    position: [
                        [116.285670, 28.732610, 0],
                        [116.085312, 28.807226, 0],
@@ -366,7 +366,7 @@
                {
                    policeStationId: 1,
                    areaCheckId: 103,
                    areaCheckname: '责任区3',
                    areaCheckName: '责任区3',
                    position: [
                        [116.085312, 28.807226, 0],
                        [115.930150, 28.733535, 0],
@@ -378,7 +378,7 @@
                {
                    policeStationId: 1,
                    areaCheckId: 104,
                    areaCheckname: '责任区4',
                    areaCheckName: '责任区4',
                    position: [
                        [115.930150, 28.733535, 0],
                        [115.986738, 28.683523, 0],
@@ -391,7 +391,7 @@
                {
                    policeStationId: 1,
                    areaCheckId: 105,
                    areaCheckname: '责任区5',
                    areaCheckName: '责任区5',
                    position: [
                        [116.045446, 28.729623, 0],
                        [116.063119, 28.708172, 0],
@@ -553,7 +553,7 @@
                    let titleLng = center[0] - 0.01
                    let titleLat = center[1] - 0.03
                    this.$EventBus.$emit('layerPointAdd', {
                        layerName: 'homePersonLayer',
                        layerName: 'policeStationLayer',
                        type: 'label',
                        params: {
                            lng: titleLng,
@@ -594,6 +594,22 @@
                        far: 20000 //最远距离
                    }
                })
                const center = this.getCenter(item.position)
                this.$EventBus.$emit('layerPointAdd', {
                    layerName: 'areaCheckLayer',
                    type: 'label',
                    params: {
                        lng: center[0],
                        lat: center[1],
                        alt: 1200,
                        text: item.areaCheckName
                    },
                    distanceDisplayCondition: {
                        near: 0, //最近距离
                        far: 20000 //最远距离
                    }
                })
            })
            this.houseChange(true)
@@ -603,7 +619,7 @@
    },
    methods: {
        policeStationSelect (item, index) {
            this.policeStationCheckValue = item.name
            this.policeStationCheckValue = item.policeStationName
            if (item.name == "全部") {
                this.$EventBus.$emit('toPosition', {