guanqb
2023-05-08 58a4b40252170bf0d92bf936c0514244927c0b4c
社区点击模型逻辑调整
1 files modified
60 ■■■■ changed files
src/views/house/index.vue 60 ●●●● patch | view | raw | blame | history
src/views/house/index.vue
@@ -1344,17 +1344,17 @@
                            item.properties.hnagn
                        if (minHeight < aoiHeight && aoiHeight < maxHeight) {
                            let chooseIndex = ''
                            // this.unitChoosedArr.forEach((one, index) => {
                            //     if (one.sname == item.properties.cftlg) {
                            //         chooseIndex = index
                            //     }
                            // })
                            // this.floorsType = Math.ceil((chooseIndex + 1) / 5)
                            // if (this.floorsType > 3) {
                            //     for (let i = 0; i < this.floorsType - 3; i++) {
                            //         this.nextFloorBtn()
                            //     }
                            // }
                            this.unitChoosedArr.forEach((one, index) => {
                                if (one.sname == item.properties.cftlg) {
                                    chooseIndex = index
                                }
                            })
                            this.floorsType = Math.ceil((chooseIndex + 1) / 5)
                            if (this.floorsType > 3) {
                                for (let i = 0; i < this.floorsType - 3; i++) {
                                    this.nextFloorBtn()
                                }
                            }
                            let polygon = this.$turf.polygon([
                                JSON.parse(item.properties.kmj3a).coordinates[0],
                            ])
@@ -1375,40 +1375,7 @@
        },
        // 三维接口高亮楼栋户室--户室不能直接用接口查找
        // getResident3DData (build_std_addr_id, adcode, house_name) {
        //     getHouses(build_std_addr_id, adcode).then((res) => {
        //         let residentList = res.data.data.properties.nwwqd.features
        //         console.log('getResident3DData--then')
        //         let curHousingHWTXA = res.data.data.properties.hwtxa
        //         residentList.forEach(item => {
        //             let item_house_name = Number(item.properties.fojcu.slice(0, item.properties.fojcu.length - 1))
        //             if (item_house_name == house_name) {
        //                 const polygon = JSON.parse(item.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: item.properties.szhfr + 240,
        //                     sitePitch: -80,
        //                 })
        //                 this.$EventBus.$emit("clearHouse3D")
        //                 this.$EventBus.$emit("showThreeDimensions", {
        //                     positions: item.properties.kmj3a,
        //                     minHeight: item.properties.szhfr + curHousingHWTXA.yjpca,
        //                     maxHeight: item.properties.szhfr + item.properties.hnagn + curHousingHWTXA.yjpca,
        //                 })
        //             }
        //         })
        //     })
        // },
        // 三维接口高亮楼栋户室-通过
        getResident3DData (build_std_addr_id) {
            this.unitChoosed3DList.forEach(item => {
                if (item.properties.snxmi == build_std_addr_id) {
@@ -1446,7 +1413,6 @@
            this.floorChoosed = params.sname
            console.log('residentDetailsClick--then')
            let residentId = params.std_addr_id.split('|')[2]
            // this.getResident3DData(residentId, "361102", params.sname)
            this.getResident3DData(residentId)
            this.getVillagePersonInfo(residentId)
            this.getPicURL(residentId)
@@ -2060,7 +2026,7 @@
                ).then(async (res) => {
                    let chooseBuildItem = []
                    this.buildingList.forEach((item) => {
                        if (item.build_std_addr_id == res.data.result[0].cid) {
                        if (item.build_std_addr_id == res.data.result[0].std_addr_id.split("|")[1]) {
                            chooseBuildItem = item
                        }
                    })