Index: ssts-web/src/main/webapp/disinfectsystem/interfere/interfereTerminateInvoicePlanView.js =================================================================== diff -u -r16951 -r32638 --- ssts-web/src/main/webapp/disinfectsystem/interfere/interfereTerminateInvoicePlanView.js (.../interfereTerminateInvoicePlanView.js) (revision 16951) +++ ssts-web/src/main/webapp/disinfectsystem/interfere/interfereTerminateInvoicePlanView.js (.../interfereTerminateInvoicePlanView.js) (revision 32638) @@ -134,12 +134,12 @@ myMask.hide(); var result = response.responseText; showResult(result); - }, - failure : function(response, options) { - myMask.hide(); - showResult("系统加载失败,请稍候再试"); } }); + setTimeout(function(){ + myMask.hide(); + flushProgress(); + }, 5000); } } ); @@ -149,3 +149,34 @@ Ext.getCmp("type").setValue(1); form.render("formDiv"); }); + +function flushProgress(percentText){ + var myMask; + if(percentText){ + myMask = new Ext.LoadMask(Ext.getBody(),{msg:"处理了 "+percentText}); + }else { + myMask = new Ext.LoadMask(Ext.getBody(),{msg:"处理了 1%"}); + } + myMask.show(); + Ext.Ajax.request( { + url : WWWROOT + '/disinfectSystem/baseData/maintainAction!flushProgress.do', + success : function(response, options) { + var result = Ext.decode(response.responseText); + if(result.data.totalCount > 0){ + setTimeout(function(){ + myMask.hide(); + flushProgress(result.data.percentText); + }, 5000); + return; + } + myMask.hide(); + if(percentText == '100%' || percentText == '99%'){ + showResult('更新完成'); + } + }, + failure : function(response, options) { + myMask.hide(); + showResult("系统加载失败,请稍候再试"); + } + }); +} \ No newline at end of file