var Util={isEmpty:function(a){return $.isArray(a)?0==a.length:$.isPlainObject(a)?$.isEmptyObject(a):"undefined"==typeof a||null===a||""==a},reloadDataGrid:function(a){$("#"+a).datagrid("reload")},reloadTreeGrid:function(a){$("#"+a).treegrid("reload")},array2Object:function(a){for(var b={},c=0,e=a.length;c=d?(a.width=b*e/d,a.height=c,a.style.marginLeft="-"+parseInt((a.width-b)/2)+"px"): (a.width=b,a.height=c*d/e,a.style.marginTop="-"+parseInt((a.height-c)/2)+"px");return a},getDeviceTypeIcon:function(a){var b=null;return b=a&&a.toString().startsWith("Linux")?"":a&&a.toString().startsWith("Win32")?"":a&&a.toString().startsWith("Android")?"":a&&a.toString().startsWith("LUA")?"":""},decodeStyleStr:function(a){if(!a)return null; var b=[];a=a.split(";");for(var c=a.length-1;0<=c;c--){var e=a[c].split(":");e[0]&&0=b.length)return a;for(var c=b.length,e=a.length,d="",f=0,g=0;g=c&&(f=0);return d},encodeParams:function(a){if("function"!=typeof getCookie)return console.log("getCookie===="+typeof getCookie),a;var b=getCookie("strkey");if(null==a||null==b)return a;var c={};$.each(a,function(a,b){void 0!=b.name?c[b.name]="string"==typeof b.value?encodeURI(b.value):b.value:c[a]="string"==typeof b?encodeURI(b):b});return{_p:window.btoa(Xxtea.xxtea_encrypt(JSON.stringify(c), b))}},MergeArray:function(a,b){for(var c=[],e=0;e=d/c)var f=b*d/c,b=d;else f=e,b=c*e/b;e=(e-f)/2;d=(d-b)/2;$(a).css({width:f+ "px",height:b+"px",marginLeft:e+"px",marginTop:d+"px"})},parseParams:function(a){try{var b=[],c;for(c in a){var e=encodeURIComponent(a[c].name),d=encodeURIComponent(a[c].value);b.push(e+"="+d)}return b.join("&")}catch(f){return""}},showSplist:function(a,b,c){void 0==c&&(c=18);"H"==a.orient?$.each(a.children,function(a,d){!0==d.hasOwnProperty("atree")?b.append(Util.showSplist(d.atree,$("
"), c)):b.append($("
"+d.name+"
"))}):"V"==a.orient&&$.each(a.children,function(a,d){!0==d.hasOwnProperty("atree")?b.append(Util.showSplist(d.atree,$("
"),c)): b.append($("
"+d.name+"
"))});return b},domScale:function(a,b,c){var e=a.parent().width(),d=a.parent().height();a.css("position","absolute");b>=c?b>e?(a.width(b+"px"),a.height(c+"px"),a.css("transform","scale("+(e/b).toFixed(2)+","+(e/b).toFixed(2)+")"),a.css("top","-"+(c- d)/2+"px"),a.css("left","-"+(b-b*(e/b).toFixed(2))/2+"px")):(a.width("200%"),a.height("200%"),a.css("transform","scale(0.5,0.5)"),a.css("top","-50%"),a.css("left","-50%")):c>d?(a.width(b+"px"),a.height(c+"px"),a.css("transform","scale("+(d/c).toFixed(2)+","+(d/c).toFixed(2)+")"),a.css("top","-"+(c-c*(d/c).toFixed(2))/2+"px"),a.css("left","-"+(b-e)/2+"px")):(a.width("200%"),a.height("200%"),a.css("transform","scale(0.5,0.5)"),a.css("top","-50%"),a.css("left","-50%"))}};