dzHb.vue
33.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
<template>
<div class="hb-tabs top20">
<div class="hbq">
<span class="tips" style="margin-left:0;">合并前多幢信息</span>
<table border="1">
<tr>
<td class="xh">序号</td>
<td class="zddm">宗地代码</td>
<td class="bdcdyh">不动产单元号</td>
<td class="xmmc">项目名称</td>
<td class="bdcqzh">不动产权证号</td>
<td class="qlr">权利人</td>
<td class="zl">坐落</td>
<td class="zl">类型</td>
<td class="">
多幢:
<el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="newAddDz"
>+
</el-button>
自然幢:
<el-button
type="primary"
class="changeBtn outAdd addMinus"
@click="newAddZrz"
>+
</el-button>
</td>
</tr>
<tr v-if="dzhbqData.length==0">
<td colspan="9">
<span class="noData">暂无数据</span>
</td>
</tr>
<tr v-else v-for="(item,index) in dzhbqData" :key="index">
<td class="xh">{{index+1}}</td>
<td class="zddm">{{item.zddm}}</td>
<td class="bdcdyh">{{item.bdcdyh}}</td>
<td class="xmmc">{{item.xmmc}}</td>
<td class="bdcqzh">{{item.bdcqzh}}</td>
<td class="qlr">{{item.qlr}}</td>
<td class="zl">{{item.zl}}</td>
<td class="zl">{{item.type}}</td>
<td class="cz">
<el-button
type="primary"
class="changeBtn outMinus addMinus"
@click="deleteData(index)"
>-
</el-button>
</td>
</tr>
</table>
</div>
<div class="hbh dzhbh">
<span class="tips" style="width:100%;display:block;margin-left:0;">合并后多幢信息</span>
<el-card class="data">
<div slot="header" class="clearfix">
<span>多幢基本信息</span>
</div>
<ul class="zdjbxx">
<li>
<span class="label">行政区:</span>
<span class="value">
<el-select v-model="dzhbhData.xzqbsm" @change="changeXzq(dzhbhData.xzqbsm)" disabled>
<el-option
v-for="i in xzq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</span>
</li>
<li>
<span class="label">地籍区:</span>
<span class="value">
<el-select v-model="dzhbhData.djqbsm" @change="changeDjq(dzhbhData.djqbsm)" disabled>
<el-option
v-for="i in djq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</span>
</li>
<li>
<span class="label">地籍子区:</span>
<span class="value">
<el-select v-model="dzhbhData.djzqbsm" @change="$forceUpdate()" disabled>
<el-option
v-for="i in djzq"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</span>
</li>
<li>
<span class="label">所有权类型:</span>
<span class="value">
<el-select v-model="dzhbhData.syqlxbsm" disabled>
<el-option
v-for="i in syq"
:key="i.value"
:label="i.label"
:value="i.value"
></el-option>
</el-select>
</span>
</li>
<li>
<span class="label">宗地特征码:</span>
<span class="value">
<el-select v-model="dzhbhData.zdtzmbsm" disabled>
<el-option
v-for="i in $store.state.zdtzmList"
:key="i.bsm"
:label="i.mc"
:value="i.bsm"
></el-option>
</el-select>
</span>
</li>
<li>
<span class="label">项目名称:</span>
<span class="value">
<el-input type="text" v-model="dzhbhData.xmmc"></el-input>
</span>
</li>
</ul>
</el-card>
<div class="zxx">
<el-card class="zrz">
<div slot="header" class="clearfix">
<span style="margin-right:10px">幢信息</span>
<span style="margin-right:10px"><i class="iconfont iconduochuang"></i>多幢<span
style="color:red">{{dzList.length}}</span>幢</span>
<span><i class="iconfont iconziranchuang"></i>自然幢<span
style="color:red">{{zrzList.length}}</span>幢</span>
</div>
<ul>
<li v-for="(item,index) in dzList" :key="index"
>
<i class="iconfont iconduochuang"></i> {{item.xmmc}}
</li>
<li v-for="(item,index) in zrzList" :key="index"
>
<i class="iconfont iconziranchuang"></i> {{item.xmmc}}
</li>
</ul>
</el-card>
</div>
</div>
<div class="header-button">
<el-button type="primary" class="saveBtn" @click="save">保存</el-button>
</div>
<el-dialog
title="新增多幢"
:visible.sync="dzIsVisible"
width="70%"
@close="dzClose"
:modal-append-to-body="false"
>
<div class="search">
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="宗地编码">
<el-input
v-model="queryData.zddm"
placeholder="输入宗地编码"
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
></el-input>
</el-form-item>
<el-button type="primary" style="margin-left:30px" @click="search">查询</el-button>
<el-button type="warning" @click="reset">重置</el-button>
</el-form>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="权利人">
<el-input
v-model="queryData.qlrmc"
placeholder="输入权利人"
></el-input>
</el-form-item>
<el-form-item label="坐落">
<el-input
v-model="queryData.zl"
placeholder="输入坐落"
></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="table-data">
<table border="1">
<tr>
<td>序号</td>
<td>操作</td>
<td>宗地代码</td>
<td>不动产单元号</td>
<td>项目名称</td>
<td>不动产权证号</td>
<td>权利人</td>
<td>坐落</td>
<td>自然幢数量</td>
</tr>
<tr v-if="Data.length==0">
<td colspan="9">
<span class="noData">暂无数据</span>
</td>
</tr>
<tr v-else v-for="(item,index) in Data" :key="index">
<td>{{index+1}}</td>
<td @click="addDzData(item)" class="xz">
<span>选择</span>
</td>
<td>{{item.zddm}}</td>
<td>{{item.bdcdyh}}</td>
<td>{{item.xmmc}}</td>
<td>{{item.bdcqzh}}</td>
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
<td>{{item.zrzCount}}</td>
</tr>
</table>
</div>
</div>
<div class="page">
<el-pagination
background
layout="prev, pager, next,total"
:page-size="queryData.pageSize"
:total="total"
@current-change="currentChange"
>
</el-pagination>
</div>
</el-dialog>
<el-dialog
title="新增自然幢"
:visible.sync="zrzIsVisible"
width="70%"
@close="zrzClose"
:modal-append-to-body="false"
>
<div class="search">
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="宗地编码">
<el-input
v-model="queryData.zddm"
placeholder="输入宗地编码"
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
v-model="queryData.bdcqzh"
placeholder="输入不动产权证号"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
></el-input>
</el-form-item>
<el-button type="primary" style="margin-left:30px" @click="search">查询</el-button>
<el-button type="warning" @click="reset">重置</el-button>
</el-form>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form :inline="true" class="demo-form-inline">
<el-form-item label="权利人">
<el-input
v-model="queryData.qlrmc"
placeholder="输入权利人"
></el-input>
</el-form-item>
<el-form-item label="坐落">
<el-input
v-model="queryData.zl"
placeholder="输入坐落"
></el-input>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="table-data">
<table border="1">
<tr>
<td>序号</td>
<td>操作</td>
<td>宗地代码</td>
<td>不动产单元号</td>
<td>项目名称</td>
<td>不动产权证号</td>
<td>权利人</td>
<td>坐落</td>
</tr>
<tr v-if="Data.length==0">
<td colspan="8">
<span class="noData">暂无数据</span>
</td>
</tr>
<tr v-else v-for="(item,index) in Data" :key="index">
<td>{{index+1}}</td>
<td @click="addZrzData(item)" class="xz">
<span>选择</span>
</td>
<td>{{item.zddm}}</td>
<td>{{item.bdcdyh}}</td>
<td>{{item.xmmc}}</td>
<td>{{item.bdcqzh}}</td>
<td>{{item.qlr}}</td>
<td>{{item.zl}}</td>
</tr>
</table>
</div>
</div>
<div class="page">
<el-pagination
background
layout="prev, pager, next,total"
:page-size="queryData.pageSize"
:total="total"
@current-change="currentChange"
>
</el-pagination>
</div>
</el-dialog>
</div>
</template>
<script>
import {
getAllList,
getListByXzqbsm,
getListByPbsm,
getDdicByMC
} from "@api/common";
import {dzList, zrzList} from './../../api/search'
import {getQjZdjbxxDetailById} from './../../api/zd'
export default {
name: "dzHb",
data() {
return {
total: 1,
dzIsVisible: false,
zrzIsVisible: false,
dzhbqData: [], // 多幢合并前数据
dzhbhData: {}, // 多幢合并后数据
Data: [],
xzq: [],
djq: [],
djzq: [],
dzList: [],
zrzList: [],
zdbsm: '',
queryData: {
bdcdyh: "",
bdcqzh: "",
qlrmc: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 10,
},
syq: [
{
label: "国家所有",
value: "G",
},
{
label: "集体所有",
value: "J",
},
{
label: "土地所有权未确定或有争议",
value: "Z",
}
],
}
},
mounted() {
this.getXzqList();
},
methods: {
getZdData(id) {
getQjZdjbxxDetailById(id).then(res => {
this.dzhbhData.xzqbsm = res.result.xzqbsm
this.changeXzq(this.dzhbhData.xzqbsm)
this.dzhbhData.djqbsm = res.result.djqbsm
this.changeDjq(this.dzhbhData.djqbsm)
this.dzhbhData.djzqbsm = res.result.djzqbsm
this.dzhbhData.syqlxbsm = res.result.syqlxbsm
this.dzhbhData.zdtzmbsm = res.result.zdtzmbsm
})
},
newAddDz() {
this.dzIsVisible = true;
this.geDztData(this.queryData)
},
newAddZrz() {
this.zrzIsVisible = true;
this.geZrztData(this.queryData)
},
deleteData(index) {
let data = this.dzhbqData[index];
// 多幢
if (data.zrzCount) {
let dzIndex = this.dzList.indexOf(data);
this.dzList.splice(dzIndex, 1);
} else {
let zrzIndex = this.zrzList.indexOf(data);
this.zrzList.splice(zrzIndex, 1)
}
this.dzhbqData.splice(index, 1)
if (this.dzhbqData.length === 0) {
this.dzhbhData.xzqbsm = ""
this.dzhbhData.djqbsm = ""
this.dzhbhData.djzqbsm = ""
this.dzhbhData.syqlxbsm = ""
this.dzhbhData.zdtzmbsm = ""
}
},
save() {
},
dzClose() {
this.dzIsVisible = false;
},
zrzClose() {
this.zrzIsVisible = false;
},
currentChange(val) {
this.queryData.pageNo = val;
this.geDztData(this.queryData);
},
geDztData(data) {
dzList(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
})
},
geZrztData(data) {
zrzList(data).then(res => {
this.Data = res.result.records
this.total = res.result.total;
})
},
search() {
this.geDztData(this.queryData)
},
addData(data) {
if (this.dzhbqData.length === 0) {
this.zdbsm = data.zdbsm;
}
this.zrzIsVisible = false;
this.dzIsVisible = false;
this.dzhbqData.push(data);
},
addDzData(data) {
let arr = [];
arr = this.dzhbqData.filter(i => i.bsm === data.bsm);
if (arr.length > 0) {
this.$message.info("当前多幢已选择,请重新选择")
return
}
arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm);
if (arr.length > 0) {
this.$confirm('当前选择多幢不在同一宗地下,是否继续选择?')
.then(_ => {
this.dzList.push(data)
data['type']='多幢'
this.addData(data)
return
})
.catch(_ => {
return
});
} else {
this.dzList.push(data);
data['type']='多幢'
this.addData(data)
}
},
addZrzData(data) {
let arr = [];
arr = this.dzhbqData.filter(i => i.bsm === data.bsm);
if (arr.length > 0) {
this.$message.info("当前自然幢已选择,请重新选择")
return
}
arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm);
if (arr.length > 0) {
this.$confirm('当前选择多幢不在同一宗地下,是否继续选择?')
.then(_ => {
this.zrzList.push(data)
data['type'] = '自然幢'
this.addData(data)
return
})
.catch(_ => {
return
});
} else {
this.zrzList.push(data)
data['type'] = '自然幢';
this.addData(data)
}
},
getXzqList() {
getAllList()
.then((res) => {
this.xzq = res.result;
})
.catch((error) => {
});
},
changeXzq(id) {
this.djq = [];
this.djzq = [];
switch (this.tabName) {
case "zd":
this.zdhbhData.djqbsm = '';
this.zdhbhData.djzqbsm = '';
break
case "dz":
this.zdhbhData.djqbsm = '';
this.zdhbhData.djzqbsm = '';
break
default:
break
}
getListByXzqbsm(id)
.then((res) => {
if (res.result == null) {
this.djq = null;
} else {
this.djq = res.result;
}
})
.catch((error) => {
});
},
changeDjq(item) {
this.djzq = [];
this.dzhbqData.djzqbsm = '';
if (item == null) {
} else {
getListByPbsm(item)
.then((res) => {
if (res.result == null) {
this.djzq = null;
} else {
this.djzq = res.result;
}
})
.catch((error) => {
});
}
},
reset() {
this.queryData = {
bdcdyh: "",
bdcqzh: "",
qlrmc: "",
xmmc: "",
zddm: "",
zl: "",
pageNo: 1,
pageSize: 10
};
this.geDztData(this.queryData)
},
},
watch: {
zdbsm: function (bsm) {
this.getZdData(bsm)
}
}
}
</script>
<style scoped lang="less">
.hb {
.menu {
/deep/ .el-tabs__content {
position: unset;
margin-top: 62px;
overflow: visible;
}
/deep/ .el-tabs__header {
position: -webkit-fixed;
position: fixed;
top: 120px;
z-index: 999;
width: 100%;
margin-bottom: 0;
border: 0;
/deep/ .el-tabs__nav-scroll {
height: 50px;
box-sizing: border-box;
padding-left: 20px;
.el-tabs__active-bar {
display: none;
}
> .el-tabs__nav {
border: 0;
> .el-tabs__item {
border: 1px solid #DEDEDE;
height: 36px;
line-height: 32px;
padding: 0 20px;
margin: 9px 10px 9px 0;
background-color: #ffffff;
}
.is-active {
color: #006CFF;
border: 1px solid #006CFF;
}
}
}
/deep/ .el-tabs__nav-wrap::after {
width: 0;
}
}
}
}
.psn {
position: unset !important;
}
.hb-tabs {
height: auto;
width: 100%;
position: relative;
.addBtn {
position: absolute;
right: 30px;
top: 0;
z-index: 999;
}
.header {
box-sizing: border-box;
padding: 18px 18px 0 18px;
display: flex;
justify-items: left;
span {
width: 130px;
line-height: 40px;
color: #9B9B9B;
}
.el-input {
width: 200px;
margin-right: 20px;
}
}
.header-button {
width: 1624px;
height: 50px;
position: fixed;
bottom: 0;
text-align: center;
background-color: #ffffff;
}
table {
margin-top: 10px;
background-color: #fff;
font-size: 14px;
width: 100%;
tr:nth-of-type(odd) {
background: #FAFAFA;
th {
height: 36px;
}
}
.formInput {
margin: 0;
height: 36px;
outline: none;
border: none;
color: #606764;
overflow: visible;
text-align: center;
cursor: text;
}
tr:hover {
background-color: #F5F7FA;
}
}
td {
text-align: center;
height: 40px;
min-width: 50px;
}
table:hover {
cursor: pointer;
}
.noData {
color: #b2b2b2;
}
.saveBtn {
background-color: #00CACD;
border-color: #00CACD;
padding: 10px 30px;
margin-top: 8px;
}
.saveBtn:hover {
background-color: rgba(0, 202, 205, .8);
border-color: rgba(0, 202, 205, .8);
}
.xh {
width: 100px;
}
.xzq, .djq, .djzq {
width: 150px;
}
.tips {
color: #9B9B9B;
margin-left: 20px;
margin-bottom: 14px;
}
.hbq {
margin: 14px 20px 20px 20px;
}
.dzhbh {
box-sizing: border-box !important;
padding: 0 18px 0 0 !important;
margin-top: 10px !important;
display: block !important;
}
.hbh {
margin-left: 20px;
margin-top: 14px;
margin-bottom: 70px;
display: flex;
flex-direction: column;
flex-flow: nowrap;
.data {
width: 40%;
float: left;
}
.el-card {
border: 1px solid #E6E6E6;
background-color: white;
overflow: auto;
.clearfix {
span {
color: #9B9B9B;
}
}
/deep/ .el-card__body {
padding: 10px 12px;
}
ul {
li {
padding: 5px;
line-height: 20px;
color: #4A4A4A;
.label {
vertical-align: middle;
color: #4A4A4A;
display: inline-block;
width: 104px;
text-align: right;
}
.value {
vertical-align: middle;
color: #6D7278;
display: inline-block;
padding-left: 10px;
width: calc(100% - 116px);
word-break: break-all;
}
}
.hasChoosed {
color: #BBB;
}
}
.zdjbxx {
width: 100%;
height: 320px;
margin-bottom: 10px;
float: left;
}
.zdmap {
width: calc(100% - 380px);
height: 200px;
float: left;
}
}
.zxx {
width: calc(60% - 40px);
margin-left: 20px;
display: flex;
flex-direction: column;
flex-flow: nowrap;
float: left;
.title {
color: red;
text-align: center;
padding: 5px 0;
}
/deep/ .el-card__body {
height: 320px;
overflow-y: scroll;
position: relative;
}
.line {
width: 1px;
height: calc(100% - 20px);
background-color: #EDEDED;
position: absolute;
top: 10px;
left: 50%;
}
.dz {
width: 33%;
overflow: auto;
ul {
li {
width: 96% !important;
}
}
}
.zrz {
width: 100%;
overflow: auto;
}
ul {
overflow: auto;
width: 100%;
float: left;
margin-left: 10px;
li {
width: 23%;
padding: 5px;
text-align: left;
line-height: 20px;
display: inline-block;
.label {
width: 90px;
}
}
li:nth-of-type(even) {
.label {
width: 110px;
text-indent: 20px;
}
}
}
}
}
}
.cz {
color: blue;
}
.cz:hover {
color: blue;
text-decoration: underline;
}
.xz {
color: blue;
}
.table-data {
height: 480px;
}
/deep/ .el-select {
width: 100%;
}
</style>