shuishen
2023-03-14 5aa70838b602e30f25c702c2d771eaa8c995ef4a
修改
3 files modified
170 ■■■■■ changed files
package.json 1 ●●●● patch | view | raw | blame | history
pnpm-lock.yaml 12 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 157 ●●●●● patch | view | raw | blame | history
package.json
@@ -22,6 +22,7 @@
        "element-ui": "^2.15.6",
        "flv.js": "^1.6.2",
        "font-awesome": "^4.7.0",
        "js-base64": "^3.7.5",
        "js-md5": "^0.7.3",
        "lib-flexible": "^0.3.2",
        "moment": "^2.29.1",
pnpm-lock.yaml
@@ -24,6 +24,7 @@
  eslint-plugin-vue: ^6.2.2
  flv.js: ^1.6.2
  font-awesome: ^4.7.0
  js-base64: ^3.7.5
  js-md5: ^0.7.3
  lib-flexible: ^0.3.2
  mockjs: ^1.1.0
@@ -40,7 +41,6 @@
  vue-axios: ^3.3.7
  vue-router: ^3.2.0
  vue-seamless-scroll: ^1.1.23
  vue-swatches: ^2.1.1
  vue-template-compiler: ^2.6.11
  vuex: ^3.4.0
@@ -59,6 +59,7 @@
  element-ui: 2.15.13_vue@2.7.14
  flv.js: 1.6.2
  font-awesome: 4.7.0
  js-base64: 3.7.5
  js-md5: 0.7.3
  lib-flexible: 0.3.2
  moment: 2.29.4
@@ -72,7 +73,6 @@
  vue-axios: 3.5.2_axios@0.22.0+vue@2.7.14
  vue-router: 3.6.5_vue@2.7.14
  vue-seamless-scroll: 1.1.23
  vue-swatches: 2.1.1
  vuex: 3.6.2_vue@2.7.14
devDependencies:
@@ -7378,6 +7378,10 @@
    resolution: {integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ==}
    dev: false
  /js-base64/3.7.5:
    resolution: {integrity: sha512-3MEt5DTINKqfScXKfJFrRbxkrnk2AxPWGBL/ycjz4dK8iqiSJ06UxD8jh8xuh6p10TX4t2+7FsBYVxxQbMg+qA==}
    dev: false
  /js-md5/0.7.3:
    resolution: {integrity: sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==}
    dev: false
@@ -11012,10 +11016,6 @@
      hash-sum: 1.0.2
      loader-utils: 1.4.2
    dev: true
  /vue-swatches/2.1.1:
    resolution: {integrity: sha512-YugkNbByxMz1dnx1nZyHSL3VSf/TnBH3/NQD+t8JKxPSqUmX87sVGBxjEaqH5IMraOLfVmU0pHCHl2BfXNypQg==}
    dev: false
  /vue-template-compiler/2.7.14:
    resolution: {integrity: sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==}
src/views/home/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-09 17:13:53
 * @LastEditTime: 2023-03-14 16:48:21
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -503,9 +503,6 @@
import { getActAsPoliceList, getEquipmentPaging, getPoliceStationTree, getEquipmentAll, getLandDetail } from "@/api/home/index.js"
import { getTalkEquimentPage, getPoliceCameraEquimentPage } from '@/api/home/equiment.js'
export default {
    inject: ['userInfo'],
@@ -649,8 +646,8 @@
        // }, 3000)
        this.getEquipmentAll({ type: 0 })
        this.getEquipmentAll({ type: 1 })
    },
    mounted () {
@@ -683,6 +680,9 @@
                        name: '全部',
                        id: 1
                    })
                    this.getEquipmentAll({ type: 0, deptId: this.userInfo.dept_id })
                    this.getEquipmentAll({ type: 1, deptId: this.userInfo.dept_id })
                    if (this.userInfo.dept_id != '1123598813738675201') {
@@ -756,11 +756,77 @@
        },
        getEquipmentAll (params) {
            getEquipmentAll({ ...params, deptId: this.userInfo.dept_id }).then(res => {
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'carLayers',
                type: 'VectorLayer'
            })
            this.$EventBus.$emit('mapClearLayer', {
                layerName: 'cameraLayers',
                type: 'VectorLayer'
            })
            getEquipmentAll({ ...params }).then(res => {
                if (params.type == 0) {
                    this.carList = res.data.data
                    if (this.carList.length > 0) {
                        this.carList.forEach(item => {
                            if (item.longitude && item.latitude) {
                                this.$EventBus.$emit('layerPointAdd', {
                                    layerName: 'carLayers',
                                    type: "billboard",
                                    layerType: 'ClusterLayer',
                                    params: {
                                        ...item,
                                        lng: item.longitude,
                                        lat: item.latitude,
                                        alt: 1,
                                        url: '/img/icon/car.png'
                                    },
                                    incident: this.phoneSiteClick
                                })
                            }
                        })
                        this.carChange(this.carLayerShow)
                    }
                } else {
                    this.cameraList = res.data.data
                    if (this.cameraList.length > 0) {
                        this.cameraList.forEach(item => {
                            if (item.longitude && item.latitude) {
                                // this.$EventBus.$emit('layerPointAdd', {
                                //     layerName: 'cameraLayers',
                                //     type: 'label',
                                //     params: {
                                //         lng: item.longitude,
                                //         lat: item.latitude,
                                //         alt: 1,
                                //         text: item.name
                                //     },
                                //     distanceDisplayCondition: { "near": 0, "far": 200000 }
                                // })
                                this.$EventBus.$emit('layerPointAdd', {
                                    layerName: 'cameraLayers',
                                    type: "billboard",
                                    layerType: 'ClusterLayer',
                                    params: {
                                        ...item,
                                        lng: item.longitude,
                                        lat: item.latitude,
                                        alt: 1,
                                        url: '/img/icon/camera.png'
                                    },
                                    incident: this.siteClick
                                })
                            }
                        })
                        this.cameraChange(this.cameraLayerShow)
                    }
                }
            })
        },
