guanqb
2023-03-17 1ad4b0e4b0d38aed0f1975038faf3006e5e9b3b1
Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
2 files modified
94 ■■■■ changed files
src/components/map/index.vue 22 ●●●● patch | view | raw | blame | history
src/views/house/index.vue 72 ●●●● patch | view | raw | blame | history
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-03-16 16:54:09
 * @LastEditTime: 2023-03-17 08:55:29
 * @FilePath: \srs-police-affairs\src\components\map\index.vue
 * @Description: 公用地图组件
 * 
@@ -75,6 +75,8 @@
<script>
let tile3DUrl = ''
let floorEntitysLayers = null
let flootEntitysEntites = null
if (process.env.NODE_ENV == 'development') {
    // 开发
@@ -156,7 +158,6 @@
    sdTilesetLayer: null
}
let flootEntitysEntites = null
const ysLabels = [
    'EPSG:4490_test:0',
@@ -347,9 +348,7 @@
            })
            // 原生Cesium加载多边体
            let floorEntitysLayers = new global.DC.Namespace.Cesium.CustomDataSource("floorEntitysLayers")
            global.viewer.dataSources.add(floorEntitysLayers)
            flootEntitysEntites = floorEntitysLayers.entities
            // let floorPositions = positions.reduce((prev, curr, index, arr) => {
            //     curr.forEach(item => {
@@ -504,8 +503,8 @@
            that.flytoLayer(params.polygonName, params.duration)
        })
        this.$EventBus.$on('showHouse3D', (params) => {
            that.showHouse3D(params.positions, params.minHeight, params.maxHeight)
        this.$EventBus.$on('showThreeDimensions', (params) => {
            that.showThreeDimensions(params.positions, params.minHeight, params.maxHeight)
        })
        this.$EventBus.$on('clearHouse3D', () => {
@@ -1002,9 +1001,12 @@
        * @param {*} positions 建筑范围坐标
        * @param {*} 
        */
        showHouse3D (positions, minHeight, maxHeight) {
            console.log('showHouse3D被调用!',positions,111);
            if(flootEntitysEntites!=null){
        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()
            }
            let housePositions = JSON.parse(positions).coordinates[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-03-09 17:24:03
 * @LastEditTime: 2023-03-17 10:07:45
 * @FilePath: \srs-police-affairs\src\views\house\index.vue
 * @Description: 小区-栋-层-房屋
 * 
@@ -140,9 +140,9 @@
                                <div class="two">
                                    <div>
                                        <div>98</div>
                                                                                                                                                                                                                                                    <div>户籍人口</div>
                                                                                                                                                                                                                                                </div>
                                                                                                                                                                                                                                                <div>
                                                                                                                                                                                                                                                                <div>户籍人口</div>
                                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                                            <div>
                                        <div style="color:#0E88FF">20</div>
                                        <div>流动人口</div>
                                    </div>
@@ -164,17 +164,17 @@
                                <div>
                                    <div>120</div>
                                    <div>出租</div>
                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                            <div>
                                                                                                                                                                                                                                                <div>160</div>
                                                                                                                                                                                                                                                <div>自住</div>
                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                            <div>
                                                                                                                                                                                                                                                <div>8</div>
                                                                                                                                                                                                                                                <div>空置</div>
                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                        </div>
                                                                                                                                                                                                                                    </div>-->
                                                                                                                                                                                                                                                        </div>
                                                                                                                                                                                                                                                        <div>
                                                                                                                                                                                                                                                            <div>160</div>
                                                                                                                                                                                                                                                            <div>自住</div>
                                                                                                                                                                                                                                                        </div>
                                                                                                                                                                                                                                                        <div>
                                                                                                                                                                                                                                                            <div>8</div>
                                                                                                                                                                                                                                                            <div>空置</div>
                                                                                                                                                                                                                                                        </div>
                                                                                                                                                                                                                                                    </div>
                                                                                                                                                                                                                                                </div>-->
                        <div class="house-element-info" v-if="isShowHouseBox">
                        <!-- 选择单元 -->
                        <div class="condo" v-show="isShowUnitChoose">
@@ -219,17 +219,17 @@
                                    <div>
                                        <span class="zizhu"></span>
                                        自住
                                                                                                                                                                                                                                                </div>
                                                                                                                                                                                                                                                <div>
                                                                                                                                                                                                                                                    <span class="kongzhi"></span>
                                                                                                                                                                                                                                                    空置
                                                                                                                                                                                                                                                </div>
                                                                                                                                                                                                                                                <div>
                                                                                                                                                                                                                                                    <span class="shangye"></span>
                                                                                                                                                                                                                                                    商业
                                                                                                                                                                                                                                                </div>
                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                        </div>-->
                                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                                            <div>
                                                                                                                                                                                                                                                                <span class="kongzhi"></span>
                                                                                                                                                                                                                                                                空置
                                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                                            <div>
                                                                                                                                                                                                                                                                <span class="shangye"></span>
                                                                                                                                                                                                                                                                商业
                                                                                                                                                                                                                                                            </div>
                                                                                                                                                                                                                                                        </div>
                                                                                                                                                                                                                                                    </div>-->
                            <el-main v-loading="pictLoading" element-loading-background="rgba(17, 38, 163, .1)"
                                element-loading-text="数据正在加载中" element-loading-spinner="el-icon-loading"
                                v-show="isShowHouseBox">
@@ -266,8 +266,8 @@
                                                <!-- :class="[{ 'chuzu': value.houseType == '出租' }, { 'zizhu': value.houseType == '自住' }, { 'kongzhi': value.houseType == '空置' }, { 'shangye': value.houseType == '商业' }]" -->
                                                {{ value.properties.fojcu }}
                                                <!-- <div class="flow"></div>
                                                                                                                                                                                                                                                        <div class="focus"></div>
                                                                                                                                                                                                                                                            <div class="warning"></div>-->
                                                                                                                                                                                                                                                                    <div class="focus"></div>
                                                                                                                                                                                                                                                                        <div class="warning"></div>-->
                                            </div>
                                        </div>
                                    </div>
@@ -827,16 +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 maxHeight = res.data.data.properties.hwtxa.features[0].properties.mbfdr - res.data.data.properties.hwtxa.features[0].properties.yjpca
                let houseData = res.data.data.properties
                curHousingName = res.data.data.properties.ckgkt
                this.floorChoosed = []
                this.$nextTick(() => {
                    this.$EventBus.$emit('showHouse3D', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight })
                })
                this.$EventBus.$emit('showThreeDimensions', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight })
                if (res.data != null && houseData.nwwqd.features != []) {
                    let unitData = houseData.nwwqd.features
@@ -919,7 +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);
            console.log('residentDetailsClick-params', params)
            this.$EventBus.$emit('showHouse3D', { positions: params.properties.kmj3a, minHeight: params.properties.szhfr, maxHeight: params.properties.szhfr + params.properties.hnagn })
        },
@@ -928,7 +928,7 @@
        },
        buildingClick (item, aoiArr) {
            console.log('buildingClick-start',111);
            console.log('buildingClick-start', 111)
            this.unitHouseChoosed = []
            this.pictLoading = true
            if (!aoiArr) {
@@ -948,7 +948,7 @@
            this.choosedBuildId = item.build_id
            this.getVillagePersonStatisticInfoByBuildId(item.build_id)
            this.getHouses(item.build_id, '361102', aoiArr)
            console.log('buildingClick-end');
            console.log('buildingClick-end')
            this.floorsType = 1
            document.querySelector(".floor-num").style.left = '0px'
            this.lastFloorShow = false