0bee2c7d by weimo934

Merge remote-tracking branch 'origin/master'

2 parents c22ff144 ba094817
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
22 .dn{ 22 .dn{
23 display: none; 23 display: none;
24 } 24 }
25 .cp{
26 cursor: pointer;
27 }
25 .fl{ 28 .fl{
26 float: left; 29 float: left;
27 } 30 }
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
76 <th>套数</th> 76 <th>套数</th>
77 <th>面积</th> 77 <th>面积</th>
78 </tr> 78 </tr>
79 <tr v-for="(item, index) in legendList" :key="index"> 79 <tr v-for="(item, index) in legendList" :key="index" class="cp" @click="handleChoosedH">
80 <td> 80 <td>
81 <i class="el-icon-star-on" :style="{ color: item.color }"></i 81 <i class="el-icon-star-on" :style="{ color: item.color }"></i
82 >{{ item.name }} 82 >{{ item.name }}
...@@ -380,7 +380,11 @@ export default { ...@@ -380,7 +380,11 @@ export default {
380 } 380 }
381 }) 381 })
382 }, 382 },
383 383 //选中房屋状态
384 handleChoosedH(){
385 //清除选中户
386 this.$refs.lpbContent.clearChoosedH()
387 }
384 }, 388 },
385 computed: { 389 computed: {
386 }, 390 },
......
...@@ -238,6 +238,19 @@ export default { ...@@ -238,6 +238,19 @@ export default {
238 } 238 }
239 } 239 }
240 }, 240 },
241 //清除选中户
242 clearChoosedH(){
243 this.$nextTick(()=>{
244 //将每个选中的户的选中状态清除
245 this.$refs.hBsm.forEach(item=>{
246 if(item.className == 'tdSelect'){
247 item.className = '';
248 }
249 });
250 // 清空hbsmList
251 this.hbsmList = [];
252 })
253 }
241 }, 254 },
242 computed: { 255 computed: {
243 createFlagChange() { 256 createFlagChange() {
...@@ -260,7 +273,9 @@ export default { ...@@ -260,7 +273,9 @@ export default {
260 }, 273 },
261 //监听有无通过输入框查询选择到的户,如果有,将其bsm放入hbsmList 274 //监听有无通过输入框查询选择到的户,如果有,将其bsm放入hbsmList
262 searchNum(n){ 275 searchNum(n){
263 console.log(this.$refs.hBsm,'this.$refs.hBsm'); 276 //清除之前选中户
277 this.clearChoosedH();
278 // 渲染查询到的户
264 this.$nextTick(()=>{ 279 this.$nextTick(()=>{
265 this.$refs.hBsm.forEach(item=>{ 280 this.$refs.hBsm.forEach(item=>{
266 if(item.className == 'tdSelect'){ 281 if(item.className == 'tdSelect'){
......