实时报表导出--合计
This commit is contained in:
@@ -8,6 +8,8 @@
|
|||||||
<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>
|
||||||
|
var pato=1;
|
||||||
|
var size=30;
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
//筛选功能初始化
|
//筛选功能初始化
|
||||||
filterActionInit();
|
filterActionInit();
|
||||||
@@ -68,6 +70,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
ajaxServiceLogTotal();
|
ajaxServiceLogTotal();
|
||||||
$("#export-btn").click(function(){
|
$("#export-btn").click(function(){
|
||||||
|
totaltb(1,-1);
|
||||||
var te = $(".in table").tableExport({
|
var te = $(".in table").tableExport({
|
||||||
headings:true,
|
headings:true,
|
||||||
footers:true,
|
footers:true,
|
||||||
@@ -77,6 +80,7 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
$("#myexport").click();
|
$("#myexport").click();
|
||||||
$("caption").remove();
|
$("caption").remove();
|
||||||
|
totaltb(pato,size);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
function getXlsxFileName() {
|
function getXlsxFileName() {
|
||||||
@@ -198,22 +202,17 @@ var ajaxReport=function(url,target){
|
|||||||
};
|
};
|
||||||
//自定义列设置事件
|
//自定义列设置事件
|
||||||
function customColumnClick(){
|
function customColumnClick(){
|
||||||
|
|
||||||
|
|
||||||
var submit = function(v,h,f) {
|
var submit = function(v,h,f) {
|
||||||
var abVisCols = [true];
|
var abVisCols = [true];
|
||||||
top.$(".customColumnList input[type='checkbox']").each(function(){
|
top.$(".customColumnList input[type='checkbox']").each(function(){
|
||||||
abVisCols[$(this).val()] = $(this).prop("checked");
|
abVisCols[$(this).val()] = $(this).prop("checked");
|
||||||
});
|
});
|
||||||
|
|
||||||
var key = getLocationPathName()+"_visCols";
|
var key = getLocationPathName()+"_visCols";
|
||||||
Cookies.set(key,JSON.stringify(abVisCols),{expires:7});
|
Cookies.set(key,JSON.stringify(abVisCols),{expires:7});
|
||||||
customColumnInit();
|
customColumnInit();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var html = "<div class='customColumnList'>";
|
var html = "<div class='customColumnList'>";
|
||||||
$(".active .table tr th").each(function(colIndex,obj){
|
$(".active .table tr th").each(function(colIndex,obj){
|
||||||
|
|
||||||
@@ -231,13 +230,15 @@ function customColumnClick(){
|
|||||||
html+="<div class='col-md-6'><label>"+ckbox_html+" "+$(this).html()+"</label></div>";
|
html+="<div class='col-md-6'><label>"+ckbox_html+" "+$(this).html()+"</label></div>";
|
||||||
})
|
})
|
||||||
html +="</div>";
|
html +="</div>";
|
||||||
|
|
||||||
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中某一段数据
|
//合计table中某一段数据
|
||||||
function totaltb(pageNo,pageSize){
|
function totaltb(paNo,paSize){
|
||||||
|
if(paSize>0){
|
||||||
|
size=paSize;
|
||||||
|
pato=paNo;
|
||||||
|
}
|
||||||
$('#total').remove();
|
$('#total').remove();
|
||||||
var reportBusinessType=$("#reportBusinessType").val()
|
var reportBusinessType=$("#reportBusinessType").val()
|
||||||
var tableId="tagTable";
|
var tableId="tagTable";
|
||||||
@@ -266,8 +267,8 @@ function customColumnClick(){
|
|||||||
s=2;
|
s=2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pageNo > 1){
|
if(paNo > 1){
|
||||||
row=(pageNo-1)*pageSize+1;
|
row=(paNo-1)*paSize+1;
|
||||||
}
|
}
|
||||||
for (var i = row; i < rows.length; i++) {
|
for (var i = row; i < rows.length; i++) {
|
||||||
for (var j = s; j <rows[i].cells.length ; j++) {
|
for (var j = s; j <rows[i].cells.length ; j++) {
|
||||||
@@ -278,10 +279,10 @@ function customColumnClick(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
num++;
|
num++;
|
||||||
if(num == pageSize){
|
if(num == paSize){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(rows.length > 1){
|
if(rows.length > 1){
|
||||||
var trtotal="";
|
var trtotal="";
|
||||||
if(reportBusinessType=="src_ip_report"){
|
if(reportBusinessType=="src_ip_report"){
|
||||||
|
|||||||
Reference in New Issue
Block a user