@@ -832,6 +898,9 @@
                this.housingCheckValue = '请选择小区'
                this.policeStaionID = ''
                this.getEquipmentAll({ type: 0, deptId: this.userInfo.dept_id })
                this.getEquipmentAll({ type: 1, deptId: this.userInfo.dept_id })
            } else {
                cylinderLayer.clear()
                this.getPoliceStationTree(2, item.id)
@@ -839,6 +908,9 @@
                this.housingCheckValue = '请选择小区'
                this.policeStaionID = item.id
                this.getEquipmentAll({ type: 0, deptId: this.policeStaionID })
                this.getEquipmentAll({ type: 1, deptId: this.policeStaionID })
            }
            this.$refs.leftContainer.getHomeAllData(this.policeStaionID)
@@ -951,71 +1023,28 @@
        carChange (e) {
            if (e == true) {
                if (this.carList.length > 0) {
                    this.carList.forEach(item => {
                        if (item.longitude && item.latitude) {
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'carLayers',
                                type: "billboard",
                                layerType: 'ClusterLayer',
                                params: {
                                    ...item,
                                    lng: item.longitude,
                                    lat: item.latitude,
                                    alt: 1,
                                    url: '/img/icon/car.png'
                                },
                                incident: this.phoneSiteClick
                            })
                        }
                    })
                }
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                this.$EventBus.$emit('layerShow', {
                    layerName: 'carLayers',
                    type: 'VectorLayer'
                    flag: false
                })
            } else {
                this.$EventBus.$emit('layerShow', {
                    layerName: 'carLayers',
                    flag: false
                })
            }
        },
        cameraChange (e) {
            if (e == true) {
                if (this.cameraList.length > 0) {
                    this.cameraList.forEach(item => {
                        if (item.longitude && item.latitude) {
                            // this.$EventBus.$emit('layerPointAdd', {
                            //     layerName: 'cameraLayers',
                            //     type: 'label',
                            //     params: {
                            //         lng: item.longitude,
                            //         lat: item.latitude,
                            //         alt: 1,
                            //         text: item.name
                            //     },
                            //     distanceDisplayCondition: { "near": 0, "far": 200000 }
                            // })
                            this.$EventBus.$emit('layerPointAdd', {
                                layerName: 'cameraLayers',
                                type: "billboard",
                                layerType: 'ClusterLayer',
                                params: {
                                    ...item,
                                    lng: item.longitude,
                                    lat: item.latitude,
                                    alt: 1,
                                    url: '/img/icon/camera.png'
                                },
                                incident: this.siteClick
                            })
                        }
                    })
                }
            } else {
                this.$EventBus.$emit('mapClearLayer', {
                this.$EventBus.$emit('layerShow', {
                    layerName: 'cameraLayers',
                    type: 'VectorLayer'
                    flag: true
                })
            } else {
                this.$EventBus.$emit('layerShow', {
                    layerName: 'cameraLayers',
                    flag: false
                })
            }
        },