jxdnsong
2023-04-05 d5eece86c4754bf20d540339477209d23c2d7b4c
Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs into master
5 files modified
1 files added
233 ■■■■ changed files
src/api/dept/index.js 18 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 62 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 8 ●●●●● patch | view | raw | blame | history
src/views/house/2.js 67 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 74 ●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-11-30 15:18:29
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-02-10 10:22:04
 * @LastEditTime: 2023-04-05 00:49:17
 * @FilePath: \srs-police-affairs\src\api\dept\index.js
 * @Description:
 *
@@ -29,7 +29,7 @@
 */
export const getResidentialQuartersList = (adcode) => {
    return request({
        url: '/sf3d_xinzhou/area/list',
        url: '/sf3d/area/list',
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
@@ -45,7 +45,7 @@
 */
export const getResidentialQuartersInfo = (area_id, adcode) => {
    return request({
        url: '/sf3d_xinzhou/area/info',
        url: '/sf3d/area/info',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
@@ -64,8 +64,8 @@
 */
export const getAoiByPt = (lng, lat, height, adcode, tolerance) => {
    return request({
        // url: '/sf3d_xinzhou/area/getAoiByPt',
        url: '/sf3d_xinzhou/area/stdgetAoiByPt',
        // url: '/sf3d/area/getAoiByPt',
        url: '/sf3d/area/stdgetAoiByPt',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
@@ -86,7 +86,7 @@
 */
export const getUnitbuild = (area_id, adcode) => {
    return request({
        url: '/sf3d_xinzhou/area/unitbuild',
        url: '/sf3d/area/unitbuild',
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
@@ -103,8 +103,8 @@
 */
export const getHouses = (build_id, adcode) => {
    return request({
        // url: '/sf3d_xinzhou/build/houses',
        url: '/sf3d_xinzhou/build/stdhouses',
        // url: '/sf3d/build/houses',
        url: '/sf3d/build/stdhouses',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
@@ -181,7 +181,7 @@
// 转id
export const getAoiByBgId = (bg_id) => {
    return request({
        url: `/sf3d_xinzhou/area/getAoiByBgId`,
        url: `/sf3d/area/getAoiByBgId`,
        method: 'get',
        requestBaseUrl: 'fengt',
        params: {
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-04 18:18:42
 * @LastEditTime: 2023-04-05 00:50:03
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -249,6 +249,9 @@
            global.viewer.addLayer(layersObjcect.monitoringLayer)
            layersObjcect.panoramaLayer = new global.DC.VectorLayer('panoramaLayer')
            global.viewer.addLayer(layersObjcect.panoramaLayer)
            floorEntitysLayers = new global.DC.VectorLayer('floorEntitysLayers')
            global.viewer.addLayer(floorEntitysLayers)
            // 模型图层添加
            tilesetLayer = new global.DC.TilesetLayer('tilesetLayer')
@@ -608,7 +611,7 @@
            })
            // this.addMxTileset('sdTilesetLayer', `${tile3DUrl}/sf3d/361102/model/wanda/tileset.json`)
            // this.addMxTileset('sdTilesetLayer', `https://tuan-gis.sit.fengtu.com.cn/361102/wanda/tileset.json`)
            // this.addMxTileset('sdTilesetLayer02', `https://tuan-gis.sit.fengtu.com.cn/361102/wanda/tileset.json`)
            // this.addMxTileset('sdTilesetLayer', `/mx/01/tileset.json`)
            if (this.tilesetLayerType == type && status == '') {
@@ -744,7 +747,7 @@
         * @param {*} layerName 图层名称
         * @param {*} type 图层类型
         */
        mapAddLayer (layerName, type) {
        mapAddLayer (layerName, type, ClusterLayerType) {
            if (type == 'VectorLayer') {
                if (!layersObjcect[layerName]) layersObjcect[layerName] = null
@@ -753,9 +756,8 @@
                layersObjcect[layerName].addTo(global.viewer)
            } else if (type == 'ClusterLayer') {
                if (!layersObjcect[layerName]) layersObjcect[layerName] = null
                layersObjcect[layerName] = new global.DC.ClusterLayer(layerName, {
                    pixelRange: 40
                    pixelRange: 40, style: ClusterLayerType
                })
                layersObjcect[layerName].addTo(global.viewer)
@@ -831,7 +833,7 @@
            far: Number.MAX_VALUE //最远距离
        }, incident = (e) => { }, mouseOverIncident = (e) => { }, mouseOutIncident = (e) => { }, pointMouseMove = (e) => { }) {
            if (!layersObjcect[layerName] || layersObjcect[layerName] == null) {
                this.mapAddLayer(layerName, layerType)
                this.mapAddLayer(layerName, layerType, params.ClusterLayerType)
            }
            let pointElement
@@ -844,6 +846,7 @@
                pointElement = new global.DC.Billboard(new global.DC.Position(Number(params.lng), Number(params.lat), 4), params.url)
                pointElement.setStyle(params.setStyle)
                pointElement.size = [32, 32]
                pointElement.style = "clustering"
                pointElement.attrParams = params
                layersObjcect[layerName].addOverlay(pointElement)
                pointElement.on(global.DC.MouseEventType.CLICK, incident)
@@ -1116,43 +1119,42 @@
        * @param {*} 
        */
        showThreeDimensions (positions, minHeight, maxHeight) {
            if (flootEntitysEntites == null) {
                floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers")
                global.viewer.dataSources.add(floorEntitysLayers)
                flootEntitysEntites = floorEntitysLayers.entities
            } else {
                flootEntitysEntites.removeAll()
            if (floorEntitysLayers != null) {
                floorEntitysLayers.remove()
                floorEntitysLayers = new global.DC.VectorLayer('floorEntitysLayers')
                global.viewer.addLayer(floorEntitysLayers)
            }
            floorEntitysLayers.clear()
            let housePositions = JSON.parse(positions).coordinates[0]
            let floorPositions = housePositions.reduce((prev, curr) => {
                curr.forEach(item => {
                    prev.push(item)
                })
                prev.push([curr[0], curr[1]])
                return prev
            }, [])
            flootEntitysEntites.add({
                polygon: {
                    hierarchy: global.DC.Namespace.Cesium.Cartesian3.fromDegreesArrayHeights(floorPositions),
                    heightReference: global.DC.Namespace.Cesium.HeightReference.RELATIVE_TO_GROUND,
                    extrudedHeightReference: global.DC.Namespace.Cesium.HeightReference.RELATIVE_TO_GROUND,
                    height: minHeight,
                    extrudedHeight: maxHeight,
            let polygonStr = floorPositions.join(';')
            let polygon = new global.DC.Polygon(polygonStr)
            polygon.setStyle({
                    material: global.DC.Namespace.Cesium.Color.RED.withAlpha(0.5),
                }
                extrudedHeight: maxHeight,
                height: minHeight,
                extrudedHeightReference: global.DC.Namespace.Cesium.HeightReference.RELATIVE_TO_GROUND,
                heightReference: global.DC.Namespace.Cesium.HeightReference.RELATIVE_TO_GROUND
            })
            floorEntitysLayers.addOverlay(polygon)
            floorEntitysLayers.show = true
        },
        // 清除建筑3D
        clearHouse3D () {
            if (flootEntitysEntites == null) {
                floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers")
                global.viewer.dataSources.add(floorEntitysLayers)
                flootEntitysEntites = floorEntitysLayers.entities
            } else {
                flootEntitysEntites.removeAll()
            }
            floorEntitysLayers.clear()
        },
    },
src/views/home/index.vue
@@ -589,13 +589,14 @@
                    if (item.X && item.X != '' && item.Y && item.Y != '') {
                        this.$EventBus.$emit('layerPointAdd', {
                            layerName: 'keypeopleslay',
                            layerName: 'keypeopleslayer',
                            type: "billboard",
                            layerType: 'ClusterLayer',
                            params: {
                                lng: Number(item.X),
                                lat: Number(item.Y),
                                url: '/img/icon/keypeople.png'
                                url: '/img/icon/keypeople.png',
                                ClusterLayerType: "clustering"
                            }
                        })
                    }
@@ -609,7 +610,8 @@
                            params: {
                                lng: Number(item.x),
                                lat: Number(item.y),
                                url: '/img/icon/school.png'
                                url: '/img/icon/school.png',
                                ClusterLayerType: "circle"
                            }
                        })
                    }
src/views/house/2.js
New file
@@ -0,0 +1,67 @@
/*
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-04-04 23:17:30
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-04 23:24:14
 * @FilePath: \srs-police-affairs\src\views\house\2.js
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 */
{
    type: Polygon,
        coordinates: [
            [
                [
                    117.9535958,
                    28.4472951,
                    0
                ],
                [
                    117.9536016,
                    28.4471247,
                    0
                ],
                [
                    117.9536304,
                    28.4471072,
                    0
                ],
                [
                    117.9536986,
                    28.44713,
                    0
                ],
                [
                    117.9537122,
                    28.4471007,
                    0
                ],
                [
                    117.9537374,
                    28.4471592,
                    0
                ],
                [
                    117.9537155,
                    28.4472118,
                    0
                ],
                [
                    117.9537885,
                    28.4472371,
                    0
                ],
                [
                    117.953736,
                    28.4473437,
                    0
                ],
                [
                    117.9535958,
                    28.4472951,
                    0
                ]
            ]
        ]
}
src/views/house/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-04-04 10:05:38
 * @LastEditTime: 2023-04-05 00:58:14
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -201,7 +201,8 @@
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName" @row-click="deepDataRowClick($event, 'comeOut')"
                            empty-text="暂无出入口数据">
                            :empty-text="houseDeepNoDataText" v-loading="houseDeepLoading" element-loading-text="拼命加载中"
                            element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.2)">
                            <el-table-column prop="name" label="名称" width="180"
                                :show-overflow-tooltip="true"></el-table-column>
                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
@@ -214,7 +215,8 @@
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName" @row-click="deepDataRowClick($event, 'park')"
                            empty-text="暂无停车场数据">
                            :empty-text="houseDeepNoDataText" v-loading="houseDeepLoading" element-loading-text="拼命加载中"
                            element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.2)">
                            <el-table-column prop="name" label="名称" width="180"
                                :show-overflow-tooltip="true"></el-table-column>
                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
@@ -227,7 +229,9 @@
                            :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                            :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }"
                            :row-class-name="tableRowClassName" @row-click="deepDataRowClick($event, 'business')"
                            @sort-change="sortDevName" empty-text="暂无商场数据">
                            @sort-change="sortDevName" :empty-text="houseDeepNoDataText" v-loading="houseDeepLoading"
                            element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
                            element-loading-background="rgba(0, 0, 0, 0.2)">
                            <el-table-column sortable="custom" prop="name" label="名称" width="180"
                                :show-overflow-tooltip="true"></el-table-column>
                            <el-table-column prop="x" label="经度" width="100"></el-table-column>
@@ -270,7 +274,7 @@
        <map-search-box></map-search-box>
        <el-dialog title="报警信息" :modal="true" :visible.sync="policeSituationVisible" :append-to-body="true"
            :before-close="policeSituationBeforeClose" :close-on-click-modal="true" class="policeSituation-details-box">
            :close-on-click-modal="false" :before-close="policeSituationBeforeClose" class="policeSituation-details-box">
            <div class="box">
                <div class="item">
                    <div>接警单位编号:</div>
@@ -331,8 +335,8 @@
            </div>
        </el-dialog>
        <el-dialog :title="residentDetailsTitle" :modal="false" :visible.sync="residentDetailsShow"
            :before-close="residentDetailsClose" :close-on-click-modal="true" class="resident-details-box" width="24%">
        <el-dialog :title="residentDetailsTitle" :modal="true" :visible.sync="residentDetailsShow" :append-to-body="true"
            :close-on-click-modal="false" :before-close="residentDetailsClose" class="resident-details-box" width="24%">
            <el-table :data="houseDate"
                :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
                :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" v-loading="residentLoading"
@@ -344,8 +348,8 @@
            </el-table>
        </el-dialog>
        <el-dialog :title="keyPersonTitle" :modal="false" :visible.sync="keyPersonVisible"
            :before-close="keyPersonBeforeClose" :close-on-click-modal="true" class="keyPerson-details-box-two">
        <el-dialog :title="keyPersonTitle" :modal="true" :visible.sync="keyPersonVisible" :append-to-body="true"
            :close-on-click-modal="false" :before-close="keyPersonBeforeClose" class="keyPerson-details-box-two">
            <div class="header">
                <div>
                    姓名:
@@ -418,9 +422,11 @@
        return {
            // 下拉搜索--树状数据相关
            searchTreeShowFlag: false,
            houseDeepLoading: false,
            peopleNoDataText: ' ',
            jqNoDataText: ' ',
            residentNoDataText: ' ',
            houseDeepNoDataText: ' ',
            keyPeopleLoading: false,
            policeInfoLoading: false,
            isHaveNoPic: false,
@@ -606,7 +612,6 @@
    methods: {
        housingIndent (e) {
            console.log(e, 1111111)
            this.getAoiByPtStd(e)
        },
@@ -618,6 +623,18 @@
                layerName: "deepDataLayer",
                type: "VectorLayer",
            })
            this.houseDeepLoading = true
            this.houseDeepNoDataText = ' '
            setTimeout(() => {
                this.houseDeepLoading = false
                // if (comeOutData.length && type == 2) {
                //     this.houseDeepNoDataText = '暂无出入口数据'
                // } else if (parkingLotData.length && type == 3) {
                //     this.houseDeepNoDataText = '暂无停车场数据'
                // } else if (businessData.length && type == 4) {
                //     this.houseDeepNoDataText = '暂无商场数据'
                // }
            }, 500)
        },
        /**
@@ -728,6 +745,11 @@
                circleLayer = null
            }
            this.subNavType = 1
            this.comeOutData = []
            this.parkingLotData = []
            this.businessData = []
            this.getSearchExtensivelyBgAoiDeepdata(
                "ebf48ecaa1fd436fa3d40c4600aa051f",
                "361100",
@@ -842,6 +864,14 @@
                            floor_num: `${item.floor_num}`,
                            elev: `${item.elev}`,
                        })
                    })
                    this.$EventBus.$emit("toPosition", {
                        ...this.buildingList[0],
                        siteJd: Number(this.buildingList[0].siteJd),
                        siteWd: Number(this.buildingList[0].siteWd) - 0.0021,
                        siteGd: 240,
                        sitePitch: -45,
                    })
                    this.BuildListLoading = false
@@ -969,6 +999,20 @@
        // 点击户室
        residentDetailsClick (params) {
            const polygon = JSON.parse(params.properties.kmj3a).coordinates[0].reduce((pre, cur) => {
                pre.push([cur[0], cur[1]])
                return pre
            }, [])
            const homeCenter = this.$turf.centroid(this.$turf.polygon([polygon])).geometry.coordinates
            this.$EventBus.$emit("toPosition", {
                siteJd: Number(homeCenter[0]) + 0.00006,
                siteWd: Number(homeCenter[1]) - 0.00030,
                siteGd: params.properties.szhfr + 40,
                sitePitch: -45,
            })
            this.floorChoosed = params.properties.fojcu
            this.$EventBus.$emit("clearHouse3D")
            this.getVillagePersonInfo(params.properties.snxmi)
@@ -977,8 +1021,7 @@
            this.residentDetailsShow = true
            this.residentNoDataText = ' '
            this.residentLoading = true
            console.log("residentDetailsClick-params", params)
            this.$EventBus.$emit("showHouse3D", {
            this.$EventBus.$emit("showThreeDimensions", {
                positions: params.properties.kmj3a,
                minHeight: params.properties.szhfr,
                maxHeight: params.properties.szhfr + params.properties.hnagn,
@@ -990,7 +1033,6 @@
        },
        buildingClick (item, aoiArr) {
            console.log("buildingClick-start", 111)
            this.unitHouseChoosed = []
            this.pictLoading = true
            if (!aoiArr) {
@@ -1012,7 +1054,6 @@
            this.getVillagePersonStatisticInfoByBuildId(item.build_id)
            // 楼栋单元楼层户室查询
            this.getHouses(item.build_id, "361102", aoiArr)
            console.log("buildingClick-end")
            this.floorsType = 1
            document.querySelector(".floor-num").style.left = "0px"
            this.lastFloorShow = false
@@ -1509,7 +1550,6 @@
        // 大搜点查询
        getAoiByPtStd (e) {
            console.log('大搜点查询', e)
            getAoiByPt(
                e.wgs84Position.lng,
                e.wgs84Position.lat,
@@ -1771,7 +1811,6 @@
                    height: 200px;
                    img {
                        width: 100%;
                        height: 100%;
                    }
@@ -1949,11 +1988,12 @@
                                    cursor: default;
                                }
                                &>div:last-child {
                                    margin-left: 14px;
                                    font-size: 18px;
                                    font-weight: bold;
                                    color: #499d99;
                                    color: rgb(114, 255, 248);
                                }
                            }
vue.config.js
@@ -161,8 +161,8 @@
        proxy: {
            "/api": {
                // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
                target: "http://localhost:82",
                // target: "http://192.168.0.100:82",
                // target: "http://localhost:82",
                target: "http://192.168.0.100:82",
                // target: "http://17.20.10.3:82",
                // target: "http://10.141.11.11:8081/api",
                // ws: true, //启用webSocket6566