b2464333 by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 85d1f84d 35a032b8
......@@ -189,7 +189,7 @@ export default {
margin-left: -10px;
}
}
margin-bottom: 18px;
margin-bottom: 10px;
}
.el-button {
width: 100px;
......
......@@ -544,7 +544,7 @@ export default {
box-sizing: border-box;
padding: 18px 0 4px 0;
border: 1px solid #E6E6E6;
margin-bottom: 18px;
margin-bottom: 10px;
}
.el-button {
width: 100px;
......
......@@ -36,7 +36,8 @@
<!-- 幢单元名称 -->
<div class="zdy-name name">
<p>
{{ zdys.zdymc }}
<!-- {{ zdys.zdymc }} -->
<el-checkbox @change='zdySelectAll($event,zdys.cs)'>{{ zdys.zdymc }}</el-checkbox>
</p>
</div>
......@@ -171,7 +172,8 @@
<!-- 幢单元名称 -->
<div class="zdy-name name">
<p>
{{ zdys.zdymc }}
<!-- {{ zdys.zdymc }} -->
<el-checkbox @change='zdySelectAll($event,zdys.cs)'>{{ zdys.zdymc }}</el-checkbox>
</p>
</div>
<!-- 循环幢单元下的层户 -->
......@@ -957,8 +959,8 @@ export default {
this.hcxlzVisible = true
},
//楼盘表户全选
lpbSelectAll(value){
if(value){
lpbSelectAll(val){
if(val){
this.$refs.hBsm.forEach((item) => {
item.className = "tdSelect";
this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
......@@ -969,6 +971,40 @@ export default {
this.hbsmList = [];
});
}
},
//幢单元全选
zdySelectAll(val,cs){
let zdyHbsmList = [];
cs.forEach(i=>{
i.hs.forEach(j=>{
zdyHbsmList.push(j.bsm)
})
});
if (val) {
this.$nextTick(()=>{
console.log(zdyHbsmList);
this.$refs.hBsm.forEach((item) => {
console.log(item.dataset.bsm);
if (zdyHbsmList.indexOf(item.dataset.bsm)>-1) {
item.className = "tdSelect";
this.hbsmList = zdyHbsmList; // 将户bsm放进hbsmList
}
});
})
}else{
this.$refs.hBsm.forEach((item) => {
console.log(item.dataset.bsm);
if (zdyHbsmList.indexOf(item.dataset.bsm)>-1) {
item.className = "";
}
zdyHbsmList.forEach(j=>{
if (item.dataset.bsm == j) {
this.hbsmList = this.hbsmList.filter(i=>i!=j)
}
})
});
}
}
},
computed: {
......