|
@@ -901,45 +901,26 @@ export default {
|
|
|
this.$http.get('/czc-community/assets/building/house/find', { id: id }).then(({ status, data, msg }) => {
|
|
|
|
|
|
if (0 === status) {
|
|
|
- if (data.buildingUnitList.length !== 0) {
|
|
|
+ if (data.floorVo.length !== 0) {
|
|
|
this.formdata = data;
|
|
|
-
|
|
|
- this.formdata.householdsPerFloor = data.buildingUnitList[0].unitFloorList[0].roomList.length;
|
|
|
+ this.formdata.householdsPerFloor = data.floorVo[0].roomList.length;
|
|
|
this.initialUnitList = {
|
|
|
checkedUnit: data.unitNumber !== 0 ? true : false,
|
|
|
enableUnit: data.unitNumber !== 0 ? 1 : 0,
|
|
|
unit: {
|
|
|
type: 'Number', // Number letter
|
|
|
- start: data.buildingUnitList[0]['unitName'], // 1 A单元的起始单元
|
|
|
- end: data.buildingUnitList[data.buildingUnitList.length - 1]['unitName']
|
|
|
+ start: data.floorVo[0]['unitName'], // 1 A单元的起始单元
|
|
|
+ end: data.floorVo[data.floorVo.length - 1]['unitName']
|
|
|
}
|
|
|
};
|
|
|
-
|
|
|
- let resDate = [];
|
|
|
- let resDateList = []; //楼层
|
|
|
- let resDateBuilding = [];
|
|
|
- data.buildingUnitList.map((item, index) => {
|
|
|
- resDate.push(item.unitFloorList[0])
|
|
|
- resDateList.push(item.unitFloorList[0].floorNumber)
|
|
|
-
|
|
|
+ let unitFloorList = [];
|
|
|
+ data.floorVo.forEach((itme) => {
|
|
|
+ unitFloorList.push(itme)
|
|
|
})
|
|
|
- resDateList = Array.from(new Set(resDateList));
|
|
|
- debugger
|
|
|
-
|
|
|
- console.log('777', resDateList)
|
|
|
|
|
|
+ this.doorData.push({ unitFloorList: unitFloorList });
|
|
|
|
|
|
|
|
|
-
|
|
|
- data.buildingUnitList.forEach((item) => {
|
|
|
- item.unitFloorList = resDate;
|
|
|
- })
|
|
|
-
|
|
|
- debugger
|
|
|
- this.doorData = data.buildingUnitList;
|
|
|
-
|
|
|
- // debugger
|
|
|
- // this.doorData = resDate;
|
|
|
} else {
|
|
|
this.formdata = data;
|
|
|
}
|