修改户查询结果渲染方式
Showing
1 changed file
with
5 additions
and
6 deletions
... | @@ -14,7 +14,7 @@ | ... | @@ -14,7 +14,7 @@ |
14 | <!-- 显示层数 --> | 14 | <!-- 显示层数 --> |
15 | <td class="floor">{{cs.sjc}}层</td> | 15 | <td class="floor">{{cs.sjc}}层</td> |
16 | <!-- 显示户 --> | 16 | <!-- 显示户 --> |
17 | <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> | 17 | <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)">{{hs.shbw}}</td> |
18 | </tr> | 18 | </tr> |
19 | </table> | 19 | </table> |
20 | <!-- </div> --> | 20 | <!-- </div> --> |
... | @@ -30,7 +30,7 @@ | ... | @@ -30,7 +30,7 @@ |
30 | <!-- 显示层数 --> | 30 | <!-- 显示层数 --> |
31 | <td class="floor">{{cs.sjc}}层</td> | 31 | <td class="floor">{{cs.sjc}}层</td> |
32 | <!-- 显示户 --> | 32 | <!-- 显示户 --> |
33 | <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> | 33 | <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)">{{hs.shbw}}</td> |
34 | </tr> | 34 | </tr> |
35 | </table> | 35 | </table> |
36 | </div> | 36 | </div> |
... | @@ -55,7 +55,7 @@ | ... | @@ -55,7 +55,7 @@ |
55 | <!-- 显示层数 --> | 55 | <!-- 显示层数 --> |
56 | <td class="floor">{{cs.sjc}}层</td> | 56 | <td class="floor">{{cs.sjc}}层</td> |
57 | <!-- 显示户 --> | 57 | <!-- 显示户 --> |
58 | <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> | 58 | <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)">{{hs.shbw}}</td> |
59 | </tr> | 59 | </tr> |
60 | </table> | 60 | </table> |
61 | </div> | 61 | </div> |
... | @@ -67,7 +67,7 @@ | ... | @@ -67,7 +67,7 @@ |
67 | <!-- 显示层数 --> | 67 | <!-- 显示层数 --> |
68 | <td class="floor">{{cs.sjc}}层</td> | 68 | <td class="floor">{{cs.sjc}}层</td> |
69 | <!-- 显示户 --> | 69 | <!-- 显示户 --> |
70 | <td v-for="(hs,hsIndex) in cs.hs" :data-bsm="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? hs.bsm : ''" ref="hBsm" :key="hsIndex" :class="(searchNum == hs.shbw || searchNum == hs.bdcdyh) ? 'tdSelect':''" @click="handleTdClick($event,hs.bsm)" @dblclick="dbclick(hs.bsm)">{{hs.shbw}}</td> | 70 | <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)">{{hs.shbw}}</td> |
71 | </tr> | 71 | </tr> |
72 | </table> | 72 | </table> |
73 | </div> | 73 | </div> |
... | @@ -263,8 +263,7 @@ export default { | ... | @@ -263,8 +263,7 @@ export default { |
263 | console.log(this.$refs.hBsm,'this.$refs.hBsm'); | 263 | console.log(this.$refs.hBsm,'this.$refs.hBsm'); |
264 | this.$nextTick(()=>{ | 264 | this.$nextTick(()=>{ |
265 | this.$refs.hBsm.forEach(item=>{ | 265 | this.$refs.hBsm.forEach(item=>{ |
266 | console.log(item.dataset,'item'); | 266 | if(item.className == 'tdSelect'){ |
267 | if(item.dataset.bsm != ''){ | ||
268 | console.log(item.dataset.bsm,'item.dataset.bsm'); | 267 | console.log(item.dataset.bsm,'item.dataset.bsm'); |
269 | // 判断hbsmList中是否已经存在 | 268 | // 判断hbsmList中是否已经存在 |
270 | if(this.hbsmList.indexOf(item.dataset.bsm) == -1){ | 269 | if(this.hbsmList.indexOf(item.dataset.bsm) == -1){ | ... | ... |
-
Please register or sign in to post a comment