1
guanqb
2023-03-17 1d797cc1ca5b64dff43a29f516705d60c0db774b
1
2 files modified
60 ■■■■ changed files
src/components/map/index.vue 42 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 18 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -74,8 +74,6 @@
</template>
<script>
let tile3DUrl = ''
if (process.env.NODE_ENV == 'development') {
@@ -191,8 +189,6 @@
import videoListPopup from './components/videoListPopup.vue'
import yToolTip from './components/yToolTip.vue'
export default {
    name: 'mapBox',
@@ -220,6 +216,7 @@
    computed: {
    },
    mounted () {
        if (global.viewer != null) {
            global.viewer = null
@@ -306,21 +303,21 @@
            that.switchImg()
            // 外网
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            //         format: 'image/jpeg',
            //         show: true,
            //         maximumLevel: 18
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
                    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
                    format: 'image/jpeg',
                    show: true,
                    maximumLevel: 18
                })
            )
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: '/sryx/{z}/{x}/{y}.png',
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: '/sryx/{z}/{x}/{y}.png',
                })
            )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
@@ -418,7 +415,7 @@
        // global.viewer.scene.morphTo2D(1)
        // 清除控制台
        console.clear()
        // console.clear()
        function isEleFullScreen () {
            const fullScreenEle =
@@ -561,7 +558,7 @@
                this.removeMxTileset(`sdTilesetLayer${item}`, this.housingIndent)
            })
            // this.addMxTileset('sdTilesetLayer', `${tile3DUrl}/sf3d/361102/model/wanda/tileset.json`, this.housingIndent)
            this.addMxTileset('sdTilesetLayer', `${tile3DUrl}/sf3d/361102/model/wanda/tileset.json`, this.housingIndent)
            if (this.tilesetLayerType == type) {
                this.tilesetLayerType = ''
@@ -1005,7 +1002,10 @@
        * @param {*} 
        */
        showHouse3D (positions, minHeight, maxHeight) {
            flootEntitysEntites.removeAll()
            console.log('showHouse3D被调用!',positions,111);
            if(flootEntitysEntites!=null){
                flootEntitysEntites.removeAll()
            }
            let housePositions = JSON.parse(positions).coordinates[0]
            let floorPositions = housePositions.reduce((prev, curr) => {
src/views/house/index.vue
@@ -609,9 +609,6 @@
                // 大搜之搜索面详细数据(停车场出入口商场)--默认万达华府
                this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', villageId, '1|3')
                // this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', villageId, '1|3')
                // this.getResidentialQuartersInfo('6E513C5E5D1611EAB6183C15FB00027B', '361102')
                // this.getResidentialQuartersInfo(villageId, '361102')
            })
        }
@@ -629,8 +626,6 @@
    },
    mounted () {
        const that = this
        this.$parent.$parent.resize('400px', true)
        this.$nextTick(() => {
@@ -750,7 +745,7 @@
                circleLayer = null
            }
            this.getResidentialQuartersInfo(current.id, '361102')
            // this.getResidentialQuartersInfo(current.id, '361102')
            this.getSearchExtensivelyBgAoiDeepdata('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', current.id, '1|3')
            this.getVillageInfo(current.id)
@@ -832,13 +827,16 @@
        // 楼栋单元楼层户室查询
        getHouses (build_id, adcode, aoiArr) {
            getHouses(build_id, adcode).then(res => {
                console.log('getHouses',res);
                let maxHeight = 3 * (res.data.data.properties.cjgga.features.length + 1)
                let houseData = res.data.data.properties
                curHousingName = res.data.data.properties.ckgkt
                this.floorChoosed = []
                this.$EventBus.$emit('showHouse3D', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight })
                this.$nextTick(() => {
                    this.$EventBus.$emit('showHouse3D', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight })
                })
                if (res.data != null && houseData.nwwqd.features != []) {
                    let unitData = houseData.nwwqd.features
@@ -921,6 +919,7 @@
            this.getVillagePersonInfo(params.properties.snxmi)
            this.residentDetailsTitle = `${curHousingName}${this.unitOptions.filter(item => item.value == this.unitValue)[0].label}${params.properties.fojcu}住户信息`
            this.residentDetailsShow = true
            console.log('residentDetailsClick-params',params);
            this.$EventBus.$emit('showHouse3D', { positions: params.properties.kmj3a, minHeight: params.properties.szhfr, maxHeight: params.properties.szhfr + params.properties.hnagn })
        },
@@ -929,6 +928,7 @@
        },
        buildingClick (item, aoiArr) {
            console.log('buildingClick-start',111);
            this.unitHouseChoosed = []
            this.pictLoading = true
            if (!aoiArr) {
@@ -948,6 +948,7 @@
            this.choosedBuildId = item.build_id
            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
@@ -1293,7 +1294,7 @@
        // 获取责任民警、所属辖区
        getVillageInfo (aoiId) {
            getVillageInfo(aoiId).then(res => {
                this.getResidentialQuartersInfo(res.data.data.md5Id, '361102')
                // this.getResidentialQuartersInfo(res.data.data.md5Id, '361102')
                this.villageInfo.policeName = res.data.data.policeName
                this.villageInfo.policeStationName = res.data.data.policeStationName
            })
@@ -1334,6 +1335,7 @@
            this.getVillagePersonInfo('', this.choosedBuildId, this.keyPeopleType == 1 ? '' : this.keyPeopleType, this.peoplePage.currentPage, this.peopleName, this.callPhone)
        },
        // 小区范围围栏光柱
        getResidentialQuartersInfo (area_id, adcode) {
            // '6E513C5E5D1611EAB6183C15FB00027B', '361102'
            getResidentialQuartersInfo(area_id, adcode).then(res => {