修复底部单击查看户,已经是本楼情况下不出发问题

master
许宏杰 6 months ago
parent 464cd92627
commit fd0d3c776f

@ -124,6 +124,16 @@ export default {
this.getBuildingList();
}
},
clickResult: {
handler(newVal, oldVal) {
if (newVal.id && this.loading == false) {
this.handlerWindow();
console.log("已经是本楼");
}
},
deep: true,
// immediate: true,
},
},
created() {},
methods: {
@ -134,6 +144,8 @@ export default {
this.currentIndex = 0;
},
clickHouse(item) {
this.$store.commit("SET_CLICK_RESULT", {});
debugger;
this.$store.commit("SET_BUILDING_WIDTH", {
id: item.id,
buildingId: item.building_id,
@ -146,7 +158,6 @@ export default {
keyId: item.id,
});
this.currentIndex = item.id;
this.$store.commit("SET_CLICK_RESULT", {});
},
async getBuildingInfo() {
let info = await getBuilding(this.queryParamsXiaoqu.buildingId);
@ -165,6 +176,11 @@ export default {
this.loading = false;
this.$store.commit("SET_REFRESH", 1);
this.handlerWindow();
console.log("接口找");
},
handlerWindow() {
this.$nextTick(() => {
const list = document.getElementsByClassName("foldPane-bottom")[0];
const build = document.getElementsByClassName("building-container")[0];
@ -173,12 +189,9 @@ export default {
list.style.width = `calc(100% - (390px + ${build.offsetWidth}px) )`;
list.style.transform = `translateX(0)`;
}
if (this.clickResult.id) {
this.clickHouse(this.clickResult);
}
if (this.clickResult.id) this.clickHouse(this.clickResult);
});
},
//
handleColor(item) {
if (!item.color) {

Loading…
Cancel
Save