regbusDyZDTFHT.jsp 5.74 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 type="text/javascript">
	$(document).ready(function() {
			//$("#name").focus();
			$("#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 path="",name="";
			var getImgIp ='${Url}';
	        var objZdt = eval('${zdt}');
	        var objH = eval('${ht}');
	       /*  if(objZdt != undefined || objZdt != null || objZdt !=""){
	        	 for(var i in objZdt){
	 	            path = getImgIp+objZdt[i].path;
	 	            name=objZdt[i].name;
	 	            var chtml = '<li id="operation">'
	 	                           +'<p class="product_picture"><img width="50%" height="50%"  src="'+path+'"></p></li>';
	 	            var chtml1 = '<a>'+name+'</a>';
	 	            if($('.BoxLeftZ').height() <= $('.BoxRightZ').height()){
	 	                $('.BoxLeftZ').append(chtml+chtml1);
	 	            }else{
	 	                $('.BoxRightZ').append(chtml+chtml1);
	 	            }
	 	        }
	        } */
	        var chtmzdt1 ="",chtmzdt11="",chtml="",chtml1="";
	        if(objH != undefined || objH != null || objH !=""){
	        	for(var i in objH){
	        		 chtmzdt1 ="",chtmzdt11="",chtml="",chtml1="";
	        		//-------------------------
	        		 if(objZdt != undefined || objZdt != null || objZdt !=""){
	    	        	 for(var j in objZdt){
	    	 	            path = getImgIp+objZdt[j].path;
	    	 	            name=objZdt[j].name;
	    	 	            /* chtmzdt1 = '<li style="list-style-type:none;" id="operation">'
	    	 	                           +'<p class="product_picture"><img width="20%" height="20%"  src="'+path+'"></p></li>';
	    	 	            chtmzdt11= '<a>'+name+'</a>'; */
	    	 	            chtmzdt1 = '<div margin:0px auto; align=center><img  width="20%" height="20%"  onmousedown="mouseDown(this)"  onmousewheel="return bigimg(this)"  src="'+path+'"></div>';
 	                      chtmzdt11= '<a>'+name+'</a>'; 
	    	 	         /*   chtmzdt1 = '<img onmousewheel="return bigimg(this)" width="20%" height="20%" src="'+path+'">';
	 	                      chtmzdt11= '<a>'+name+'</a>'; */
	    	 	        }
	    	        	$('.zdtBox').append('<legend>宗地图</legend>'+chtmzdt1+chtmzdt11);
	    	    		   
	    	        }
	        		//--------------------------
		            path = getImgIp+objH[i].path;
		            name=objH[i].name;
		 	           
		             /* chtml = '<li style="list-style-type:none;" id="operation">'
		                           +'<p class="product_picture"><img width="20%" height="20%" src="'+path+'"></p></li>';
		             chtml1 = '<a>'+name+'</a>';	 */    
		             chtml = '<div margin:0px auto; align=center><img width="20%" height="20%"  onmousedown="mouseDown(this)"  onmousewheel="return bigimg(this)"  src="'+path+'"></div>';
                     chtml1 = '<a>'+name+'</a>';	
			         $('.zdtBox').append('<legend>房屋分户图</legend>'+chtml+chtml1+'<div style="page-break-after:always"></div>');
		        }	        	 
	        }
	        
		});
	function printPictures(){
		var printData = document.getElementById("imgOperation").innerHTML; 
		window.document.body.innerHTML = printData;   //把 html 里的数据 复制给 body 的 html 
		window.print();
	}
	function bigimg(i)
	{
		var zoom = parseInt(i.style.zoom,10)||100;
		zoom += event.wheelDelta / 12;
		if(zoom > 0 )
		i.style.zoom=zoom+'%'; 
		i.width=i.width;
		i.height=i.height;
		
		return false;
	}
	function mouseDown(i){
		i.style.transform=i.style.transform+"rotate("+90+"deg)";
	}
	</script>
</head>
<body>
    <div  id="okButton">
        <input id="btnOK"  type="button" class="btn btn-primary" onclick="javascript:printPictures();" value="点击按钮打印"/>
    </div>
	<div class="zdtBox"  id="imgOperation">
	   <!--   <legend>宗地图</legend>
         <ul class="BoxLeftZ">
         </ul>
         <ul class="BoxRightZ">
         </ul> -->
     </div>
 <!--     <div class="hBox" id="imgHOperation">
         <legend>房屋分户图</legend>
         <ul class="BoxLeftH">
         </ul>
         <ul class="BoxRightH">
         </ul>
     </div> -->
      <div  id="okButton">
        <input id="btnOK"  type="button" class="btn btn-primary" onclick="javascript:printPictures();" value="点击按钮打印"/>
    </div>
</body>
<style>
		.twoRankedBox{
		    margin:6px 8px;
		    overflow: hidden;
		    padding-bottom:25px;
		}
		.twoRankedBox ul{
		    width:49%;
		    float: left;
		}
		.twoRankedBox ul:last-child{
		    margin-left:2%;
		}
		.twoRankedBox ul li{
		    padding:5px;
		    margin-bottom:10px;
		    padding-bottom:10px;
		    background-color: #FFFFFF;
		}
		.twoRankedBox ul li p:first-child{
		    padding-top:0px;
		}
		.twoRankedBox ul li p{
		    padding-top:4px;
		}
		.product_picture img{
		    display: block;
		    width:100%;
		}
		.product_np{
		    overflow: hidden;
		    line-height:60px;
		}
		.product_np a{
		    display: block;
		    overflow:hidden;
		    text-overflow:ellipsis;
		    white-space:nowrap;
		}
		.product_np a:first-child{
		    font-size:0.9em;
		    color:#58b7e3;
		    width:65%;
		    float: left;
		}
		.product_np a:last-child{
		    font-size:1.2em;
		    color:#f00;
		    float: right;
		    width:100%;
		    text-align: right;
		}
	</style>
</html>