diff --git a/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp b/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp index a1d917a..110ec2d 100644 --- a/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp +++ b/src/main/webapp/WEB-INF/views/font/showRecordIframe.jsp @@ -39,9 +39,28 @@ float:right; background-color: #FFFFFF; } + .loading { + width: 148px; + height: 56px; + position: absolute; + top: 28px; + right: 16px; + line-height: 56px; + color: red; + padding-left: 60px; + font-size: 7px; + background: #000; + opacity: 0.7; + -moz-border-radius: 20px; + -webkit-border-radius: 20px; + border-radius: 20px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70); + display: none; + } +
正在采集,请稍等
@@ -67,7 +86,7 @@
- + diff --git a/src/main/webapp/static/js/showRecord/showRecordIframe.js b/src/main/webapp/static/js/showRecord/showRecordIframe.js index f373068..428acc5 100644 --- a/src/main/webapp/static/js/showRecord/showRecordIframe.js +++ b/src/main/webapp/static/js/showRecord/showRecordIframe.js @@ -84,13 +84,14 @@ function onloadPdf(){ $("#iframe1").css("height",$("body")[0].offsetHeight) } -//定义刷新开始计时到超时时间为20分钟 -var timeOut = 20 * 60 * 1000; +//定义刷新开始计时到超时时间为10分钟 +var timeOut = 10 * 60 * 1000; //定义查询间隔时间默认1分钟 var intervalTime = 60 * 1000; -//定义倒计时刷新秒数默认5秒 -var times = 5; +//定义倒计时刷新秒数默认10秒 +var times = 10; //按需求刷新pdf +$("#loading").css("background","url("+path+"/static/img/load.gif) no-repeat 10px 50%"); function flashPdf(){ $.ajax({ type:'post', @@ -99,13 +100,16 @@ function flashPdf(){ dataType:'json', success:function(result){ if(result.code == 100){ - debugger var data = result.extend.data; if(data != '' && data == 1){ //已归档 toastr.warning("该病案已归档"); }else{ toastr.success("后台开始执行按需采集,稍后采集完成页面将自动刷新"); + //3秒后触发等待控件 + setTimeout(function(){ + $("#loading").show(); + },5000) setInterval(function () { //1分钟查询一次 $.ajax({ @@ -115,6 +119,8 @@ function flashPdf(){ dataType:'json', success:function(result){ if(result.code == 100){ + //隐藏加载控件 + $("#loading").hide(); setTimeout(function(){ window.location.reload(); },times*1000); @@ -127,6 +133,8 @@ function flashPdf(){ },intervalTime); setTimeout(function(){ toastr.error("后台按需采集超时,请联系系统运维人员"); + //隐藏加载控件 + $("#loading").hide(); },timeOut); } }else{