guanqb
2023-04-15 b62fcd45e5a2c6965517ce14f258099d5808a83d
社区高亮增加切换复选框
3 files modified
82 ■■■■ changed files
src/api/dept/index.js 10 ●●●●● patch | view | raw | blame | history
src/components/map/index.vue 21 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 51 ●●●●● patch | view | raw | blame | history
src/api/dept/index.js
@@ -45,10 +45,11 @@
 */
export const getResidentialQuartersInfo = (area_id, adcode) => {
    return request({
        url: '/sf3d/area/info',
        // url: '/sf3d/area/info',
        url: '/data/getResidentialQuartersInfo.json',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
        // requestBaseUrl: 'fengt',
        params: {
            area_id,
            adcode
@@ -105,10 +106,11 @@
export const getHouses = (build_id, adcode) => {
    return request({
        // url: '/sf3d/build/houses',
        url: '/sf3d/build/stdhouses',
        // url: '/sf3d/build/stdhouses',
        url: '/data/huafu15d.json',
        method: 'get',
        authorization: false,
        requestBaseUrl: 'fengt',
        // requestBaseUrl: 'fengt',
        params: {
            build_id,
            adcode
src/components/map/index.vue
@@ -295,7 +295,7 @@
            // global.viewer.addTerrain(terrain)
            // 内网
            that.switchImg()
            // that.switchImg()
            // 外网
            // global.viewer.imageryLayers.addImageryProvider(
@@ -402,7 +402,7 @@
        // global.viewer.scene.morphTo2D(1)
        // 清除控制台
        // console.clear()
        console.clear()
        function isEleFullScreen () {
            const fullScreenEle =
@@ -1188,6 +1188,7 @@
        * @param {*} 
        */
        showThreeDimensions (positions, minHeight, maxHeight) {
            console.log('showThreeDimensions', positions, minHeight, maxHeight)
            if (floorEntitysLayers != null) {
                floorEntitysLayers.remove()
                floorEntitysLayers = new global.DC.VectorLayer('floorEntitysLayers')
@@ -1221,6 +1222,22 @@
            floorEntitysLayers.show = true
        },
        // 建筑高亮切换显示隐藏
        switchThreeDimensions (boolean) {
            // if (floorEntitysLayers == null) return
            // console.log('floorEntitysLayers', floorEntitysLayers)
            // if (boolean) {
            //     console.log('switchThreeDimensions---if---if-----', boolean)
            //     floorEntitysLayers.show = true
            // } else {
            //     console.log('switchThreeDimensions---else---else-----', boolean)
            //     floorEntitysLayers.show = false
            // }
            floorEntitysLayers.show = false
            floorEntitysLayers.clear()
        },
        // 清除建筑3D
        clearHouse3D () {
            floorEntitysLayers.clear()
src/views/house/index.vue
@@ -99,6 +99,12 @@
                                                {{
                                                    item.name
                                                }}
                                                <div @click.stop>
                                                    <el-checkbox v-model="isBuildHighLightchecked"
                                                        v-show="buildingChoosed.name == item.name"
                                                        @change="changeBuildHighLightchecked"></el-checkbox>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
@@ -189,7 +195,7 @@
                                                :class="{ on: floorChoosed == value.properties.fojcu }">
                                                {{ value.properties.fojcu }}
                                                <!-- <div class="flow"></div>
                                                                                                                                <div class="warning"></div>-->
                                                                                                                                                                                                                                                                                                                                                        <div class="warning"></div>-->
                                            </div>
                                        </div>
                                    </div>
@@ -436,6 +442,7 @@
    data () {
        return {
            isBuildHighLightchecked: true,
            // 下拉搜索--树状数据相关
            searchTreeShowFlag: false,
            houseDeepLoading: false,
@@ -629,7 +636,7 @@
        this.$parent.$parent.resize("400px", true)
        this.$nextTick(() => {
            this.$EventBus.$emit('highOrLightChange', 'light', 'house')
            // this.$EventBus.$emit('highOrLightChange', 'light', 'house')
            this.$EventBus.$emit('registerMxClick', this.getAoiByPtStd)
@@ -649,6 +656,10 @@
    updated () { },
    methods: {
        changeBuildHighLightchecked (e) {
            console.log('changeBuildHighLightchecked-----------------------------------', e)
        },
        // 获取半年前时间
        getHalfYearTime () {
            const nowResult = new Date().getTime()
@@ -851,6 +862,7 @@
            this.pictLoading = true
            this.buildingList = []
            getSearchExtensivelyBgAoiDeepdata(ak, region, ids, infos).then((res) => {
                console.log('res', res)
                let baseUrl
                if (process.env.NODE_ENV == "development") {
                    // 开发
@@ -939,7 +951,8 @@
                        this.BuildListLoading = false
                    }, 500)
                    this.queryBuildings(this.buildingList[0])
                    // this.queryBuildings(this.buildingList[0])
                    this.buildingClick(this.buildingList[0])
                }
                this.callPolicePage.currentPage = 1
@@ -957,6 +970,7 @@
        // 楼栋单元楼层户室查询
        getHouses (build_id, adcode, aoiArr) {
            getHouses(build_id, adcode).then((res) => {
                console.log('getHouses---res', res)
                if (res.data.data == null) {
                    setTimeout(() => {
                        this.pictLoading = false
@@ -1087,8 +1101,8 @@
            this.$EventBus.$emit("toPosition", {
                siteJd: Number(homeCenter[0]) + 0.00006,
                siteWd: Number(homeCenter[1]) - 0.00030,
                siteGd: params.properties.szhfr + 40,
                sitePitch: -45,
                siteGd: params.properties.szhfr + 240,
                sitePitch: -80,
            })
            this.floorChoosed = params.properties.fojcu
@@ -1111,15 +1125,20 @@
        },
        buildingClick (item, aoiArr) {
            console.log('buildingClick', item)
            if (this.buildingChoosed.name == item.name) return
            this.isBuildHighLightchecked = true
            this.unitHouseChoosed = []
            this.pictLoading = true
            if (!aoiArr) {
                console.log('if (!aoiArr)')
                this.$EventBus.$emit("clearHouse3D")
                this.$EventBus.$emit("toPosition", {
                    ...item,
                    siteJd: Number(item.siteJd),
                    siteWd: Number(item.siteWd) - 0.0021,
                    siteGd: 240,
                    // siteGd: 1500,
                    sitePitch: -45,
                })
            }
@@ -1129,8 +1148,10 @@
            // 获取户籍人口重点人口数据
            this.choosedBuildId = item.build_id
            // 重点人口户籍人口
            console.log('before--getVillagePersonStatisticInfoByBuildId')
            this.getVillagePersonStatisticInfoByBuildId(item.build_id)
            // 楼栋单元楼层户室查询
            console.log('before--getHouses')
            this.getHouses(item.build_id, "361102", aoiArr)
            this.floorsType = 1
            document.querySelector(".floor-num").style.left = "0px"
@@ -2053,11 +2074,31 @@
                                        text-overflow: ellipsis;
                                        white-space: nowrap;
                                        display: block;
                                        position: relative;
                                        &.on {
                                            color: orange;
                                            border-color: orange !important;
                                        }
                                        :deep(.el-checkbox) {
                                            position: absolute;
                                            top: 0;
                                            right: 0;
                                        }
                                        :deep(.el-checkbox .el-checkbox__inner) {
                                            width: 12px;
                                            height: 12px;
                                            border-radius: 1px;
                                            border: 0;
                                        }
                                        :deep(.el-checkbox .el-checkbox__inner::after) {
                                            height: 7px;
                                            left: 5px;
                                        }
                                    }
                                }
                            }