text: layui.define(['layer','element','dropdown'],function(h){var $=layui.$,element=layui.element,layer=layui.layer,dropdown=layui.dropdown;element.init();if(!/http(s*):\/\//.test(location.href)){let tips="请先将项目部署至web容器（Apache/Tomcat/Nginx/IIS/等），否则部分数据将无法显示";return Fun.toastr.alert(tips)}var i=$(document),$container=$('#fun-app'),FUN_APP='fun-app',THIS='layui-this',ICON_SPREAD='layui-icon-spread-left',SIDE_SHRINK='layui-side-shrink',THEME=[{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#772c6a',headerBgLogo:'#fff',headerLogofontColor:'#595959',menuLeftBg:'#23262e',menuLeftBgThis:'#772c6a',menuLeftBgHover:'#772c6a',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#197971',headerBgLogo:'#fff',headerLogofontColor:'#595959',menuLeftBg:'#23262e',menuLeftBgThis:'#20b598',menuLeftBgHover:'#20b598',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#722ed1',headerBgLogo:'#fff',headerLogofontColor:'#595959',menuLeftBg:'#23262e',menuLeftBgThis:'#722ed1',menuLeftBgHover:'#722ed1',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#772c6a',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#23262e',menuLeftBgThis:'#772c6a',menuLeftBgHover:'#772c6a',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#197971',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#23262e',menuLeftBgThis:'#20b598',menuLeftBgHover:'#20b598',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#722ed1',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#23262e',menuLeftBgThis:'#722ed1',menuLeftBgHover:'#722ed1',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#20b598',headerfontColor:'#fff',headerBgThis:'#197971',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#23262e',menuLeftBgThis:'#20b598',menuLeftBgHover:'#20b598',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#20b598',headerfontColor:'#fff',headerBgThis:'#197971',headerBgLogo:'#20b598',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#20b598',menuLeftBgHover:'#3b3f4b',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#722ed1',headerfontColor:'#fff',headerBgThis:'#197971',headerBgLogo:'#722ed1',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#722ed1',menuLeftBgHover:'#722ed1',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#00a65a',headerBgThis:'#197971',headerBgLogo:'#00a65a',headerLogofontColor:'#fff',menuLeftBg:'#222d32',menuLeftBgThis:'#00a65a',menuLeftBgHover:'#00a65a',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#23262e',headerfontColor:'#fff',headerBgThis:'#0c0c0c',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#23262e',menuLeftBgThis:'#20b598',menuLeftBgHover:'#3b3f4b',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#ffa4d1',headerfontColor:'#fff',headerBgThis:'#bf7b9d',headerBgLogo:'#e694bd',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#ffa4d1',menuLeftBgHover:'#ffa4d1',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#1e9fff',headerfontColor:'#fff',headerBgThis:'#0069b7',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#1e9fff',menuLeftBgHover:'#1e9fff',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#ffb800',headerfontColor:'#fff',headerBgThis:'#d09600',headerBgLogo:'#243346',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#ffb800',menuLeftBgHover:'#ffb800',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#e82121',headerfontColor:'#fff',headerBgThis:'#ae1919',headerBgLogo:'#0c0c0c',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#e82121',menuLeftBgHover:'#e82121',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#963885',headerfontColor:'#fff',headerBgThis:'#772c6a',headerBgLogo:'#243346',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#963885',menuLeftBgHover:'#963885',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#1e9fff',headerfontColor:'#fff',headerBgThis:'#0069b7',headerBgLogo:'#0069b7',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#1e9fff',menuLeftBgHover:'#1e9fff',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#ffb800',headerfontColor:'#fff',headerBgThis:'#d09600',headerBgLogo:'#d09600',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#ffb800',menuLeftBgHover:'#ffb800',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#e82121',headerfontColor:'#fff',headerBgThis:'#ae1919',headerBgLogo:'#d91f1f',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#e82121',menuLeftBgHover:'#e82121',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#e82121',headerfontColor:'#fff',headerBgThis:'#ae1919',headerBgLogo:'#772c6a',headerLogofontColor:'#fff',menuLeftBg:'#1f1f1f',menuLeftBgThis:'#e82121',menuLeftBgHover:'#e82121',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#963885',headerfontColor:'#fff',headerBgThis:'#772c6a',headerBgLogo:'#772c6a',headerLogofontColor:'#fff',menuLeftBg:'#2f4056',menuLeftBgThis:'#963885',menuLeftBgHover:'#963885',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#772c6a',headerBgLogo:'#1c2175',headerLogofontColor:'#fff',menuLeftBg:'#1c2175',menuLeftBgThis:'#772c6a',menuLeftBgHover:'#772c6a',menuLeftDlBg:'#272c91',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#772c6a',headerBgLogo:'#23287c',headerLogofontColor:'#fff',menuLeftBg:'#23287c',menuLeftBgThis:'#772c6a',menuLeftBgHover:'#772c6a',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},{headerBg:'#fff',headerfontColor:'#595959',headerBgThis:'#772c6a',headerBgLogo:'#772c6a',headerLogofontColor:'#fff',menuLeftBg:'#23287c',menuLeftBgThis:'#772c6a',menuLeftBgHover:'#23287c',menuLeftDlBg:'rgba(0,0,0,.3)',menuLeftfontColor:'rgba(255,255,255,.7)',menuLeftfontColorHover:'#fff',},];var j={v:'1.6.0',render:function(a){a.refreshUrl=a.refreshUrl||Fun.url('ajax/clearcache');a.themeid=a.themeid||0;a.maxTabs=a.maxTabs||15;j.initTabs({filter:'layui-layout-tabs',maxTabs:a.maxTabs,});j.initBgColor();j.hideLoading(a.loadingTime);j.initBodyTheme();j.api.bindEvent()},initBodyTheme:function(){$('.layui-side-menu .layui-nav-item').removeClass('layui-nav-hover');$('.layui-side-menu .layui-nav-item').find('dl').removeClass('layui-nav-child-drop');$('.layui-side-menu .layui-nav-item').find('dl').removeAttr('style');if($('.layui-layout-admin .layui-nav-header').length>0){height=$('.layui-nav-header ul').height();$('.layui-layout-admin .layui-pagetabs').attr('style','top:'+(60+height)+'px!important;')$('.layui-layout-admin .layui-body').attr('style','padding-bottom:'+(20+height)+'px!important;')return false}return false},hideLoading:function(c){c=c||350;var d=sessionStorage.getItem('funColorId');if(d==null){d=0}var e=THEME[d]['menuLeftBgThis'];if(d){$(document).find('.fun-loading').find('span').css('background-color',THEME[d]['menuLeftBgHover'])}setTimeout(function(){$(document).find('.fun-loading').fadeOut();if(layui.data('BackendLock').lock){layer.prompt({btn:[__('Unlock Now')],title:[__('Input Password'),'background:'+e+';color:'+THEME[d]['menuLeftfontColor']],closeBtn:0,formType:1,success:function(a,b){a.find('.layui-layer-btn0').css('background',e)}},function(a,b){if(a.length<1){Fun.toastr.error(__('Input Password'));return false}else{if(a===layui.data('BackendLock').lock){Fun.toastr.close(b);layui.data('BackendLock',{key:'lock',remove:true});Fun.toastr.success(__('Unlock Success'))}else{Fun.toastr.error(__('Password Error'));return false}}})}},c)},initTabs:function(a){a.filter=a.filter||null;a.maxTabs=a.maxTabs||15;j.listenScroll();j.listenSwitch(a);j.listenTabs(a);j.listenDeltab(a)},fullScreen:function(){var a=document.documentElement,reqFullScreen=a.requestFullScreen||a.webkitRequestFullScreen||a.mozRequestFullScreen||a.msRequestFullscreen;if(typeof reqFullScreen!=='undefined'&&reqFullScreen){reqFullScreen.call(a)}},exitScreen:function(){if(document.exitFullscreen){document.exitFullscreen()}else if(document.mozCancelFullScreen){document.mozCancelFullScreen()}else if(document.webkitCancelFullScreen){document.webkitCancelFullScreen()}else if(document.msExitFullscreen){document.msExitFullscreen()}},checkScreen:function(){var a=navigator.userAgent.toLocaleLowerCase();var b=navigator.platform.toLocaleLowerCase();var c=(/android/i).test(a)||((/iPhone|iPod|iPad/i).test(a)&&(/linux/i).test(b))||(/ucweb.*linux/i.test(a));var d=(/iPhone|iPod|iPad/i).test(a)&&!c;var e=(/Windows Phone|ZuneWP7/i).test(a);var f=$(window);var g=f.width();return!(!c&&!d&&!e&&g>768)},sideFlexible:function(){$container.toggleClass(SIDE_SHRINK);$container.toggleClass(FUN_APP);$('fun-tool').toggleClass(ICON_SPREAD);$('.layui-side-shrink .layui-side-menu .layui-nav-item').removeClass("layui-nav-hover")},listenTabs:function(c){var d=layui.sessionData("funTabInfo");var e=layui.sessionData('tabLayId');var f=e.id;if(f===null||f===undefined)return false;if(d){$("#layui-side-left-menu [data-url]").each(function(){var a=$(this).attr('lay-id');if(a===f){var b=$(this).data('tips')||$(this).attr('title'),url=$(this).data('url'),icon=$(this).find('i').attr('class');$(this).parents('.layui-nav-item').addClass('active');j.addTab({layId:a,url:url,text:b,icon:icon,maxTabs:c.maxTabs,});element.tabChange('layui-layout-tabs',f)}})}},delTab:function(a,b){var c=layui.sessionData("funTabInfo");if(c!=null){layui.sessionData("funTabInfo",{key:a,remove:true})}if(b===true){parent.layui.element.tabDelete('layui-tabs',a)}else{element.tabDelete('layui-layout-tabs',a)}a=$('.layui-tab .layui-tab-title').find('.layui-this').attr('lay-id');j.changeSessioinTabId(a);$('#layui-nav-righmenu').remove()},addTab:function(a){a.layId=a.layId||null;a.url=a.url||null;a.text=a.text||null;a.icon=a.icon||null;a.iframe=a.iframe||null;if($(".layui-tab .layui-tab-title li").length>=a.maxTabs){Fun.toastr.error(__('window is create by maxnum'));return false}j.changeSessioinTabId(a.layId);layui.sessionData('funTabInfo',{key:a.layId,value:a.layId,});var b=element;if(a.iframe)b=parent.layui.element;var c=j.checkLayId(a.layId),loadindex;if(!c){loadindex=layer.load();b.tabAdd('layui-layout-tabs',{title:' <i class="'+a.icon+'"></i><cite>'+a.text+'</cite>',content:'<iframe id="'+a.layId+'" width="100%" height="100%" frameborder="no"   src="'+a.url+'"></iframe>',id:a.layId,})}else{loadindex=layer.load();$(".layui-tab-content .layui-show").find("iframe")[0].contentWindow.location.reload()}$('#layui-nav-righmenu').remove();layer.close(loadindex);b.tabChange('layui-layout-tabs',a.layId)},changeSessioinTabId:function(a){if(a){layui.sessionData('tabLayId',{key:'id',value:a})}else{layui.sessionData('tabLayId',null)}},checkLayId:function(b){var c=false;$(".layui-tab .layui-tab-title li").each(function(){var a=$(this).attr('lay-id');if(a!=null&&a===b){c=true}});return c!==false},buildBgColorHtml:function(){var c='';var d=sessionStorage.getItem('funColorId');if(d==null||d===''){d=0}$.each(THEME,function(a,b){if(a===d){c+='<li class="layui-this" lay-event="setTheme" data-color="'+a+'">\n'}else{c+='<li  lay-event="setTheme" data-color="'+a+'">\n'}c+='<a href="javascript:;" data-skin="skin-blue" style="" class="clearfix full-opacity-hover">\n'+'<div><span style="display:block; width: 20%; float: left; height: 12px; background: '+b.headerBgLogo+';"></span><span style="display:block; width: 80%; float: left; height: 12px; background: '+b.headerBg+';"></span></div>\n'+'<div><span style="display:block; width: 20%; float: left; height: 40px; background: '+b.menuLeftBg+';"></span><span style="display:block; width: 80%; float: left; height: 40px; background: #f4f5f7;"></span></div>\n'+'</a>\n'+'</li>'});return c},initBgColor:function(){var a=sessionStorage.getItem('funColorId');if(a==null||a===''){a=0}var b=THEME[a];var c='.layui-layout-admin .layui-header ul li a{color:'+b.headerfontColor+'!important;}'+'.layui-layout-admin .layui-header{background-color:'+b.headerBg+'!important;}\n'+'.layui-header>ul>.layui-nav-item.layui-this:hover{color:'+b.headerBgThis+'!important;}\n'+'.layui-header .layui-nav .layui-nav-child dd.layui-this a{background-color:'+b.headerBg+'!important;}\n'+'.layui-layout-admin .layui-logo {background-color:'+b.headerBgLogo+'!important;}\n'+'.layui-layout-admin .layui-logo{color:'+b.headerfontColor+'!important;}\n'+'.layui-layout-admin .layui-logo cite{color:'+b.headerLogofontColor+'!important;}\n'+'.layui-layout-admin .layui-side-scroll .layui-nav-tree .layui-nav-item a{color:'+b.menuLeftfontColor+'}\n'+'.layui-layout-admin .layui-side-scroll .layui-nav-tree .layui-nav-item>a:hover{color:'+b.menuLeftfontColorHover+'!important;}\n'+'.layui-layout-admin .layui-side-scroll .layui-nav-tree .layui-nav-item>a:hover{background-color:'+b.menuLeftBgHover+'!important;}\n'+'.layui-layout-admin .layui-side-scroll .layui-nav-tree .layui-nav-item>.layui-nav-child:before{background-color:'+b.menuLeftBg+'!important;}\n'+'.layui-layout-admin .layui-side-scroll .layui-nav-tree>.layui-nav-item>a:before{background-color:'+b.menuLeftBgHover+'!important;}\n'+'.layui-side.layui-bg-black,.layui-side.layui-bg-black>.layui-side-scroll>ul {background-color:'+b.menuLeftBg+'!important;}\n'+'.layui-side-scroll .layui-nav .layui-nav-child a:hover:not(.layui-this){background-color:'+b.menuLeftBgHover+'!important;}\n'+'.layui-layout-admin .layui-nav-tree .layui-this,.layui-layout-admin .layui-nav-tree .layui-this>a,'+'.layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this,.layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a {background-color: '+b.menuLeftBgThis+' !important;}\n'+'.layui-pagetabs .layui-tab-title li:hover,.layui-pagetabs .layui-tab-title li.layui-this{ color:'+b.menuLeftBgThis+'!important;}\n'+'.layui-layout-admin .layui-nav-tree .layui-nav-bar{background:'+b.menuLeftBgThis+'!important;}\n';$('#fun-bg-color').html(c)},listenSwitch:function(b){b.filter=b.filter||null;element.on('tab('+b.filter+')',function(){var a=$(this).attr('lay-id');j.changeSessioinTabId(a);j.listenSwitchIframe(a);j.scrollPostion()})},listenDeltab:function(b){b.filter=b.filter||null;element.on('tabDelete('+b.filter+')',function(){var a=$(this).parent().attr('lay-id');j.delTab(a)})},listenScroll:function(a){var b=$('.layui-tab  .layui-tab-title');var c=b.scrollLeft();if(a==='left'){b.animate({scrollLeft:c-550},100)}else{b.animate({scrollLeft:c+550},100)}},listenSwitchIframe:function(a){$("#layui-side-left-menu").find("li,dd").removeClass("layui-this").removeClass("layui-nav-itemed");$("#layui-side-left-menu > li dl.layui-nav-child").removeAttr('style');$("#layui-side-left-menu a[data-url]").each(function(){if($(this).attr('lay-id')===a){$(this).parents("dd").addClass("layui-nav-itemed");$(this).parents("li").addClass("layui-nav-itemed");$(this).parent().removeClass("layui-nav-itemed").addClass("layui-this")}})},scrollPostion:function(){var a=$('.layui-tab .layui-tab-title');var b=0;a.children("li").each(function(){if($(this).hasClass('layui-this')){return false}else{b+=$(this).outerWidth()}});a.animate({scrollLeft:b-a.width()/4},200)},events:{opentheme:function(){var a=layer.load(0,{shade:false,time:2*1000});var b=(document.documentElement.clientHeight)-60;var c=j.buildBgColorHtml();var d=[0,1,2,3,4,5,6];var e=d[Math.floor(Math.random()*d.length+1)-1];var f='<div class="layui-fun-color">\n'+'<div class="color-title">\n'+'<span>'+__('Theme Color')+'</span>\n'+'</div>\n'+'<div class="color-content">\n'+'<ul>\n'+c+'</ul>\n'+'</div>\n'+'</div>';layer.open({type:1,title:false,closeBtn:0,shade:0.2,anim:e,shadeClose:true,isOutAnim:true,id:'layui-fun-color',area:['340px',b+'px'],offset:'rb',content:f,});layer.close(a)},setTheme:function(a){var b=a.data('color');$('.layui-fun-color .color-content ul .layui-this').attr('class','');$(this).attr('class','layui-this');sessionStorage.setItem('funColorId',b);j.initBgColor()},lockScreen:function(){var f=sessionStorage.getItem('funColorId');if(f==null){f=0}layer.prompt({btn:[__('Lock Now')],title:[__('Set Password To Lock Screen'),'background:'+THEME[f]['menuLeftBgThis']+';color:'+THEME[f]['menuLeftfontColor']],formType:1,success:function(a,b){a.find('.layui-layer-btn0').css('background',THEME[f]['menuLeftBgThis'])},yes:function(c,d){var e=(d.find(".layui-layer-input").val())if(e.length<1){Fun.toastr.error(__('Input Password'));return false}else{layui.data('BackendLock',{key:'lock',value:e});layer.close(c);layer.prompt({btn:[__('Unlock')],title:[__('Input Password'),'background:'+THEME[f]['menuLeftBgThis']+';color:'+THEME[f]['menuLeftfontColor']],closeBtn:0,formType:1,success:function(a,b){a.find('.layui-layer-btn0').css('background',THEME[f]['menuLeftBgThis'])}},function(a,b){if(a.length<1){Fun.toastr.error(__('Input Password'));return false}else{if(a===layui.data('BackendLock').lock){layer.close(b);$(".yy").hide();layui.data('BackendLock',{key:'lock',remove:true});Fun.toastr.success(__('Unlock Success'))}else{Fun.toastr.error(__('Password Error'));return false}}})}}},function(a,b){})},flexible:function(){j.sideFlexible()},rightPage:function(){j.listenScroll('right')},leftPage:function(){j.listenScroll('left')},showtips:function(a,b){if($container.hasClass(SIDE_SHRINK)){if(b===1){let tip=a.data('tips');layer.tips(tip,a)}else{layer.close()}}},fullscreen:function(a){var b='layui-icon-screen-full',SCREEN_REST='layui-icon-screen-restore',iconElem=a.children("i");if(iconElem.hasClass(b)){j.fullScreen();iconElem.addClass(SCREEN_REST).removeClass(b)}else{j.exitScreen();iconElem.addClass(b).removeClass(SCREEN_REST)}},shade:function(){j.sideFlexible()},clear:function(b){layui.sessionData('funTabInfo',{key:'fun-safe',value:'',});layui.sessionData('funTabInfo',{key:'fun-info',value:'',});var c=b.data('ajax')?b.data('ajax'):j.refreshUrl;Fun.ajax({url:c},function(a){Fun.toastr.success(a.msg);$(".layui-tab-content .layui-show").find("iframe")[0].contentWindow.location.reload()},function(a){Fun.toastr.error(a.msg);$(".layui-tab-content .layui-show").find("iframe")[0].contentWindow.location.reload()})},refresh:function(){Fun.toastr.success(__('Refresh Success'));Fun.toastr.loading('',setTimeout(function(){$(".layui-tab-content .layui-show").find("iframe")[0].contentWindow.location.reload();Fun.toastr.close()},1200))},closeThisTabs:function(){var a=$(".layui-tab .layui-tab-title li.layui-this").attr('lay-id');if(a){j.delTab(a)}},closeOtherTabs:function(d){$(".layui-tab .layui-tab-title li").each(function(a,b){var c=$(b).attr('lay-id');if(d==='all'&&c){j.delTab(c)}else{if(c&&!$(this).hasClass(THIS)){j.delTab(c)}}})},closeAllTabs:function(){j.events.closeOtherTabs('all')},logout:function(b){var c=b.data('ajax');Fun.toastr.confirm(__('Are you sure todo this'),function(){Fun.ajax({url:c,method:'post'},function(a){if(a.code>0){Fun.toastr.success(a.msg,setTimeout(function(){window.location=a.url},2000))}else{Fun.toastr.error(a.msg)}})})},langset:function(b){var c=b.data('ajax');Fun.ajax({url:c},function(a){Fun.toastr.success(a.msg,setTimeout(function(){window.location.reload()},1500))},function(a){Fun.toastr.error(a.msg)})}},api:{bindEvent:function(){i.on('click','*[lay-id]',function(){var a=$(this),target=a.prop('target'),url=a.data('url')?a.data('url'):a.data('iframe'),layId=a.attr('data-id'),text=a.data('tips')||$(this).attr('title'),icon=a.find('i').attr('class'),iframe=a.has('data-iframe')?true:false;layId=layId?layId:url;var b=a.parent();var d=a.parents('.layui-nav-header')var e=b.siblings('li');var c=b.siblings('li.active').children('.layui-nav-child')if(!a.data("url")&&d.length>0){return false}if(!a.data("url")){var f=b.children('.layui-nav-child');var g=f.height();if(!j.checkScreen()&&$('.'+SIDE_SHRINK).length>0){return false}f.css({display:"block"});if(b.hasClass("layui-nav-itemed")){b.addClass('active');b.height('auto');if(e.hasClass('active')){c.css('display','block');c.animate({height:0},function(){c.removeAttr('style')});b.siblings('li.active').animate({height:'auto'},function(){b.siblings('li.active').removeClass('active')})}f.height(0);f.animate({height:g+"px"},function(){f.css({height:"auto"})})}else{b.removeClass('active');f.animate({height:0},function(){f.removeAttr("style")})}}else{b.addClass('active');if(e.hasClass('active')){c.animate({height:0},function(){c.removeAttr('style')});b.siblings('li.active').animate({height:'55px'},function(){b.siblings('li.active').removeClass('active')})}if(target==='_blank'){window.open(url,"_blank");return false}let options={layId:layId,text:text,url:url,icon:icon,iframe:iframe};j.addTab(options);if(j.checkScreen()){$container.removeClass(SIDE_SHRINK).addClass('fun-app')}c.attr('style','display:block!important;')}});i.on('click','*[lay-event]',function(){var a=$(this),attrEvent=a.attr('lay-event');j.events[attrEvent]&&j.events[attrEvent].call(this,a)});i.on("mouseenter",".layui-side-shrink .layui-nav-tree>.layui-nav-item,.layui-side-shrink .layui-nav-itemed",function(){var a=$(this);if(!j.checkScreen()){var b=a.offset().top;a.removeClass('layui-nav-itemed');a.addClass('layui-nav-hover');a.children('dl').addClass('layui-nav-child-drop');a.children('dl').css('top',b+'px')}}).on("mouseleave",".layui-side-shrink .layui-nav-tree>.layui-nav-item",function(){var a=$(this);a.removeClass('layui-nav-hover');a.find('dl').removeClass('layui-nav-child-drop');a.find('dl').removeAttr('style')});i.on("mouseenter",".layui-side-shrink .layui-side-menu .layui-nav-hover dd",function(){var a=$(this);if(!j.checkScreen()){if(a.find('dl')){var b=a.offset().top;var c=a.offset().left+a.width();a.children('dl').addClass('layui-nav-child-drop');a.children('dl').css('top',b+'px');a.children('dl').css('left',+c+'px')}}}).on("mouseleave",".layui-side-shrink .layui-side-menu .layui-nav-child-drop,"+".layui-side-shrink .layui-side-menu .layui-nav-child-drop>dd",function(){var a=$(this);a.find('dl').removeClass('layui-nav-child-drop');a.siblings('dd').children('dl').removeClass('layui-nav-child-drop');a.find('dl').removeAttr('style')});dropdown.render({elem:'#layui-tab-header',trigger:'contextmenu',isAllowSpread:false,style:'width: 130px',id:'layui-tab-header-menu',data:[{title:'<a href="javascript:;" lay-event="refresh"><i class="layui-icon layui-icon-refresh"></i>  刷新当前页</a>',id:'refresh'},{type:'-'},{title:'<a href="javascript:;" lay-event="closeThisTabs">&nbsp;<i class="layui-icon layui-icon-close-fill"></i>  关闭当前页</a>',id:'closeThisTabs'},{type:'-'},{title:'<a href="javascript:;" lay-event="closeOtherTabs">&nbsp;<i class="layui-icon layui-icon-unlink"></i>  关闭其它页</a>',id:'closeOtherTabs'},{type:'-'},{title:'<a href="javascript:;" lay-event="closeAllTabs">&nbsp;<i class="layui-icon layui-icon-close"></i>  关闭全部页</a>',id:'closeAllTabs'}]});i.on('click','.layui-body,.layui-header,.layui-side-menu,.layui-tab,.layui-right-shade',function(){$('.layui-dropdown').remove()});$(window).on("resize",function(){j.initBodyTheme()})},}};h("Backend",j)});