0b323a2f63b63f6d7ef5cd672897479dbae18cd5.svn-base
54.6 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
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>测绘信息管理</title>
<meta name="decorator" content="default"/>
<script src="${ctxStatic}/gis/js/init.js" type="text/javascript"></script>
<script src="${ctxStatic}/gis/lib/OpenLayers.js" type="text/javascript"></script>
<script src="${ctxStatic}/gis/lib/zdclient.js" type="text/javascript"></script>
<script src="${ctxStatic}/gis/lib/jquery.orbit-1.2.3.js" type="text/javascript"></script>
<script src="${ctxStatic}/gis/js/global.js" type="text/javascript"></script>
<script src="${ctxStatic}/gis/js/config.js" type="text/javascript"></script>
<script src="${ctxStatic}/select3/AreaData_min.js" type="text/javascript"></script>
<link href="${ctxStatic}/gis/lib/jqueryEasyui/easyui.css" rel="stylesheet" type="text/css" />
<link href="${ctxStatic}/gis/lib/jqueryEasyui/icon.css" rel="stylesheet" type="text/css" />
<script src="${ctxStatic}/gis/lib/jqueryEasyui/jquery.easyui.min.js" type="text/javascript"></script>
<script type="text/javascript">
var mapreturnvale;
var mapreturnvaleList;
var DJQTotle,DJZQTotle;
var DJQName = new Array();
var DJZQName = new Array();
var regBaseZbinfoRowIdx = 0;
var tempdjq,tempdjzq,tempxzq;
var TempZBArray = new Array();
var TempZBYXArray = new Array();
var zblisttemp="";
var daoru="";
var minArea = 0, maxArea = 0;
$(document).ready(function() {
/* var czlx= "${czlx}";
if(czlx=="修改")
{
document.getElementById("zdtzmTxt").disabled=true;
} */
var daoru= "${daoru}";
//document.getElementById("seachprovtext").value =actualSvrcfg.xingzhengqu;
document.getElementById("chcode").value ="${regBaseChxx11.chcode}";
tempxzq="${regBaseChxx11.seachprov}";
tempdjq="${regBaseChxx11.seachcity}";
tempdjzq="${regBaseChxx11.seachdistrict}";
$.ajax({
type:"POST", //请求方式
url:"${ctx}/reg/base/regBaseChxx/getHKVInfoindex", //请求路径
cache: false, //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。
data:"djq="+"${regBaseChxx11.seachcity}"+"&djzq="+"${regBaseChxx11.seachdistrict}",//"id="+ id +"&NEWYWH=${regBusSlsq.ywh}&djlx=${regBusSlsq.djxl}", //传参
async:true,
// dataType: "html", //返回值类型
success:function(modelmap){
document.getElementById("seachcitytext").value =modelmap.djq;
document.getElementById("seachdistricttext").value =modelmap.djzq;
}
});
//$("#name").focus();
/*var regBaseZbinfoRowIdx = 0, regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
var data = ${fns:toJson(regBaseChxx11.regBaseZbinfoList)};
for (var i=0; i<data.length; i++){
addRow('#regBaseZbinfoList', regBaseZbinfoRowIdx, regBaseZbinfoTpl, data[i]);
regBaseZbinfoRowIdx = regBaseZbinfoRowIdx + 1;
}*/
$("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
var initdjq = "${regBaseChxx11.seachcity}";
var initdjzq = "${regBaseChxx11.seachdistrict}";
if(initdjq == undefined || initdjq == null || initdjq ==""){
if((initdjzq!="")&&(initdjzq!=null)&&(initdjzq != undefined))
{
regBaseZbinfoRowIdx = 0; regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
var data = ${fns:toJson(regBaseChxx11.regBaseZbinfoList)};
for (var i=0; i<data.length; i++){
addRow('#regBaseZbinfoList', regBaseZbinfoRowIdx, regBaseZbinfoTpl, data[i]);
regBaseZbinfoRowIdx = regBaseZbinfoRowIdx + 1;
}
}
// initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, '44', '0', '0');
}
views();
});
function gobackchxxlist(){
var url = "${ctx}/reg/base/regBaseChxx/list?chsqr=${chsqr}&chzdmj=${chzdmj}";
window.location = url;
}
function views(){
var viewid = "${VIEWS}";
console.log(viewid);
if(viewid == undefined || viewid == null || viewid ==""){
return;
}
$("input:not(#btnCancel),select,textarea").attr("disabled","disabled");
$("#getdjqdjzqCancel").attr("disabled","disabled");
$("#btnn").removeAttr("onclick");
}
//得到地区码
function getAreaID(){
var area = 0;
if($("#seachdistricttext").val() != "0"){
area = $("#seachdistricttext").val();
}else if ($("#seachcitytext").val() != "0"){
area = $("#seachcitytext").val();
}else{
area = $("#seachprovtext").val();
}
return area;
}
function getAreaInfo() {
//地区码
var areaID = getAreaID();
//地区名
var areaName = getAreaNamebyID(areaID) ;
$("#chcode").val(areaID);
$("#zltext").val(areaName);
}
//根据地区码查询地区名
function getAreaNamebyID(areaID){
var areaName = "";
if(areaID.length == 6){
areaName = area_array[areaID];
}else if(areaID.length == 9){
var index1 = areaID.substring(0, 6);
areaName = area_array[index1] + "" + sub_array[index1][areaID];
}else if(areaID.length == 12){
var index1 = areaID.substring(0, 6);
var index2 = areaID.substring(0, 9);
areaName = area_array[index1] + "" + sub_array[index1][index2] + "" + sub_arr[index2][areaID];
}
return areaName;
}
function addRow(list, idx, tpl, row){
$(list).append(Mustache.render(tpl, {
idx: idx, delBtn: true, row: row
}));
$(list+idx).find("select").each(function(){
$(this).val($(this).attr("data-value"));
});
for(var i=0;i<150;i++){
$("#regBaseZbinfoList"+i+"_sort").val(i+1);
$("#regBaseZbinfoList"+i+"_zbdmc").val("J"+(i+1));
}
$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
var ss = $(this).attr("data-value").split(',');
for (var i=0; i<ss.length; i++){
if($(this).val() == ss[i]){
$(this).attr("checked","checked");
}
}
});
}
function delRow(obj, prefix){
var id = $(prefix+"_id");
var delFlag = $(prefix+"_delFlag");
if (id.val() == ""){
$(obj).parent().parent().remove();
} else if(delFlag.val() == "0"){
delFlag.val("1");
$(obj).html("撤销删除").attr("title", "撤销删除");
//$(obj).parent().parent().addClass("error");
}else if(delFlag.val() == "1") {
delFlag.val("0");
$(obj).html("删 除").attr("title", "删除");
$(obj).parent().parent().removeClass("error");
}
}
//打开人员基础信息维护
function personOpen(){
var iWidth=1100;
var iHeight=600;
var iTop = (window.screen.height - 30 - iHeight) / 2;
var iLeft = (window.screen.width - 10 - iWidth) / 2;
window.open("/ODM/a/reg/base/regBasePerson/list?WO=1&CHXXXZ=1","人员信息",
"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
}
//父页面证件类型赋值函数
function select2_zjlx(zjlxValue){
$("#zjlxtext").data('select2').val([zjlxValue]);
}
function checkbitianxiang(){
var trueOrfalse;
trueOrfalse=false;
$(".error").remove();
if($("#seachcitytext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#seachcitytext");
trueOrfalse=true;
}
if($("#seachdistricttext").val()== ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#seachdistricttext");
trueOrfalse=true;
}
if($("#seachprovtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#seachprovtext");
trueOrfalse=true;
}
if(!(($("#seachprovtext").val() == "${XQCODE}"))){
$("<label for='name' class='error'>县级行政区有误</label>").insertAfter("#seachprovtext");
trueOrfalse=true;
}
if($("#zdtzmTxt").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdtzmTxt");
trueOrfalse=true;
}
if($("#zltext").val()== ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zltext");
trueOrfalse=true;
}
if($("#zdmjtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdmjtext");
trueOrfalse=true;
}
if($("#adszdtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#adszdtext");
trueOrfalse=true;
}
if($("#zdt").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdt");
trueOrfalse=true;
}
if($("#zdszntext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdszntext");
trueOrfalse=true;
}
if($("#zdszxtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdszxtext");
trueOrfalse=true;
}
if($("#zdszbtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zdszbtext");
trueOrfalse=true;
}
return trueOrfalse;
}
function selectTuCeng(ListTucengNO)
{
var tucengValue="";
switch(ListTucengNO)
{
case "A":
tucengValue=actualSvrcfg.SYQZDGDBP;
break;
case "B":
tucengValue=actualSvrcfg.SHYQZD_DB;
break;
case "S":
tucengValue=actualSvrcfg.SHYQZD_DS;
break;
case "X":
tucengValue=actualSvrcfg.SHYQZD_DX;
break;
case "C":
tucengValue=actualSvrcfg.ZJDGDBP;
break;
case "D":
tucengValue=actualSvrcfg.CBJYQZD_GD;
break;
case "E":
tucengValue=actualSvrcfg.CBJYQZD_LD;
break;
case "F":
tucengValue=actualSvrcfg.CBJYQZD_CD;
break;
case "N":
tucengValue=actualSvrcfg.NYDGDBP;
break;
case "I":
break;
case "J":
break;
default:break;
}
return tucengValue;
}
function AddquyaosutoTC()
{
/*if(($("#regBaseZbinfoList"+0+"_zbx").val())!=($("#regBaseZbinfoList"+(regBaseZbinfoRowIdx-1)+"_zbx").val()))
{
alert("坐标有误!");
return;
}*/
if(false==checkzb()){ $("#btnSubmit").attr("disabled",false);return;}
if(TempZBArray[0]!=TempZBArray[TempZBArray.length-1])
{
TempZBArray[TempZBArray.length]=TempZBArray[0];
TempZBYXArray[TempZBYXArray.length]=TempZBYXArray[0];
}
//checkDJQ(actualSvrcfg.DJQ);
shujvfenxijianyan();
}
function shujvfenxijianyan()
{
var strTucengg;
var pointObj = new Array();
var qupointObj = new Array();
var lengthzb;
/*for(var j=0; j<regBaseZbinfoRowIdx; j++){
pointObj[j]=$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val();
}*/
/* pointObj=TempZBArray;
for(var i=0;i<pointObj.length;i++)
{
lengthzb=pointObj[i].split(",");
if(lengthzb.length==2)
{
qupointObj[i] = new Zondy.Object.Point2D(parseFloat(lengthzb[1]), parseFloat(lengthzb[0]));
}
else
{alert("该宗地坐标有误!");return false;}
} */
qupointObj=TempZBYXArray;
var geomObj = new Zondy.Object.Polygon(qupointObj);
geomObj.nearDis=0.001;
var queryStruct=new Zondy.Service.QueryFeatureStruct(
{
IncludeGeometry:true,
IncludeAttribute:true,
IncludeWebGraphic:false
});
var featureRule =Zondy.Service.QueryFeatureRule({
MustInside:true,
Intersect: true
});
strTucengg=actualSvrcfg.TUCENG;
var queryParam=new Zondy.Service.QueryByLayerParameter(
strTucengg,
{
geometry: geomObj,
resultFormat: "json",
isAsc: true,//排序 旧API文档没有
rule: featureRule,
struct:queryStruct
// where : str
});
queryParam.recordNumber=1000;
var queryService=new Zondy.Service.QueryLayerFeature(queryParam,
{
ip: actualSvrcfg.ip, //IP地址
port: actualSvrcfg.port , //端口号
requestType:"POST"
});
queryService.query(querryfenxiSuccess);
}
function querryfenxiSuccess(data){
var a=0;
for (var i=0;i<9;i++){
if(data[i].TotalCount>0)
{
i=8;
//alert("该测绘信息界址点坐标与其他宗地坐标相交,请检查!");
a=1;
$('#selectOkCancleButton').dialog('open');
$("#selectOkCancleButton").dialog("move",{top:$(document).scrollTop() + ($(window).height()-300) * 0.5});//带滚动条的div窗口居中显示
// return;
}
}
if(a==0)
{
checkDJQ(actualSvrcfg.DJQ);
}
}
function continueAddyaosu()
{
$('#selectOkCancleButton').dialog('close');
checkDJQ(actualSvrcfg.DJQ);
}
function cancelAdd()
{
$('#selectOkCancleButton').dialog('close');
return;
}
function checkDJQ(tuceng)
{
var pointObjcheckQu = new Array();
/*for(var j=0; j<regBaseZbinfoRowIdx; j++){
pointObjcheckQu[j] = new Zondy.Object.Point2D(parseFloat($("#regBaseZbinfoList"+j+"_zby").val()), parseFloat($("#regBaseZbinfoList"+j+"_zbx").val()));
}*/
pointObjcheckQu=TempZBYXArray;
var queryStructcheckQu=new Zondy.Service.QueryFeatureStruct(
{
IncludeGeometry:true,
IncludeAttribute:true,
IncludeWebGraphic:false
});
var polyLinecheckQu=new Zondy.Object.PolyLineForQuery(pointObjcheckQu);
var queryParamcheckQu = new Zondy.Service.QueryByLayerParameter(tuceng,{
geometry: polyLinecheckQu,
resultFormat: "json",
struct: queryStructcheckQu
});
var queryServicecheckQu=new Zondy.Service.QueryLayerFeature(queryParamcheckQu,
{
ip: actualSvrcfg.ip, //IP地址
port: actualSvrcfg.port , //端口号
requestType:"POST"
});
queryServicecheckQu.query(querryDJQSuccess);
}
function querryDJQSuccess(data){
DJQTotle=data.TotalCount;
document.getElementById("DJQ").options.length = 0;
for(var i=0;i<data.TotalCount;i++)
{
DJQName[i]=data.SFEleArray[i].AttValue[3];
var items = new Option(data.SFEleArray[i].AttValue[3]);
// document.getElementById('DJQ').options.add(items);
var djqCode=data.SFEleArray[i].AttValue[2];
$("#DJQ").append("<option value="+djqCode+">"+DJQName[i]+"</option>");
}
checkDJZQ(actualSvrcfg.DJZQ);
}
function checkDJZQ(tuceng)
{
var pointObjcheckQu = new Array();
/*for(var j=0; j<regBaseZbinfoRowIdx; j++){
pointObjcheckQu[j] = new Zondy.Object.Point2D(parseFloat($("#regBaseZbinfoList"+j+"_zby").val()), parseFloat($("#regBaseZbinfoList"+j+"_zbx").val()));
}*/
pointObjcheckQu=TempZBYXArray;
var queryStructcheckQu=new Zondy.Service.QueryFeatureStruct(
{
IncludeGeometry:true,
IncludeAttribute:true,
IncludeWebGraphic:false
});
// var lineObjcheckQu=new Zondy.Object.PolyLineForQuery ; //线要素查询
var polyLinecheckQu=new Zondy.Object.PolyLineForQuery(pointObjcheckQu);
var queryParamcheckQu = new Zondy.Service.QueryByLayerParameter(tuceng,{
geometry: polyLinecheckQu,
resultFormat: "json",
struct: queryStructcheckQu
});
var queryServicecheckQu=new Zondy.Service.QueryLayerFeature(queryParamcheckQu,
{
ip: actualSvrcfg.ip, //IP地址
port: actualSvrcfg.port , //端口号
requestType:"POST"
});
queryServicecheckQu.query(querryDJZQSuccess);
}
function querryDJZQSuccess(data){
var i;
var DJQfanxie = document.getElementById("seachcitytext");
var DJZQfanxie = document.getElementById("seachdistricttext");
DJZQTotle=data.TotalCount;
document.getElementById("QJZQ").options.length = 0;
for(i=0;i<data.TotalCount;i++)
{
DJZQName[i]=data.SFEleArray[i].AttValue[3];
var djzqCode=data.SFEleArray[i].AttValue[2];
// document.getElementById('QJZQ').options.add(new Option(DJZQName[i]));
$("#QJZQ").append("<option value="+djzqCode+">"+DJZQName[i]+"</option>");
}
$('#SelectDJQZQ').dialog('open');
$("#SelectDJQZQ").dialog("move",{top:$(document).scrollTop() + ($(window).height()-300) * 0.5});//带滚动条的div窗口居中显示
//document.getElementById('DJQ').options[0].selected = true;
//document.getElementById('QJZQ').options[0].selected = true;
$("#DJQ").data('select2').val(DJQName[0]);
$("#QJZQ").data('select2').val(DJZQName[0]);
//addyaosu();
}
function closetaqnchu()
{
var str1,str2;
str1=$("#DJQ").select2('data').text;
str2=$("#QJZQ").select2('data').text;
//---------------------------------------------
document.getElementById("seachcitytext").value =str1;
document.getElementById("seachdistricttext").value =str2;
// document.getElementById("zltext").value =actualSvrcfg.xingzhengqu+str1+str2;
document.getElementById("zltext").value =$("#seachprovtext").select2('data').text+str1+str2;
//-------------------------------
$.ajax({
type:"POST", //请求方式
url:"${ctx}/reg/base/regBaseChxx/getHKVInfo", //请求路径
cache: false, //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。
data:"xzq="+$("#seachprovtext").val()+"&djq="+$("#seachcitytext").val()+"&djzq="+$("#seachdistricttext").val(),//"id="+ id +"&NEWYWH=${regBusSlsq.ywh}&djlx=${regBusSlsq.djxl}", //传参
async:true,
// dataType: "html", //返回值类型
success:function(modelmap){
tempxzq=modelmap.xzq;
tempdjq=modelmap.djq;
tempdjzq=modelmap.djzq;
document.getElementById("chcode").value =modelmap.djzq;
tempdjq=$("#DJQ").val();
tempdjzq=$("#QJZQ").val();
document.getElementById("chcode").value=$("#QJZQ").val();
}
});
//--------------------------------------
$('#SelectDJQZQ').dialog('close');
}
function djqdjzqajax()
{
//-------------------------------
$.ajax({
type:"POST", //请求方式
url:"${ctx}/reg/base/regBaseChxx/getHKVInfo", //请求路径
cache: false, //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。
data:"xzq="+$("#seachprovtext").val()+"&djq="+$("#seachcitytext").val()+"&djzq="+$("#seachdistricttext").val(),//"id="+ id +"&NEWYWH=${regBusSlsq.ywh}&djlx=${regBusSlsq.djxl}", //传参
async:false,
success:function(modelmap){
tempxzq=modelmap.xzq;
//tempdjq=modelmap.djq;
//tempdjzq=modelmap.djzq;
//document.getElementById("chcode").value =modelmap.djzq;
//tempdjq=$("#DJQ").val();
//tempdjzq=$("#QJZQ").val();
//document.getElementById("chcode").value=$("#QJZQ").val();
}
});
//--------------------------------------
}
function checkzb(){
var tb = document.getElementById("contentTable");
var tempx,tempy,indexNO=0,flag=0;
console.log(TempZBArray);//清空数组
console.log(TempZBYXArray);//清空数组
zblisttemp="";
console.log(tb.rows.length);
for (var i=1;i<tb.rows.length-1;i++){
tempx = tb.rows[i].cells[3].getElementsByTagName("INPUT")[0].value;
tempy = tb.rows[i].cells[4].getElementsByTagName("INPUT")[0].value;
var str=tb.rows[i].cells[5].innerText;
str=str.replace( /^\s+|\s+$/g, "" );
if(str=="删 除"||str=="撤销删除")
{
flag = 0;
//判断导入的数据格式,为文本则可导入
if((tempx.indexOf("E") != -1) || (tempy.indexOf("E") != -1)){
alert("导入的界址点格式为 非文本 格式,无法导入,请修改后重新导入");
gobackchxxlist();
flag = 1;
return false;
}
var arr = tempx.split(".");
var arr1 = tempy.split(".");
var NewIndex = 0;
if((arr[0].length>=7)&&(arr1[0].length>=7))
{
if($("#regBaseZbinfoList"+(i-1)+"_delFlag").val()=="0"){
//坐标与GIS图XY坐标颠倒
if((arr[0].length == 7)&&(arr1[0].length==8)){
TempZBArray[indexNO]=tempy+","+tempx;
TempZBYXArray[indexNO]= new Zondy.Object.Point2D(parseFloat(tempy), parseFloat(tempx));
zblisttemp=zblisttemp+$("#regBaseZbinfoList"+(i-1)+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+(i-1)+"_zby").val()+","+$("#regBaseZbinfoList"+(i-1)+"_zbx").val()+"] "+","+$("#regBaseZbinfoList"+(i-1)+"_id").val()+","+$("#regBaseZbinfoList"+(i-1)+"_delFlag").val()+","+$("#regBaseZbinfoList"+(i-1)+"_sort").val()+";";
indexNO=indexNO+1;
}
//坐标正常,XY一一对应
else if((arr[0].length == 8)&&(arr1[0].length==7)){
TempZBArray[indexNO]=tempx+","+tempy;
TempZBYXArray[indexNO]= new Zondy.Object.Point2D(parseFloat(tempx), parseFloat(tempy));
zblisttemp=zblisttemp+$("#regBaseZbinfoList"+(i-1)+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+(i-1)+"_zbx").val()+","+$("#regBaseZbinfoList"+(i-1)+"_zby").val()+"] "+","+$("#regBaseZbinfoList"+(i-1)+"_id").val()+","+$("#regBaseZbinfoList"+(i-1)+"_delFlag").val()+","+$("#regBaseZbinfoList"+(i-1)+"_sort").val()+";";
indexNO=indexNO+1;
}else{
alert("第"+i+ "行坐标输入有误,请检查");
return false;
}
}
}
else
{
alert("第"+i+ "行坐标输入有误,请检查");
return false;
}
}
}
if(flag == 0){
//初始化面积测量服务
/* var calArea = new Zondy.Service.CalArea(TempZBYXArray,{
ip:actualSvrcfg.ip,
port:actualSvrcfg.port
}); */
//获取空间参考系
/* var gdbinfo = new Zondy.Object.CGDBInfo({
GDBName:actualSvrcfg.tileMapName,
GDBSvrName:"MapGISLocal",
Password:"",
User:""
});
var projBySRSID = new Zondy.Service.CProjectBySRSID(601, gdbinfo); */
//执行面积测量
// calArea.execute(projBySRSID, calAreaSuccess);
if((TempZBArray.length<4)||(regBaseZbinfoRowIdx<4)) {alert("请输入至少4个坐标点!");return false;}
}
return true;
}
function calAreaSuccess(data){
minArea = data*(0.97);
maxArea = data*(1.03);
console.log("s"+minArea);
console.log("b"+maxArea);
}
function checkArea(){
var Area = $("#zdmjtext").val();
if(minArea < parseFloat(Area) && parseFloat(Area) < maxArea){
return true;
}
else{
$("<label for='name' class='error'>宗地面积有误</label>").insertAfter("#zdmjtext");
return false;
}
}
function addyaosu()
{
var tempcheck;
var zbtemp="";
tempcheck=checkbitianxiang();
if (tempcheck==true) {$("#btnSubmit").attr("disabled",false);return;}
if(false==checkzb()){ $("#btnSubmit").attr("disabled",false);return;}
//if(false==checkArea()){ $("#btnSubmit").attr("disabled",false);return;}
if(TempZBArray[0]!=TempZBArray[TempZBArray.length-1])
{
TempZBArray[TempZBArray.length]=TempZBArray[0];
TempZBYXArray[TempZBYXArray.length]=TempZBYXArray[0];
}
djqdjzqajax();
/*for(var j=0; j<regBaseZbinfoRowIdx; j++){
//pointObj[j]=$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val();
zblisttemp=zblisttemp+$("#regBaseZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val()+"] "+","+$("#regBaseZbinfoList"+j+"_id").val()+","+$("#regBaseZbinfoList"+j+"_delFlag").val()+","+$("#regBaseZbinfoList"+j+"_sort").val()+";";
// zbtemp=zbtemp+$("#regBaseZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val()+"] ";
}*/
zbtemp="";
for(j=0; j<TempZBArray.length; j++){
zbtemp=zbtemp+"J"+(j+1)+"["+TempZBArray[j]+"] ";
}
$.ajax({
type:"POST", //请求方式
url:"${ctx}/reg/base/regBaseChxx/save1", //请求路径
cache: false, //(默认: true,dataType为script和jsonp时默认为false) jQuery 1.2 新功能,设置为 false 将不缓存此页面。
//data:"zddmvalue="+ss+"&bdcdyhvalue="+""+"&qlrvalue="+"", //传参
data:"seachprovtext="+tempxzq+"&seachcity="+tempdjq+"&seachdistrict="+tempdjzq+"&qlrmc="+$("#qlrxmtext").val()+"&zjlx="+$("#zjlxtext").val()+"&zjhm="+$("#zjhmtext").val()+"&seachprov="+$("#seachprovtext").val()+"&zdtzm="+$("#zdtzmTxt").val()+"&zl="+$("#zltext").val()+"&zdmj="+$("#zdmjtext").val()+"&tfh="+$("#tfhtext").val()+"&zdszd="+$("#adszdtext").val()+"&zdszn="+$("#zdszntext").val()+"&zdszx="+$("#zdszxtext").val()+"&zdszb="+$("#zdszbtext").val()+"&zdt="+$("#zdt").val()+"&chrymc="+$("#chrymctext").val()+"&jzdzblist="+zblisttemp+"&jzdzb="+zbtemp+"&id=${regBaseChxx11.id}"+"&chsjtext="+$("#chsjtext").val()+"&mjdw="+$("#mjdwTxt").val(),//chrymctext
async:false,
//dataType: "html", //返回值类型
success:function(modelmap){
if((modelmap.data)=="0") {alert("时间保存出错!");}
mapreturnvale =modelmap.RegBaseChxx11Data;
mapreturnvaleList=modelmap.RegBaseZbinfoListData;
mapreturnvale = eval('(' + mapreturnvale + ')');
mapreturnvaleList = eval('(' + mapreturnvaleList + ')');
//---------------------根据id查询到宗地 更新对应宗地信息
var queryStruct=new Zondy.Service.QueryFeatureStruct();
queryStruct.IncludeGeometry=true;
var temptuceng=selectTuCeng(mapreturnvale.zdtzm);
var str="CHID='"+mapreturnvale.id +"'";
var queryParam=new Zondy.Service.QueryByLayerParameter(actualSvrcfg.TUCENG,{
// geometry: line,
resultFormat: "json",
struct:queryStruct,
where : str
});
var queryService=new Zondy.Service.QueryLayerFeature(queryParam,
{
ip: actualSvrcfg.ip, //IP地址
port: actualSvrcfg.port , //端口号
requestType:"POST"
});
queryService.query(queryUpdatedataSuccess);
//------------------------------------
}
});
}
function queryUpdatedataSuccess(data)
{
console.log(data);
var chaxunvalue=data;
var temptuceng=selectTuCeng($("#zdtzmTxt").val());
var b = 0;
for (var i=0;i<9;i++){
if(chaxunvalue[i].TotalCount ==0)
{
continue;
}else{
var gisceng = selectTuCeng(chaxunvalue[i].SFEleArray[0].AttValue[7]);
updatequyaosu(chaxunvalue[i].SFEleArray[0].FID,gisceng);
b = 1;
break;
}
}
if(b == 0){
addzongdi();
}
/* if(chaxunvalue.TotalCount==0)
{
addzongdi();
} */
}
function addzongdi()
{
var pointObj = new Array();
var qupointObj = new Array();
var lengthzb;
var zbtemp="";
for(var j=0; j<regBaseZbinfoRowIdx; j++){
//pointObj[j]=$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val();
if($("#regBaseZbinfoList"+j+"_id").val()=="0"){
zbtemp=zbtemp+$("#regBaseZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val()+"] "+"zbid="+$("#regBaseZbinfoList"+j+"_id").val() +";";
}
}
zbtemp="";
for(j=0; j<TempZBArray.length; j++){
zbtemp=zbtemp+"J"+(j+1)+"["+TempZBArray[j]+"] ";
}
/*for(var i=0;i<pointObj.length;i++)
{
lengthzb=pointObj[i].split(",");
if(lengthzb.length==2)
{
qupointObj[i] = new Zondy.Object.Point2D(parseFloat(lengthzb[1]), parseFloat(lengthzb[0]));
}
else
{alert("该宗地坐标有误!");return false;}
}*/
qupointObj=TempZBYXArray;
var gArc = new Zondy.Object.Arc(qupointObj); //构成区要素的弧段
var gAnyLine = new Zondy.Object.AnyLine([gArc]); //构成区要素折线
var gRegion = new Zondy.Object.GRegion([gAnyLine]); //构成区要素
var fGeom = new Zondy.Object.FeatureGeometry({ RegGeom: [gRegion] }); //构成区要素的几何信息
//设置区要素的图形参数信息
var cRegionInfo = new Zondy.Object.CRegionInfo({ EndColor: 2, FillColor:2, FillMode: 0, OutPenWidth: 1, OverMethod: 0, PatAngle: 1, PatColor: 1, PatHeight: 1, PatID: 0, PatWidth: 1 }); //区形状图形参数信息
var graphicInfo = new Zondy.Object.WebGraphicsInfo({ InfoType: 3, RegInfo: cRegionInfo }); //要素图形参数信
//设置区要素的属性信息
//var attValue = [0, , ,$("#qlrxmtext").val(),$("#zjlxtext").val(),$("#zjhmtext").val(),$("#seachprovtext").val(),$("#seachcitytext").val(),$("#seachdistricttext").val(),$("#zltext").val(),$("#zdmjtext").val(),$("#tfhtext").val(),$("#zdszdtext").val(),$("#zdszntext").val(),$("#zdszxtext").val(),$("#zdszbtext").val(),zbtemp,$("#zdt").val(),$("#chcode").val(),$("#chrymctext").val(),$("#chsjtext").val()];//$("#textnewyaosu").val()];
var attValue = [0,,,,,,"6001010000",$("#zdtzmTxt").val(),$("#zltext").val(),$("#zdmjtext").val(),,,,,,,,,,,,$("#adszdtext").val(),$("#zdszntext").val(),$("#zdszxtext").val(),$("#zdszbtext").val(),$("#zdt").val(),$("#tfhtext").val(),,,"1",$("#qlrxmtext").val(),mapreturnvale.id,"0",,];//$("#textnewyaosu").val()];
//创建一个新的区要素
var newFeature = new Zondy.Object.Feature({ AttValue: attValue, fGeom: fGeom, GraphicInfo: graphicInfo });
newFeature.setFType(3);
//创建一个要素数据集
var featureSet = new Zondy.Object.FeatureSet();
var fldNumber = 36;
var fldType = ["long", "double", "double", "long", "string","string","string","string","string","double","string","string","string","string","double","string","string","string","string","float","float","string","string","string","string","string","string","string","string","string","string","string","string","string","string","string"];
var fldName = ["mpLayer", "mpArea", "mpPerimeter","BSM", "ZDDM", "BDCDYH","YSDM", "ZDTZM","ZL", "ZDMJ", "YTMC", "MJDW", "YT", "DJ", "JG", "QLLX" ,"QLXZ", "QLSDFS", "RJL", "JZMD","JZXG", "ZDSZD", "ZDSZN", "ZDSZX", "ZDSZB", "ZDT", "TFH", "DJH","DAH","ZT","QLRXM","CHID","islogout","BZ","ISLS","BB"];
var cAttValue = new Zondy.Object.CAttStruct({ FldNumber: fldNumber, FldType: fldType, FldName: fldName });
featureSet.AttStruct = cAttValue;
featureSet.addFeature(newFeature);
//创建一个要素编辑服务对象
// var editDocFeature = new Zondy.Service.EditDocFeature(SvrCfg.tileMapName, 0,0, { ip: SvrCfg.ip, port: SvrCfg.port });
var temptuceng=selectTuCeng($("#zdtzmTxt").val());
if(temptuceng!="")
{
var editDocFeature = new Zondy.Service.EditLayerFeature(temptuceng, { ip: actualSvrcfg.ip, port: actualSvrcfg.port });
editDocFeature.add(featureSet, chxxsuccess);
//--------------------------------
}
}
function chxxsuccess(data)
{
if (data == true) {
alert("添加要素成功!");
var querystruct=new Zondy.Service.QueryFeatureStruct();
querystruct.IncludeGeometry=true;
var temptuceng=selectTuCeng($("#zdtzmTxt").val());
var str="CHID='"+mapreturnvale.id +"'";
var queryparam=new Zondy.Service.QueryByLayerParameter(temptuceng,{
// geometry: line,
resultFormat: "json",
struct:querystruct,
where : str
});
var queryservice=new Zondy.Service.QueryLayerFeature(queryparam,
{
ip: actualSvrcfg.ip, //IP地址
port: actualSvrcfg.port, //端口号
requestType:"POST"
});
queryservice.query(dataSuccess);
//------------------------------------
}
else {
alert("添加要素失败!");
}
}
//面积
function dataSuccess(data){
var zdmj =parseFloat(data.SFEleArray[0].AttValue[1]);
var max = zdmj * (1.03);
var min = zdmj * (0.97);
var srmj = parseFloat($("#zdmjtext").val());
var mjdw = $("#mjdwTxt").val();
if(mjdw == "1"){
zdmj = zdmj.toFixed(2);
if(min < srmj && srmj < max){
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}else{
alert("系统测的宗地面积为: "+zdmj+" 平方米,登记面积为: "+srmj+" 平方米,请确认坐标及登记面积!");
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}
}
if(mjdw == "2"){
zdmj = (zdmj*0.0015).toFixed(2);
max = (max*0.0015).toFixed(2);
min = (min*0.0015).toFixed(2);
if(min < srmj && srmj < max){
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}else{
alert("系统测的宗地面积为: "+zdmj+" 亩,登记面积为: "+srmj+" 亩,请确认坐标及登记面积!");
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}
}
if(mjdw == "3"){
zdmj = (zdmj*0.0001).toFixed(2);
max = (max*0.0001).toFixed(2);
min = (min*0.0001).toFixed(2);
if(min < srmj && srmj < max){
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}else{
alert("系统测的宗地面积为: "+zdmj+" 公顷,登记面积为: "+srmj+" 公顷,请确认坐标及登记面积!");
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}
}
}
function updatequyaosu(fid,tuceng)
{
var editDocFeature = new Zondy.Service.EditLayerFeature(tuceng, { ip: actualSvrcfg.ip, port: actualSvrcfg.port });
editDocFeature.deletes(fid, deleteonSuccess);
/*for(var j=0; j<regBaseZbinfoRowIdx; j++)
{
if($("#regBaseZbinfoList"+j+"_delFlag").val()!=0)
{
pointObj[j]=$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val();
zbtemp=zbtemp+$("#regBaseZbinfoList"+j+"_zbdmc").val()+"["+$("#regBaseZbinfoList"+j+"_zbx").val()+","+$("#regBaseZbinfoList"+j+"_zby").val()+"] ";
}
}
for(var i=0;i<pointObj.length;i++)
{
r= pointObj[i].substring(1,pointObj[i].length-1);
lengthzb=r.split(",");
if(lengthzb.length==2)
{
qupointObj[i] = new Zondy.Object.Point2D(parseFloat(lengthzb[1]), parseFloat(lengthzb[0]));
}
else
{alert("该宗地坐标有误!");return false;}
}
//--------------------------
var gArc = new Zondy.Object.Arc(qupointObj); //构成区要素的弧段
var gAnyLine = new Zondy.Object.AnyLine([gArc]); //构成区要素折线
var gRegion = new Zondy.Object.GRegion([gAnyLine]); //构成区要素
var fGeom = new Zondy.Object.FeatureGeometry({ RegGeom: [gRegion] }); //构成区要素的几何信息
//设置区要素的图形参数信息
var cRegionInfo = new Zondy.Object.CRegionInfo({ EndColor: 31, FillColor:31, FillMode: 1, OutPenWidth: 1, OverMethod: 0, PatAngle: 1, PatColor: 1, PatHeight: 1, PatID: 0, PatWidth: 1 }); //区形状图形参数信息
var graphicInfo = new Zondy.Object.WebGraphicsInfo({ InfoType: 3, RegInfo: cRegionInfo }); //要素图形参数信
//设置区要素的属性信息
// var attValue = [0,,,dataes.zddm,dataes.bdcdyh,dataes.ysdm,dataes.zdtzm,dataes.zl,dataes.zdmj,dataes.mjdw,dataes.yt,dataes.dj,dataes.jg,dataes.qllx,dataes.qlxz,dataes.qlsdfs,dataes.rjl,dataes.jzmd,dataes.jzxg,dataes.zdszd,dataes.zdszn,dataes.zdszx,dataes.zdszb,dataes.zdt,dataes.tfh,dataes.djh,dataes.zt,dataes.qlrxm,dataes.chid,dataes.islogout];
var attValue = [0,,,,,,$("#zdtzmTxt").val(),$("#zltext").val(),$("#zdmjtext").val(),,,,,,,,,,,$("#adszdtext").val(),$("#zdszntext").val(),$("#zdszxtext").val(),$("#zdszbtext").val(),$("#zdt").val(),$("#tfhtext").val(),,,$("#qlrxmtext").val(),mapreturnvale.id,"0"];//$("#textnewyaosu").val()];
//创建一个新的区要素
var newFeature = new Zondy.Object.Feature({ AttValue: attValue, fGeom: fGeom, GraphicInfo: graphicInfo });
newFeature.setFType(3);
newFeature.setFID(fid);
//创建一个要素数据集
var featureSet = new Zondy.Object.FeatureSet();
var fldNumber = 30;
var fldType = ["long", "double", "double", "string","string","string","string","string","double","string","string","string","double","string","string","string","float","float","float","string","string","string","string","string","string","string","string","string","string","string"];
var fldName = ["mpLayer", "mpArea", "mpPerimeter", "ZDDM", "BDCDYH","YSDM", "ZDTZM","ZL", "ZDMJ", "MJDW", "YT", "DJ", "JG", "QLLX" ,"QLXZ", "QLSDFS", "RJL", "JZMD","JZXG", "ZDSZD", "ZDSZN", "ZDSZX", "ZDSZB", "ZDT", "TFH", "DJH","ZT","QLRXM","CHID","islogout"];
var cAttValue = new Zondy.Object.CAttStruct({ FldNumber: fldNumber, FldType: fldType, FldName: fldName });
featureSet.AttStruct = cAttValue;
featureSet.addFeature(newFeature);
//创建一个要素编辑服务对象
var editDocFeature = new Zondy.Service.EditLayerFeature(tuceng, { ip: actualSvrcfg.ip, port: actualSvrcfg.port });
editDocFeature.update(featureSet, updateSuccess); */
//--------------------------------
}
function deleteonSuccess(data)
{
addzongdi();
}
function updateSuccess(data)
{
if (data == true) {
alert("更新成功!");
var url ="${ctx}/reg/base/regBaseChxx/?repage";
window.location = url;
}
else {
alert("更新失败,请检查参数是否填写完整!");
}
}
</script>
</head>
<body>
<ul class="nav nav-tabs">
<li><a href="${ctx}/reg/base/regBaseChxx/">测绘信息列表</a></li>
<li class="active"><a href="#">测绘信息<shiro:hasPermission name="reg:base:RegBaseChxx11:edit">${not empty regBaseChxx11.id?'修改':'添加'}</shiro:hasPermission><shiro:lacksPermission name="reg:base:RegBaseChxx11:edit">查看</shiro:lacksPermission></a></li>
</ul><br/>
<form:form id="inputForm" name="form" modelAttribute="regBaseChxx11" action="${ctx}/reg/base/regBaseChxx/save" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<div class="control-group">
<label class="control-label">测绘编码:</label>
<div class="controls">
<form:input path="chcode" id="chcode" value="${CHCODE}" readOnly="true" htmlEscape="false" maxlength="100" class="input-xlarge "/>
</div>
</div>
<div class="control-group">
<label class="control-label">测绘申请人名称:</label>
<div class="controls">
<form:input path="qlrmc" id="qlrxmtext" readOnly="true" htmlEscape="false" maxlength="100" class="input-xlarge "/>
<c:if test="${empty VIEWS}">
<input id="button" class="btn btn-primary" type="button" onclick="personOpen();" value="..."/>
</c:if>
</div>
</div>
<div class="control-group">
<label class="control-label">证件类型:</label>
<div class="controls">
<form:select path="zjlx" id="zjlxtext" class="input-xlarge ">
<form:option value="" label=""/>
<form:options items="${fns:getDictList('reg_bus_zjlx')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</div>
</div>
<div class="control-group">
<label class="control-label">证件号:</label>
<div class="controls">
<form:input path="zjhm" id="zjhmtext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge "/>
</div>
</div>
<div class="control-group">
<label class="control-label">县级行政区:</label>
<div class="controls">
<%--
<form:input path="seachprov" id="seachprovtext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge "/>
--%>
<form:select path="seachprov" id="seachprovtext" class="input-xlarge required" onChange="changeComplexProvince(this.value, sub_array, 'seachcitytext', 'seachdistricttext');getAreaInfo();">
<form:option value="${XQCODE}" label="${fns:getDictLabel(XQCODE, 'reg_bus_xq', '')}"/>
<%--
<form:options items="${fns:getDictList('reg_bus_xq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
--%>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">地籍区:</label>
<div class="controls">
<c:if test="${not empty VIEWS}">
<form:input path="seachcity" id="seachcitytext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge " value="${fns:getDictList('reg_bus_djq')}"/>
</c:if>
<c:if test="${empty VIEWS}">
<form:input path="seachcity" id="seachcitytext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge "/>
</c:if>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">地籍子区:</label>
<div class="controls">
<c:if test="${not empty VIEWS}">
<form:input path="seachdistrict" id="seachdistricttext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge " value="${fns:getDictList('reg_bus_djzq')}"/>
</c:if>
<c:if test="${empty VIEWS}">
<form:input path="seachdistrict" id="seachdistricttext" readOnly="true" htmlEscape="false" maxlength="50" class="input-xlarge " />
</c:if>
<%--
<form:select path="seachdistrict" id="seachdistricttext" class="input-xlarge required" onChange="getAreaInfo();">
<form:option value="" label=""/>
<form:options items="${fns:getDictList('reg_bus_djzq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
--%>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地特征码:</label>
<div class="controls">
<form:select id="zdtzmTxt" path="zdtzm" class="input-large required">
<form:option value="" label=""/>
<form:option value="C" label="宅基地使用权宗地"/>
<!--<form:options items="${fns:getDictList('reg_bus_zdtzm')}" itemLabel="label" itemValue="value" htmlEscape="false"/>-->
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">坐落:</label>
<div class="controls">
<form:textarea path="zl" id="zltext" htmlEscape="false" rows="4" maxlength="200" class="input-xxlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
<input id="getdjqdjzqCancel" class="btn" type="button" value="获取坐落" onclick="AddquyaosutoTC();"/>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地面积:</label>
<div class="controls">
<fmt:formatNumber value="${regBaseChxx11.zdmj}"
pattern="#0.##"
var="formattedNumber"/>
<form:input path="zdmj" id="zdmjtext" htmlEscape="false"
value="${formattedNumber}"
maxlength="15" class="input-xlarge number required"/>
<font color="red">*</font> </span>
<form:select id="mjdwTxt" path="mjdw" class="input-small required">
<form:options items="${fns:getDictList('reg_bus_mjdw')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</div>
</div>
<div class="control-group">
<label class="control-label">图幅号:</label>
<div class="controls">
<form:input path="tfh" id="tfhtext" htmlEscape="false" maxlength="50" class="input-xlarge"/>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地四至-东:</label>
<div class="controls">
<form:input path="zdszd" id="adszdtext" htmlEscape="false" maxlength="200" class="input-xxlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地四至-南:</label>
<div class="controls">
<form:input path="zdszn" id="zdszntext" htmlEscape="false" maxlength="200" class="input-xxlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地四至-西:</label>
<div class="controls">
<form:input path="zdszx" id="zdszxtext" htmlEscape="false" maxlength="200" class="input-xxlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">宗地四至-北:</label>
<div class="controls">
<form:input path="zdszb" id="zdszbtext" htmlEscape="false" maxlength="200" class="input-xxlarge required"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<!--
<div class="control-group">
<label class="control-label">界址点坐标:</label>
<div class="controls">
<form:textarea path="jzdzb" htmlEscape="false" rows="4" maxlength="500" class="input-xxlarge "/>
</div>
</div>
-->
<div class="control-group">
<label class="control-label">宗地图:</label>
<div class="controls">
<form:hidden id="zdt" path="zdt" htmlEscape="false" maxlength="4000" class="input-xlarge required"/>
<sys:ckfinder input="zdt" type="files" uploadPath="/reg/base/regBaseChxx" selectMultiple="true"/>
<span class="help-inline"><font color="red">*</font> </span>
</div>
</div>
<div class="control-group">
<label class="control-label">测绘人员:</label>
<div class="controls">
<form:input path="chrymc" id="chrymctext" value="${CHRYMC}" htmlEscape="false" maxlength="100" class="input-xlarge"/>
</div>
</div>
<div class="control-group">
<label class="control-label">测绘添加时间:</label>
<div class="controls">
<!-- 更新 -->
<c:if test="${not empty regBaseChxx11.id}">
<input name="chsj" id="chsjtext" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="<fmt:formatDate value="${regBaseChxx11.chsj}" pattern="yyyy-MM-dd"/>"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
</c:if>
<!-- 新增 -->
<c:if test="${empty regBaseChxx11.id}">
<input name="chsj" id="chsjtext" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
value="${fns:getDate('yyyy-MM-dd')}"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd' });"/>
</c:if>
</div>
</div>
<div class="control-group">
<label class="control-label">界址点坐标:</label>
<div class="controls">
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th class="hide"></th>
<th>序号</th>
<th>坐标点名称</th>
<th>X坐标值</th>
<th>Y坐标值</th>
<shiro:hasPermission name="reg:base:RegBaseChxx11:edit"><th width="100"> 操 作</th></shiro:hasPermission>
</tr>
</thead>
<tbody id="regBaseZbinfoList">
</tbody>
<shiro:hasPermission name="reg:base:RegBaseChxx11:edit"><tfoot>
<tr><td colspan="5"><a href="javascript:" onclick="addRow('#regBaseZbinfoList', regBaseZbinfoRowIdx, regBaseZbinfoTpl);regBaseZbinfoRowIdx = regBaseZbinfoRowIdx + 1;" class="btn" id="btnn">新增</a></td></tr>
</tfoot></shiro:hasPermission>
</table>
<script type="text/template" id="regBaseZbinfoTpl">//<!--
<tr id="regBaseZbinfoList{{idx}}">
<td class="hide">
<input id="regBaseZbinfoList{{idx}}_id" name="regBaseZbinfoList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
<input id="regBaseZbinfoList{{idx}}_delFlag" name="regBaseZbinfoList[{{idx}}].delFlag" type="hidden" value="0"/>
</td>
<td>
<input id="regBaseZbinfoList{{idx}}_sort" name="regBaseZbinfoList[{{idx}}].sort" type="text" value="{{row.sort}}" maxlength="100" class="input-small "/>
</td>
<td>
<input id="regBaseZbinfoList{{idx}}_zbdmc" name="regBaseZbinfoList[{{idx}}].zbdmc" type="text" value="{{row.zbdmc}}" maxlength="100" class="input-small "/>
</td>
<td>
<c:if test="${not empty daoru}">
<input id="regBaseZbinfoList{{idx}}_zbx" name="regBaseZbinfoList[{{idx}}].zbx" type="text" value="{{row.zby}}" readonly="true" maxlength="50" class="input-small "/>
</c:if>
<c:if test="${empty daoru}">
<input id="regBaseZbinfoList{{idx}}_zbx" name="regBaseZbinfoList[{{idx}}].zbx" type="text" value="{{row.zby}}" maxlength="50" class="input-small "/>
</c:if>
</td>
<td>
<c:if test="${not empty daoru}">
<input id="regBaseZbinfoList{{idx}}_zby" name="regBaseZbinfoList[{{idx}}].zby" type="text" value="{{row.zbx}}" readonly="true" maxlength="50" class="input-small "/>
</c:if>
<c:if test="${empty daoru}">
<input id="regBaseZbinfoList{{idx}}_zby" name="regBaseZbinfoList[{{idx}}].zby" type="text" value="{{row.zbx}}" maxlength="50" class="input-small "/>
</c:if>
</td>
<shiro:hasPermission name="reg:base:RegBaseChxx11:edit"><td class="text-center" width="100">
{{#delBtn}}<a class="btn btn-primary" onclick="delRow(this, '#regBaseZbinfoList{{idx}}')" title="删除" id="btnn">删 除</a>{{/delBtn}}
</td></shiro:hasPermission>
</tr>//-->
</script>
<script type="text/javascript">
regBaseZbinfoRowIdx = 0, regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
$(document).ready(function() {
var data = ${fns:toJson(regBaseChxx11.regBaseZbinfoList)};
for (var i=0; i<data.length; i++){
addRow('#regBaseZbinfoList', regBaseZbinfoRowIdx, regBaseZbinfoTpl, data[i]);
regBaseZbinfoRowIdx = regBaseZbinfoRowIdx + 1;
}
});
/*var regBaseZbinfoRowIdx = 0, regBaseZbinfoTpl = $("#regBaseZbinfoTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
$(document).ready(function() {
alert("ff");
alert(mapreturnvaleList.length);
for (var i=0; i<mapreturnvaleList.length; i++){
addRow('#regBaseZbinfoList', regBaseZbinfoRowIdx, regBaseZbinfoTpl, mapreturnvaleList[i]);
regBaseZbinfoRowIdx = regBaseZbinfoRowIdx + 1;
}
})*/
</script>
</div>
</div>
<div class="form-actions">
<c:if test="${empty VIEWS}">
<shiro:hasPermission name="reg:base:RegBaseChxx11:edit"><input id="btnSubmit" class="btn btn-primary" type="button" onclick="javascript:{this.disabled=true;addyaosu();}" value="保 存"/> </shiro:hasPermission>
</c:if>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="gobackchxxlist()"/>
</div>
</form:form>
<div id="SelectDJQZQ" class="easyui-dialog" title="该宗地所在的地籍区地籍子区" maximizable="false" minimizable="false" collapsible="false" border="false" resizable="false" closable="true" closed="true" style="color:#1E90FF;left:300px;top:200px; width:300px; height:200px;padding: 5px" resizable="false"> <form style="padding:10px 20px 10px 40px;">
<table border="0" style="font-family:宋体;font-size:10pt;">
<tr>
<td style="text-align:top;font-weight:bold ;color:#008000;">地籍区</td>
<td style="text-align:top;height:10;">
<select name="DJQ" id="DJQ" style="width:100px;">
</select>
</td>
</tr>
<tr>
<td style="text-align:top;font-weight:bold ;color:#008000;">地籍子区</td>
<td style="text-align:top;height:10;">
<select name="DJZQ" id="QJZQ" style="width:100px;">
</select>
</td>
</tr>
</table>
<br />
<input id="divDotsearch" type="button" style="margin-right:50px;" value="点击该处确定!" onclick="closetaqnchu();">
</div>
<%-- --%>
<div id="selectOkCancleButton" class="easyui-dialog" title="提示信息!" maximizable="false" minimizable="false" collapsible="false" border="false" resizable="false" closable="true" closed="true" style="color:#1E90FF;left:300px;top:200px; width:300px; height:200px;padding: 5px" resizable="false"> <form style="padding:10px 20px 10px 40px;">
<label class="control-label"><br/> 添加的宗地与其他图层相交,是否继续。<br/><span><font color="red">选择‘是’,继续添加,选择‘否’,退出该操作!</font></span></label>
<br/>
<div>
<br/>
<input id="btnSubmit" class="btn btn-primary" type="button" onclick="javascript:{this.disabled=true;continueAddyaosu();}" value="是"/>
<input id="btnCancel" class="btn" type="button" value="否" onclick="cancelAdd()"/>
</div>
</div>
<%-- --%>
</body>
</html>