对外预览病案接口按需采集功能增加加载中控件

master
zengwh 5 years ago
parent fcd92347fa
commit f4de17d750

@ -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;
}
</style>
</head>
<body style="scroll:auto" onkeydown="disabledPrint()">
<div id="loading" class="loading">正在采集,请稍等</div>
<!--文件路径-->
<input type="hidden" id="filePath">
<input type="hidden" id="detailIds">
@ -67,7 +86,7 @@
<div class="content-right">
<iframe width="100%" src="" id="iframe1" frameborder="0" scrolling="yes"></iframe>
</div>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframe.js?2020-07-08"></script>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframe.js?time=2020-07-08"></script>
<script type="text/javascript" src="${path}/static/js/showRecord/showRecordIframeCommom.js"></script>
</body>
</html>

@ -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{

Loading…
Cancel
Save