shuishen
2023-04-05 17f526f1c9f4bf78aa4cd7399785d0bc8ade8b6a
社区感知的更改
3 files modified
1 files added
193 ■■■■ changed files
src/api/dept/index.js 18 ●●●● patch | view | raw | blame | history
src/components/map/index.vue 56 ●●●● patch | view | raw | blame | history
src/views/house/2.js 67 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 52 ●●●● 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 == '') {
@@ -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,
                    material: global.DC.Namespace.Cesium.Color.RED.withAlpha(0.5),
                }
            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/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:39:48
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -187,7 +187,7 @@
                                                <!-- :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]" -->
                                                {{ value.properties.fojcu }}
                                                <!-- <div class="flow"></div>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <div class="warning"></div>-->
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <div class="warning"></div>-->
                                            </div>
                                        </div>
                                    </div>
@@ -270,7 +270,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 +331,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 +344,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>
                    姓名:
@@ -606,7 +606,6 @@
    methods: {
        housingIndent (e) {
            console.log(e, 1111111)
            this.getAoiByPtStd(e)
        },
@@ -728,6 +727,11 @@
                circleLayer = null
            }
            this.subNavType = 1
            this.comeOutData = []
            this.parkingLotData = []
            this.businessData = []
            this.getSearchExtensivelyBgAoiDeepdata(
                "ebf48ecaa1fd436fa3d40c4600aa051f",
                "361100",
@@ -842,6 +846,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 +981,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 +1003,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 +1015,6 @@
        },
        buildingClick (item, aoiArr) {
            console.log("buildingClick-start", 111)
            this.unitHouseChoosed = []
            this.pictLoading = true
            if (!aoiArr) {
@@ -1012,7 +1036,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 +1532,6 @@
        // 大搜点查询
        getAoiByPtStd (e) {
            console.log('大搜点查询', e)
            getAoiByPt(
                e.wgs84Position.lng,
                e.wgs84Position.lat,
@@ -1771,7 +1793,6 @@
                    height: 200px;
                    img {
                        width: 100%;
                        height: 100%;
                    }
@@ -1949,11 +1970,12 @@
                                    cursor: default;
                                }
                                &>div:last-child {
                                    margin-left: 14px;
                                    font-size: 18px;
                                    font-weight: bold;
                                    color: #499d99;
                                    color: rgb(114, 255, 248);
                                }
                            }