实时报表增加数据合计
This commit is contained in:
@@ -984,6 +984,7 @@ lwhh_report=Official Letter Report
|
|||||||
src_ip_report=Src IP Report
|
src_ip_report=Src IP Report
|
||||||
dest_ip_report=Dest IP Report
|
dest_ip_report=Dest IP Report
|
||||||
isp_report=Entrance Report
|
isp_report=Entrance Report
|
||||||
|
report_total=Total
|
||||||
#=============about report===================
|
#=============about report===================
|
||||||
ip_multiplex_policy=IP Reuse Policy
|
ip_multiplex_policy=IP Reuse Policy
|
||||||
ip_multiplex_pool_config=IP Reuse Addr Pool
|
ip_multiplex_pool_config=IP Reuse Addr Pool
|
||||||
|
|||||||
@@ -982,6 +982,7 @@ lwhh_report=\u6765\u6587\u51FD\u53F7\u62A5\u8868
|
|||||||
src_ip_report=\u5883\u5185\u6E90IP\u62A5\u8868
|
src_ip_report=\u5883\u5185\u6E90IP\u62A5\u8868
|
||||||
dest_ip_report=\u76EE\u7684\u56FD\u5BB6IP\u62A5\u8868
|
dest_ip_report=\u76EE\u7684\u56FD\u5BB6IP\u62A5\u8868
|
||||||
isp_report=\u8FD0\u8425\u5546\u5C40\u70B9\u62A5\u8868
|
isp_report=\u8FD0\u8425\u5546\u5C40\u70B9\u62A5\u8868
|
||||||
|
report_total=\u5408\u8BA1
|
||||||
#=============about report===================
|
#=============about report===================
|
||||||
ip_multiplex_policy=IP\u590D\u7528\u7B56\u7565
|
ip_multiplex_policy=IP\u590D\u7528\u7B56\u7565
|
||||||
ip_multiplex_pool_config=IP\u590D\u7528\u5730\u5740\u6C60
|
ip_multiplex_pool_config=IP\u590D\u7528\u5730\u5740\u6C60
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ function toPage(pageNo, pageSize, funcParam) {
|
|||||||
$('tbody').children().css('display', 'none');
|
$('tbody').children().css('display', 'none');
|
||||||
//显示元素
|
//显示元素
|
||||||
$('tbody').children().slice((pageNo-1)*pageSize, pageNo*pageSize).css('display', '');
|
$('tbody').children().slice((pageNo-1)*pageSize, pageNo*pageSize).css('display', '');
|
||||||
|
totaltb(pageNo,pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
//底部跳页按钮
|
//底部跳页按钮
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
||||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
//日期类型初始化
|
//日期类型初始化
|
||||||
@@ -235,6 +235,69 @@ function customColumnClick(){
|
|||||||
top.$.jBox(html,{title:"<i class='fa fa-wrench'></i> Custom Columns",showIcon:false,opacity:0.3,submit:submit});
|
top.$.jBox(html,{title:"<i class='fa fa-wrench'></i> Custom Columns",showIcon:false,opacity:0.3,submit:submit});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//合计table中某一段数据
|
||||||
|
function totaltb(pageNo,pageSize){
|
||||||
|
$('#total').remove();
|
||||||
|
var reportBusinessType=$("#reportBusinessType").val()
|
||||||
|
var tableId="tagTable";
|
||||||
|
if(reportBusinessType=="label_report"){
|
||||||
|
tableId="tagTable";
|
||||||
|
}else if(reportBusinessType=="lwhh_report"){
|
||||||
|
tableId="lwhhTable";
|
||||||
|
}else if(reportBusinessType=="src_ip_report"){
|
||||||
|
tableId="contentTable1";
|
||||||
|
}else if(reportBusinessType=="attr_type_report"){
|
||||||
|
tableId="attrTypeTable";
|
||||||
|
}else if(reportBusinessType=="dest_ip_report"){
|
||||||
|
tableId="destIpTable";
|
||||||
|
}else if(reportBusinessType=="isp_report"){
|
||||||
|
tableId="entranceIdTable";
|
||||||
|
}
|
||||||
|
//统计数据
|
||||||
|
var tb=document.getElementById(tableId);
|
||||||
|
var rows=tb.rows;
|
||||||
|
var list=new Array();
|
||||||
|
list.splice(0,list.length);
|
||||||
|
var num=0;
|
||||||
|
var row=1;
|
||||||
|
var s=1;
|
||||||
|
if(reportBusinessType=="src_ip_report"){
|
||||||
|
s=2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pageNo > 1){
|
||||||
|
row=(pageNo-1)*pageSize+1;
|
||||||
|
}
|
||||||
|
for (var i = row; i < rows.length; i++) {
|
||||||
|
for (var j = s; j <rows[i].cells.length ; j++) {
|
||||||
|
if(list[j]!=null){
|
||||||
|
list[j-s]=parseInt(rows[i].cells[j].innerHTML)+parseInt(list[j-s]);
|
||||||
|
}else{
|
||||||
|
list[j-s]=parseInt(rows[i].cells[j].innerHTML);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
num++;
|
||||||
|
if(num == pageSize){
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(rows.length > 1){
|
||||||
|
var trtotal="";
|
||||||
|
if(reportBusinessType=="src_ip_report"){
|
||||||
|
trtotal+="<td colspan='2' style='text-align: center;' ><spring:message code='report_total' />:</td>";
|
||||||
|
}else{
|
||||||
|
trtotal+="<td style='text-align: center;'><spring:message code='report_total' />:</td>";
|
||||||
|
}
|
||||||
|
for (var k = 0; k < list.length; k++) {
|
||||||
|
trtotal+="<td>"+list[k]+"</td>";
|
||||||
|
}
|
||||||
|
trtotal+=""
|
||||||
|
$('#total').remove();
|
||||||
|
$('#'+tableId).append("<tr id='total'></tr>");
|
||||||
|
$('#total').html(trtotal);
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
Reference in New Issue
Block a user