transferZB.jsp 7.5 KB
<%@ 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">
	
	$(document).ready(function() {
		
	});
	var js = 0;
	  var mapreturnvale;
	  var mapreturnvaleList;
	  var DJQTotle,DJZQTotle;
	  var DJQName = new Array();
	  var DJZQName = new Array();
	  var regBaseZbinfoRowIdx = 0;
	  var tempdjq,tempdjzq,tempxzq;
	  var bdcdyhs = "";
	  var chids = "";
	  var ZBArray = "";
	  var ZBYXArray = "";
	  var zblisttemp="";
	  var daoru="";
	  var minArea = 0, maxArea = 0;
	  var ychid = "";
	  var yts="";
	  var tuceng;
	  
	 
	  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 readtc(){
			var tuceng = selectTuCeng($("#zdtzm").val());
			var queryStruct=new Zondy.Service.QueryFeatureStruct();
				queryStruct.IncludeGeometry=true;
				var queryParam=new Zondy.Service.QueryByLayerParameter(tuceng,{ 
	                   // geometry: line,
	                   resultFormat: "json",
	                   struct:queryStruct,
	                   });
				queryParam.recordNumber = 10000;
				var queryService=new Zondy.Service.QueryLayerFeature(queryParam,
						{
					ip: actualSvrcfg.ip,        //IP地址
					port: actualSvrcfg.port,   //端口号
					requestType:"POST"
					});
				queryService.query(readZDSuccess);
		  }  
		
		function readZDSuccess(data){
			console.log(data);
			var sums=data.TotalCount -1;
			 for(var i=0;i<data.TotalCount;i++){
				 var zddm = data.SFEleArray[i].AttValue[2];
					var zl = data.SFEleArray[i].AttValue[4];
					var qlxz = data.SFEleArray[i].AttValue[5];
					var qllx = data.SFEleArray[i].AttValue[6];
					var zdmj = data.SFEleArray[i].AttValue[19];
					var yt = data.SFEleArray[i].AttValue[9];
					var rjl= data.SFEleArray[i].AttValue[10];
					var jzmd = data.SFEleArray[i].AttValue[11];
					var dz = data.SFEleArray[i].AttValue[14];
					var nz = data.SFEleArray[i].AttValue[15];
					var xz = data.SFEleArray[i].AttValue[16];
					var bz = data.SFEleArray[i].AttValue[17];
					var tfh = data.SFEleArray[i].AttValue[20];
					var zdt = data.SFEleArray[i].AttValue[28];
					var qlr = data.SFEleArray[i].AttValue[21];
					var dj = data.SFEleArray[i].AttValue[22];
					var zdtzm = data.SFEleArray[i].AttValue[24];
					var qlsdfs = data.SFEleArray[i].AttValue[25];
					var bdcdyh = data.SFEleArray[i].AttValue[5];
					var mjdw = data.SFEleArray[i].AttValue[27];
					var zjhm = data.SFEleArray[i].AttValue[31];
					var chid = data.SFEleArray[i].AttValue[31];
					var fGeom = data.SFEleArray[i].fGeom;
					var zbs = data.SFEleArray[i].fGeom.RegGeom[0].Rings[0].Arcs[0].Dots;
					var zblist="";
					var jzdzb = "";
					
					for(var j = 0;j<zbs.length;j++){
						var tempx = zbs[j].x
						tempx = tempx.toString().substr(0,12);
						var tempy = zbs[j].y
						tempy = tempy.toString().substr(0,11);
						var s = j+1;
						
						jzdzb = jzdzb +"J"+s+"["+tempx+","+tempy+"] ";
					    zblist = zblist+"J"+s+","+"["+tempx+","+tempy+"]"+","+"0"+","+s+"; ";
					}
					bdcdyhs = bdcdyhs+bdcdyh+",";
					chids = chids+chid+",";
					ZBArray = ZBArray+jzdzb+"B";
					ZBYXArray = ZBYXArray+zblist+"B";
			 }
			var downloadURL = "${ctx}/gis/web/gisController/zbtransfer"; 
			      var form = $("<form>");   //定义一个form表单  
			  form.attr('style','display:none');   //在form表单中添加查询参数  
			  form.attr('target','');  
			  form.attr('method','post');  
			  form.attr('action',downloadURL);  
			                        
			  var input1 = $('<input>');   
			  input1.attr('type','hidden');   
			  input1.attr('name','BDCDYH');   
			  input1.attr('value',bdcdyhs);    
			    
			  var input2 = $('<input>');   
			  input2.attr('type','hidden');   
			  input2.attr('name','CHID');   
			  input2.attr('value',chids);
			  var input3 = $('<input>');   
			  input3.attr('type','hidden');   
			  input3.attr('name','ZBARRAY');   
			  input3.attr('value',ZBArray);
			  var input4 = $('<input>');   
			  input4.attr('type','hidden');   
			  input4.attr('name','ZBYXARRAY');   
			  input4.attr('value',ZBYXArray);
			 
			  $('body').append(form);  //将表单放置在web中  
			  form.append(input1);
			  form.append(input2);
			  form.append(input3);
			  form.append(input4);
			 
			  //将查询参数控件提交到表单上  
			  form.submit();
			
					/*$.ajax({ 
						type:"POST", //请求方式 
						url:"${ctx}/gis/web/gisController/zbtransfer", //请求路径 
						cache: false, 
						data:"bdcdyh="+ bdcdyh+"chid="+ chid +"&zblist="+zblist+"&jzdzb="+jzdzb,
						async:false,
						success:function(modelmap){
							//alert("坐标转换成功!")
			}
					});*/
					 
			
			 
		}
		
		
		
		
	</script>
</head>
<body>

	   <table align="center">
		
		
		<tr>
			<td><select id="zdtzm" path="zdtzm" class="input-large required">
			            <option value=" ">--请选择-- </option>
						<option value="A">集体土地所有权宗地</option>
						<option value="B">建设用地使用权宗地(地表)</option>
						<option value="S">建设用地使用权宗地(地上)</option>
						<option value="X">建设用地使用权宗地(地下)</option>
						<option value="C">宅基地使用权宗地</option>
						<option value="D">土地承包经营权宗地(耕地)</option>
					 	<option value="E">土地承包经营权宗地(林地)</option>
						<option value="F">土地承包经营权宗地(草地)</option>
					 	<option value="N">农用地使用权宗地</option>
					</select>
			
				 <input id="btnSubmit" class="btn btn-primary" type="button" value="转换坐标" onclick="readtc()"/><br><br>
			</td>
			
			
			
			<td class="clearfix"></td>
		</tr>
	</table> 
	
	 
	 
</body>

</html>