(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.dsb&&(com.kingdee.bos.qing.dsb={});"undefined"==typeof com.kingdee.bos.qing.dsb.widget&&(com.kingdee.bos.qing.dsb.widget={});"undefined"==typeof com.kingdee.bos.qing.dsb.widget.mobile&&(com.kingdee.bos.qing.dsb.widget.mobile={});var L=com.kingdee.bos.qing.dsb.widget.mobile;
L.WidgetCtrlTitleBar=function(){var b=this,k=$("<div id='title'>"),q,M,z,r,m,f,l,h=!1,g=n.getPortrait(),v=!0,A=!0,B,N,O,C,D,E,t,F,G;this.setShowFullscreen=function(a){v=a;f&&(v&&f.show(),!v&&f.hide())};this.setShowTitleAndDesc=function(a){A=a};this.setBeforeFullscreenListener=function(a){B=a};this.setFullscreenListener=function(a){N=a};this.setCancelFullscreenListener=function(a){O=a};this.setRedrawListener=function(a){C=a};this.setAboutInfoItemCreator=function(a){E=a};this.setMenuToolItemCreator=
function(a){D=a};this.setOpenMenuListener=function(a){t=a};this.setBackListener=function(a){G=a};this.setRotateUIListener=function(a){F=a};this.setTitle=function(a,e){M=a;z=e;q||((q=P())&&q.addClass("lapp-dsb-widget-ctrl-title-text"),q&&q.appendTo(k));if(e&&!r){if(r=Q())a=r.getJqUi(),a.addClass("lapp-dsb-widget-ctrl-helpicon"),a.appendTo(k);com.kingdee.bos.qing.lapp.ui.LappIntegration.addScrollListener(function(){r&&r.removeTips()})}};this.getJqUi=function(){k.addClass("lapp-dsb-widget-ctrl-title");
f=$("<div>");f.on("click",b.doFullscreen);f.appendTo(k);H.layoutCtrlWithLRTB(f,null,0,28,1,null,28);var a=$("<span>");p.background(a,"icon_fullscreen");a.addClass("lapp-dsb-fullscreen-icon");a.appendTo(f);!v&&f.hide();return k};this.doFullscreen=function(a){h=!h;B&&B(h);g?!h&&R():n.rotateUI(g);var e=!1,c=com.kingdee.bos.qing.lapp.ui.LappIntegration;c.isCardFullscreen()||w.postMessageWhenImmediateExecution(h?w.TYPE_REQUEST_WIDGET_FULLSCREEN:w.TYPE_EXIT_WIDGET_FULLSCREEN,function(x){var d=window.location.href,
y=I.decodeParamFromUrl(d,"publishId");d=I.decodeParamFromUrl(d,"time");x.iframeId=y+d;e=!0;c.setResizeListener(function(){S();c.setResizeListener(null)})});e||S()};this.doClickMenu=function(){l&&l.click()};var P=function(){if(A){var a=$("<span>");a.text(M)}return a},Q=function(){if(A&&z){var a=new J;a.setIconType(J.ICON_TYPE_QUESTION);a.setTipsText(z)}return a},S=function(){h?(k.hide(),N(function(a){W(a)})):(k.show(),O());K()},W=function(a){var e=$("<div>");e.addClass("lapp-dsb-widget-ctrl-fullscreen-headbar");
e.appendTo(a);a=$("<div id='exit'>");p.background(a,"icon_back");a.addClass("lapp-dsb-widget-ctrl-exit");a.appendTo(e);a.on("click",function(){G&&G()||T()});a=$("<div>");a.addClass("lapp-dsb-widget-ctrl-title-fullacreen");a.appendTo(e);var c=P();c&&c.appendTo(a);c&&c.addClass("lapp-dsb-widget-ctrl-title-text-fullacreen");if(c=Q())c=c.getJqUi(),c.addClass("lapp-dsb-widget-ctrl-helpicon-fullscreen"),c.appendTo(a);var x=function(){d&&(d.hide(),t&&t(!1))};a=new U;X(a);if(a.isHasButtonInMenu()){var d=
$("<div id='toolbar'>");d.css({"z-index":512,"background-color":"#FFFFFF"});H.layoutCtrlWithLRTB(d,0,0,null,35,null,44);d.appendTo(e);d.hide();a=a.getJqUi();a.appendTo(d);a.css({right:"20px",left:"8px",width:"unset"});var y=!1;l=$("<div id='menu'>");p.background(l,"btn_list");l.addClass("lapp-dsb-widget-ctrl-menu");l.on("click",function(Y){(y=!y)?(d.show(),t&&t(!0)):x();K()});l.appendTo(e)}var T=function(){x();b.doFullscreen();com.kingdee.bos.qing.lapp.ui.LappIntegration.popPopStateListener()};com.kingdee.bos.qing.lapp.ui.LappIntegration.addPopStateListener(function(){T()})},
X=function(a){E&&E(a);n.supportSwitchScreen(!0)&&(m=g?a.addButtonInMenu("icon_turn_horizontal",u.get("horizontalScreen","\u6a2a\u5c4f"),function(){n.rotateUI(g)},85):a.addButtonInMenu("icon_turn_vertical",u.get("horizontalScreen","\u7ad6\u5c4f"),function(){n.rotateUI(g)},85),window.addEventListener("orientationchange",V));D&&D(a)},R=function(){window.removeEventListener("orientationchange",V)},V=function(){g=!g;F&&F(g);m&&(g?(p.background(m.getJqIcon(),"icon_turn_horizontal"),m.getJqText().text(u.get("horizontalScreen",
"\u6a2a\u5c4f"))):(p.background(m.getJqIcon(),"icon_turn_vertical"),m.getJqText().text(u.get("verticalScreen","\u7ad6\u5c4f"))));K();!h&&R()},K=function(){C&&setTimeout(function(){C(h)},100)}};var u,n,w,I,H,U,J,p;(function(){b=com.kingdee.bos.qing.framework.common;u=b.MultilanguageManager.createPackageAccessor(L);b=com.kingdee.bos.qing.lapp.integration;n=b.EnvUtil;w=b.PostMessageUtils;var b=com.kingdee.bos.qing.common;I=b.Util;H=b.DomUtil;b=com.kingdee.bos.qing.lapp.component;U=b.SecondaryMenuBar;
J=b.HelpIcon;p=b.Icons})()})();
//qingVersionTag: 20250415