2019-01-06 20:00:13 +08:00
|
|
|
|
<%@ page contentType="text/html;charset=UTF-8"%>
|
|
|
|
|
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
|
|
|
|
|
<html>
|
|
|
|
|
|
<head>
|
|
|
|
|
|
<title><spring:message code="app"></spring:message>
|
|
|
|
|
|
</title>
|
|
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/dashboard.css">
|
|
|
|
|
|
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/pages/css/pagination.css">
|
|
|
|
|
|
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/pages/scripts/jquery.pagination.js"></script>
|
|
|
|
|
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
|
|
|
|
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
|
|
|
|
|
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page-content">
|
|
|
|
|
|
<div class="theme-panel hidden-xs hidden-sm">
|
|
|
|
|
|
<button type="button" class="btn btn-default"
|
|
|
|
|
|
onClick="javascript:window.location.reload()">
|
|
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button type="button" class="btn btn-default" onClick="javascript:window.location='${ctx}/dashboard/traffic/appTypeList'">
|
|
|
|
|
|
<i class="fa fa-history"></i>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h3 class="page-title">
|
|
|
|
|
|
<spring:message code="${appName}"></spring:message>
|
|
|
|
|
|
</h3>
|
|
|
|
|
|
<h5 class="page-header"></h5>
|
2019-01-10 16:34:04 +08:00
|
|
|
|
<ul class="nav nav-tabs">
|
|
|
|
|
|
<li class="changeData active" value="1"><a href="javascript:void(0);"><spring:message code="real_time"/></a></li>
|
|
|
|
|
|
<li class="changeData" value="2"><a href="javascript:void(0);"><spring:message code="history"/></a></li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<br>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<div class="row chart-realTime">
|
|
|
|
|
|
<form:form id="searchForm1" method="get" class="form-search">
|
|
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
|
<div class="col-md-12">
|
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
2019-01-16 18:23:58 +08:00
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
</div>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<select id="entranceId1" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<option value=""><spring:message code="select"/></option>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dict" >
|
|
|
|
|
|
<option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"></spring:message></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="isp"/></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<select id="isp1" name="isp" class="selectpicker form-control input-medium" data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="search">
|
|
|
|
|
|
<%-- <option value=""><spring:message code="select"/></option> --%>
|
|
|
|
|
|
<c:forEach items="${fns:getIspDicList('ispCode')}" var="dict" >
|
|
|
|
|
|
<option value="${dict.ispKeyCode}"><spring:message code="${dict.ispKeyName}"></spring:message></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<button type="button" class="btn blue"
|
|
|
|
|
|
onClick="return searchList1()">
|
|
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
|
|
<spring:message code="search" />
|
|
|
|
|
|
</button>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<button type="button" class="btn btn-default" id="resetBtn1">
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
|
|
<spring:message code="reset" />
|
2019-01-18 08:34:58 +00:00
|
|
|
|
</button>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
|
</form:form>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row chart-history hidden">
|
|
|
|
|
|
<form:form id="searchForm2" method="get" class="form-search">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
|
<div class="col-md-12">
|
2019-01-10 16:34:04 +08:00
|
|
|
|
<div class="pull-left chart-history">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
|
<span class="selectpicker form-control"><spring:message
|
|
|
|
|
|
code="begin_date" /></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<input name="beginDate" id="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
2019-01-14 09:22:01 +08:00
|
|
|
|
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setStartTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-10 16:34:04 +08:00
|
|
|
|
<div class="pull-left chart-history">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
|
<span class="selectpicker form-control"><spring:message
|
|
|
|
|
|
code="end_date" /></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<input name="endDate" id="endDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate input-medium"
|
2019-01-14 09:22:01 +08:00
|
|
|
|
value="" onclick="WdatePicker({onpicked:function(){this.onchange()},dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true,maxDate:'#F{\'new Date()\'}'});" onchange="setEndTime('#beginDate','#endDate',1,'d','yyyy-MM-dd hh:mm:ss',false)"/>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
2019-01-16 18:23:58 +08:00
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="area_id"/></span>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</div>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<select id="entranceId2" name="entranceId" class="selectpicker form-control" width="100px" data-live-search="true" data-live-search-placeholder="search">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<option value=""><spring:message code="select"/></option>
|
|
|
|
|
|
<c:forEach items="${fns:getDictList('ENTRANCE')}" var="dict" >
|
|
|
|
|
|
<option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"></spring:message></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<div class="input-group">
|
|
|
|
|
|
<div class="input-group-btn">
|
|
|
|
|
|
<span class="selectpicker form-control" ><spring:message code="isp"/></span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<select id="isp2" name="isp" class="selectpicker form-control input-medium" data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="search">
|
|
|
|
|
|
<%-- <option value=""><spring:message code="select"/></option> --%>
|
|
|
|
|
|
<c:forEach items="${fns:getIspDicList('ispCode')}" var="dict" >
|
|
|
|
|
|
<option value="${dict.ispKeyCode}"><spring:message code="${dict.ispKeyName}"></spring:message></option>
|
|
|
|
|
|
</c:forEach>
|
|
|
|
|
|
</select>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<div class="pull-left">
|
|
|
|
|
|
<button type="button" class="btn blue"
|
2019-01-11 18:15:33 +08:00
|
|
|
|
onClick="return searchList2()">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
|
|
<spring:message code="search" />
|
|
|
|
|
|
</button>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<button type="button" class="btn btn-default" id="resetBtn2">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<i class="fa fa-refresh"></i>
|
|
|
|
|
|
<spring:message code="reset" />
|
2019-01-18 08:34:58 +00:00
|
|
|
|
</button>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<!-- 搜索内容与操作按钮栏 -->
|
|
|
|
|
|
</form:form>
|
|
|
|
|
|
</div>
|
2019-01-10 16:34:04 +08:00
|
|
|
|
<div class="row chart-realTime">
|
|
|
|
|
|
<div id="chart-realTime" style="width: 97%; height: 430px; margin-top: 20px"></div>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<input id="total" type="hidden" />
|
|
|
|
|
|
<input id="sipData" type="hidden" />
|
|
|
|
|
|
<input id="dipData" type="hidden" />
|
|
|
|
|
|
<input id="timeData" type="hidden" />
|
|
|
|
|
|
<input id="appType" name="appType" type="hidden" value="${appType}" />
|
|
|
|
|
|
<input id="beginDateh" type="hidden" value="${beginDate}" />
|
|
|
|
|
|
<input id="endDateh" type="hidden" value="${endDate}" />
|
2019-01-10 16:34:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="row chart-history hidden">
|
|
|
|
|
|
<div id="chart-history" style="width: 97%; height: 430px; margin-top: 20px"></div>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</div>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<ul class="nav nav-tabs chart-history hidden">
|
2019-01-08 20:45:39 +08:00
|
|
|
|
<li class="searchQuota active" value="1" onclick="changeOrderby(1)"><a href="javascript:void(0);"><spring:message code="link_num"/></a></li>
|
|
|
|
|
|
<li class="searchQuota" value="2" onclick="changeOrderby(2)"><a href="javascript:void(0);"><spring:message code="packet"/></a></li>
|
|
|
|
|
|
<li class="searchQuota" value="3" onclick="changeOrderby(3)"><a href="javascript:void(0);"><spring:message code="byte"/></a></li>
|
|
|
|
|
|
</ul>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<div class="btn-group pull-right chart-history hidden" style="padding-top: 5px">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-wrench"></i> <spring:message code="export"/>
|
|
|
|
|
|
<span class="caret"></span>
|
|
|
|
|
|
</button>
|
2019-01-10 16:34:04 +08:00
|
|
|
|
<ul class="dropdown-menu" role="menu" style="min-width: 81px;right: -12px;">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<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 </a><li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
<div class="btn-group">
|
|
|
|
|
|
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2019-01-08 20:45:39 +08:00
|
|
|
|
<br>
|
2019-01-11 18:15:33 +08:00
|
|
|
|
<div class="row chart-history hidden" style="padding-top: 5px">
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<div class="table-responsive">
|
|
|
|
|
|
<table id="contentTable" style="width: 100%;"
|
|
|
|
|
|
class="table table-striped table-bordered table-condensed text-nowrap">
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
2019-01-08 20:45:39 +08:00
|
|
|
|
<th><spring:message code="client_ip"/></th>
|
2019-01-18 08:34:58 +00:00
|
|
|
|
<th><spring:message code="isp"/></th>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
<th><spring:message code="link_num"/></th>
|
|
|
|
|
|
<th><spring:message code="percentage"/> (<spring:message code="link_num"/>)</th>
|
|
|
|
|
|
<th><spring:message code="packets"/></th>
|
|
|
|
|
|
<th><spring:message code="percentage"/> (<spring:message code="packets"/>)</th>
|
2019-01-08 20:45:39 +08:00
|
|
|
|
<th><spring:message code="bytes"/></th>
|
|
|
|
|
|
<th><spring:message code="percentage"/> (<spring:message code="bytes"/>)</th>
|
2019-01-17 12:43:04 +08:00
|
|
|
|
<th><spring:message code="pps"/></th>
|
2019-01-18 08:00:18 +00:00
|
|
|
|
<th class='lowercase'><spring:message code="second_bps"/></th>
|
2019-01-06 20:00:13 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody id="tableData"></tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="page" class="pageView"><div class="M-box"></div><div class="pageMessage"> <spring:message code="current"/> <input type="text" class="pageCurrent" readonly="readonly"/> / <span class="pageNum"></span> <spring:message code="page"/> , <spring:message code="total"/> <span class="pageTotal"></span> <spring:message code="count"/></div></div>
|
|
|
|
|
|
<div class="none-data"><i class="fa fa-warning font-red-flamingo"></i> <spring:message code="noneData"/></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/highcharts.js"></script>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
|
|
|
|
|
<%-- <script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script> --%>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
|
|
|
|
|
|
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
|
var starth = $("#beginDateh").val();
|
|
|
|
|
|
var endh = $("#endDateh").val();
|
|
|
|
|
|
$("#beginDate").val(starth);
|
|
|
|
|
|
$("#endDate").val(endh);
|
|
|
|
|
|
var appType=$("#appType").val();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
var entranceId1=$("#entranceId1").val();
|
|
|
|
|
|
var entranceId2=$("#entranceId2").val();
|
|
|
|
|
|
var isp1=$("#isp1").val();
|
|
|
|
|
|
var isp2=$("#isp2").val();
|
2019-01-08 20:45:39 +08:00
|
|
|
|
var searchQuota=$(".searchQuota[class~='active']").val();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
showRealTimeTransChart(appType,entranceId1,isp1);// 实时折线
|
|
|
|
|
|
appTransAjax(starth,endh,appType,entranceId2,isp2);
|
|
|
|
|
|
appTop100List(starth,endh,appType,entranceId2,searchQuota,isp2);
|
|
|
|
|
|
//筛选功能初始化
|
|
|
|
|
|
$("#resetBtn1").on("click",function() {
|
|
|
|
|
|
$("#searchForm1 select.selectpicker").each(function() {
|
|
|
|
|
|
$(this).selectpicker('val',"");
|
|
|
|
|
|
$(this).find("option").attr("selected",false);
|
|
|
|
|
|
// $(this).find("option:first").attr("selected",true);
|
|
|
|
|
|
});
|
|
|
|
|
|
$("#searchForm1")[0].reset();
|
|
|
|
|
|
});
|
2019-01-06 20:00:13 +08:00
|
|
|
|
//筛选功能初始化
|
2019-01-18 08:34:58 +00:00
|
|
|
|
$("#resetBtn2").on("click",function() {
|
|
|
|
|
|
$("#searchForm2 select.selectpicker").each(function() {
|
|
|
|
|
|
$(this).selectpicker('val',"");
|
2019-01-06 20:00:13 +08:00
|
|
|
|
$(this).find("option").attr("selected",false);
|
2019-01-18 08:34:58 +00:00
|
|
|
|
// $(this).find("option:first").attr("selected",true);
|
2019-01-06 20:00:13 +08:00
|
|
|
|
});
|
2019-01-19 15:16:45 +00:00
|
|
|
|
// $(".Wdate").attr("value", '');
|
|
|
|
|
|
var deftime=(new Date().getTime())-(1000 * 60 * 60);
|
|
|
|
|
|
var defbegin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(deftime)); // 默认一小时
|
|
|
|
|
|
var defend=dateFtt("yyyy-MM-dd hh:mm:ss",new Date());
|
|
|
|
|
|
|
2019-01-18 08:34:58 +00:00
|
|
|
|
$("#searchForm2")[0].reset();
|
2019-01-19 15:16:45 +00:00
|
|
|
|
$("#beginDate").val(defbegin);
|
|
|
|
|
|
$("#endDate").val(defend);
|
2019-01-06 20:00:13 +08:00
|
|
|
|
});
|
2019-01-08 20:45:39 +08:00
|
|
|
|
$(".searchQuota").on("click",function(){
|
|
|
|
|
|
$(".searchQuota").removeClass("active");
|
|
|
|
|
|
$(this).addClass("active");
|
|
|
|
|
|
})
|
2019-01-10 16:34:04 +08:00
|
|
|
|
$(".chart-history").addClass("hidden");
|
2019-01-10 19:47:09 +08:00
|
|
|
|
$(".chart-realTime").removeClass("hidden");
|
2019-01-10 16:34:04 +08:00
|
|
|
|
$(".changeData").on("click",function(){
|
|
|
|
|
|
$(".changeData").removeClass("active");
|
|
|
|
|
|
$(this).addClass("active");
|
|
|
|
|
|
if($(this).val()==1){
|
|
|
|
|
|
$(".chart-realTime").removeClass("hidden");
|
|
|
|
|
|
$(".chart-history").addClass("hidden");
|
|
|
|
|
|
}else{
|
|
|
|
|
|
$(".chart-realTime").addClass("hidden");
|
|
|
|
|
|
$(".chart-history").removeClass("hidden");
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2019-01-06 20:00:13 +08:00
|
|
|
|
$('.pageView').hide();
|
|
|
|
|
|
});
|
2019-01-08 20:45:39 +08:00
|
|
|
|
// 改变排序字段
|
|
|
|
|
|
function changeOrderby(searchQuota) {
|
2019-01-15 20:27:38 +08:00
|
|
|
|
loading();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
appTop100List($("#beginDate").val(),$("#endDate").val(),$("#appType").val(),$("#entranceId2").val(),searchQuota,$("#isp2").val());
|
2019-01-08 20:45:39 +08:00
|
|
|
|
}
|
2019-01-11 18:15:33 +08:00
|
|
|
|
function searchList1() {
|
2019-01-18 08:34:58 +00:00
|
|
|
|
loading();
|
2019-01-11 18:15:33 +08:00
|
|
|
|
var appType=$("#appType").val();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
var entranceId1=$("#entranceId1").val();
|
|
|
|
|
|
var isp1=$("#isp1").val();
|
|
|
|
|
|
showRealTimeTransChart(appType,entranceId1,isp1);// 折线
|
2019-01-11 18:15:33 +08:00
|
|
|
|
}
|
|
|
|
|
|
function searchList2() {
|
2019-01-06 20:00:13 +08:00
|
|
|
|
var start = $("#beginDate").val();
|
|
|
|
|
|
var end = $("#endDate").val();
|
|
|
|
|
|
$("#beginDateh").val(start);
|
|
|
|
|
|
$("#endDateh").val(end);
|
|
|
|
|
|
if (start == '' || end == '' || end == null || start == null) {
|
|
|
|
|
|
window.location.reload();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
var appType=$("#appType").val();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
var entranceId2=$("#entranceId2").val();
|
|
|
|
|
|
var isp2=$("#isp2").val();
|
2019-01-08 20:45:39 +08:00
|
|
|
|
var searchQuota=$(".searchQuota[class~='active']").val();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
appTransAjax(start,end,appType,entranceId2,isp2);// 折线
|
|
|
|
|
|
appTop100List(start,end,appType,entranceId2,searchQuota,isp2);// 列表
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 列表
|
2019-01-18 08:34:58 +00:00
|
|
|
|
function appTop100List(start,end,appType,entranceId,searchQuota,isp){
|
2019-01-06 20:00:13 +08:00
|
|
|
|
$.ajax({
|
|
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTopList",
|
|
|
|
|
|
type : 'get',
|
|
|
|
|
|
dataType : "json",
|
|
|
|
|
|
data : {
|
|
|
|
|
|
"beginDate" : start,
|
|
|
|
|
|
"endDate" : end,
|
|
|
|
|
|
"appType" : appType,
|
2019-01-08 20:45:39 +08:00
|
|
|
|
"entranceId" : entranceId,
|
2019-01-18 08:34:58 +00:00
|
|
|
|
"searchQuota":searchQuota,
|
|
|
|
|
|
"searchIspCode":isp
|
2019-01-06 20:00:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
async : true,
|
|
|
|
|
|
timeout : 50000,
|
|
|
|
|
|
traditional:true,
|
|
|
|
|
|
success : function(data) {
|
|
|
|
|
|
if (data != null && data.length > 0 && data[0].error != null) {
|
|
|
|
|
|
top.$.jBox.tip( "<spring:message code='request_service_failed'/>", "<spring:message code='info'/>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
fileData = data;
|
|
|
|
|
|
getPageData(1, 10);//初始化第一页的数据
|
|
|
|
|
|
pageJuan(10);//初始化分页
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
if (data != null && data.length < 1) {
|
|
|
|
|
|
$(".none-data").show();
|
|
|
|
|
|
$('.pageView').hide();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$('.none-data').hide();
|
|
|
|
|
|
$('.pageView').show();
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
error : function(data, textStatus, errorThrown) {
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
complete : function(XMLHttpRequest, status) {//超时设置
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
// 处理接口数据
|
|
|
|
|
|
function htmlData(fileDataS) {
|
|
|
|
|
|
$("#tableData").html("");
|
|
|
|
|
|
if (fileDataS == null || fileData == '') {
|
|
|
|
|
|
$(".none-data").show();
|
|
|
|
|
|
$('.pageView').hide();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
$('.none-data').hide();
|
|
|
|
|
|
$('.pageView').show();
|
|
|
|
|
|
var start=$("#beginDateh").val();
|
|
|
|
|
|
var end=$("#endDateh").val();
|
|
|
|
|
|
var totalunique=0;
|
|
|
|
|
|
var totalpkt=0;
|
|
|
|
|
|
var totalbyte=0;
|
|
|
|
|
|
$.each(fileDataS, function(index, data) {
|
|
|
|
|
|
totalunique=totalunique+(Number(data.logNum));
|
|
|
|
|
|
totalpkt=totalpkt+(Number(data.pktNum));
|
|
|
|
|
|
totalbyte=totalbyte+(Number(data.byteNum));
|
|
|
|
|
|
})
|
|
|
|
|
|
$.each(fileDataS, function(index, data) {
|
|
|
|
|
|
if (data != null) {
|
|
|
|
|
|
var html ="<tr>";
|
|
|
|
|
|
html += "<td class='tc'>" + data.ipAddr + "</td>";
|
2019-01-18 08:34:58 +00:00
|
|
|
|
html += "<td class='tc'>" + data.ispName + "</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html += "<td class='tc'>" + data.logNum + "</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html += "<td class='tc'>" + data.logPercent + " %</td>";
|
2019-01-18 08:34:58 +00:00
|
|
|
|
// html += "<td class='tc'>" + (((data.entranceId)==1) ? "Astana":"Almaty") + "</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html += "<td class='tc'>" + Math.round(data.pktNum*100)/100 + "</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html += "<td class='tc'>" + data.pktPercent + " %</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html += "<td class='tc'>" + Math.round(data.byteNum*100)/100 + "</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html += "<td class='tc'>" + data.bytePercent + " %</td>";
|
2019-01-17 12:43:04 +08:00
|
|
|
|
html += "<td class='tc'>" + data.pps + "</td>";
|
|
|
|
|
|
html += "<td class='tc'>" + data.bps + "</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html += "</tr>"
|
|
|
|
|
|
if(index==fileDataS.length-1){
|
|
|
|
|
|
html+="<tr class='tr-total hidden'>"
|
|
|
|
|
|
html+= "<td class='tc'>"+"<spring:message code='report_total'/>"+"</td>";
|
2019-01-18 08:34:58 +00:00
|
|
|
|
html+= "<td class='tc'>" +"--"+"</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html+= "<td class='tc'>"+totalunique+"</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html+= "<td class='tc'>" +"--"+"</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html+= "<td class='tc'>"+totalpkt+"</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
2019-01-06 20:00:13 +08:00
|
|
|
|
html+= "<td class='tc'>"+totalbyte+"</td>";
|
2019-01-08 20:45:39 +08:00
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
2019-01-17 12:43:04 +08:00
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
|
|
|
|
|
html+= "<td class='tc'>"+"--"+"</td>";
|
2019-01-18 08:34:58 +00:00
|
|
|
|
html+="</tr>"
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
$("#tableData").append(html);
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// app曲线图
|
2019-01-18 08:34:58 +00:00
|
|
|
|
function appTransAjax(beginDate, endDate,appType,entranceId,isp) {
|
2019-01-06 20:00:13 +08:00
|
|
|
|
loading();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
$.ajax({ url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
2019-01-06 20:00:13 +08:00
|
|
|
|
type : "get",
|
|
|
|
|
|
dataType : "json",
|
|
|
|
|
|
async : true,
|
2019-01-18 08:34:58 +00:00
|
|
|
|
data : {
|
|
|
|
|
|
"beginDate" : beginDate,
|
|
|
|
|
|
"endDate" : endDate,
|
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
|
},
|
|
|
|
|
|
traditional:true,
|
2019-01-06 20:00:13 +08:00
|
|
|
|
success : function(rs) {
|
|
|
|
|
|
var series=new Array();
|
|
|
|
|
|
var sipResult=new Array();
|
|
|
|
|
|
var dipResult=new Array();
|
|
|
|
|
|
var sipData=new Array();
|
|
|
|
|
|
var dipData=new Array();
|
|
|
|
|
|
var timeData=new Array();
|
|
|
|
|
|
var total=[];
|
|
|
|
|
|
if(rs!=null&&Object.keys(rs).length>0){
|
|
|
|
|
|
sipResult=rs.sipResult;
|
|
|
|
|
|
dipResult=rs.dipResult
|
|
|
|
|
|
total.push(rs.sipSum,rs.dipSum);
|
|
|
|
|
|
// 图表导出用列
|
|
|
|
|
|
$(sipResult).each(function(i,d){
|
|
|
|
|
|
sipData.push(d[1])
|
|
|
|
|
|
timeData.push(d[0])
|
|
|
|
|
|
})
|
|
|
|
|
|
$(dipResult).each(function(i,d){
|
|
|
|
|
|
dipData.push(d[1])
|
|
|
|
|
|
})
|
2019-01-10 16:34:04 +08:00
|
|
|
|
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
total.push(0,0);
|
|
|
|
|
|
}
|
2019-01-10 16:34:04 +08:00
|
|
|
|
showActionHistoryChart(sipResult,dipResult);
|
2019-01-06 20:00:13 +08:00
|
|
|
|
$("#total").val(JSON.stringify(total));
|
|
|
|
|
|
$("#sipData").val(JSON.stringify(sipData));
|
|
|
|
|
|
$("#dipData").val(JSON.stringify(dipData));
|
|
|
|
|
|
$("#timeData").val(JSON.stringify(timeData));
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
error : function(data, textStatus, errorThrown) {
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
complete : function(XMLHttpRequest, status) {//超时设置
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 获取本页数据
|
|
|
|
|
|
* @param currentPage 当前页数 【初次查数据,默认第1页】
|
|
|
|
|
|
*/
|
|
|
|
|
|
var fileData;
|
|
|
|
|
|
function getPageData(currentPage, pageNumber) {
|
|
|
|
|
|
if (typeof (fileData) != "undefined" && fileData != null ) {
|
|
|
|
|
|
//计算每页数据起始和终止数据编号
|
|
|
|
|
|
// var pageNumber = 10;
|
|
|
|
|
|
var maxLength = currentPage * pageNumber - 1;
|
|
|
|
|
|
var minLength = currentPage * pageNumber - pageNumber;
|
|
|
|
|
|
var pageData = [];
|
|
|
|
|
|
for (var i = minLength; i < fileData.length; i++) {
|
|
|
|
|
|
if (maxLength < i) {
|
|
|
|
|
|
break;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
pageData.push(fileData[i]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
htmlData(pageData);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
//把空数据传到页面中去
|
|
|
|
|
|
htmlData(fileData);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// 导出列表
|
|
|
|
|
|
$(".export-btn").click(function(){
|
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
|
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='${appName}'/>"+"</th>";
|
|
|
|
|
|
htmlTitle+= "<th class='tc' colspan='2'>"+start+"--"+ end +"</th>";
|
|
|
|
|
|
htmlTitle+="</tr>"
|
|
|
|
|
|
$("#contentTable thead").prepend(htmlTitle);
|
|
|
|
|
|
if(dataType=="xlsx"){
|
|
|
|
|
|
getTableContent("contentTable");
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var te = $("#contentTable").tableExport({
|
|
|
|
|
|
headings:true,
|
|
|
|
|
|
footers:true,
|
|
|
|
|
|
formats:[dataType],
|
|
|
|
|
|
fileName:"<spring:message code='${appName}'></spring:message>"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(),
|
|
|
|
|
|
bootstrap:false
|
|
|
|
|
|
});
|
|
|
|
|
|
$("#myexport").click();
|
|
|
|
|
|
$("caption").remove();
|
|
|
|
|
|
}
|
|
|
|
|
|
$(".tr-title").remove();
|
|
|
|
|
|
getPageData(1,10);
|
|
|
|
|
|
pageJuan(10);//初始化分页
|
|
|
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 调用后台接口
|
|
|
|
|
|
* @param Int id 表格id
|
|
|
|
|
|
* @return Array
|
|
|
|
|
|
*/
|
|
|
|
|
|
function getTableContent(id){
|
|
|
|
|
|
var mytable = document.getElementById(id);
|
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
|
var data = [];
|
|
|
|
|
|
for(var i=0,rows=mytable.rows.length; i<rows; i++){
|
|
|
|
|
|
for(var j=0,cells=mytable.rows[i].cells.length; j<cells; j++){
|
|
|
|
|
|
if(!data[i]){
|
|
|
|
|
|
data[i] = new Array();
|
|
|
|
|
|
}
|
|
|
|
|
|
data[i][j] = mytable.rows[i].cells[j].innerHTML;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
var title= data.shift();
|
|
|
|
|
|
var heard= data.shift();
|
|
|
|
|
|
var map ={};
|
|
|
|
|
|
map["titleTime"]=title;
|
|
|
|
|
|
map["heard"]=heard;
|
|
|
|
|
|
map["book"]=data;
|
|
|
|
|
|
map["titleCode"]="<spring:message code='${appName}'/>"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds();
|
|
|
|
|
|
var exports = JSON.stringify(map);
|
|
|
|
|
|
aJaxImportPost("${ctx}/export/ajaxExport",{"exports":exports});
|
|
|
|
|
|
}
|
|
|
|
|
|
$("#print-btn").click(function() {
|
|
|
|
|
|
window.print();
|
|
|
|
|
|
});
|
|
|
|
|
|
/**
|
|
|
|
|
|
* 分页控件处理
|
|
|
|
|
|
*/
|
|
|
|
|
|
function pageJuan(showData) {
|
|
|
|
|
|
if (typeof (fileData) != "undefined" && fileData != null) {
|
|
|
|
|
|
var totalData = fileData.length;
|
|
|
|
|
|
// var showData = 10;
|
|
|
|
|
|
if (showData > totalData) {
|
|
|
|
|
|
showData = totalData;
|
|
|
|
|
|
}
|
|
|
|
|
|
var current=1;
|
|
|
|
|
|
$('.M-box').pagination({
|
|
|
|
|
|
totalData : totalData,
|
|
|
|
|
|
showData : showData,
|
|
|
|
|
|
coping : true,
|
|
|
|
|
|
callback : function(index) {
|
|
|
|
|
|
//改变显示开始和结束数据编号
|
|
|
|
|
|
getPageData(index.getCurrent(), showData);
|
|
|
|
|
|
current=index.getCurrent();
|
|
|
|
|
|
$(".pageCurrent").val(current);
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
if(totalData<10){
|
|
|
|
|
|
$(".pageCurrent").val(1);
|
|
|
|
|
|
}
|
|
|
|
|
|
$(".pageTotal").text(totalData);
|
|
|
|
|
|
$(".pageNum").text(Math.ceil(totalData/10));
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-01-18 08:34:58 +00:00
|
|
|
|
function realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp){
|
2019-01-10 16:34:04 +08:00
|
|
|
|
var result={};
|
|
|
|
|
|
$.ajax({
|
2019-01-18 08:34:58 +00:00
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
2019-01-10 16:34:04 +08:00
|
|
|
|
type : "get",
|
|
|
|
|
|
dataType : "json",
|
2019-01-18 08:34:58 +00:00
|
|
|
|
data : {
|
|
|
|
|
|
"beginDate" : beginDate,
|
|
|
|
|
|
"endDate" : endDate,
|
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
|
},
|
2019-01-10 16:34:04 +08:00
|
|
|
|
async : false,
|
2019-01-18 08:34:58 +00:00
|
|
|
|
traditional:true,
|
2019-01-10 16:34:04 +08:00
|
|
|
|
success : function(rs) {
|
|
|
|
|
|
result=rs;
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
error : function(data, textStatus, errorThrown) {
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
complete : function(XMLHttpRequest, status) {//超时设置
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
return result;
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
2019-01-08 20:45:39 +08:00
|
|
|
|
var timer=null;
|
2019-01-06 20:00:13 +08:00
|
|
|
|
// 局点信息
|
2019-01-18 08:34:58 +00:00
|
|
|
|
function showRealTimeTransChart(appType,entranceId,isp) {
|
2019-01-10 16:34:04 +08:00
|
|
|
|
var time1=(new Date().getTime())-(1000 * 60 * 10+1000 * 60 * 5);
|
|
|
|
|
|
var time2=(new Date().getTime())-(1000 * 60 * 5);//推迟五分钟
|
|
|
|
|
|
var beginDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time1)); //获取十个点
|
|
|
|
|
|
var endDate=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time2)); // 少算一分钟
|
|
|
|
|
|
var sipResult=new Array();
|
|
|
|
|
|
var dipResult=new Array();
|
2019-01-18 08:34:58 +00:00
|
|
|
|
var intData = realTimeTrendAjax(beginDate, endDate,appType,entranceId,isp); //初始化数据 为10个点
|
2019-01-10 16:34:04 +08:00
|
|
|
|
sipResult=intData.sipResult;
|
|
|
|
|
|
dipResult=intData.dipResult;
|
2019-01-06 20:00:13 +08:00
|
|
|
|
var nowDate=new Date();
|
2019-01-10 16:34:04 +08:00
|
|
|
|
Highcharts.setOptions({ global: { useUTC: false } });
|
2019-01-06 20:00:13 +08:00
|
|
|
|
var num=0;
|
2019-01-10 16:34:04 +08:00
|
|
|
|
var chart = Highcharts.chart('chart-realTime',
|
2019-01-06 20:00:13 +08:00
|
|
|
|
{
|
|
|
|
|
|
chart: {
|
|
|
|
|
|
// type: 'spline',
|
2019-01-10 16:34:04 +08:00
|
|
|
|
type: 'area',
|
2019-01-06 20:00:13 +08:00
|
|
|
|
marginRight: 10,
|
|
|
|
|
|
// events: {
|
|
|
|
|
|
// events: {
|
|
|
|
|
|
// load: function() {}
|
|
|
|
|
|
// }
|
|
|
|
|
|
// }
|
|
|
|
|
|
},
|
|
|
|
|
|
noData:{
|
|
|
|
|
|
style: {//设置字体颜色
|
|
|
|
|
|
color: '#413333',
|
|
|
|
|
|
fontFamily:'Microsoft YaHei',
|
|
|
|
|
|
fontWeight:"unset",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
exporting : {
|
|
|
|
|
|
filename : '<spring:message code="${appName}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(),
|
|
|
|
|
|
scale : 1,
|
|
|
|
|
|
sourceWidth : 1280,
|
|
|
|
|
|
sourceHeight : 500,
|
|
|
|
|
|
buttons : {
|
|
|
|
|
|
contextButton : {
|
|
|
|
|
|
menuItems : [
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
|
|
|
|
|
|
'downloadPNG','downloadPDF',
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
colors:['#a9d4cf','#eecf8d'],
|
|
|
|
|
|
title : {
|
|
|
|
|
|
text : null
|
|
|
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
type:'datetime',
|
|
|
|
|
|
dateTimeLabelFormats: {
|
|
|
|
|
|
second: '%H:%M:%S',
|
|
|
|
|
|
minute: '%H:%M',
|
|
|
|
|
|
hour: '%H:%M',
|
|
|
|
|
|
day: '%m-%d',
|
|
|
|
|
|
week: '%m-%d',
|
|
|
|
|
|
month: '%Y-%m',
|
|
|
|
|
|
year: '%Y'
|
|
|
|
|
|
},
|
|
|
|
|
|
title: {
|
2019-01-10 19:47:09 +08:00
|
|
|
|
text: 'Real Time',
|
2019-01-06 20:00:13 +08:00
|
|
|
|
align:'high',
|
|
|
|
|
|
},
|
|
|
|
|
|
labels: {
|
|
|
|
|
|
// rotation: -45, //倾斜的角度
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
yAxis : {
|
|
|
|
|
|
title : {
|
|
|
|
|
|
text : null
|
|
|
|
|
|
},
|
2019-01-08 20:45:39 +08:00
|
|
|
|
min:0,
|
|
|
|
|
|
allowDecimals:false
|
2019-01-06 20:00:13 +08:00
|
|
|
|
},
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
dateTimeLabelFormats: {
|
|
|
|
|
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
second: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
minute: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
hour: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
day: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
week: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
month: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
year: '%Y-%m-%d %H:%M:%S'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2019-01-08 20:45:39 +08:00
|
|
|
|
credits : {//是否有水印
|
2019-01-06 20:00:13 +08:00
|
|
|
|
enabled : false
|
|
|
|
|
|
},
|
|
|
|
|
|
plotOptions : {
|
|
|
|
|
|
series : {
|
|
|
|
|
|
marker : {
|
|
|
|
|
|
radius : 2,
|
|
|
|
|
|
hover : {
|
|
|
|
|
|
enabled : true,
|
|
|
|
|
|
radius : 7,
|
|
|
|
|
|
radiusPlus : 5
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [{
|
2019-01-08 20:45:39 +08:00
|
|
|
|
name: '<spring:message code="client_ip"/>',
|
2019-01-10 16:34:04 +08:00
|
|
|
|
lineColor:'#a9d4cf',
|
|
|
|
|
|
lineWidth:1,
|
|
|
|
|
|
marker: {
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
},
|
2019-01-06 20:00:13 +08:00
|
|
|
|
data: (function () {
|
|
|
|
|
|
var data = [];
|
|
|
|
|
|
if(sipResult!=null&&sipResult.length>0){
|
|
|
|
|
|
var count=10;
|
2019-01-10 16:34:04 +08:00
|
|
|
|
if(sipResult.length<10){
|
|
|
|
|
|
count=sipResult.length;
|
|
|
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < count; i++) {
|
|
|
|
|
|
var d =sipResult[i];
|
|
|
|
|
|
var x = d[0], // 时间
|
|
|
|
|
|
y = d[1];
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
x: x,
|
|
|
|
|
|
y: y
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
} else{
|
|
|
|
|
|
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
|
|
|
|
|
for (var i = 0; i <10; i++) {
|
2019-01-06 20:00:13 +08:00
|
|
|
|
data.push({
|
2019-01-10 16:34:04 +08:00
|
|
|
|
x: time + i * 1000*60,
|
|
|
|
|
|
y: 0
|
2019-01-06 20:00:13 +08:00
|
|
|
|
});
|
2019-01-10 16:34:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-01-06 20:00:13 +08:00
|
|
|
|
return data;
|
|
|
|
|
|
}())
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2019-01-08 20:45:39 +08:00
|
|
|
|
name: '<spring:message code="server_ip"/>',
|
2019-01-10 16:34:04 +08:00
|
|
|
|
lineColor:'#a9d4cf',
|
|
|
|
|
|
lineWidth:1,
|
|
|
|
|
|
marker: {
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
},
|
2019-01-06 20:00:13 +08:00
|
|
|
|
data: (function () {
|
|
|
|
|
|
var data = [];
|
|
|
|
|
|
if(dipResult!=null&&dipResult.length>0){
|
2019-01-10 16:34:04 +08:00
|
|
|
|
var count=10;
|
|
|
|
|
|
if(dipResult.length<10){
|
|
|
|
|
|
count=dipResult.length;
|
|
|
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < count; i++) {
|
|
|
|
|
|
var d =dipResult[i];
|
|
|
|
|
|
var x = d[0], // 当前时间
|
|
|
|
|
|
y = d[1];
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
x: x,
|
|
|
|
|
|
y: y
|
|
|
|
|
|
});
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
2019-01-10 16:34:04 +08:00
|
|
|
|
}else{
|
|
|
|
|
|
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
|
|
|
|
|
for (var i = 0; i <10; i++) {
|
2019-01-06 20:00:13 +08:00
|
|
|
|
data.push({
|
2019-01-10 16:34:04 +08:00
|
|
|
|
x: time + i * 1000*60,
|
|
|
|
|
|
y: 0
|
2019-01-06 20:00:13 +08:00
|
|
|
|
});
|
2019-01-10 16:34:04 +08:00
|
|
|
|
}
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
return data;
|
|
|
|
|
|
}())
|
|
|
|
|
|
}]
|
|
|
|
|
|
});
|
2019-01-08 20:45:39 +08:00
|
|
|
|
|
|
|
|
|
|
var series = chart.series[0];
|
|
|
|
|
|
var series1 = chart.series[1];
|
2019-01-06 20:00:13 +08:00
|
|
|
|
window.clearInterval(timer);
|
2019-01-10 16:34:04 +08:00
|
|
|
|
// if(sipResult!=null&&sipResult.length>0){
|
2019-01-06 20:00:13 +08:00
|
|
|
|
timer=setInterval(function() {
|
2019-01-10 16:34:04 +08:00
|
|
|
|
var time3=(new Date().getTime())-(1000 * 60 * 5);
|
|
|
|
|
|
var time4=(new Date().getTime())-(1000 * 60 * 4);
|
|
|
|
|
|
var begin=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time3)); //获取1个点少算一分钟
|
|
|
|
|
|
var end=dateFtt("yyyy-MM-dd hh:mm:ss",new Date(time4));
|
|
|
|
|
|
$.ajax({
|
2019-01-18 08:34:58 +00:00
|
|
|
|
url : "${ctx}/dashboard/traffic/ajaxAppTrend",
|
2019-01-10 16:34:04 +08:00
|
|
|
|
type : "post",
|
|
|
|
|
|
dataType : "json",
|
|
|
|
|
|
cache:false,
|
2019-01-18 08:34:58 +00:00
|
|
|
|
data : {
|
|
|
|
|
|
"beginDate" : begin,
|
|
|
|
|
|
"endDate" : end,
|
|
|
|
|
|
"appType" : appType,
|
|
|
|
|
|
"entranceId" : entranceId,
|
|
|
|
|
|
"searchIspCode":isp
|
|
|
|
|
|
},
|
2019-01-10 16:34:04 +08:00
|
|
|
|
async : true,
|
2019-01-18 08:34:58 +00:00
|
|
|
|
traditional:true,
|
2019-01-10 16:34:04 +08:00
|
|
|
|
success : function(rs) {
|
|
|
|
|
|
var realTimeData=rs;
|
|
|
|
|
|
if(realTimeData!=null&&Object.keys(realTimeData).length>0){
|
|
|
|
|
|
var sipReal=realTimeData.sipResult;
|
|
|
|
|
|
var dipReal=realTimeData.dipResult;
|
|
|
|
|
|
var d =sipReal[0];
|
|
|
|
|
|
series.addPoint([d[0], d[1]], true, true);
|
|
|
|
|
|
var t =dipReal[0];
|
|
|
|
|
|
series1.addPoint([t[0], t[1]], true, true);
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var x=(new Date()).getTime()-(1000 * 60 * 5);
|
|
|
|
|
|
var y=0;
|
|
|
|
|
|
series.addPoint([x, y], true, true);
|
|
|
|
|
|
series1.addPoint([x, y], true, true);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
error : function(data, textStatus, errorThrown) {
|
|
|
|
|
|
closeTip();
|
|
|
|
|
|
},
|
|
|
|
|
|
complete : function(XMLHttpRequest, status) {//超时设置
|
|
|
|
|
|
closeTip();
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
2019-01-10 16:34:04 +08:00
|
|
|
|
});
|
|
|
|
|
|
},1000*60);
|
|
|
|
|
|
// }else{
|
|
|
|
|
|
// window.clearInterval(timer);
|
|
|
|
|
|
// }
|
|
|
|
|
|
}
|
|
|
|
|
|
// 历史信息
|
|
|
|
|
|
function showActionHistoryChart(sipResult,dipResult) {
|
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
|
Highcharts.setOptions({ global: { useUTC: false } });
|
|
|
|
|
|
var num=0;
|
|
|
|
|
|
var chart = Highcharts.chart('chart-history',
|
|
|
|
|
|
{
|
|
|
|
|
|
chart: {
|
|
|
|
|
|
type: 'area',
|
|
|
|
|
|
zoomType: 'x'
|
|
|
|
|
|
},
|
|
|
|
|
|
noData:{
|
|
|
|
|
|
style: {//设置字体颜色
|
|
|
|
|
|
color: '#413333',
|
|
|
|
|
|
fontFamily:'Microsoft YaHei',
|
|
|
|
|
|
fontWeight:"unset",
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
exporting : {
|
|
|
|
|
|
filename : '<spring:message code="${appName}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds(),
|
|
|
|
|
|
scale : 1,
|
|
|
|
|
|
sourceWidth : 1280,
|
|
|
|
|
|
sourceHeight : 500,
|
|
|
|
|
|
buttons : {
|
|
|
|
|
|
contextButton : {
|
|
|
|
|
|
menuItems : [
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[0],// 打印
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[1],// jpeg
|
|
|
|
|
|
'downloadPNG','downloadPDF',
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[4],// excel
|
|
|
|
|
|
Highcharts.getOptions().exporting.buttons.contextButton.menuItems[3],// cvs
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
colors:['#a9d4cf','#eecf8d'],
|
|
|
|
|
|
title : {
|
|
|
|
|
|
text : null
|
|
|
|
|
|
},
|
|
|
|
|
|
xAxis: {
|
|
|
|
|
|
type:'datetime',
|
|
|
|
|
|
dateTimeLabelFormats: {
|
|
|
|
|
|
second: '%H:%M:%S',
|
|
|
|
|
|
minute: '%H:%M',
|
|
|
|
|
|
hour: '%H:%M',
|
|
|
|
|
|
day: '%m-%d',
|
|
|
|
|
|
week: '%m-%d',
|
|
|
|
|
|
month: '%Y-%m',
|
|
|
|
|
|
year: '%Y'
|
|
|
|
|
|
},
|
|
|
|
|
|
title: {
|
2019-01-10 19:47:09 +08:00
|
|
|
|
text: 'History Time',
|
2019-01-10 16:34:04 +08:00
|
|
|
|
align:'high',
|
|
|
|
|
|
},
|
|
|
|
|
|
labels: {
|
|
|
|
|
|
// rotation: -45, //倾斜的角度
|
|
|
|
|
|
},
|
|
|
|
|
|
},
|
|
|
|
|
|
yAxis : {
|
|
|
|
|
|
title : {
|
|
|
|
|
|
text : null
|
|
|
|
|
|
},
|
|
|
|
|
|
min:0,
|
|
|
|
|
|
allowDecimals:false
|
|
|
|
|
|
},
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
dateTimeLabelFormats: {
|
|
|
|
|
|
millisecond: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
second: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
minute: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
hour: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
day: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
week: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
month: '%Y-%m-%d %H:%M:%S',
|
|
|
|
|
|
year: '%Y-%m-%d %H:%M:%S'
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
credits : {//是否有水印
|
|
|
|
|
|
enabled : false
|
|
|
|
|
|
},
|
|
|
|
|
|
plotOptions : {
|
|
|
|
|
|
series : {
|
|
|
|
|
|
marker : {
|
|
|
|
|
|
radius : 2,
|
|
|
|
|
|
hover : {
|
|
|
|
|
|
enabled : true,
|
|
|
|
|
|
radius : 7,
|
|
|
|
|
|
radiusPlus : 5
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
series: [{
|
|
|
|
|
|
name: '<spring:message code="client_ip"/>',
|
|
|
|
|
|
data: sipResult,
|
|
|
|
|
|
lineColor:'#a9d4cf',
|
|
|
|
|
|
lineWidth:1,
|
|
|
|
|
|
marker: {
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
name: '<spring:message code="server_ip"/>',
|
|
|
|
|
|
data: dipResult,
|
|
|
|
|
|
lineColor:'#eecf8d',
|
|
|
|
|
|
lineWidth:1,
|
|
|
|
|
|
marker: {
|
|
|
|
|
|
enabled: false
|
|
|
|
|
|
}
|
|
|
|
|
|
}]
|
|
|
|
|
|
});
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
(function(H) {
|
|
|
|
|
|
H.Chart.prototype.downloadXLS = function() {
|
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
|
var start=$("#beginDateh").val();
|
|
|
|
|
|
var end=$("#endDateh").val();
|
2019-01-10 19:47:09 +08:00
|
|
|
|
var rows = this.getDataRows(true);
|
|
|
|
|
|
var heard = rows.shift(); // 删除一个重复行
|
|
|
|
|
|
rows.shift(); // 删除一个重复行
|
|
|
|
|
|
var total=[];
|
2019-01-06 20:00:13 +08:00
|
|
|
|
var map={};
|
2019-01-10 19:47:09 +08:00
|
|
|
|
if(heard[0].indexOf("History") != -1){
|
|
|
|
|
|
rows = [];
|
|
|
|
|
|
/* 调用后台接口导出 */
|
|
|
|
|
|
total = JSON.parse($("#total").val());
|
|
|
|
|
|
var timeData = JSON.parse($("#timeData").val());
|
|
|
|
|
|
var sipData = JSON.parse($("#sipData").val());
|
|
|
|
|
|
var dipData = JSON.parse($("#dipData").val());
|
|
|
|
|
|
for(var i=0;i<sipData.length;i++){
|
|
|
|
|
|
var colData=[];
|
|
|
|
|
|
var time=new Date(timeData[i]); //
|
|
|
|
|
|
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
|
|
|
|
|
colData.push(ftime,sipData[i],dipData[i])
|
|
|
|
|
|
rows.push(colData)
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var siptotal=0;
|
|
|
|
|
|
var diptotal=0;
|
|
|
|
|
|
$(rows).each(function (i,d){
|
|
|
|
|
|
if(d!=null){
|
|
|
|
|
|
if(i==0){
|
|
|
|
|
|
start=d[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
if(i==rows.length-1){
|
|
|
|
|
|
end=d[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
siptotal=siptotal+Number(d[1]);
|
|
|
|
|
|
diptotal=diptotal+Number(d[2]);
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
total.push(siptotal,diptotal);
|
2019-01-06 20:00:13 +08:00
|
|
|
|
}
|
|
|
|
|
|
total.unshift('<spring:message code="report_total"/>');
|
|
|
|
|
|
rows.push(total)
|
|
|
|
|
|
map["titleTime"]='<spring:message code="${appName}"></spring:message>'+","+start+"--"+end;
|
|
|
|
|
|
map["heard"]=heard;
|
|
|
|
|
|
map["book"]=rows;
|
|
|
|
|
|
map["titleCode"]='<spring:message code="${appName}"></spring:message>'+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds();
|
|
|
|
|
|
var exports = JSON.stringify(map);
|
|
|
|
|
|
aJaxImportPost("${ctx}/export/ajaxExport",{"exports":exports});
|
|
|
|
|
|
};
|
|
|
|
|
|
}(Highcharts));
|
|
|
|
|
|
|
|
|
|
|
|
(function(H) {
|
|
|
|
|
|
H.Chart.prototype.downloadCSV = function() {
|
2019-01-10 19:47:09 +08:00
|
|
|
|
|
|
|
|
|
|
var rows = this.getDataRows(true);
|
2019-01-06 20:00:13 +08:00
|
|
|
|
var data=[];
|
2019-01-10 19:47:09 +08:00
|
|
|
|
var heard = rows.shift(); // 删除一个重复行
|
|
|
|
|
|
var total=[];
|
|
|
|
|
|
var start = "";
|
|
|
|
|
|
var end = "";
|
|
|
|
|
|
if(heard[0].indexOf("History") != -1){
|
|
|
|
|
|
start = $("#beginDateh").val();
|
|
|
|
|
|
end = $("#endDateh").val();
|
|
|
|
|
|
total = JSON.parse($("#total").val());
|
|
|
|
|
|
var timeData = JSON.parse($("#timeData").val());
|
|
|
|
|
|
var sipData = JSON.parse($("#sipData").val());
|
|
|
|
|
|
var dipData = JSON.parse($("#dipData").val());
|
|
|
|
|
|
for(var i=0;i<sipData.length;i++){
|
|
|
|
|
|
var colData=[];
|
|
|
|
|
|
var time=new Date(timeData[i]); //
|
|
|
|
|
|
var ftime=dateFtt("yyyy-MM-dd hh:mm:ss",time);
|
|
|
|
|
|
colData.push(ftime,sipData[i],dipData[i])
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
num1:ftime,
|
|
|
|
|
|
num2:sipData[i],
|
|
|
|
|
|
num3:dipData[i],
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
|
|
|
var siptotal=0;
|
|
|
|
|
|
var diptotal=0;
|
|
|
|
|
|
$(rows).each(function (i,d){
|
|
|
|
|
|
if(d!=null){
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
num1:d[0],
|
|
|
|
|
|
num2:d[1],
|
|
|
|
|
|
num3:d[2],
|
|
|
|
|
|
});
|
|
|
|
|
|
if(i>0){
|
|
|
|
|
|
if(i==1){
|
|
|
|
|
|
start=d[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
if(i==rows.length-1){
|
|
|
|
|
|
end=d[0];
|
|
|
|
|
|
}
|
|
|
|
|
|
siptotal=siptotal+Number(d[1]);
|
|
|
|
|
|
diptotal=diptotal+Number(d[2]);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2019-01-06 20:00:13 +08:00
|
|
|
|
})
|
2019-01-10 19:47:09 +08:00
|
|
|
|
total.push(siptotal,diptotal);
|
|
|
|
|
|
}
|
|
|
|
|
|
data.push({
|
|
|
|
|
|
num1:"<spring:message code='report_total'/>",
|
|
|
|
|
|
num2:total
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-01-06 20:00:13 +08:00
|
|
|
|
exportCsv({
|
|
|
|
|
|
title:["<spring:message code='${appName}'/>",start+"--"+end],
|
|
|
|
|
|
titleForKey:["num1","num2","num3"],
|
|
|
|
|
|
data:data
|
|
|
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
}(Highcharts));
|
|
|
|
|
|
|
|
|
|
|
|
function exportCsv(obj){
|
|
|
|
|
|
var nowDate=new Date();
|
|
|
|
|
|
//title ["","",""]
|
|
|
|
|
|
var title = obj.title;
|
|
|
|
|
|
//titleForKey ["","",""]
|
|
|
|
|
|
var titleForKey = obj.titleForKey;
|
|
|
|
|
|
var data = obj.data;
|
|
|
|
|
|
var str = [];
|
|
|
|
|
|
str.push(obj.title.join(",")+"\n");
|
|
|
|
|
|
for(var i=0;i<data.length;i++){
|
|
|
|
|
|
var temp = [];
|
|
|
|
|
|
for(var j=0;j<titleForKey.length;j++){
|
|
|
|
|
|
temp.push(data[i][titleForKey[j]]);
|
|
|
|
|
|
}
|
|
|
|
|
|
str.push(temp.join(",")+"\n");
|
|
|
|
|
|
}
|
|
|
|
|
|
str = "\uFEFF"+str.join(""); //
|
|
|
|
|
|
var blob = new Blob([str], {type: 'text/plain'});
|
|
|
|
|
|
var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(blob);
|
|
|
|
|
|
var downloadLink = document.createElement("a");
|
|
|
|
|
|
downloadLink.href = window.URL.createObjectURL(blob);
|
|
|
|
|
|
downloadLink.download = "<spring:message code='${appName}'/>"+nowDate.getFullYear()+(nowDate.getMonth()+1)+nowDate.getDate()+nowDate.getHours()+nowDate.getMinutes()+nowDate.getSeconds()+".csv";
|
|
|
|
|
|
downloadLink.style.display = 'none';
|
|
|
|
|
|
document.body.appendChild(downloadLink);
|
|
|
|
|
|
downloadLink.click();
|
|
|
|
|
|
document.body.removeChild(downloadLink);
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|