|
|
|
@ -25,7 +25,7 @@
|
|
|
|
|
:item="house"
|
|
|
|
|
v-for="(house, houseIndex) in item"
|
|
|
|
|
:key="houseIndex"
|
|
|
|
|
@clickHouse="clickHouse(house, house.id)"
|
|
|
|
|
@clickHouse="clickHouse(house)"
|
|
|
|
|
></colorCell>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -56,6 +56,7 @@ export default {
|
|
|
|
|
"rightTopColor",
|
|
|
|
|
"houseItem",
|
|
|
|
|
"refreshBuild",
|
|
|
|
|
"clickResult",
|
|
|
|
|
]),
|
|
|
|
|
groupedRooms() {
|
|
|
|
|
if (this.list.length == 0) return;
|
|
|
|
@ -109,6 +110,11 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.show = false;
|
|
|
|
|
const list = document.getElementsByClassName("foldPane-bottom")[0];
|
|
|
|
|
|
|
|
|
|
list.style.left = ``;
|
|
|
|
|
list.style.width = ``;
|
|
|
|
|
list.style.transform = ``;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"houseItem.id"(newValue, oldValue) {
|
|
|
|
@ -128,7 +134,7 @@ export default {
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.currentIndex = 0;
|
|
|
|
|
},
|
|
|
|
|
clickHouse(item, keyId) {
|
|
|
|
|
clickHouse(item) {
|
|
|
|
|
this.$store.commit("SET_BUILDING_WIDTH", {
|
|
|
|
|
id: item.id,
|
|
|
|
|
buildingId: item.building_id,
|
|
|
|
@ -138,9 +144,10 @@ export default {
|
|
|
|
|
? this.houseItem.buildingWidth
|
|
|
|
|
: window.innerWidth - this.$refs.houseItem.offsetWidth,
|
|
|
|
|
name: item.name,
|
|
|
|
|
keyId: keyId,
|
|
|
|
|
keyId: item.id,
|
|
|
|
|
});
|
|
|
|
|
this.currentIndex = keyId;
|
|
|
|
|
this.currentIndex = item.id;
|
|
|
|
|
this.$store.commit("SET_CLICK_RESULT", {});
|
|
|
|
|
},
|
|
|
|
|
async getBuildingInfo() {
|
|
|
|
|
let info = await getBuilding(this.queryParamsXiaoqu.buildingId);
|
|
|
|
@ -158,6 +165,19 @@ export default {
|
|
|
|
|
this.list = res.data;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
this.$store.commit("SET_REFRESH", 1);
|
|
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
const list = document.getElementsByClassName("foldPane-bottom")[0];
|
|
|
|
|
const build = document.getElementsByClassName("building-container")[0];
|
|
|
|
|
if (this.queryParamsXiaoqu.buildingId) {
|
|
|
|
|
list.style.left = `390px`;
|
|
|
|
|
list.style.width = `calc(100% - (390px + ${build.offsetWidth}px) )`;
|
|
|
|
|
list.style.transform = `translateX(0)`;
|
|
|
|
|
}
|
|
|
|
|
if (this.clickResult.id) {
|
|
|
|
|
this.clickHouse(this.clickResult);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 颜色处理
|
|
|
|
|