流量统计带表格的导出excel,csv, 第一行标题,时间,最后一行统计,修改活跃IP的详情的标题

This commit is contained in:
zhanghongqing
2018-12-21 17:05:27 +08:00
parent fcfe3634b5
commit 7c6965633b
10 changed files with 2600 additions and 2543 deletions

View File

@@ -61,7 +61,7 @@
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <spring:message code="export"/>
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -9px;">
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -16px;">
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv &nbsp;&nbsp;&nbsp;</a><li>
</ul>
@@ -93,6 +93,7 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
<script type="text/javascript">
$(document).ready(function(){
loading();
var starth=$("#beginDateh").val();
var endh=$("#endDateh").val();
$("#beginDate").val(starth);
@@ -166,6 +167,14 @@ function ajaxProtocolList(start,end){
$(".export-btn").click(function(){
var dataType = $(this).attr("data-type");
getPageData(1,999999);// 设置导出页条数
var start=$("#beginDate").val();
var end=$("#endDate").val();
var htmlTitle="";
htmlTitle+="<tr class='tr-title'>";
htmlTitle+= "<th class='tc' colspan='1'>"+"<spring:message code='service'/>"+"</th>";
htmlTitle+= "<th class='tc' colspan='2'>"+start+"--"+ end +"</th>";
htmlTitle+="</tr>"
$("#contentTable thead").prepend(htmlTitle);
var te = $("#contentTable").tableExport({
headings:true,
footers:true,
@@ -175,6 +184,7 @@ $(".export-btn").click(function(){
});
$("#myexport").click();
$("caption").remove();
$(".tr-title").remove();
getPageData(1,10);
});
/**
@@ -233,7 +243,6 @@ function htmlData(fileDataS){
html+= "<td class='tc'>"+"100%"+"</td>";
html+= "<td class='tc'>"+(data.allGByte/1073741824).toFixed(2)+"</td>";
html+= "<td class='tc'>"+"100%"+"</td>";
html+= "<td class='tc'>"+start+"--"+ end +"</td>";
html+="</tr>"
}
}