未做更改
This commit is contained in:
@@ -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('<input id="intype" name="reportTime" class="form-control input-medium Wdate" type="text" value="' + reportTime.substring(0, 4) + '" readonly="readonly" onclick=WdatePicker({dateFmt:"yyyy",isShowClear:true});>');
|
||||
}
|
||||
}
|
||||
|
||||
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<services.length;i++){
|
||||
var target=objs[i].find("span");
|
||||
for(var da in data){
|
||||
if(data[da].service==services[i]){
|
||||
target.html(data[da].sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){//超时设置
|
||||
if(status=="timeout"){
|
||||
for(var i=0;i<services.length;i++){
|
||||
var target=objs[i].find("span");
|
||||
target.html(timeout);
|
||||
}
|
||||
}else if(status !="success"){
|
||||
for(var i=0;i<services.length;i++){
|
||||
var target=objs[i].find("span");
|
||||
target.html(failed);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
var ajaxReport=function(url,target){
|
||||
loading('<spring:message code="onloading"/>');
|
||||
$.ajax({
|
||||
@@ -193,7 +215,7 @@ function customColumnClick(){
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="status">
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<div data-action="${service.action}" class="service btn
|
||||
<div data-service="${service.serviceId}" class="service btn
|
||||
<c:if test="${status.index%2==0}">btn-primary</c:if>
|
||||
<c:if test="${status.index%2!=0}">btn-default</c:if>">
|
||||
<spring:message code="${action.itemValue}"/>
|
||||
|
||||
Reference in New Issue
Block a user