diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index e393f3941..025b48826 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -66,32 +66,7 @@ } } }); - $(".service").each(function(){ - var target=$(this).find("span"); - var action=$(this).data("action"); - $.ajax({ - type:'post', - url:'${ctx}/report/ajaxNtcServiceReport', - data:{ - "action":action, - "functionId":$("#functionId").val(), - "reportType":$('[name="reportType"]').val(), - "reportTime":$('[name="reportTime"]').val() - }, - dataType:'json', - async:true, - success:function(data,textStatus){//处理返回结果 - if(textStatus=="success"){ - target.html(data[action]); - } - }, - complete:function(XMLHttpRequest,status){//超时设置 - if(status=="timeout"){ - target.html(timeout); - } - } - }); - }); + ajaxServiceLogTotal(); $("#export-btn").click(function(){ var te = $(".in table").tableExport({ headings:true, @@ -126,7 +101,54 @@ $("#reportTypeDiv").append(''); } } - +var ajaxServiceLogTotal=function(){ + var services=[]; + var objs=[]; + $(".service").each(function(){ + objs.push($(this)); + services.push($(this).data("service")); + }); + var timeout=$.validator.messages.timeout; + var failed=$.validator.messages.failed; + $.ajax({ + type:'post', + timeout:10000,//超时时间设置,查询接口时间过长超时 + url:'${ctx}/report/ajaxNtcServiceReport', + data:{ + "services":services.join(","), + "functionId":$("#functionId").val(), + "reportType":$('[name="reportType"]').val(), + "reportTime":$('[name="reportTime"]').val() + }, + dataType:'json', + async:true, + success:function(data,textStatus){//处理返回结果 + if(textStatus=="success"){ + for(var i=0;i'); $.ajax({ @@ -193,7 +215,7 @@ function customColumnClick(){ -
btn-primary btn-default">