var DialogHelper={showLoading:function(a){!0==a?($("#dlg_loading").dialog("center"),$("#dlg_loading").dialog("open")):$("#dlg_loading").dialog("close")},showModelDialog:function(a,c){null!=a&&""!=a&&this.showModelAlert(a,"info")},showModelAlert:function(a,c,d){null!=a&&""!=a&&$.messager.alert("消息",a,c,d)},showToast:function(a,c,d){var b=document.getElementById("toast");null==b?this.showModelAlert(a,"info"):(b.textContent=a,b.className="toast "+c,b.style.display="block",b.classList.add("show"),
setTimeout((()=>{b.classList.remove("show");b.classList.add("hide");setTimeout((()=>{b.style.display="none";b.classList.remove("hide")}),400)}),d))},showMessage:function(a,c,d){$.messager.show({height:200,title:a,msg:c,showType:"show",timeout:d})},confirm:function(a,c,d){$.messager.confirm("提醒",a,function(a){a?c&&c():d&&d()})},_createDialog:function(){var a="ID_dlg_"+Math.round(1E5*Math.random()),c="
";
$("#dlg_Others").append(c);return a},load:function(a,c){LoginHelper.check();if(""==a)return this.showModelDialog("功能尚未实现"),!1;var d=c||{},b=this._createDialog();a=0Object.keys(d).length?a+("__dlgid="+b):a+("&__dlgid="+b);this.showLoading(!0);a=encodeURI(a);$("#"+b).load(a,function(){DialogHelper.showLoading(!1);var a=window[b];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),$("#"+b).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[b]=null;delete window[b];b=null},onOpen:function(){$(document).trigger("tabload")}}),$("#"+b).dialog("open"),f&&f()):DialogHelper.showModelAlert("网络调用失败,请重试。",
"error")});return!0},checkLoad:function(a){if(""==a)return this.showModelDialog("功能尚未实现"),!1;var c=this._createDialog();a=0Object.keys(d).length?a+("__dlgid="+b):a+("&__dlgid="+b);this.showLoading(!0);$("#"+b).load(a,function(){DialogHelper.showLoading(!1);var a=window[b];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),$("#"+b).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[b]=null;delete window[b];b=null},onOpen:function(){$(document).trigger("tabload")}}),$("#"+b).dialog("open"),f&&f()):DialogHelper.showModelAlert("网络调用失败,请重试。","error")});return!0},openHelp:function(a){this.load("/dlg/dlg.help.php",{page:a})},doAuditTask:function(a,c,d){this.load("/dlg/dlg.task.do.php?tskid="+a+"&teid="+c,null,function(){d&&d(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})}};