| | |
| | | treeEmptyText: "", |
| | | |
| | | contentShow: true, |
| | | unitOptions: [{ value: 1, label: '1单元' }], |
| | | unitOptions: [], |
| | | unitValue: 1, |
| | | searchHouse: '', |
| | | navType: 0, |
| | |
| | | isShowHouseBox: true, |
| | | floorChoosed: {}, |
| | | isShowUnitChoose: false, |
| | | allHouseFloorList: [], |
| | | } |
| | | }, |
| | | |
| | |
| | | this.$EventBus.$emit('showHouse3D', { positions: houseData.kmj3a, minHeight: 0, maxHeight: maxHeight }) |
| | | |
| | | if (res.data != null && houseData.nwwqd.features != []) { |
| | | // let unitData = res.data.data.unit[this.unitValue - 1].house |
| | | let unitData = houseData.nwwqd.features |
| | | this.floorInfo.house_num = unitData.length |
| | | if (houseData.hwtxa.features.length > 1) { |
| | | this.isShowUnitChoose = true |
| | | this.isShowUnitChoose = true |
| | | } |
| | | let houseFloorList = [] |
| | | unitData.forEach(item => { |
| | | if (houseFloorList.indexOf(Number(item.properties.cftlg)) === -1) { |
| | | houseFloorList.push(Number(item.properties.cftlg)) |
| | | } |
| | | }) |
| | | houseFloorList = houseFloorList.sort((a, b) => { |
| | | return a - b |
| | | }) |
| | | let newArr = [] |
| | | houseFloorList.forEach(floor => { |
| | | let houseArr = unitData.filter(item => { |
| | | return Number(item.properties.cftlg) == floor |
| | | let allUnitDate = [] |
| | | houseData.hwtxa.features.forEach((item, index) => { |
| | | this.unitOptions.push({ value: `${index + 2}`, label: `${item.properties.pgjmz}` }) |
| | | let unitOptionData = [] |
| | | unitData.forEach(inItem => { |
| | | if (inItem.properties.pgjmz == item.properties.pgjmz) { |
| | | unitOptionData.push(inItem) |
| | | } |
| | | }) |
| | | newArr.push({ floor_num: floor, floor_house: houseArr.slice(0, 4) }) |
| | | allUnitDate.push(unitOptionData) |
| | | }) |
| | | this.unitHouseChoosed = newArr |
| | | this.allHouseFloorList = [] |
| | | allUnitDate.forEach(item => { |
| | | let houseFloorList = [] |
| | | item.forEach(inItem => { |
| | | if (houseFloorList.indexOf(Number(inItem.properties.cftlg)) === -1) { |
| | | houseFloorList.push(Number(inItem.properties.cftlg)) |
| | | } |
| | | }) |
| | | houseFloorList = houseFloorList.sort((a, b) => { |
| | | return a - b |
| | | }) |
| | | let newArr = [] |
| | | houseFloorList.forEach(floor => { |
| | | let houseArr = item.filter(inItem => { |
| | | return Number(inItem.properties.cftlg) == floor |
| | | }) |
| | | newArr.push({ floor_num: floor, floor_house: houseArr.slice(0, 4) }) |
| | | }) |
| | | this.allHouseFloorList.push(newArr) |
| | | }) |
| | | this.unitHouseChoosed = this.allHouseFloorList[0] |
| | | console.log(this.unitHouseChoosed, 2222) |
| | | if (aoiArr) { |
| | | this.unitHouseChoosed.forEach((item, index) => { |
| | | let aoiHeight = aoiArr[1] |
| | |
| | | |
| | | chooseUnit (value) { |
| | | this.floorsType = 1 |
| | | this.unitHouseChoosed = this.allHouseFloorList[this.unitValue - 1] |
| | | document.querySelector(".floor-num").style.left = '0px' |
| | | this.lastFloorShow = false |
| | | }, |