a8d72516 by 杨威

楼盘表切换实预测类型时清除选中层,更新图例数据

1 parent 5c7f7be5
......@@ -442,17 +442,25 @@ export default {
plshClose() {
this.plShVisible = false;
},
//改变预测数据类型
//改变预测数据类型
scyclxChange(val){
//清空已选中层户
this.cbsmList = [];
this.bsms = [];
console.log(this.$refs.lpbContent.$refs.hBsm,'this.$refs.lpbContent');
this.$refs.lpbContent.$refs.hBsm.forEach(item=>{
console.log(this.$refs.lpbContent.$refs.cBsm,'this.$refs.lpbContent.$refs.cBsm');
this.$nextTick(()=>{
this.$refs.lpbContent.$refs.hBsm.forEach(item=>{
if (item.className == "tdSelect") {
item.className = "";
}
});
this.$refs.lpbContent.$refs.cBsm.forEach(item=>{
console.log(item.className,'item.className');
item.className = "floor";
});
})
//获取图例数据
this.getDyztBsmList();
},
//获取高度计算lpb内容区高度
getHeight() {
......
......@@ -12,7 +12,7 @@
<table class="chTable" :style="{'top':(ljzzdyHeight-1-zdys.cs.length*65)+'px'}" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
<tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td class="floor" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
......@@ -28,7 +28,7 @@
<table class="chTable" :style="{'top':(ljzzdyHeight+40-1-ljzs.cs.length*65)<0? 0:(ljzzdyHeight+40-1-ljzs.cs.length*65) +'px'}" border="1" cellspacing="0" cellpadding="0">
<tr v-for="(cs) in ljzs.cs" :key="cs.bsm">
<!-- 显示层数 -->
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td class="floor" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
......@@ -53,7 +53,7 @@
<table class="chTable" border="1" cellspacing="0" cellpadding="0" v-show="zdys.cs.length>0">
<tr v-for="(cs,csIndex) in zdys.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td class="floor" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
......@@ -65,7 +65,7 @@
<table class="chTable" ref="ch" border="1" cellspacing="0" cellpadding="0" v-show="lpbData.cs != null && lpbData.cs.length>0" >
<tr v-for="(cs,csIndex) in lpbData.cs" :key="csIndex">
<!-- 显示层数 -->
<td class="floor" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<td class="floor" ref="cBsm" @contextmenu.prevent="openMenu($event, cs,'c')" @click="handleClickC($event,cs)">{{cs.sjc}}</td>
<!-- 显示户 -->
<td v-for="(hs,hsIndex) in cs.hs" :data-bsm="hs.bsm" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)" @contextmenu.prevent="openMenu($event, hs,'h')">{{hs.shbw}}</td>
</tr>
......