var DialogHelper={showLoading:function(a){!0==a?($("#dlg_loading").dialog("center"),$("#dlg_loading").dialog("open")):$("#dlg_loading").dialog("close")},showModelDialog:function(a,b){null!=a&&""!=a&&this.showModelAlert(a,"info")},showModelAlert:function(a,b,c){null!=a&&""!=a&&$.messager.alert("消息",a,b,c)},showMessage:function(a,b,c){$.messager.show({height:200,title:a,msg:b,showType:"show",timeout:c})},confirm:function(a,b,c){$.messager.confirm("提醒",a,function(a){a?b&&b():c&&c()})}, _createDialog:function(){var a="ID_dlg_"+Math.round(1E5*Math.random()),b="
";$("#dlg_Others").append(b);return a},load:function(a,b){LoginHelper.check();if(""==a)return this.showModelDialog("功能尚未实现"),!1;var c=b||{},d=this._createDialog();a=0Object.keys(c).length?a+("__dlgid="+d):a+("&__dlgid="+d);this.showLoading(!0);a=encodeURI(a);$("#"+d).load(a,function(){DialogHelper.showLoading(!1);var a=window[d];a||lgObj.width?("string"==typeof a.width&&-1!=a.width.indexOf("%")&&(a.width=parseInt(a.width)*$(window).width()/100),"string"==typeof a.height&&-1!=a.height.indexOf("%")&&(a.height=parseInt(a.height)*$(window).height()/100),$("#"+d).dialog({title:a.title,width:a.width,height:a.height,buttons:a.buttons,maximizable:a.maximizable, onResize:a.onResize,onClose:function(){e&&e();$(this).dialog("destroy").remove();window[d]=null;delete window[d];d=null},onOpen:function(){$(document).trigger("tabload")}}),$("#"+d).dialog("open"),f&&f()):DialogHelper.showModelAlert("网络调用失败,请重试。","error")});return!0},checkLoad:function(a){if(""==a)return this.showModelDialog("功能尚未实现"),!1;var b=this._createDialog();a=0Object.keys(c).length?a+("__dlgid="+d):a+("&__dlgid="+d);this.showLoading(!0);$("#"+d).load(a,function(){DialogHelper.showLoading(!1);var a=window[d];a||lgObj.width?("string"== typeof a.width&&-1!=a.width.indexOf("%")&&(a.width=parseInt(a.width)*$(window).width()/100),"string"==typeof a.height&&-1!=a.height.indexOf("%")&&(a.height=parseInt(a.height)*$(window).height()/100),$("#"+d).dialog({title:a.title,width:a.width,height:a.height,buttons:a.buttons,maximizable:a.maximizable,onResize:a.onResize,onClose:function(){e&&e();$(this).dialog("destroy").remove();window[d]=null;delete window[d];d=null},onOpen:function(){$(document).trigger("tabload")}}),$("#"+d).dialog("open"), f&&f()):DialogHelper.showModelAlert("网络调用失败,请重试。","error")});return!0},openHelp:function(a){this.load("/dlg/dlg.help.php",{page:a})},doAuditTask:function(a,b,c){this.load("/dlg/dlg.task.do.php?tskid="+a+"&teid="+b,null,function(){c&&c(a)})},viewAuditTask:function(a){this.load("/dlg/dlg.task.view.php?tskid="+a)},viewTerms:function(a){this.load("/dlg/dlg.device.selector.php",{stype:"view",val:a})}};