Index: ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js =================================================================== diff -u -r21738 -r26249 --- ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js (.../orgUnitExtView.js) (revision 21738) +++ ssts-web/src/main/webapp/systemmanage/orgUnitExtView.js (.../orgUnitExtView.js) (revision 26249) @@ -175,17 +175,47 @@ }, timeout:240000//超时时间4分钟 }); - + //执行一次的定时器 setTimeout(function(){ - showResult("同步成功"); + showResult("同步失败"); mask.hide(); reloadTreeAndTable(); },240000);//超时时间4分钟 } }); } +function syncOrgUnitAndUser() { + Ext.MessageBox.confirm("请确认","是否确定要同步组织机构与用户信息?",function(button, text){ + if("yes" == button){ + var mask = new Ext.LoadMask(Ext.getBody(), { + msg : "同步组织机构中...
由于数据量比较大,更新时间可能比较长,请耐心等待。
如超过4分钟,页面还没有响应,请手动刷新页面!" + }); + mask.show(); + //超时时间4分钟 + var timeoutMillionSeconds = 240 * 1000; + DataSynchronizationTableManager.syncOrgUnitAndUser({ + callback:function(success){ + result = success; + if (success) { + showResult("同步成功"); + reloadTreeAndTable(); + } else { + showResult("同步失败"); + } + mask.hide(); + }, + errorHandler:function(msg){ + showResult("服务器正在处理中,请稍后刷新页面查看结果!"); + mask.hide(); + }, + timeout:timeoutMillionSeconds //超时时间4分钟 + }); + } + }); +} + function reloadTreeAndTable(){ root.reload(); @@ -301,6 +331,14 @@ syncOrgUnit(); } },'-',{ + text:"同步组织机构与用户数据", + tooltip : '同步组织机构与用户数据', + iconCls : 'icon_refresh', + hidden : !sstsConfig.showOrgunitAndUserSyncButton, + handler:function(){ + syncOrgUnitAndUser(); + } + },'-',{ text : '自动同步组织机构数据', tooltip:'自动同步组织机构数据', iconCls:'icon_refresh',