(1)境内源IP报表加入对界面时间字段的处理

(2)时间字段的处理放到baseController中
(3)界面ajax函数缩减为1个公用的函数
This commit is contained in:
wangxin
2018-07-10 13:33:28 +08:00
parent 86fa5f0000
commit 0e05e2a0e4
6 changed files with 255 additions and 142 deletions

View File

@@ -23,19 +23,19 @@
$("#searchForm")[0].reset();
});
if(!"${bean.reportBusinessType}"){
ajaxGetLabelReport();
ajaxReport("/report/ajaxNtcTagReport","#label");
}else if("${bean.reportBusinessType}"=="label_report"){
ajaxGetLabelReport();
ajaxReport("/report/ajaxNtcTagReport","#label");
}else if("${bean.reportBusinessType}"=="lwhh_report"){
ajaxGetLwhhReport();
ajaxReport("/report/ajaxNtcLwhhReport","#lwhh");
}else if("${bean.reportBusinessType}"=="src_ip_report"){
ajaxGetSrcIpReport();
ajaxReport("/report/ajaxNtcSrcipDomesticReport","#srcIp");
}else if("${bean.reportBusinessType}"=="attr_type_report"){
ajaxGetXzReport();
ajaxReport("/report/ajaxNtcXzReport","#attrType");
}else if("${bean.reportBusinessType}"=="dest_ip_report"){
ajaxGetDestIpReport();
ajaxReport("/report/ajaxNtcDestIpReport","#destIp");
}else if("${bean.reportBusinessType}"=="isp_report"){
ajaxGetIspReport();
ajaxReport("/report/ajaxNtcIspReport","#entranceId");
}
$("[name='reportType']").each(function(){
var type='${bean.reportType}';
@@ -47,17 +47,17 @@
$("#reportBusinessType").val($(this).data("bussiness"));
if(!$(this).parent("li").hasClass("active")){
if($(this).data("bussiness")=="label_report"){
ajaxGetLabelReport();
ajaxReport("/report/ajaxNtcTagReport","#label");
}else if($(this).data("bussiness")=="lwhh_report"){
ajaxGetLwhhReport();
ajaxReport("/report/ajaxNtcLwhhReport","#lwhh");
}else if($(this).data("bussiness")=="src_ip_report"){
ajaxGetSrcIpReport();
ajaxReport("/report/ajaxNtcSrcipDomesticReport","#srcIp");
}else if($(this).data("bussiness")=="attr_type_report"){
ajaxGetXzReport();
ajaxReport("/report/ajaxNtcXzReport","#attrType");
}else if($(this).data("bussiness")=="dest_ip_report"){
ajaxGetDestIpReport();
ajaxReport("/report/ajaxNtcDestIpReport","#destIp");
}else if($(this).data("bussiness")=="isp_report"){
ajaxGetIspReport();
ajaxReport("/report/ajaxNtcIspReport","#entranceId");
}
}
});
@@ -78,104 +78,20 @@
}
}
var ajaxGetLabelReport=function(){
var ajaxReport=function(url,target){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcTagReport',
url:'${ctx}'+url,///report/ajaxNtcTagReport
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
"reportType":$('[name="reportType"]').val(),
"reportTime":$('[name="reportTime"]').val()
},
dataType:"html",
success:function(data){
$("#label").html(data);
closeTip();
}
});
}
var ajaxGetLwhhReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcLwhhReport',
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
},
dataType:"html",
success:function(data){
$("#lwhh").html(data);
closeTip();
}
});
}
var ajaxGetSrcIpReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcSrcipDomesticReport',
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
},
dataType:"html",
success:function(data){
$("#srcIp").html(data);
closeTip();
}
});
}
var ajaxGetXzReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcXzReport',
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
},
dataType:"html",
success:function(data){
$("#attrType").html(data);
closeTip();
}
});
}
var ajaxGetDestIpReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcDestIpReport',
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
},
dataType:"html",
success:function(data){
$("#destIp").html(data);
closeTip();
}
});
}
var ajaxGetIspReport=function(){
loading('<spring:message code="onloading"/>');
$.ajax({
type:'post',
async:false,
url:'${ctx}/report/ajaxNtcIspReport',
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val()
},
dataType:"html",
success:function(data){
$("#entranceId").html(data);
$(target).html(data);//#label
closeTip();
}
});