regbusDyZDTFHT.jsp
5.74 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
<%@ 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>