report前端分页bug修复
This commit is contained in:
@@ -133,7 +133,6 @@ public class NtcSrcipDomesticReportController extends BaseController {
|
||||
}
|
||||
model.addAttribute("splitor", Constants.REPORT_TRIM_CONNECTOR);
|
||||
model.addAttribute("datas", showData);
|
||||
model.addAttribute("dataLength", showData.size());
|
||||
return "/report/srcIp";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,6 @@ public class NtcTagReportController extends BaseController {
|
||||
showData.put(label.getServiceDictId().toString(), _line);
|
||||
}
|
||||
model.addAttribute("datas", showData);
|
||||
model.addAttribute("dataLength", showData.size());
|
||||
return "/report/label";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ function pagination() {
|
||||
|
||||
pageNo = 1;
|
||||
count = $('tbody').children().size();// 总记录数
|
||||
|
||||
//处理ajax时jquery选择器缓存的问题
|
||||
dataLength = "${dataLength}";
|
||||
/* dataLength = "${fn:length(datas)}";
|
||||
preCount = 0;
|
||||
if (dataLength < count) {
|
||||
preCount = count - dataLength;
|
||||
count = count - preCount;
|
||||
}
|
||||
$('tbody').children().slice(0, preCount).remove();
|
||||
alert(count)
|
||||
//$('tbody').children().slice(0, preCount).remove();
|
||||
} */
|
||||
|
||||
|
||||
pageSize = 30; // 页面大小
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<%-- <script src="${ctxStatic }/pages/scripts/pageGroup.js" type="text/javascript"></script> --%>
|
||||
<table id="tagTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -13,18 +12,25 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<td>
|
||||
<c:forEach items="${labels}" var="label">
|
||||
<c:if test="${label.serviceDictId==data.key}">${label.itemValue}</c:if>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${labels}" var="label">
|
||||
<c:if test="${label.serviceDictId==data.key}">
|
||||
trContent += "<td>${label.itemValue}</td>";
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#tagTable').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page"></div>
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
|
||||
var ajaxReport=function(url,target){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
//loading('<spring:message code="onloading"/>');
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
@@ -119,8 +119,7 @@ var ajaxReport=function(url,target){
|
||||
dataType:"html",
|
||||
success:function(data){
|
||||
$(target).html(data);//#label
|
||||
pagination();
|
||||
closeTip();
|
||||
//closeTip();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
});
|
||||
</script>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<table id="lwhhTable" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -15,18 +12,25 @@ $(function(){
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<td>
|
||||
<c:forEach items="${requestInfos}" var="lwhh">
|
||||
<c:if test="${lwhh.id eq data.key}">${lwhh.requestTitle}</c:if>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${requestInfos}" var="lwhh">
|
||||
<c:if test="${lwhh.id eq data.key}">
|
||||
trContent += "<td>${lwhh.requestTitle}</td>";
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#lwhhTable').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<%-- <script src="${ctxStatic }/pages/scripts/pageGroup.js" type="text/javascript"></script> --%>
|
||||
<table id="contentTable1" class="table table-striped table-bordered table-condensed text-nowrap">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -14,16 +13,23 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<c:forEach items="${datas}" var="data">
|
||||
<tr>
|
||||
<c:forEach items="${fn:split(data.key,splitor)}" var="location">
|
||||
<td>${location}</td>
|
||||
<script type="text/javascript">
|
||||
var trContent = "";
|
||||
<c:forEach items="${datas}" var="data">
|
||||
trContent += "<tr>";
|
||||
<c:forEach items="${fn:split(data.key,splitor)}" var="location">
|
||||
trContent += "<td>${location}</td>";
|
||||
</c:forEach>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
trContent += "<td>${cloumn}</td>";
|
||||
</c:forEach>
|
||||
trContent += "</tr>";
|
||||
</c:forEach>
|
||||
<c:forEach items="${data.value}" var="cloumn" varStatus="status">
|
||||
<td>${cloumn}</td>
|
||||
</c:forEach>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
$('tbody').remove();
|
||||
$('#contentTable1').append("<tbody></tbody>");
|
||||
$('tbody').html(trContent);
|
||||
pagination();
|
||||
</script>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page"></div>
|
||||
|
||||
Reference in New Issue
Block a user