| | |
| | | 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], |
| | | ]) |
| | |
| | | |
| | | }, |
| | | |
| | | // 三维接口高亮楼栋户室--户室不能直接用接口查找 |
| | | // 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) { |
| | |
| | | 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) |
| | |
| | | ).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 |
| | | } |
| | | }) |