759c9974 by zhaoqian

Merge remote-tracking branch 'origin/master'

2 parents 778b4e44 85755638
1 <template> 1 <template>
2 <div> 2 <div>
3 <el-dialog v-dialogDrag :close-on-click-modal="false" 3 <el-dialog v-dialogDrag :close-on-click-modal="false"
4 title="新增" 4 title="批量户"
5 :visible.sync="isVisible" 5 :visible.sync="isVisible"
6 width="70%" 6 width="72%"
7 @close="close" 7 @close="close"
8 :modal-append-to-body="false" 8 :modal-append-to-body="false"
9 > 9 >
...@@ -187,13 +187,10 @@ ...@@ -187,13 +187,10 @@
187 </tr> 187 </tr>
188 188
189 <tr> 189 <tr>
190 <td colspan="12" rowspan="4" align="center"> 190 <td colspan="12" align="center">
191 <Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz> 191 <Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz>
192 </td> 192 </td>
193 </tr> 193 </tr>
194 <tr></tr>
195 <tr></tr>
196 <tr></tr>
197 194
198 <tr> 195 <tr>
199 <td colspan="2">东墙体归属</td> 196 <td colspan="2">东墙体归属</td>
...@@ -370,7 +367,7 @@ ...@@ -370,7 +367,7 @@
370 close: function () { 367 close: function () {
371 this.$emit('close') 368 this.$emit('close')
372 this.isVisible = false 369 this.isVisible = false
373 this.result() 370 this.reset()
374 }, 371 },
375 reset: function () { 372 reset: function () {
376 this.form={ 373 this.form={
......
...@@ -401,13 +401,18 @@ export default { ...@@ -401,13 +401,18 @@ export default {
401 if (this.bsms.length <= 0) { 401 if (this.bsms.length <= 0) {
402 Message.warning("请选择操作户") 402 Message.warning("请选择操作户")
403 return 403 return
404 } 404 }else{
405 batchCommit(this.bsms).then(res=>{ 405 if (this.qsztList.indexOf('1') > -1) {
406 if (res.success) { 406 Message.warning("已提交的户无法继续操作")
407 Message.success("提交成功"); 407 }else{
408 this.getlpbData(); 408 batchCommit(this.bsms).then(res=>{
409 } 409 if (res.success) {
410 }) 410 Message.success("提交成功");
411 this.getlpbData();
412 }
413 })
414 }
415 }
411 }, 416 },
412 loading(){ 417 loading(){
413 this.getLpbMenuTree(this.$store.state.zrzbsm); 418 this.getLpbMenuTree(this.$store.state.zrzbsm);
...@@ -423,23 +428,28 @@ export default { ...@@ -423,23 +428,28 @@ export default {
423 if (this.bsms.length <= 0) { 428 if (this.bsms.length <= 0) {
424 Message.warning("请选择操作户") 429 Message.warning("请选择操作户")
425 return 430 return
426 } 431 }else{
427 switch (val) { 432 if (this.qsztList.indexOf('1') > -1) {
428 case 'h': 433 Message.warning("已提交的户无法继续操作")
429 this.plhVisible=true; 434 }else{
430 break; 435 switch (val) {
431 case 'zl': 436 case 'h':
432 this.plzlVisible=true; 437 this.plhVisible=true;
433 break; 438 break;
434 case 'sh': 439 case 'zl':
435 this.plShVisible=true; 440 this.plzlVisible=true;
436 break; 441 break;
437 default: 442 case 'sh':
438 break; 443 this.plShVisible=true;
439 } 444 break;
445 default:
446 break;
447 }
448 }
449 }
440 }, 450 },
441 lodding(){ 451 lodding(){
442 this.getlpbData(); 452 this.getlpbData();
443 }, 453 },
444 plZlClose() { 454 plZlClose() {
445 this.plzlVisible = false; 455 this.plzlVisible = false;
...@@ -462,6 +472,7 @@ export default { ...@@ -462,6 +472,7 @@ export default {
462 //清空已选中层户 472 //清空已选中层户
463 this.cbsmList = []; 473 this.cbsmList = [];
464 this.bsms = []; 474 this.bsms = [];
475 this.qsztList = [];
465 this.$refs.lpbContent.hbsmList = []; 476 this.$refs.lpbContent.hbsmList = [];
466 this.$nextTick(()=>{ 477 this.$nextTick(()=>{
467 //户 478 //户
...@@ -565,6 +576,16 @@ export default { ...@@ -565,6 +576,16 @@ export default {
565 this.bsms = data; 576 this.bsms = data;
566 } 577 }
567 }, 578 },
579 //获取选中户信息
580 getQsztList(data, type) {
581 if (type) {
582 // 双击
583
584 } else {
585 //单击 TO DO
586 this.qsztList = data;
587 }
588 },
568 //获取选中层bsmlist 589 //获取选中层bsmlist
569 getCbsm(data){ 590 getCbsm(data){
570 this.cbsmList = data; 591 this.cbsmList = data;
...@@ -588,9 +609,11 @@ export default { ...@@ -588,9 +609,11 @@ export default {
588 }); 609 });
589 } 610 }
590 }, 611 },
591 //调用楼盘表信息查询接口 612 //调用楼盘表信息查询和图例统计接口
592 getlpbData() { 613 getlpbData() {
593 this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm,this.scyclx); 614 this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm,this.scyclx);
615 this.getDyztBsmList();
616 this.getLpbFwytAndQlxz();
594 //改变楼盘表子组件的key值,重新渲染 617 //改变楼盘表子组件的key值,重新渲染
595 this.time = new Date().getTime(); 618 this.time = new Date().getTime();
596 }, 619 },
...@@ -631,18 +654,21 @@ export default { ...@@ -631,18 +654,21 @@ export default {
631 }, 654 },
632 //批量添加不动产单元号 655 //批量添加不动产单元号
633 addBdcdyh() { 656 addBdcdyh() {
634 // this.pd[0].bsm //自然幢标识码 657 if (this.qsztList.indexOf('1') > -1) {
635 batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then( 658 Message.warning("已提交的户无法继续操作")
636 (res) => { 659 }else{
637 if (res.code === 200) { 660 batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then(
638 this.$message.success("生成完成!"); 661 (res) => {
639 } else if(res.code === 206){ 662 if (res.code === 200) {
640 let hasGenerateCount = res.result.hasGenerateCount; 663 this.$message.success("生成完成!");
641 let unGenerateCount = res.result.unGenerateCount; 664 } else if(res.code === 206){
642 this.open(hasGenerateCount,unGenerateCount); 665 let hasGenerateCount = res.result.hasGenerateCount;
666 let unGenerateCount = res.result.unGenerateCount;
667 this.open(hasGenerateCount,unGenerateCount);
668 }
643 } 669 }
644 } 670 );
645 ); 671 }
646 }, 672 },
647 673
648 open(hasGenerateCount,unGenerateCount) { 674 open(hasGenerateCount,unGenerateCount) {
......
...@@ -65,6 +65,7 @@ ...@@ -65,6 +65,7 @@
65 :rowspan="hs.sjcs" 65 :rowspan="hs.sjcs"
66 :colspan="hs.sjhs" 66 :colspan="hs.sjhs"
67 :data-bsm="hs.bsm" 67 :data-bsm="hs.bsm"
68 :data-qszt="hs.qszt"
68 ref="hBsm" 69 ref="hBsm"
69 :key="hsIndex" 70 :key="hsIndex"
70 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''" 71 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...@@ -126,6 +127,7 @@ ...@@ -126,6 +127,7 @@
126 :rowspan="hs.sjcs" 127 :rowspan="hs.sjcs"
127 :colspan="hs.sjhs" 128 :colspan="hs.sjhs"
128 :data-bsm="hs.bsm" 129 :data-bsm="hs.bsm"
130 :data-qszt="hs.qszt"
129 ref="hBsm" 131 ref="hBsm"
130 :key="hsIndex" 132 :key="hsIndex"
131 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''" 133 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...@@ -199,6 +201,7 @@ ...@@ -199,6 +201,7 @@
199 :rowspan="hs.sjcs" 201 :rowspan="hs.sjcs"
200 :colspan="hs.sjhs" 202 :colspan="hs.sjhs"
201 :data-bsm="hs.bsm" 203 :data-bsm="hs.bsm"
204 :data-qszt="hs.qszt"
202 ref="hBsm" 205 ref="hBsm"
203 :key="hsIndex" 206 :key="hsIndex"
204 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''" 207 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...@@ -253,6 +256,7 @@ ...@@ -253,6 +256,7 @@
253 :rowspan="hs.sjcs" 256 :rowspan="hs.sjcs"
254 :colspan="hs.sjhs" 257 :colspan="hs.sjhs"
255 :data-bsm="hs.bsm" 258 :data-bsm="hs.bsm"
259 :data-qszt="hs.qszt"
256 ref="hBsm" 260 ref="hBsm"
257 :key="hsIndex" 261 :key="hsIndex"
258 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''" 262 :class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...@@ -425,6 +429,7 @@ export default { ...@@ -425,6 +429,7 @@ export default {
425 loading: true, 429 loading: true,
426 hbsm:'', 430 hbsm:'',
427 hbsmList: [], 431 hbsmList: [],
432 hqsztList:[],
428 cbsmList: [], 433 cbsmList: [],
429 time: null, //区分单双击事件的定时器 434 time: null, //区分单双击事件的定时器
430 searchNum: Math.random(), 435 searchNum: Math.random(),
...@@ -619,6 +624,7 @@ export default { ...@@ -619,6 +624,7 @@ export default {
619 //未选中→选中 624 //未选中→选中
620 e.className = "tdSelect"; //加边框 625 e.className = "tdSelect"; //加边框
621 this.hbsmList.push(bsm); // 将户bsm放进hbsmList 626 this.hbsmList.push(bsm); // 将户bsm放进hbsmList
627 this.hqsztList.push(hs.qszt); // 将户qszt放进hqsztList
622 switch (this.lpbParent) { 628 switch (this.lpbParent) {
623 case 'isHbfg': 629 case 'isHbfg':
624 this.fghbChoosedList.push(hs); 630 this.fghbChoosedList.push(hs);
...@@ -631,6 +637,7 @@ export default { ...@@ -631,6 +637,7 @@ export default {
631 break; 637 break;
632 case 'isLpb': 638 case 'isLpb':
633 this.$parent.getHbsm(this.hbsmList, false); 639 this.$parent.getHbsm(this.hbsmList, false);
640 this.$parent.getQsztList(this.hqsztList, false);
634 break; 641 break;
635 642
636 default: 643 default:
...@@ -651,7 +658,9 @@ export default { ...@@ -651,7 +658,9 @@ export default {
651 break; 658 break;
652 case 'isLpb': 659 case 'isLpb':
653 this.hbsmList = this.hbsmList.filter(i=>i!=bsm); 660 this.hbsmList = this.hbsmList.filter(i=>i!=bsm);
661 this.hqsztList = this.hqsztList.filter(i=>i!=hs.qszt);
654 this.$parent.getHbsm(this.hbsmList, false); 662 this.$parent.getHbsm(this.hbsmList, false);
663 this.$parent.getQsztList(this.hqsztList, false);
655 break; 664 break;
656 665
657 default: 666 default:
...@@ -695,6 +704,7 @@ export default { ...@@ -695,6 +704,7 @@ export default {
695 }); 704 });
696 // 清空hbsmList 705 // 清空hbsmList
697 this.hbsmList = []; 706 this.hbsmList = [];
707 this.hqsztList = [];
698 // }); 708 // });
699 }, 709 },
700 //户右键点击事件 710 //户右键点击事件
...@@ -774,7 +784,7 @@ export default { ...@@ -774,7 +784,7 @@ export default {
774 if (e.target.className.indexOf("tdSelect") == -1) { 784 if (e.target.className.indexOf("tdSelect") == -1) {
775 //未选中→选中 785 //未选中→选中
776 e.target.className += " tdSelect"; //加边框 786 e.target.className += " tdSelect"; //加边框
777 this.cbsmList.push(item.bsm); // 将户bsm放进hbsmList 787 this.cbsmList.push(item.bsm);
778 } else { 788 } else {
779 //选中→未选中 789 //选中→未选中
780 e.target.className = "floor"; 790 e.target.className = "floor";
...@@ -965,35 +975,39 @@ export default { ...@@ -965,35 +975,39 @@ export default {
965 this.$refs.hBsm.forEach((item) => { 975 this.$refs.hBsm.forEach((item) => {
966 item.className = "tdSelect"; 976 item.className = "tdSelect";
967 this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList 977 this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
978 this.hqsztList.push(item.dataset.qszt)
968 }); 979 });
969 }else{ 980 }else{
970 this.$refs.hBsm.forEach((item) => { 981 this.$refs.hBsm.forEach((item) => {
971 item.className = ""; 982 item.className = "";
972 this.hbsmList = []; 983 this.hbsmList = [];
984 this.hqsztList = [];
973 }); 985 });
974 } 986 }
975 this.$nextTick(()=>{ 987 this.$nextTick(()=>{
976 this.$parent.getHbsm(this.hbsmList, false); 988 this.$parent.getHbsm(this.hbsmList, false);
989 this.$parent.getQsztList(this.hqsztList, false);
977 }) 990 })
978 }, 991 },
979 //幢单元全选 992 //幢单元全选
980 zdySelectAll(val,cs){ 993 zdySelectAll(val,cs){
981 let zdyHbsmList = []; 994 let zdyHbsmList = [];
995 let zdyHqsztList = [];
982 cs.forEach(i=>{ 996 cs.forEach(i=>{
983 i.hs.forEach(j=>{ 997 i.hs.forEach(j=>{
984 zdyHbsmList.push(j.bsm) 998 zdyHbsmList.push(j.bsm)
999 zdyHqsztList.push(j.qszt)
985 }) 1000 })
986 }); 1001 });
987 if (val) { 1002 if (val) {
988 this.$nextTick(()=>{ 1003 this.$nextTick(()=>{
989 console.log(zdyHbsmList);
990 this.$refs.hBsm.forEach((item) => { 1004 this.$refs.hBsm.forEach((item) => {
991 console.log(item.dataset.bsm);
992 if (zdyHbsmList.indexOf(item.dataset.bsm)>-1) { 1005 if (zdyHbsmList.indexOf(item.dataset.bsm)>-1) {
993 item.className = "tdSelect"; 1006 item.className = "tdSelect";
994 this.hbsmList = zdyHbsmList; // 将户bsm放进hbsmList
995 } 1007 }
996 }); 1008 });
1009 this.hbsmList = this.hbsmList.concat(zdyHbsmList);
1010 this.hqsztList = this.hqsztList.concat(zdyHqsztList);
997 }) 1011 })
998 }else{ 1012 }else{
999 this.$refs.hBsm.forEach((item) => { 1013 this.$refs.hBsm.forEach((item) => {
...@@ -1006,10 +1020,16 @@ export default { ...@@ -1006,10 +1020,16 @@ export default {
1006 this.hbsmList = this.hbsmList.filter(i=>i!=j) 1020 this.hbsmList = this.hbsmList.filter(i=>i!=j)
1007 } 1021 }
1008 }) 1022 })
1023 zdyHqsztList.forEach(j=>{
1024 if (item.dataset.qszt == j) {
1025 this.hqsztList = this.hqsztList.filter(i=>i!=j)
1026 }
1027 })
1009 }); 1028 });
1010 } 1029 }
1011 this.$nextTick(()=>{ 1030 this.$nextTick(()=>{
1012 this.$parent.getHbsm(this.hbsmList, false); 1031 this.$parent.getHbsm(this.hbsmList, false);
1032 this.$parent.getQsztList(this.hqsztList, false);
1013 }) 1033 })
1014 }, 1034 },
1015 //逻辑幢、幢单元、层双击 1035 //逻辑幢、幢单元、层双击
...@@ -1056,7 +1076,8 @@ export default { ...@@ -1056,7 +1076,8 @@ export default {
1056 console.log(item.dataset.bsm, "item.dataset.bsm"); 1076 console.log(item.dataset.bsm, "item.dataset.bsm");
1057 // 判断hbsmList中是否已经存在 1077 // 判断hbsmList中是否已经存在
1058 if (this.hbsmList.indexOf(item.dataset.bsm) == -1) { 1078 if (this.hbsmList.indexOf(item.dataset.bsm) == -1) {
1059 this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList 1079 this.hbsmList.push(item.dataset.bsm);
1080 this.hqsztList.push(item.dataset.qszt);
1060 } 1081 }
1061 } 1082 }
1062 }); 1083 });
......