var DialogHelper={showLoading:function(a){!0==a?($("#dlg_loading").dialog("center"),$("#dlg_loading").dialog("open")):$("#dlg_loading").dialog("close")},showModelDialog:function(a,d){null!=a&&""!=a&&this.showModelAlert(a,"info")},showModelAlert:function(a,d,b){null!=a&&""!=a&&$.messager.alert("消息",a,d,b)},showMessage:function(a,d,b){$.messager.show({height:200,title:a,msg:d,showType:"show",timeout:b})},confirm:function(a,d){$.messager.confirm("提醒",a,function(a){a&&d&&d()})},_createDialog:function(){var a=
"ID_dlg_"+Math.round(1E5*Math.random()),d="
";$("#dlg_Others").append(d);return a},load:function(a,d){LoginHelper.check();if(""==a)return this.showModelDialog("功能尚未实现"),!1;var b=d||{},c=this._createDialog();a=0Object.keys(b).length?
a+("__dlgid="+c):a+("&__dlgid="+c);this.showLoading(!0);$("#"+c).load(a,function(){DialogHelper.showLoading(!1);var a=window[c];"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);$("#"+c).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[c]=null;delete window[c];c=null},onOpen:function(){$(document).trigger("tabload")}});$("#"+c).dialog("open");f&&f()});return!0},mload:function(a,d){if(""==a)return this.showModelDialog("功能尚未实现"),!1;var b=d||{},c=this._createDialog();a=0Object.keys(b).length?a+("__dlgid="+c):a+("&__dlgid="+c);this.showLoading(!0);$("#"+c).load(a,function(){DialogHelper.showLoading(!1);
console.log(2);var a=window[c];"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);$("#"+c).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[c]=null;delete window[c];c=null},onOpen:function(){$(document).trigger("tabload")}});
$("#"+c).dialog("open");f&&f()});return!0},openHelp:function(a){this.load("/dlg/dlg.help.php",{page:a})},doAuditTask:function(a,d,b){this.load("/dlg/dlg.task.do.php?tskid="+a+"&teid="+d,null,function(){b&&b(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})}};