759c9974 by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 778b4e44 85755638
<template>
<div>
<el-dialog v-dialogDrag :close-on-click-modal="false"
title="新增"
title="批量户"
:visible.sync="isVisible"
width="70%"
width="72%"
@close="close"
:modal-append-to-body="false"
>
......@@ -187,13 +187,10 @@
</tr>
<tr>
<td colspan="12" rowspan="4" align="center">
<td colspan="12" align="center">
<Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz>
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td colspan="2">东墙体归属</td>
......@@ -370,7 +367,7 @@
close: function () {
this.$emit('close')
this.isVisible = false
this.result()
this.reset()
},
reset: function () {
this.form={
......
......@@ -401,13 +401,18 @@ export default {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
}
}else{
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
batchCommit(this.bsms).then(res=>{
if (res.success) {
Message.success("提交成功");
this.getlpbData();
}
})
}
}
},
loading(){
this.getLpbMenuTree(this.$store.state.zrzbsm);
......@@ -423,7 +428,10 @@ export default {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
}
}else{
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
switch (val) {
case 'h':
this.plhVisible=true;
......@@ -437,6 +445,8 @@ export default {
default:
break;
}
}
}
},
lodding(){
this.getlpbData();
......@@ -462,6 +472,7 @@ export default {
//清空已选中层户
this.cbsmList = [];
this.bsms = [];
this.qsztList = [];
this.$refs.lpbContent.hbsmList = [];
this.$nextTick(()=>{
//户
......@@ -565,6 +576,16 @@ export default {
this.bsms = data;
}
},
//获取选中户信息
getQsztList(data, type) {
if (type) {
// 双击
} else {
//单击 TO DO
this.qsztList = data;
}
},
//获取选中层bsmlist
getCbsm(data){
this.cbsmList = data;
......@@ -588,9 +609,11 @@ export default {
});
}
},
//调用楼盘表信息查询接口
//调用楼盘表信息查询和图例统计接口
getlpbData() {
this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm,this.scyclx);
this.getDyztBsmList();
this.getLpbFwytAndQlxz();
//改变楼盘表子组件的key值,重新渲染
this.time = new Date().getTime();
},
......@@ -631,7 +654,9 @@ export default {
},
//批量添加不动产单元号
addBdcdyh() {
// this.pd[0].bsm //自然幢标识码
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then(
(res) => {
if (res.code === 200) {
......@@ -643,6 +668,7 @@ export default {
}
}
);
}
},
open(hasGenerateCount,unGenerateCount) {
......
......@@ -65,6 +65,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -126,6 +127,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -199,6 +201,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -253,6 +256,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -425,6 +429,7 @@ export default {
loading: true,
hbsm:'',
hbsmList: [],
hqsztList:[],
cbsmList: [],
time: null, //区分单双击事件的定时器
searchNum: Math.random(),
......@@ -619,6 +624,7 @@ export default {
//未选中→选中
e.className = "tdSelect"; //加边框
this.hbsmList.push(bsm); // 将户bsm放进hbsmList
this.hqsztList.push(hs.qszt); // 将户qszt放进hqsztList
switch (this.lpbParent) {
case 'isHbfg':
this.fghbChoosedList.push(hs);
......@@ -631,6 +637,7 @@ export default {
break;
case 'isLpb':
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
......@@ -651,7 +658,9 @@ export default {
break;
case 'isLpb':
this.hbsmList = this.hbsmList.filter(i=>i!=bsm);
this.hqsztList = this.hqsztList.filter(i=>i!=hs.qszt);
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
......@@ -695,6 +704,7 @@ export default {
});
// 清空hbsmList
this.hbsmList = [];
this.hqsztList = [];
// });
},
//户右键点击事件
......@@ -774,7 +784,7 @@ export default {
if (e.target.className.indexOf("tdSelect") == -1) {
//未选中→选中
e.target.className += " tdSelect"; //加边框
this.cbsmList.push(item.bsm); // 将户bsm放进hbsmList
this.cbsmList.push(item.bsm);
} else {
//选中→未选中
e.target.className = "floor";
......@@ -965,35 +975,39 @@ export default {
this.$refs.hBsm.forEach((item) => {
item.className = "tdSelect";
this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
this.hqsztList.push(item.dataset.qszt)
});
}else{
this.$refs.hBsm.forEach((item) => {
item.className = "";
this.hbsmList = [];
this.hqsztList = [];
});
}
this.$nextTick(()=>{
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
})
},
//幢单元全选
zdySelectAll(val,cs){
let zdyHbsmList = [];
let zdyHqsztList = [];
cs.forEach(i=>{
i.hs.forEach(j=>{
zdyHbsmList.push(j.bsm)
zdyHqsztList.push(j.qszt)
})
});
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
}
});
this.hbsmList = this.hbsmList.concat(zdyHbsmList);
this.hqsztList = this.hqsztList.concat(zdyHqsztList);
})
}else{
this.$refs.hBsm.forEach((item) => {
......@@ -1006,10 +1020,16 @@ export default {
this.hbsmList = this.hbsmList.filter(i=>i!=j)
}
})
zdyHqsztList.forEach(j=>{
if (item.dataset.qszt == j) {
this.hqsztList = this.hqsztList.filter(i=>i!=j)
}
})
});
}
this.$nextTick(()=>{
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
})
},
//逻辑幢、幢单元、层双击
......@@ -1056,7 +1076,8 @@ export default {
console.log(item.dataset.bsm, "item.dataset.bsm");
// 判断hbsmList中是否已经存在
if (this.hbsmList.indexOf(item.dataset.bsm) == -1) {
this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
this.hbsmList.push(item.dataset.bsm);
this.hqsztList.push(item.dataset.qszt);
}
}
});
......