!function(a){"use strict";var b,c,d,e,f={},g=888,h=1;a.extend({lay:{defaults:{title:"提示信息",shade:!0,shadeClose:!1,params:null,btnText:["确定","取消"],ok:null,cancel:null,layControl:!0,preventClose:!1,content:null,lockScreen:!0,area:[]},createLay:function(i){var j,k=i.content||"",l=i.type||1;j=1==l||2==l?a.extend({},a.lay.defaults,i):a.extend({},a.lay.defaults,i.options);var m="false"!=j.title&&0!=j.title&&j.title;1!=l&&2!=l||(m="false"!=j.title&&0!=j.title&&j.title!=a.lay.defaults.title&&j.title);var n="false"!=j.shade&&0!=j.shade,o="false"!=j.shadeClose&&0!=j.shadeClose,p=j.params,q=j.btnText[0],r=j.btnText[1],s=i.ok||j.ok,t=i.cancel||j.cancel,u="false"!=j.layControl&&0!=j.layControl,v="false"!=j.preventClose&&0!=j.preventClose,w="false"!=j.lockScreen&&0!=j.lockScreen;c=j.area[0],d=j.area[1],f={"lay-shade":"lay-shade","lay-body":"lay-body lay-msg","lay-title":"lay-title","lay-control":"lay-control","lay-close":"lay-close","lay-content":"lay-content","lay-btns":"lay-btns","lay-btn-confirm":"lay-btn-confirm","lay-btn-cancel":"lay-btn-cancel"},1!=l&&2!=l||(f["lay-body"]="lay-body lay-lay"),(1==l&&"object"!=typeof k||2==l)&&(f["lay-body"]="lay-body lay-lay lay-lay-string"),2==l&&(k='<iframe class="lay-iframe" src="'+k+'"></iframe>');var x={a:'<div class="'+f["lay-shade"]+'"></div>',b:'<div class="'+f["lay-body"]+'">',c:'<div class="'+f["lay-title"]+'">'+m+"</div>",d:'<div class="'+f["lay-control"]+'"><i class="'+f["lay-close"]+'">&times;</i></div>',e:'<div class="'+f["lay-content"]+'" >'+k+"</div>",f:'<div class="'+f["lay-btns"]+'">',g:'<a class="'+f["lay-btn-confirm"]+'">'+q+"</a>",h:'<a class="'+f["lay-btn-cancel"]+'">'+r+"</a>",fe:"</div>",be:"</div>"},y="";return 1==l&&"object"==typeof k?(e=k.attr("style")||"",k.show().addClass("lay-wrap").wrap(x.b),n&&k.parents(".lay-body").before(x.a),m&&k.parents(".lay-body").prepend(x.c),u&&k.parents(".lay-body").prepend(x.d)):(n&&(y+=x.a),y+=x.b,5!=l&&6!=l&&(m&&(y+=x.c),u&&(y+=x.d)),y+=x.e,3!=l&&4!=l||(y+=x.f,y+=x.g,4==l&&(y+=x.h),y+=x.fe),y+=x.be),a("body").append(y),a(".lay-shade:last").css({"z-index":g++}).attr("id","lay-shade-"+h),o&&a(".lay-shade:last").addClass("lay-shade-close"),a.lay.refresh(),a(".lay-body:last").css({"z-index":g++}).attr({id:"lay-body-"+h,layCounter:h++}),v||a(".lay-btn-confirm,.lay-close,.lay-btn-cancel,.lay-shade-close").click(function(){b=a(".lay-body:last").attr("layCounter");var c=a(this);a(this).hasClass("lay-btn-confirm")?s&&(p?s(p):s()):(a(this).hasClass("lay-btn-cancel")||a(this).hasClass("lay-close")||a(this).hasClass("lay-shade-close"))&&t&&t(c),a.lay.close(b)}),w&&a("html").addClass("lay-lock"),h-1},open:function(b){return a.lay.createLay(b)},close:function(b){b=b||a(".lay-body:last").attr("layCounter"),a("#lay-shade-"+b).remove(),a("#lay-body-"+b).hasClass("lay-msg")||a("#lay-body-"+b).hasClass("lay-lay-string")?a("#lay-body-"+b).remove():a("#lay-body-"+b).hasClass("lay-lay")&&!a("#lay-body-"+b).hasClass("lay-lay-string")&&a("#lay-body-"+b).find(".lay-wrap").siblings().remove().end().unwrap().removeClass("lay-wrap").attr("style",e).hide(),a(".lay-shade").length<1&&a("html").removeClass("lay-lock")},closeAll:function(c){switch(c){case"msg":a(".lay-msg").each(function(){b=a(this).attr("layCounter"),a(this).remove(),a("#lay-shade-"+b).remove()}),a(".lay-shade").length<1&&a("html").removeClass("lay-lock");break;case"lay":a(".lay-lay").each(function(){b=a(this).attr("layCounter"),a("#lay-shade-"+b).remove(),a(this).hasClass("lay-lay-string")?a(this).remove():a(this).find(".lay-wrap").siblings().remove().end().unwrap().removeClass("lay-wrap").hide()}),a(".lay-shade").length<1&&a("html").removeClass("lay-lock");break;default:a(".lay-msg").remove(),a(".lay-lay").not("lay-lay-string").find(".lay-wrap").siblings().remove().end().unwrap().removeClass("lay-wrap").hide(),a(".lay-lay-string").remove(),a(".lay-shade").remove(),a("html").removeClass("lay-lock")}},alert:function(b,c,d,e){var f="function"==typeof c;return f&&(e=d,d=c),a.lay.open({type:3,content:b,ok:d,cancel:e,options:f?{}:c})},confirm:function(b,c,d,e){var f="function"==typeof c;return f&&(e=d,d=c),a.lay.open({type:4,content:b,ok:d,cancel:e,options:f?{}:c})},load:function(){},prompt:function(){},refresh:function(b){var e=a(window).width(),f=a(window).height();a(".lay-body:last .lay-body,.lay-body:last .lay-wrap").css({"max-width":e-50,"max-height":f-50}),"auto"!=c&&a(".lay-body:last .lay-body,.lay-body:last .lay-wrap").css({width:c}),"auto"!=d&&a(".lay-body:last .lay-body,.lay-body:last .lay-wrap").css({height:d}),a(".lay-body:last .lay-wrap").css("height","");var g=-a(".lay-body:last").width()/2,h=-a(".lay-body:last").height()/2;a(".lay-body:last").css({"margin-left":g,"margin-top":h}),a(".lay-body:last .lay-wrap").css({height:a(".lay-body:last").height()-a(".lay-title:last").height()}),b&&(b[0]&&"auto"!=b[0]&&(c=b[0],a(".lay-body:last .lay-body,.lay-body:last .lay-wrap").css({width:c})),b[1]&&"auto"!=b[1]&&(d=b[1],a(".lay-body:last .lay-body,.lay-body:last .lay-wrap").css({height:d})))}}}),a.alert=a.lay.alert,a.confirm=a.lay.confirm,a.prompt=a.lay.prompt,a(window).keyup(function(b){switch(b.keyCode){case 27:a(".lay-btn-cancel").length&&a(".lay-btn-cancel").click(),a.lay.close();break;case 13:a(".lay-btn-confirm").length&&a(".lay-btn-confirm").click()}}),a.fn.extend({tip:function(b,c){var d=a(this),c=c||[],e=c[0]||1;e=parseInt(e);var f=c[1]||"bottom";d.focus();var h='<div class="tip-wrap style-'+e+'"><i class="tip-i tip-i-1"></i><i class="tip-i tip-i-2"></i><div class="tip-msg">'+b+"</div></div>";d.next("div").hasClass("tip-wrap")?d.next("div").find(".tip-msg").html(b).end().stop().fadeIn():(d.after(h),d.next("div").stop().fadeIn());var i=d.next(".tip-wrap"),j=d.offset().left,k=d.offset().top,l=d.outerWidth(),m=d.outerHeight(),n=d.next(".tip-wrap").outerWidth(),o=d.next(".tip-wrap").outerHeight(),p="tip-top tip-right tip-bottom tip-left",q="style-1 style-2 style-3";switch(i.removeClass(q).addClass("style-"+e).removeClass(p).css({"z-index":g++}),f){case"top":i.offset({top:k-o-8,left:j}).addClass("tip-top");break;case"right":i.offset({top:k+(m-o)/2,left:j+l+15}).addClass("tip-right");break;case"left":i.offset({top:k,left:j-n-8}).addClass("tip-left");break;case"bottom":default:i.offset({top:k+m+8}).addClass("tip-bottom"),d.hasClass("input-1")||d.hasClass("textarea")?i.offset({left:j}):(i.offset({left:j+(l-n)/2}),d.next(".tip-wrap").find(".tip-i").css({left:"50%","margin-left":"-8px"})),a(window).width()-j<100&&("top"==f||"bottom"==f)&&(i.offset({left:j+(l-n)}),d.next(".tip-wrap").find(".tip-i").css({left:"auto",right:"8px"}))}},hideTip:function(){var b=a(this);b.next("div").hasClass("tip-wrap")&&b.next(".tip-wrap").stop().fadeOut()},refreshTip:function(){var b=a(this);b.next("div").hasClass("tip-wrap")&&b.next(".tip-wrap").css({top:b.offset().top+a(this).outerHeight()+8})}})}(jQuery);var core_ops={init:function(){this.defaults={smallWidth:640,mediumWidth:990},this.adjustWinWidth(),this.tab(),this.showPanel(),this.hasTip(),this.eventBind()},eventBind:function(){$(".box_left_nav,.menu_list").css({height:$(window).height()-170}),$(".menu_switch").click(function(){$(".menu_list li span").hide(),$(this).parents(".box_wrap").hasClass("open")?($(".box_left_nav,.menu_switch").stop().animate({width:"90px"}),$(".box_main").stop().animate({"margin-left":"90px"}),$(".menu_switch i").eq(0).show(),$(".menu_switch i").eq(1).hide()):($(".box_left_nav,.menu_switch").stop().animate({width:"200px"}),$(".box_main").stop().animate({"margin-left":"200px"}),$(".menu_switch i").eq(0).hide(),$(".menu_switch i").eq(1).show(),$(".menu_list li span").each(function(){var a=$(".menu_list li span").index(this);$(this).stop().delay(1e3*parseInt(a/3)).fadeIn()})),$(".box_wrap").toggleClass("open")}),$(".menu_list li").hover(function(){$(this).parents(".box_wrap").hasClass("open")||$(this).tip($(this).find("span").text(),[3,"right"])},function(){$(this).hideTip()}),$(window).resize(function(){core_ops.adjustWinWidth(),$(".box_left_nav,.menu_list").css({height:$(window).height()-170})}),$(".box_left_nav .menu_list").mCustomScrollbar({theme:"minimal"}),$(".edit-mode").length&&$(".edit-mode").each(function(){var a=$(this);a.find(".select-all").length&&a.find(".select-all").change(function(){0==$(this).prop("checked")?$(this).parents(".edit-mode").find("input:checkbox").not($(this)).prop("checked",!1):$(this).parents(".edit-mode").find("input:checkbox").not($(this)).prop("checked",!0)});var b=a.data("elem"),c=a.data("class"),d="thead tr,thead th,.disabled";a.find(d).css("cursor","default"),a.on("click",b,function(a){$(this).hasClass("disabled")||($(this).parents(".edit-mode").find(b).not($(this)).removeClass("selected").removeClass(c),$(this).not(d).toggleClass("selected "+c),$(this).not("thead tr").find("input:checkbox").length&&(0==$(this).find("input:checkbox").prop("checked")&&$(this).hasClass("selected")?$(this).find("input:checkbox").prop("checked",!0):$(this).hasClass("selected")||$(this).find("input:checkbox").prop("checked",!1),$(".edit-mode").on("click","input:checkbox",function(a){a.stopPropagation()})),a.stopPropagation())})});var a=new Image;a.src="https://static-s.styd.cn/201606201358/loading.gif"},adjustWinWidth:function(){var a=$(window).width();a<=this.defaults.smallWidth?$("body").removeClass("body-medium").removeClass("body-large").addClass("body-small"):a>this.defaults.smallWidth&&a<=this.defaults.mediumWidth?$("body").removeClass("body-small").removeClass("body-large").addClass("body-medium"):$("body").removeClass("body-small").removeClass("body-medium").addClass("body-large")},prettifySelect:function(){$(".select-1").each(function(){var a=$(this),b=a.find("option").length,c='<div class="select-wrap">';c+='<div class="select-selected"><span>'+a.val()+'</span><i class="icon_club">&#xe614;</i></div>',c+='<div class="select-options">',c+="<ul>";for(var d=0;d<b;d++)c+="<li>"+a.find("option").eq(d).text()+"</li>";c+="</ul></div></div>",a.after(c)}),$(".select-options").each(function(){$(this).css({width:$(this).parents(".select-wrap").width()})}),$(".select-selected").click(function(){for(var a=$(this).parents(".select-wrap").prev(".select-1").find("option").length,b="",c=0;c<a;c++)b+="<li>"+$(this).parents(".select-wrap").prev(".select-1").find("option").eq(c).text()+"</li>";$(this).parents(".select-wrap").find("ul li").remove(),$(this).parents(".select-wrap").find("ul").append(b);var d=$(this).find("span").text();$(this).parents(".select-wrap").find(".select-options").toggle(),$(this).parents(".select-wrap").find(".select-options li").each(function(){$(this).text()==d&&$(this).addClass("current").siblings("li").removeClass("current")})}),$(".select-wrap").on("click",".select-options li",function(){$(this).parents(".select-options").hide(),$(this).parents(".select-wrap").find(".select-selected span").text($(this).text());var a=$(".select-options li").index(this);$(this).parents(".select-wrap").prev(".select-1").val($(this).parents(".select-wrap").prev(".select-1").find("option").eq(a).attr("value")).find("option").eq(a).attr("selected","selected").siblings("option").removeAttr("selected"),$(this).hasClass("current")||$(this).parents(".select-wrap").prev(".select-1").change()}),$(document).bind("click",function(a){var b=$(a.target);0==b.closest(".select-wrap").length&&$(".select-options").hide()})},tab:function(){$(".tab-1 .tab-title li").length&&$(".tab-1 .tab-title li").click(function(){$(this).addClass("current").siblings("li").removeClass("current");var a=$(".tab-1 .tab-title li").index(this);$(this).parents(".tab-1").find(".tab-each").eq(a).show().siblings(".tab-each").hide()})},showPanel:function(){var a=null;$(".has-panel").length&&$(".has-panel").each(function(){var b=$(this),c=b.offset().top+b.height();$("."+b.data("panel")).css("top",c),b.hover(function(){clearTimeout(a),$("."+b.data("panel")).stop().slideDown()},function(){a=null,a=setTimeout(function(){$("."+b.data("panel")).stop().slideUp()},500)}),$("."+b.data("panel")).hover(function(){clearTimeout(a)},function(){a=$("."+b.data("panel")).stop().slideUp()})})},hasTip:function(){$("i.icon_club").each(function(){$(this).hover(function(){switch(escape($(this).text())){case"%uE610":$(this).tip("编辑",[3,"bottom"]);break;case"%uE611":$(this).tip("删除",[3,"bottom"]);break;case"%uE613":$(this).tip("添加",[3,"bottom"]);break;case"%uE616":$(this).tip("查看",[3,"bottom"]);break;case"%uE61E":$(this).tip("生成",[3,"bottom"]);break;case"%uE61C":$(this).tip("导入",[3,"bottom"]);break;case"%uE61B":$(this).tip("导出",[3,"bottom"])}},function(){$(this).hideTip()})}),$(".hastips .icon_club,.hastip").each(function(){$(this).hover(function(){$(this).data("tip")&&$(this).tip($(this).data("tip"),[3,"bottom"])},function(){$(this).hideTip()})})}};$(document).ready(function(){core_ops.init()});