|
@@ -47,10 +47,11 @@ export default {
|
|
|
this.unitPa.unitName = e.name;
|
|
|
this.unitPa.unitId = e.value;
|
|
|
} else if (e.type == 'floor') {
|
|
|
- this.unitPa.buildingName = node.parent.parent.data.name;
|
|
|
- this.unitPa.buildingId = node.parent.parent.data.value;
|
|
|
- this.unitPa.unitName = node.parent.data.name;
|
|
|
- this.unitPa.unitId = node.parent.data.value;
|
|
|
+ debugger;
|
|
|
+ this.unitPa.buildingName = this.unitPa.ids.length == 4 ? node.parent.parent.data.name : node.parent.data.name;
|
|
|
+ this.unitPa.buildingId = this.unitPa.ids.length == 4 ? node.parent.parent.data.value : node.parent.data.value;
|
|
|
+ this.unitPa.unitName = this.unitPa.ids.length == 4 ? node.parent.data.name : '';
|
|
|
+ this.unitPa.unitId = this.unitPa.ids.length == 4 ? node.parent.data.value : '';
|
|
|
this.unitPa.floor = e.name;
|
|
|
this.unitPa.floorId = e.value;
|
|
|
} else if (e.type == 'room') {
|