用户统计修改默认设置时间,可以点击列表直接查询

This commit is contained in:
zhanghongqing
2018-11-09 15:10:40 +08:00
parent 98860034a3
commit 301fa50606
2 changed files with 47 additions and 9 deletions

View File

@@ -68,6 +68,12 @@ public class TrafficStatisticsReportController extends BaseController {
endTime=DateUtils.getDateTime();
bean.setSearchFoundStartTime(statTime);
bean.setSearchFoundEndTime(endTime);
statTime=URLEncoder.encode(statTime, "UTF-8");
endTime=URLEncoder.encode(endTime, "UTF-8");
String paramUrl="&searchReportStartTime="+statTime+"&searchReportEndTime="+endTime;
destUrl=destUrl+paramUrl;
userUrl=userUrl+paramUrl;
ipUrl=ipUrl+paramUrl;
}else {
statTime=URLEncoder.encode(statTime, "UTF-8");
endTime=URLEncoder.encode(endTime, "UTF-8");

View File

@@ -6,6 +6,11 @@
<script type="text/javascript" src="${pageContext.request.contextPath}/static/global/plugins/jquery-ui/jquery-ui.min.js"></script>
<title><spring:message code="traffic_user_behavior"></spring:message></title>
<style>
td:hover{
cursor: pointer;
}
</style>
<script>
$(document).ready(function() {
@@ -120,9 +125,36 @@
if($(".httpResCfg").hasClass("hidden")){
$("#searchBusinessType").val(2);
}
$("#searchForm").attr("action","${ctx}/traffic/userBehavior");
$("#searchForm").submit();
return false;
}
function searchAccountForList(param){
if($(".httpReqCfg").hasClass("hidden")){
$("#searchBusinessType").val(3);
}
if($(".httpResCfg").hasClass("hidden")){
$("#searchBusinessType").val(2);
}
$("#account").val(param);
$("#searchForm").attr("action","${ctx}/traffic/userBehavior");
$("#searchForm").submit();
return false;
}
function searchNasIpForList(param){
if($(".httpReqCfg").hasClass("hidden")){
$("#searchBusinessType").val(3);
}
if($(".httpResCfg").hasClass("hidden")){
$("#searchBusinessType").val(2);
}
$("#nasIp").val(param);
$("#searchForm").attr("action","${ctx}/traffic/userBehavior");
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
@@ -162,7 +194,7 @@
<thead>
<tr>
<th><spring:message code="ip"/></th>
<th><spring:message code="link_num"/></th>
<th><spring:message code="visits"/></th>
</tr>
</thead>
<tbody>
@@ -260,7 +292,7 @@
<tr>
<th><spring:message code="ip"/></th>
<th><spring:message code="stat_time"/></th>
<th><spring:message code="link_num"/></th>
<th><spring:message code="visits"/></th>
</tr>
</thead>
<tbody>
@@ -275,7 +307,7 @@
</tbody>
</table> --%>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<table id="contentTable" class="table table-hover table-striped table-bordered table-condensed text-nowrap table-active">
<thead>
<tr>
<th><spring:message code="account"/></th>
@@ -284,7 +316,7 @@
<tbody>
<c:forEach items="${accountList}" var="data">
<tr>
<td title="${data.account}">${data.account}</td>
<td onClick="return searchAccountForList('${data.account}')"><span title="${data.account}">${data.account}</span></td>
</tr>
</c:forEach>
@@ -322,7 +354,7 @@
<div class="process-row">
<div class="process-time">
<div class="time-con">
<span class="year" title="<spring:message code="link_num"/>: <fmt:formatNumber type='number' value='${us.num}' minFractionDigits='0'/>">${us.reportTime}</span>
<span class="year" title="<spring:message code="visits"/>: <fmt:formatNumber type='number' value='${us.num}' minFractionDigits='0'/>">${us.reportTime}</span>
</div>
</div>
<div class="process-noyear" title="${us.nasIp}">
@@ -362,7 +394,7 @@
<tr>
<th><spring:message code="account"/></th>
<th><spring:message code="stat_time"/></th>
<th><spring:message code="link_num"/></th>
<th><spring:message code="visits"/></th>
</tr>
</thead>
<tbody>
@@ -377,7 +409,7 @@
</tbody>
</table> --%>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<table id="contentTable" class="table table-hover table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code="ip"/></th>
@@ -387,7 +419,7 @@
<c:forEach items="${nasIpList}" var="data">
<tr>
<td title="${data.nasIp}">${data.nasIp}</td>
<td onClick="return searchNasIpForList('${data.nasIp}')"><spantitle="${data.nasIp}">${data.nasIp}</span></td>
</tr>
</c:forEach>
@@ -426,7 +458,7 @@
<div class="process-row">
<div class="process-time">
<div class="time-con">
<span class="year" title="<spring:message code="link_num"/>: <fmt:formatNumber type='number' value='${it.num}' minFractionDigits='0'/>">${it.reportTime}
<span class="year" title="<spring:message code="visits"/>: <fmt:formatNumber type='number' value='${it.num}' minFractionDigits='0'/>">${it.reportTime}
</span>
</div>