jjwms/target/jjwms/imageView.jsp

127 lines
3.3 KiB
Plaintext

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>极进物流</title>
<link href="css/basic.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/date/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.6.2.js"></script>
<script type="text/javascript" src="js/jquery.media.js"></script>
<script type="text/javascript">
$(function() {
$('a.media').media({width:700, height:500});
});
</script>
<%
// 获取请求的上下文
String context = request.getContextPath();
%>
<script type="text/javascript">
//当前第几页数据
var currentPage = ${currentPage};
// 总页数
var totalPage = ${totalPage};
var aorptid = ${aorptid};
var type = "${type}";
function submitForm(actionUrl){
var formElement = document.getElementById("stuForm");
formElement.action = actionUrl;
formElement.submit();
}
//第一页
function firstPage(){
if(currentPage == 1){
alert("已经是第一页数据");
return false;
}else{
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&currentPage=1&pageSize=1");
return true;
}
}
//下一页
function nextPage(){
console.log(0813);
if(currentPage == totalPage){
alert("已经是最后一页数据");
return false;
}else{
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1&currentPage="+(currentPage+1));
return true;
}
}
//上一页
function previousPage(){
if(currentPage == 1){
alert("已经是第一页数据");
return false;
}else{
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1&currentPage="+(currentPage-1));
return true;
}
}
//尾页
function lastPage(){
if(currentPage == totalPage){
alert("已经是最后一页数据");
return false;
}else{
submitForm("<%=context %>/iqs?aorptid="+aorptid+"&type="+type+"&pageSize=1&currentPage="+totalPage);
return true;
}
}
</script>
</head>
<body>
<form action="#" id="stuForm" method="post">
</form>
<div style="height:650px;overflow-x:auto;background-color: #EAEAEA">
<table border="1" style="height:60%; weight:70%;" cellpadding="10" cellspacing="1" bgcolor="#EAEAEA">
<!-- <tr> -->
<!-- <td>序号</td> -->
<!-- <td>图片</td> -->
<!-- </tr> -->
<c:forEach var="elt" items="${list }" >
<tr>
<%-- <td>${elt.id } </td> --%>
<%-- <td>${elt.imageType}</td> --%>
<c:if test="${elt.imageType==1 }">
<%-- <td>${elt.fileUrl}</td> --%>
<td><img src="${elt.fileUrl}" style="height:25%; weight:25%;"></td>
</c:if>
<c:if test="${elt.imageType==2 }">
<%-- <td>${elt.fileUrl}</td> --%>
<td><img src="${elt.fileUrl}" style="height:25%; weight:25%;"></td>
<%-- <td><iframe src="${ctx}/<s:property value='${elt.fileUrl}'/>" width="800" height="638" scroll="no"></iframe></td> --%>
</c:if>
</tr>
</c:forEach>
<tr>
<!--<a class="media" href="img/22.pdf">PDF File</a> -->
</tr>
</table>
总共:${recordTotal}条记录
<a href="#" onclick="firstPage();">首页</a>
<a href="#" onclick="previousPage();">上一页</a>
<a href="#" onclick="nextPage();">下一页</a>
<a href="#" onclick="lastPage();">尾页</a>
</div>
</body>
</html>