5f4347253756e822cdb66dc60c0d6fcf3077674e.svn-base
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
<%@ 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() {
$("#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 tableHtml ="",tableHtmlh ="";
var objZdt = eval('${jsonZdt}');
var objH =eval('${jsonH}');
tableHtml+='<table border="1" id="zchtableid">';
if(objZdt != undefined || objZdt != null || objZdt !=""){
for(var i in objZdt){
tableHtml+='<tr id="tr'+i+'zdt">';
//tableHtml+='<td><input type="checkbox" name="zdt" id='+objZdt[i].id+'>'+objZdt[i].name+'<a href="${ctx}/reg/bus/regBusFz/openPic?path='+objZdt[i].path+'></td>';
var pathZY=objZdt[i].path;
pathZY=pathZY.replace(/\//g, '\\/');
tableHtml+='<td><input type="checkbox" name="zdt" id='+objZdt[i].id+' value="'+pathZY+'"><a href="${ctx}/reg/bus/regBusFz/openPic?path='+pathZY+'" target="_blank" >'+objZdt[i].name+'</td><td>'+objZdt[i].zddm+'</td>';
}
}
tableHtml=tableHtml+"</tr>";
tableHtml+= '</table>';
$("#tablezdt").append(tableHtml);
tableHtmlh+='<table border="1" id="zchtableid">';
if(objH != undefined || objH != null || objH !=""){
for(var i in objH){
tableHtmlh+='<tr id="tr'+i+'h">';
var pathZY=objH[i].path;
pathZY=pathZY.replace(/\//g, '\\/');
tableHtmlh+='<td><input type="checkbox" name="h" id='+objH[i].id+' value="'+pathZY+'"><a href="${ctx}/reg/bus/regBusFz/openPic?path='+pathZY+'" target="_blank" >'+objH[i].name+'</td><td>'+objH[i].bdcdyh+'</td>';
}
}
tableHtmlh=tableHtmlh+"</tr>";
tableHtmlh+= '</table>';
$("#tableh").append(tableHtmlh);
});
function printPictures(){
var $checkboxs= $('input[type=checkbox]:checked');
var tempmyMap=new Array(),myMapcount=0;
if($checkboxs.length>0){
for(var i=0;i<$checkboxs.length;i++){
if($checkboxs[i].name=="zdt"){
$checkboxs[i].parentNode.innerText;//name
$checkboxs[i].defaultValue;//路径
var myMap ={};
myMap.name=$checkboxs[i].parentElement.textContent;
myMap.path=$checkboxs[i].value;
myMap.leixing="zdt";
tempmyMap[myMapcount]=myMap;
myMapcount=myMapcount+1;
}
if($checkboxs[i].name=="h"){
$checkboxs[i].parentNode.innerText;//name
$checkboxs[i].defaultValue;//路径
var myMap ={};
myMap.name=$checkboxs[i].parentElement.textContent;
myMap.path=$checkboxs[i].value;
myMap.leixing="h";
tempmyMap[myMapcount]=myMap;
myMapcount=myMapcount+1;
}
}
picList= JSON.stringify(tempmyMap);
var iWidth=1100;
//弹出窗口的高度;
var iHeight=600;
//获得窗口的垂直位置
var iTop = (window.screen.height - 30 - iHeight) / 2;
//获得窗口的水平位置
var iLeft = (window.screen.width - 10 - iWidth) / 2;
window.open("${ctx}/reg/bus/regBusFz/getZDTFHT?picList="+ picList,"newwindow",
"height="+ iHeight +",width="+ iWidth +",top="+ iTop +",left="+ iLeft +",toolbar=no,menubar=no,scrollbars=yes, resizable=no,location=no, status=no");
}
}
</script>
</head>
<body>
<legend>宗地图列表</legend>
<div id="tablezdt">
</div>
<legend></legend>
<legend>分户图列表</legend>
<div id="tableh">
</div>
<div id="okButton">
<input id="btnOK" type="button" class="btn btn-primary" onclick="javascript:printPictures();" value="点击按钮确定要打印的图片"/>
</div>
</body>
</html>