var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(P,fa,W){P instanceof String&&(P=String(P));for(var N=P.length,ca=0;ca<N;ca++){var ja=P[ca];if(fa.call(W,ja,ca,P))return{i:ca,v:ja}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(P,fa,W){if(P==Array.prototype||P==Object.prototype)return P;P[fa]=W.value;return P};$jscomp.getGlobal=function(P){P=["object"==typeof globalThis&&globalThis,P,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var fa=0;fa<P.length;++fa){var W=P[fa];if(W&&W.Math==Math)return W}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(P,fa){var W=$jscomp.propertyToPolyfillSymbol[fa];if(null==W)return P[fa];W=P[W];return void 0!==W?W:P[fa]};
$jscomp.polyfill=function(P,fa,W,N){fa&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(P,fa,W,N):$jscomp.polyfillUnisolated(P,fa,W,N))};$jscomp.polyfillUnisolated=function(P,fa,W,N){W=$jscomp.global;P=P.split(".");for(N=0;N<P.length-1;N++){var ca=P[N];if(!(ca in W))return;W=W[ca]}P=P[P.length-1];N=W[P];fa=fa(N);fa!=N&&null!=fa&&$jscomp.defineProperty(W,P,{configurable:!0,writable:!0,value:fa})};
$jscomp.polyfillIsolated=function(P,fa,W,N){var ca=P.split(".");P=1===ca.length;N=ca[0];N=!P&&N in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var ja=0;ja<ca.length-1;ja++){var ia=ca[ja];if(!(ia in N))return;N=N[ia]}ca=ca[ca.length-1];W=$jscomp.IS_SYMBOL_NATIVE&&"es6"===W?N[ca]:null;fa=fa(W);null!=fa&&(P?$jscomp.defineProperty($jscomp.polyfills,ca,{configurable:!0,writable:!0,value:fa}):fa!==W&&(void 0===$jscomp.propertyToPolyfillSymbol[ca]&&(W=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[ca]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(ca):$jscomp.POLYFILL_PREFIX+W+"$"+ca),$jscomp.defineProperty(N,$jscomp.propertyToPolyfillSymbol[ca],{configurable:!0,writable:!0,value:fa})))};$jscomp.polyfill("Array.prototype.find",function(P){return P?P:function(fa,W){return $jscomp.findInternal(this,fa,W).v}},"es6","es3");
(function(){function P(D,U,h){var ha=U?U:Ja,w=m.RUNTIME==D?285:245,t,I,b,r=new Da,E,G,K,k,f,z,v;var x=da.get("publicCategory","\u516c\u5171\u76ee\u5f55");var F=da.get("personalCategory","\u4e2a\u4eba\u76ee\u5f55");this.setOuterMessageCurtain=function(C){v=C};this.getWidth=function(){return 392};this.getHeight=function(){return w};this.getJqUi=function(){if(!t){B();var C=function(){if(u())h.snapGroupTypeName="B"==h.snapGroupTypeId?F:x,b.setText(h.snapName),E.doAutoSelected(h.snapGroupTypeName,h.snapGroupTypeId),
K.doAutoSelected(h.snapGroupName,h.snapGroupId),E.setEnable(!1);else if(void 0!=h.snapGroupTypeId&&void 0!=h.snapGroupId&&void 0!=h.snapGroupName&&void 0!=h.isHyperLink)h.snapGroupTypeName="B"==h.snapGroupTypeId?F:x,f.setOn(h.isHyperLink),E.doAutoSelected(h.snapGroupTypeName,h.snapGroupTypeId),K.doAutoSelected(h.snapGroupName,h.snapGroupId),E.setEnable(!0);else{if(G&&1<=G.length){var d=G[0];E.doAutoSelected(d.getName(),d.getId());1==G.length&&E.setEnable(!1)}(d=K.getArrFolderNode())&&1<=d.length&&
(d=d[0],K.doAutoSelected(d.getName(),d.getId()))}};qa(E,function(){aa(K,C)})}return t};var u=function(){return h.snapName&&h.snapGroupTypeName&&h.snapGroupTypeId&&h.snapGroupId&&h.snapGroupName},p=function(C){C=new ca(C,null);C.setPlaceholder(da.get("selectPathType","\u8bf7\u9009\u62e9\u4fdd\u5b58\u76ee\u5f55\u7c7b\u578b"));C.setMaxHeight(118);C.getJqUi().css("background","white");return C},X=function(C){C=new ca(null,C);C.setPlaceholder(da.get("selectPath","\u8bf7\u9009\u62e9\u4fdd\u5b58\u76ee\u5f55"));
C.setMaxHeight(118);C.getJqUi().css("background","white");return C},R=function(C){var d=[],a=[];if(!C)return a;for(a=0;a<C.length;a++){var n=new W;n.fromJsonObject(C[a]);d.push(n)}return d},qa=function(C,d){if(null==G){var a=ha.createFacade(function(n){G=R(n);C.setArrFolderNode(G);d&&d()},function(n,L){8099101==n?ha.getMessageCurtain().showPrompt(da.get("querySnapCenterPermExp","\u67e5\u8be2\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u5f02\u5e38\u3002"),5E3):8099102==n?ha.getMessageCurtain().showPrompt(da.get("noQuerySnapCenterPermExp",
"\u5f53\u524d\u7528\u6237\u6ca1\u6709\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u3002"),5E3):_super.getMessageCurtain().showPrompt(L,5E3);return!0});m.SNAP_SCHEDULE==D?a.setShowBlocking(!1):(a.setShowBlocking(!0),a.setBlockingJqUi(t));a.loadSnapGroupTypes(h.snapId)}else C.setArrFolderNode(G)},aa=function(C,d){if(null==k){var a=ha.createFacade(function(n){k=R(n);C.setArrFolderNode(k);d&&d()},function(n,L){8099101==iErrorCode?ha.getMessageCurtain().showPrompt(da.get("querySnapCenterPermExp","\u67e5\u8be2\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u5f02\u5e38\u3002"),
5E3):8099102==iErrorCode?ha.getMessageCurtain().showPrompt(da.get("noQuerySnapCenterPermExp","\u5f53\u524d\u7528\u6237\u6ca1\u6709\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u3002"),5E3):_super.getMessageCurtain().showPrompt(L,5E3);return!0});m.SNAP_SCHEDULE==D?a.setShowBlocking(!1):(a.setShowBlocking(!0),a.setBlockingJqUi(t));a.loadSnapGroupInfo(h.snapId)}else C.setArrFolderNode(k)},B=function(){var C=0;t=$("<div>");I=$("<div>");I.addClass("publish-manage-left");if(m.RUNTIME==D||m.SNAP_CENTER==D){var d=
new Ea,a=d.getJqUi();d.setRequired(!0);d.setText(da.get("snapName","\u5feb\u7167\u540d\u79f0"));a.attr("title",d.getText());b=new Ha;var n=$("<div>");b.addEditedListener(function(c){clearTimeout(z);z=setTimeout(function(){var l=b.getText();if(""!=l){var y=ha.createFacade(function(q){n.empty();q=q[b.getText()];if(null!=q&&0<q.length){r.setCustomItemPainter(function(ka,ta){ka.on("mousedown",function(ua){b.setText(ta);n.remove();ua.stopPropagation()});ka.text(ta);ka.attr("title",ta)});r.setItemModels(q);
r.setSelecteds([q[0]]);q=r.getJqUi();var S=L.width(),ra=L.css("left"),T=L.position().top+L.height();pa.layoutCtrl(n,ra,T,S,122);n.css("z-index","9999");q.css({width:S+"px",height:"122px"});q.find(".sa-ctrl-list-owner").css("height","100px");S=$("<div>");S.css({position:"absolute","z-index":"9999",color:"#c5c5c5"});S.text(da.get("HistorySnapName","\u5386\u53f2\u5feb\u7167\u540d\u79f0"));S.css({right:"13px",top:"100px"});q.appendTo(n);S.appendTo(n);n.appendTo(I)}else n.remove()});y.setShowBlocking(!1);
y.getSnapNameByInputText(l)}else n.remove()},1E3)});b.addBlurListener(function(){n.remove()});var L=b.getJqUi();pa.layoutCtrl(a,15,C,115,23);pa.layoutCtrl(L,130,C,215,23);a.appendTo(I);L.appendTo(I);C+=45}else C+=15;a=new Ea;d=a.getJqUi();u()||a.setRequired(!0);a.setText(da.get("snapSavePathType","\u76ee\u5f55\u7c7b\u578b"));d.attr("title",a.getText());E=p(function(c){if(c&&c!=E.getLastTimeSelectedTailPathId()){var l=[];$.extend(!0,l,k);if(l&&0<l.length)if(c&&0==c.indexOf("A")){for(c=0;c<l.length;c++)"B"==
l[c].getType()&&(l.splice(c,1),c--);l.sort(function(y,q){return q.getOrder()-y.getOrder()});K.setArrFolderNode(l);K.clearSelectedTreePath()}else if(c&&0==c.indexOf("B")){for(c=0;c<l.length;c++)"A"==l[c].getType()&&(l.splice(c,1),c--);l.sort(function(y,q){return q.getOrder()-y.getOrder()});K.setArrFolderNode(l);K.clearSelectedTreePath()}}});a=E.getJqUi();pa.layoutCtrl(d,15,C,115,23);pa.layoutCtrl(a,130,C,215,23);d.appendTo(I);a.appendTo(I);a=new Ea;d=a.getJqUi();a.setRequired(!0);a.setText(da.get("snapSavePath",
"\u76ee\u5f55"));d.attr("title",a.getText());K=X(function(c){!E||E.getSelectedTreePath()&&E.getSelectedTreePath().getText()||(c.clearSelectedTreePath(),v.showPrompt(da.get("selectPathType","\u8bf7\u9009\u62e9\u76ee\u5f55\u7c7b\u578b\u3002")))});a=K.getJqUi();C+=45;pa.layoutCtrl(d,15,C,115,23);pa.layoutCtrl(a,130,C,215,23);d.appendTo(I);a.appendTo(I);if(m.RUNTIME==D||m.SNAP_SCHEDULE==D){f=new O;f.setOn(!1);d=f.getJqUi();a=new Ea(da.get("saveSnapHyperLink","\u4fdd\u5b58\u8054\u67e5/\u8054\u52a8\u8bbe\u7f6e"));
var oa=a.getJqUi();oa.attr("title",a.getText());C+=45;pa.layoutCtrl(oa,15,C,115,23);pa.layoutCtrl(d,130,C,31,23);oa.appendTo(I);d.appendTo(I)}I.appendTo(t)};this.getModelFromUI=function(){var C=new Y;m.SNAP_SCHEDULE!=D&&C.setSnapName($.trim(b.getText()));var d=K.getSelectedTreePath();C.setSaveSnapGroupPath(d.getValue());C.setSaveSnapGroupPathText(d.getText());C.setSaveSnapGroupName(K.getSelectedTailPathName());C.setSaveSnapGroupId(K.getSelectedTailPathId());C.setSaveSnapGroupType(E.getSelectedTailPathId());
m.RUNTIME==D?(C.setPageId(h.pageId),C.setPublishId(h.urlParams.publishId),d=f.isOn(),C.setIsHyperLink(d),C.setOldSnapId(h.snapId),C.setReportId(h.extReportId)):m.SNAP_CENTER==D?(C.setSnapId(h.snapId),C.setReportId(h.reportId)):m.SNAP_SCHEDULE==D&&(d=f.isOn(),C.setIsHyperLink(d));return C};this.checkUIInput=function(C){if(m.SNAP_SCHEDULE==D)if(E.getSelectedTreePath())if(K.getSelectedTreePath())C(!0);else return da.get("selectPath","\u8bf7\u9009\u62e9\u76ee\u5f55\u3002");else return da.get("selectPathType",
"\u8bf7\u9009\u62e9\u76ee\u5f55\u7c7b\u578b\u3002");else{var d=$.trim(b.getText());if(null==d||0==$.trim(d).length)return da.get("snapNameNotEmpty","\u8bf7\u8f93\u5165\u5feb\u7167\u540d\u79f0\u3002");if(50<d.length)return da.get("snapNameTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(na.isValidString(d)){if(na.isKeywords(d))return da.get("isKeywords",'\u65e0\u6cd5\u4f7f\u7528"#1"\u4f5c\u4e3a\u540d\u79f0\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002').replace("#1",d);if(E.getSelectedTreePath())if(K.getSelectedTreePath())C(!0);
else return da.get("selectPathWithPeriod","\u8bf7\u9009\u62e9\u76ee\u5f55\u3002");else return da.get("selectPathType","\u8bf7\u9009\u62e9\u76ee\u5f55\u7c7b\u578b\u3002")}else return da.get("invalidName","\u540d\u79f0\u53ea\u80fd\u7531\u6c49\u5b57\u3001\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3002")}}}function fa(){var D,U,h,ha,w,t;this.setId=function(I){D=I};this.getId=function(){return D};this.setName=function(I){U=
I};this.getName=function(){return U};this.setType=function(I){h=I};this.getType=function(){return h};this.setParentId=function(I){ha=I};this.getParentId=function(){return ha};this.setParentNode=function(I){w=I};this.getParentNode=function(){return w};this.setOrder=function(I){t=I};this.getOrder=function(){return t}}function W(){fa.call(this);var D=this,U=[],h,ha;this.setChildren=function(w){U=w};this.getChildren=function(){return U};this.setIsOpenDir=function(w){h=w};this.getIsOpenDir=function(){return h};
this.getIsShow=function(){return ha};this.setIsShow=function(w){ha=w};this.toJsonObject=function(){var w={};w.children=U;return w};this.fromJsonObject=function(w){D.setName(w.name);D.setId(w.id);D.setType(w.type);D.setParentId(w.parentId);D.setOrder(w.order);D.setIsOpenDir(!0);if(w=w.children)for(var t=0;t<w.length;t++){var I=w[t];if(!I.children||I.children&&0==I.children.length){var b=new N;b.fromJsonObject(I);b.setParentNode(D);U.push(b)}else b=new W,b.fromJsonObject(I),b.setParentNode(D),U.push(b)}}}
function N(){fa.call(this);var D=this;this.fromJsonObject=function(U){D.setName(U.name);D.setId(U.id);D.setParentId(U.parentId);D.setOrder(U.order)}}function ca(D,U){ja.call(this);var h=this,ha=this.protectedMethod,w,t=[],I,b,r,E;this.getDropDownContent=function(){h.updateArrFolderNode();h.initTreeSelector();return w.getJqUi()};this.updateArrFolderNode=function(u){D&&D(u)};this.checkClearSelectedTreePath=function(u){U&&U(u)};this.clearSelectedTreePath=function(){I=null;ha.updateText(I?I.getText():
"")};this.setSelectedTreePath=function(u){I=u;ha.updateText(I?I.getText():"")};this.getSelectedTreePath=function(){return I};this.getSelectedTailPathName=function(){return b};this.getSelectedTailPathId=function(){return r};this.getLastTimeSelectedTailPathId=function(){return E};this.initTreeSelector=function(){if(t){w=new za;w.setRootVisible(!1);w.setNodePainter(v);var u=w,p=u.setRoot,X=t,R=new W;R.setParentId(" ");R.setName("\u65b0\u589e\u76ee\u5f55");R.setId(" ");R=G(R);k(R,X);p.call(u,R);w.hookLoadingHandler(z);
w.addSelectingListener(x);w.getRoot().setExpanded(!0);w.setLineHeight(30);pa.layoutCtrl(w.getJqUi(),0,1,"100%",4<t.length?120:30*t.length+2);w.getJqUi().css("border","1px solid rgba(138, 153, 170, 0.4)");w.getJqUi().css("background","white");w.getJqUi().appendTo($(document.body))}else return null};this.setArrFolderNode=function(u){t=u};this.getArrFolderNode=function(){return t};this.doAutoSelected=function(u,p){b=u;E=r;r=p;var X=new ia;X.setValue(p);X.setText(u);I=X;ha.updateText(I?I.getText():"");
h.updateArrFolderNode(p);h.checkClearSelectedTreePath(h)};var G=function(u){var p=new za.BranchNode;p.setUserObject(u);return p},K=function(u){var p=new za.LeafNode;p.setUserObject(u);return p},k=function(u,p){if(p&&0<p.length)for(var X=0;X<p.length;X++){var R=p[X];R&&R instanceof W&&0<R.getChildren().length?f(u,R):u.addChild(K(R))}},f=function(u,p){var X=0<p.getChildren().length?G(p):K(p);u.addChild(X);u=p.getChildren();if(0!=u.length)for(p=0;p<u.length;p++)u[p]&&u[p]instanceof W&&u[p].getChildren()?
f(X,u[p]):X.addChild(K(u[p]))},z=function(u,p){setTimeout(function(){k(u);p()},500)},v=function(u,p){u.css("padding-left","4px");u.css("padding-right","4px");u.text(p.getUserObject().getName())},x=function(u,p){var X=p.getTreePath();p=u="";for(var R,qa=1;qa<X.length;qa++)1<qa&&(u+="/",p+="/"),R=X[qa],u+=R.getUserObject().getName(),p+=R.getUserObject().getId();b=R.getUserObject().getName();E=r;r=R.getUserObject().getId();R=new ia;R.setValue(p);R.setText(u);I=R;ha.updateText(I?I.getText():"");ha.doDropdown();
h.updateArrFolderNode(p);h.checkClearSelectedTreePath(h)},F=200;this.setMaxHeight=function(u){F=u};this.getPopupHeight=function(){return null==t||0==t.length?22:Math.min(30*t.length+2,F+2)}}function ja(){var D=this,U,h,ha,w,t,I=!0;this.setEnable=function(k){I=k;I||(ha.hide(),h.css({color:"rgb(192, 192, 192)"}))};this.getDropDownContent=function(){throw Error("orrive me");};this.getPopupHeight=function(){throw Error("orrive me");};this.getJqUi=function(){U||b();return U};this.setPlaceholder=function(k){b();
"placeholder"in h[0]?h.attr("placeholder",k):(t&&t.remove(),t=$("<div>"),t.text(k),t.css({color:"#ccc","font-size":"12px"}),t.on("mousedown",function(f){h.focus()}),t.appendTo(D.getJqUi()),pa.layoutCtrlWithLRTB(t,4,4,null,2,2,null),K())};var b=function(){if(!U){U=$("<div>");U.addClass("sa-ctrl-combobox");if(I)U.on("click",E);U.css("border-bottom","1px solid #ccc");h=$("<input readonly=readonly>");h.addClass("sa-ctrl-textfield-input");h.css({color:"#666","font-size":"12px","text-overflow":"ellipsis",
padding:"0px 16px 0px 4px"});h.appendTo(U);ha=$("<div>");ha.addClass("sa-ctrl-combobox-arrow sa-ctrl-combobox-arrow_enabled");ha.appendTo(U);ha.on("mouseenter",function(k){r(!0)});ha.on("mouseleave",function(k){r(!1)});r(!1)}},r=function(k){var f=w?"arrow-up":"arrow-down";k&&(f+="_hover");H.background(ha,f)},E=function(){if(I){if(w)$(document.body).off("mousedown",G),w.detach(),w=null;else{var k=$(document.body),f=w=$("<div>"),z=$("<div>");z.addClass("sa-ctrl-common-border");z.appendTo(f);w.addClass("sa-qing-publish-dropdown-selector");
D.getDropDownContent().appendTo(w);var v=D.getPopupHeight();w.css("z-index",999999);w.appendTo(k);var x=k.prop("clientHeight"),F=U.outerHeight();f=U.outerWidth();var u=[0,F-1];u=pa.upwardCoordinate(U[0],u,k[0]);z=u[0];var p=u[1];v=0>v?Math.max(0,(x>>1)-F):v;p+v>x&&(u=[0,0],u=pa.upwardCoordinate(U[0],u,k[0]),k=u[1]-v+1,0<=k&&(p=k));pa.layoutCtrl(w,z,p,f,v);$(document.body).on("mousedown",G)}r(!1)}},G=function(k){for(var f=$(document.body),z=$(k.target);z[0]!=f[0];){if(z[0]==U[0])return;z=z.parent()}for(z=
$(k.target);z[0]!=f[0];){if(z[0]==w[0])return;z=z.parent()}E()},K=function(){t&&setTimeout(function(){t.css("display",h.val()?"none":"")},0)};this.protectedMethod={updateText:function(k){b();h.val(k?k:"");k&&h.attr("title",k);"placeholder"in h[0]||K()},doDropdown:E}}function ia(){var D=this,U,h,ha,w;this.getIsShow=function(){return w};this.setIsShow=function(t){w=t};this.getValue=function(){return U};this.setValue=function(t){U=t};this.getText=function(){return h};this.setText=function(t){h=t};this.getUserObject=
function(){return ha};this.setUserObject=function(t){ha=t};this.toJsonObject=function(){var t={};t.value=U;t.text=h;return t};this.fromJsonObject=function(t){t&&(t.value&&D.setValue(t.value),t.text&&D.setText(t.text))}}function ea(D,U,h,ha){Ba.call(this,D,U,h,ha);var w=this.protectedMethod;this.loadSnapGroupTypes=function(t){w.remote("loadSnapGroupTypes",{snapId:t})};this.loadSnapGroupInfo=function(t){w.remote("loadSnapGroupInfo",{snapId:t})};this.getSnapNameByInputText=function(t){w.remote("getSnapNameByInputText",
{inputText:t})};this.saveSnapInfo=function(t){w.remote("saveSnapInfo",t)}}function na(){}function Y(){var D,U,h,ha,w,t,I,b,r,E,G,K,k;this.getSnapId=function(){return D};this.setSnapId=function(f){D=f};this.setOldSnapId=function(f){U=f};this.getOldSnapId=function(){return U};this.getReportId=function(){return h};this.setReportId=function(f){h=f};this.getPageId=function(){return ha};this.setPageId=function(f){ha=f};this.getPublishId=function(){return w};this.setPublishId=function(f){w=f};this.getSnapName=
function(){return t};this.setSnapName=function(f){t=f};this.isHyperLink=function(){return I};this.setIsHyperLink=function(f){I=f};this.getSaveSnapGroupName=function(){return b};this.setSaveSnapGroupName=function(f){b=f};this.getSaveSnapGroupType=function(){return E};this.setSaveSnapGroupType=function(f){E=f};this.getSaveSnapGroupId=function(){return r};this.setSaveSnapGroupId=function(f){r=f};this.getSaveSnapGroupPath=function(){return G};this.setSaveSnapGroupPath=function(f){G=f};this.getSaveSnapGroupPathText=
function(){return K};this.setSaveSnapGroupPathText=function(f){K=f};this.getForceOverwrite=function(){return k};this.setForceOverwrite=function(f){k=f};this.fromJsonObject=function(f){D=f.snapId;ha=f.pageId;w=f.publishId;t=f.snapName;I=f.isHyperLink;b=f.saveSnapGroupName;E=f.saveSnapGroupType;r=f.saveSnapGroupId;G=f.saveSnapGroupPath;K=f.saveSnapGroupPathText;h=f.reportId;k=f.forceOverwrite};this.toJsonObject=function(){var f={};f.snapId=D;f.oldSnapId=U;f.pageId=ha;f.publishId=w;f.snapName=t;f.isHyperLink=
I;f.saveSnapGroupName=b;f.saveSnapGroupType=E;f.saveSnapGroupId=r;f.saveSnapGroupPath=G;f.saveSnapGroupPathText=K;f.reportId=h;f.forceOverwrite=k;return f}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter&&(com.kingdee.bos.extreport.snapcenter={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter.common&&
(com.kingdee.bos.extreport.snapcenter.common={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter.common.ui&&(com.kingdee.bos.extreport.snapcenter.common.ui={});var g=com.kingdee.bos.extreport.snapcenter.common.ui,m={};g.SaveSnapDialog=function(D,U,h){Aa.call(this);var ha=this,w=this.protectedMethod,t=Ja,I=[],b=new P(D,t,h),r;(function(){w.setTitle(U);ha.setSize(b.getWidth(),b.getHeight());r=w.getMessageCurtain();b.setOuterMessageCurtain(w.getMessageCurtain());w.setContentPaneCreator(function(){return b.getJqUi()});
w.setClosingChecker(function(f){E(f)},!0);w.setClosingAction(function(){})})();this.addSuccessCallback=function(f){I.push(f)};var E=function(f){var z=b.checkUIInput(function(v){v?K(f):f(v)});z&&(w.getMessageCurtain().showPrompt(z,5E3),f(!1))},G={8099101:da.get("querySnapCenterPermExp","\u67e5\u8be2\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u5f02\u5e38\u3002"),8099102:da.get("noQuerySnapCenterPermExp","\u5f53\u524d\u7528\u6237\u6ca1\u6709\u5feb\u7167\u4e2d\u5fc3\u6743\u9650\u3002"),8099103:da.get("snapNameNotEmpty",
"\u5feb\u7167\u540d\u79f0\u4e3a\u7a7a\u3002"),8099104:da.get("snapNameTooLong","\u5feb\u7167\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),8099105:da.get("invalidName","\u540d\u79f0\u53ea\u80fd\u7531\u6c49\u5b57\u3001\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e14\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3002"),8099106:da.get("selectPath","\u76ee\u5f55\u4e3a\u7a7a\u3002"),8099107:da.get("reportNotFound","\u8be5\u62a5\u8868\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),
8099108:da.get("userNotFound","\u672a\u627e\u5230\u7528\u6237\u3002"),8099109:da.get("snapGroupNotFound","\u76ee\u5f55\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),8099110:da.get("sameSnapNameExist","\u76f8\u540c\u5feb\u7167\u540d\u79f0\u5df2\u5b58\u5728\u3002"),8099112:da.get("checkReportPermExp","\u68c0\u67e5\u7528\u6237\u662f\u5426\u62e5\u6709\u4fdd\u5b58\u5feb\u7167\u6743\u9650\u5f02\u5e38\u3002"),8099113:da.get("noReportPerm","\u5f53\u524d\u7528\u6237\u6ca1\u6709\u4fdd\u5b58\u5feb\u7167\u6743\u9650\u3002"),
8099115:da.get("checkSnapCenterModulePermExp","\u68c0\u6d4b\u5feb\u7167\u4e2d\u5fc3\u6a21\u5757\u8bb8\u53ef\u5f02\u5e38\u3002"),8099116:da.get("noSnapCenterModulePerm","\u5f53\u524d\u7528\u6237\u6ca1\u6709\u5feb\u7167\u4e2d\u5fc3\u6a21\u5757\u8bb8\u53ef\u3002"),8099117:da.get("isKeywords",'\u65e0\u6cd5\u4f7f\u7528"#1"\u4f5c\u4e3a\u540d\u79f0\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002')},K=function(f,z){var v=b.getModelFromUI();z&&v.setForceOverwrite(!0);z=t.createFacade(function(x){v.setSnapId(x);
if(v.getPublishId()||"A"==v.getSaveSnapGroupType()&&h.snapId){x=com.kingdee.bos.qing.behavior.BehaviorManager;var F=Ca.createUUID();v.getPublishId()?x.initAccessRecordParams(v.getPublishId(),F,x.SourceType.QING_PUBLISH,x.AppType.QING_RPT):x.initAccessRecordParams(h.snapId,F,x.SourceType.QING_SNAPSHOT,x.AppType.QING_RPT);x.recordResourceOperation(x.OperationType.QING_SNAPSHOT_SAVE)}if(!I||0==I.length)r&&r.showSuccess(da.get("saveSnapSuccess","\u4fdd\u5b58\u5feb\u7167\u6210\u529f\u3002"));else if(I&&
0<I.length)for(x=0;x<I.length;x++)(F=I[x])&&F(v);f(!0)},function(x,F){if(x){if(m.RUNTIME==D&&8099110==x)return F=da.get("sameSnapNameConfirmMessage","\u5feb\u7167\u540d\u79f0\u5df2\u5b58\u5728\uff0c\u786e\u5b9a\u8986\u76d6\u5417\uff1f"),k(F,f),!0;x=G[x];r.showPrompt(x?x:F,5E3);f(!1);return!0}f(!1);return!1});z.setShowBlocking(!1);z.saveSnapInfo(v.toJsonObject())},k=function(f,z){var v=$(document.body),x=$("<div class='sa-ctrl-common-modallayer'>");x.appendTo(v);var F=new Fa(x),u=da.get("operateConfirm",
"\u64cd\u4f5c\u786e\u8ba4");F.setTitle(u);u=v.prop("clientWidth");var p=v.prop("clientHeight");F.setBounds(u-300>>1,p-200>>1,300,200);F.setToolbarVisible(!1);u=$("<div>");p=$("<div>");var X=$("<span>");X.text(f);X.attr("title",f);X.css({"text-align":"center",display:"inline-block","margin-top":"5px","line-height":"23px","font-size":"14px","text-overflow":"ellipsis",overflow:"hidden"});pa.layoutCtrl(p,null,null,300,200);pa.layoutCtrl(X,0,25,300,60);X.appendTo(p);p.appendTo(u);F.setContent(u);F.addClosingListener(function(R,
qa){qa?K(z,!0):z(!1);R.destroy();x.remove();return!0});F.showFooterPane();F.show();x.appendTo(v)}};g.SnapContentPanel=P;g.SaveSnapSourceType=m;g.ExtReportSnapModel=Y;g.StringUtil=na;g.ValueTextPair=ia;m.RUNTIME=1;m.SNAP_CENTER=2;m.SNAP_SCHEDULE=3;var Ca,pa,Aa,za,Da,O,Ea,Ha,H,Fa,Ba,va,da,Ja;(function(){var D=com.kingdee.bos.qing.common;Ca=D.Util;pa=D.DomUtil;D=com.kingdee.bos.qing.ui.component;Aa=D.AbstractModalDialog;za=D.Tree;Da=D.List;O=D.SwitchButton;Ea=D.Label;Ha=D.TextField;H=D.Icons;Fa=D.Dialog;
D=com.kingdee.bos.qing.framework.common;Ba=D.AbstractFacade;va=D.AbstractRemoteCall;da=D.MultilanguageManager.createPackageAccessor(g);Ja=new function(){function U(){va.call(this);var w;this.getRemoteUrl=function(){return w};this.setRemoteUrl=function(t){w=t}}var h;this.createFacade=function(w,t,I){var b=ha();return new ea(b,w,function(r,E){return t?t(r,E):!1},I)};var ha=function(){if(!h){var w=Ca.decodeParamFromUrl(window.location.search,"path");w=(w?w:"/ierp")+"/qing_rpt/runtime.do";h=new U;h.setRemoteUrl(w)}return h}}})();
na.isValidString=function(D){return/^([\u4E00-\u9FA5a-zA-Z_])[\u4E00-\u9FA5a-zA-Z0-9_]{0,}$/.test(D)};na.isKeywords=function(D){return/\b(null|true|false)\b/i.test(D)}})();(function(){"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter&&(com.kingdee.bos.extreport.snapcenter={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter.common&&(com.kingdee.bos.extreport.snapcenter.common={});var P=com.kingdee.bos.extreport.snapcenter.common;P.Facade=
function(ja,ia,ea,na){fa.call(this,ja,ia,ea,na);var Y=this.protectedMethod;this.saveOrderExtReportGroup=function(g){g={extReportGroupList:JSON.stringify({extReportGroupList:g})};Y.remote("saveOrderExtReportGroup",g)};this.loadSnapGroupList=function(){Y.remote("loadSnapGroupList",{})};this.saveSnapGroup=function(g){g={model:JSON.stringify(g.toJsonObject())};Y.remote("saveOrUpdateSnapGroup",g)};this.deleteSnapGroup=function(g){Y.remote("deleteSnapGroup",{snapGroupID:g})};this.deleteSnapInfo=function(g){g=
{arrSnapID:JSON.stringify(g)};Y.remote("deleteSnapInfo",g)};this.loadSnapInfoListByGroupIDS=function(g){g={arrSnapGroupID:JSON.stringify(g)};Y.remote("loadSnapInfoListByGroupIDS",g)};this.loadSnapInfoListByGroupID=function(g){Y.remote("loadSnapInfoListByGroupID",{snapGroupID:g})};this.saveOrderSnapGroup=function(g){g={snapGroupList:JSON.stringify({snapGroupList:g})};Y.remote("saveOrderSnapGroup",g)};this.loadSnapGroupTypes=function(g){Y.remote("loadSnapGroupTypes",{snapId:g})};this.loadSnapGroupInfo=
function(g){Y.remote("loadSnapGroupInfo",{snapId:g})};this.getSnapNameByInputText=function(g){Y.remote("getSnapNameByInputText",{inputText:g})};this.updateSnapInfo=function(g){g={model:JSON.stringify(g.toJsonObject())};Y.remote("updateSnapInfo",g)};this.checkSnapPermission=function(g){Y.remote("checkSnapPermission",{snapId:g})};this.checkExistsOthersSnapInGroup=function(g){Y.remote("checkExistsOthersSnapInGroup",{snapGroupID:g})}};P.RemoteImpl=function(){N.call(this);var ja;this.getRemoteUrl=function(){return ja};
this.setRemoteUrl=function(ia){ja=ia}};var fa,W,N;(function(){var ja=com.kingdee.bos.qing.framework.common;fa=ja.AbstractFacade;W=ja.AbstractIcons;N=ja.AbstractRemoteCall})();P.Icons=new function(){W.call(this);var ja=this.protectedMethod;this.protectedInit=function(Y,g){na(g,"extreport");g.setGap(1);g.setStartPosition(1,1);g.setIconSize(16,16);ia(0,0,"btn-add-classification");ia(0,1,"btn-import");ia(0,2,"btn-export");ia(0,3,"btn-edit");ia(0,4,"btn-delete");ia(0,5,"btn-extreport");g.setStartPosition(207,
78);g.setIconSize(65,78);ea(0,0,"icon-question");g.setGap(0);g.setStartPosition(0,0);na(g,"icon_search");g.setIconSize(17,17);ea(0,0,"icon_search");na(g,"icon_search_hover");g.setIconSize(17,17);ea(0,0,"icon_search_hover");na(g,"btn_orderup");g.setIconSize(17,17);ea(0,0,"btn_orderup");na(g,"btn_orderup_hover");g.setIconSize(17,17);ea(0,0,"btn_orderup_hover");na(g,"btn-add-classification");g.setIconSize(17,17);ea(0,0,"btn-add-classification");na(g,"btn-add-classification_hover");g.setIconSize(17,17);
ea(0,0,"btn-add-classification_hover");na(g,"no-data");ea(0,0,"no-data");g.setFilePath("qingrpt/runtime/skin/ierp/res/extreport-runtime.png");g.setGap(1);g.setStartPosition(1,1);g.setIconSize(16,16);ea(0,2,"arrow-down");ea(1,2,"arrow-down_hover");ea(0,3,"arrow-up");ea(1,3,"arrow-up_hover");g.setFilePath("qingrpt/snapcenter/skin/ierp/res/icon_error_tips.png");g.setIconSize(14,14);g.setStartPosition(0,0);ea(0,0,"error_tips")};var ia=function(Y,g,m){ea(Y,g,m+"_hover");ea(Y+1,g,m)},ea=function(Y,g,m){ja.registIcon(Y,
g,m)},na=function(Y,g){switch(g){case "extreport":Y.setFilePath("qingrpt/manage/skin/ierp/res/extreport.png");break;case "icon_search":Y.setFilePath("qingrpt/manage/skin/ierp/res/icon_search.png");break;case "icon_search_hover":Y.setFilePath("qingrpt/manage/skin/ierp/res/icon_search_hover.png");break;case "btn-add-classification":Y.setFilePath("qingrpt/manage/skin/ierp/res/btn-add-classification.png");break;case "btn-add-classification_hover":Y.setFilePath("qingrpt/manage/skin/ierp/res/btn-add-classification_hover.png");
break;case "btn_orderup":Y.setFilePath("qingrpt/manage/skin/ierp/res/btn_orderup.png");break;case "btn_orderup_hover":Y.setFilePath("qingrpt/manage/skin/ierp/res/btn_orderup_hover.png");break;case "no-data":Y.setFilePath("qingrpt/manage/skin/ierp/res/no-data.png");break;default:throw Error("Unknow key: "+g);}}};var ca=new function(){var ja;this.hookCollector=function(ia){ja=ia};this.occur=function(ia,ea){try{ja&&ja(ia,ea)}catch(na){window.console&&console.warn(na)}};this.getPublishTargetName=function(ia){if(0==
ia)return"Appmenu";if(1==ia)return"Center"}};ca.EXT_RPT_SNAP_EDIT="ext-rpt-snap-edit";ca.SAVE_SNAP_TO_TYPE="save-snap-to-type";P.UserOperationReporter=ca})();(function(){function P(){var N=this,ca,ja,ia,ea,na,Y,g,m,Ca,pa,Aa,za=!0,Da=!1;this.getLevel=function(){return 1};this.setChecked=function(O){Da=O};this.getChecked=function(){return Da};this.setDisplay=function(O){za=O};this.getDisplay=function(){return za};this.getSnapId=function(){return ca};this.setSnapId=function(O){ca=O};this.getSnapName=function(){return ja};this.setSnapName=function(O){ja=O};this.getReportId=function(){return ia};this.setReportId=function(O){ia=O};this.getSnapGroupId=function(){return ea};
this.setSnapGroupId=function(O){ea=O};this.getCreatorName=function(){return na};this.setCreatorName=function(O){na=O};this.getCreateTime=function(){return Y};this.setCreateTime=function(O){Y=O};this.getCreateFormatTime=function(){return g};this.setCreateFormatTime=function(O){g=O};this.getModifierName=function(){return m};this.setModifierName=function(O){m=O};this.getModifyTime=function(){return Ca};this.setModifyTime=function(O){Ca=O};this.getModifyFormatTime=function(){return pa};this.setModifyFormatTime=
function(O){pa=O};this.getSnapGroupType=function(){return Aa};this.setSnapGroupType=function(O){Aa=O};this.fromJsonObject=function(O){N.setSnapId(O.snapId);N.setSnapName(O.snapName);N.setSnapGroupId(O.snapGroupId);N.setReportId(O.reportId);N.setCreatorName(O.creatorName);N.setCreateTime(O.createTime);N.setCreateFormatTime(O.createFormatTime);N.setModifierName(O.modifierName);N.setModifyTime(O.modifyTime);N.setModifyFormatTime(O.modifyFormatTime)};this.toJsonObject=function(){var O={};O.snapId=ca;
O.snapName=ja;O.snapGroupId=ea;O.reportId=ia;O.creatorName=na;O.createTime=Y;O.modifierName=m;O.modifyTime=Ca;O.level=N.getLevel();return O}}function fa(N,ca){var ja=N,ia=ca;this.getName=function(){return ja};this.setName=function(ea){ja=ea};this.getValue=function(){return ia};this.setValue=function(ea){ia=ea}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&
(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter&&(com.kingdee.bos.extreport.snapcenter={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter.model&&(com.kingdee.bos.extreport.snapcenter.model={});var W=com.kingdee.bos.extreport.snapcenter.model;W.ExtReportSnapGroupModel=function(){var N=this,ca,ja,ia,ea,na=!0,Y=null;this.setExistsOthersSnapInGroup=function(g){Y=g};this.getExistsOthersSnapInGroup=function(){return Y};this.setOrderID=function(g){ea=g};
this.getOrderID=function(){return ea};this.setDisplay=function(g){na=g};this.getDisplay=function(){return na};this.setExtReportSnapGroupID=function(g){ca=g};this.getExtReportSnapGroupID=function(){return ca};this.setExtReportSnapGroupName=function(g){ja=g};this.getExtReportSnapGroupName=function(){return ja};this.setExtReportSnapGroupType=function(g){ia=g};this.getExtReportSnapGroupType=function(){return ia};this.fromJsonObject=function(g){N.setExtReportSnapGroupID(g.extReportSnapGroupID);N.setExtReportSnapGroupName(g.extReportSnapGroupName);
N.setExtReportSnapGroupType(g.extReportSnapGroupType);N.setOrderID(g.orderID)};this.toJsonObject=function(){var g={};g.extReportSnapGroupID=ca;g.extReportSnapGroupName=ja;g.extReportSnapGroupType=ia;g.orderID=ea;return g}};W.ExtReportSnapInfoModel=P;W.ExtReportSnapGroupType=fa;W.ExtReportTreeNodeModel=function(){var N=this,ca,ja,ia,ea,na,Y,g,m,Ca,pa=[],Aa=!0,za=!1,Da=!1,O=!1,Ea=!0,Ha=!1;this.getLevel=function(){return 0};this.setChecked=function(H){Da=H};this.getChecked=function(){return Da};this.setSearchHit=
function(H){Ha=H};this.getSearchHit=function(){return Ha};this.setDisplay=function(H){Aa=H};this.getDisplay=function(){return Aa};this.setExpand=function(H){za=H};this.getExpand=function(){return za};this.setDeleted=function(H){O=H};this.getDeleted=function(){return O};this.getReportId=function(){return ca};this.setReportId=function(H){ca=H};this.getReportName=function(){return ja};this.setReportName=function(H){ja=H};this.getSnapGroupId=function(){return ia};this.setSnapGroupId=function(H){ia=H};
this.getCreatorName=function(){return ea};this.setCreatorName=function(H){ea=H};this.getCreateTime=function(){return na};this.setCreateTime=function(H){na=H};this.getCreateFormatTime=function(){return Y};this.setCreateFormatTime=function(H){Y=H};this.getModifierName=function(){return g};this.setModifierName=function(H){g=H};this.getModifyTime=function(){return m};this.setModifyTime=function(H){m=H};this.getModifyFormatTime=function(){return Ca};this.setModifyFormatTime=function(H){Ca=H};this.setChildren=
function(H){pa=H};this.getChildren=function(){return pa};this.setHasPerm=function(H){Ea=H};this.getHasPerm=function(){return Ea};this.fromJsonObject=function(H){N.setReportId(H.reportId);N.setReportName(H.reportName);N.setSnapGroupId(H.snapGroupId);N.setHasPerm(H.hasPerm);N.setCreatorName(H.creatorName);N.setCreateTime(H.createTime);N.setCreateFormatTime(H.createFormatTime);N.setModifierName(H.modifierName);N.setModifyTime(H.modifyTime);N.setModifyFormatTime(H.modifyFormatTime);if((H=H.snapInfoVOList)&&
0<H.length){for(var Fa=[],Ba=0;Ba<H.length;Ba++){var va=new P;va.fromJsonObject(H[Ba]);Fa.push(va)}N.setChildren(Fa)}};this.toJsonObject=function(){var H={};H.snapGroupId=ia;H.reportId=ca;H.reportName=ja;H.creatorName=ea;H.createTime=na;H.modifierName=g;H.modifyTime=m;H.snapInfoVOList=[];for(var Fa=0;Fa<pa.length;Fa++){var Ba=pa[Fa].toJsonObject();H.snapInfoVOList.push(Ba)}H.level=N.getLevel();return H}};fa.PUBLIC=new fa("\u516c\u5171","A");fa.PERSONAL=new fa("\u4e2a\u4eba","B")})();(function(){function P(b,r){var E=this,G,K,k,f,z=r&&r.getExtReportSnapGroupType()&&r.getExtReportSnapGroupType()==h.PUBLIC.getValue(),v=b.getEditPublicSnapGroupPerm(),x=b.getDeletePublicSnapGroupPerm(),F,u,p,X,R;this.setSelected=function(c){c&&F&&F(G,r);K=c};this.getSelected=function(){return K};this.setFunMoveUpGroupItemCallBack=function(c){X=c};this.setFunSnapGroupItemClickCallBack=function(c){F=c};this.setFunDeleteSuccessCallBack=function(c){u=c};this.setFunAddSuccessCallBack=function(c){p=c};
this.setNoDataCallBack=function(c){R=c};this.getJqUi=function(){G||qa();return G};this.getExtReportSnapGroupModel=function(){return r};var qa=function(){G=$("<div>");G.addClass("extreport-snap-group-list");k=new Da;k.setEnabled(!0);k.addBlurListener(d);var c=k.getJqUi();c.addClass("extreport-snap-group-name-edit");c.hide();c.on("click",function(l){l.stopPropagation()});c.on("keydown",function(l){13==(l.keyCode||l.which||l.charCode)&&d()});f=$("<span>");f.addClass("extreport-snap-group-title-span");
G.on("click",function(l){F(G,r)});c.appendTo(G);f.appendTo(G);aa()},aa=function(){var c=r.getExtReportSnapGroupName();k.setText(c);f.text(c);f.attr("title",c);if(!z||v)c=$("<span>"),c.addClass("moveup-button"),c.attr("title",m.get("moveupExtReportGroup","\u4e0a\u79fb\u76ee\u5f55")),c.on("click",B),ea.backgroundWithHover(c,"btn_orderup"),c.appendTo(G);if(!z||v)c=$("<span>"),c.addClass("edit-button"),c.attr("title",m.get("editExtReportSnapCategory","\u7f16\u8f91\u76ee\u5f55")),c.on("click",E.editGroupName),
ea.backgroundWithHover(c,"btn-edit"),c.appendTo(G);if(!z||x)c=$("<span>"),c.addClass("delete-button"),c.attr("title",m.get("deleteExtReportSnapCategory","\u5220\u9664\u76ee\u5f55")),c.on("click",n),ea.backgroundWithHover(c,"btn-delete"),c.appendTo(G)},B=function(c){X(E)};this.editGroupName=function(c){c&&c.stopPropagation();f.hide();k.getJqUi().show();k.setText(r?r.getExtReportSnapGroupName():"");k.requestFocus()};var C=function(){if(b.isLoadSnapGroup()){var c=b.getSnapGroupModels(r.getExtReportSnapGroupType());
c&&0!=c.length||R&&R()}},d=function(){var c=k.getText();c=c.trim();var l=c.length;r.getExtReportSnapGroupID()&&(r.getExtReportSnapGroupName()==c||!c||50<l)?(k.getJqUi().hide(),f.show(),50<l&&(c=m.get("CategoryNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),b.getMessageCurtain().showPrompt(c,b.getMsgTimeOut()))):c?50<l?(c=m.get("CategoryNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),b.getMessageCurtain().showPrompt(c,
b.getMsgTimeOut())):a():(G.remove(),C())},a=function(){var c=new D;c.setExtReportSnapGroupID(r.getExtReportSnapGroupID());c.setExtReportSnapGroupName(k.getText().trim());c.setExtReportSnapGroupType(r.getExtReportSnapGroupType());c.setOrderID(r.getOrderID());var l=b.createFacade(function(y){var q=r.getExtReportSnapGroupID(),S=k.getText();S=S.trim();f.text(S);f.attr("title",S);k.setText(S);k.getJqUi().hide();f.show();r.getExtReportSnapGroupID()||r.setExtReportSnapGroupID(y);r.setExtReportSnapGroupName(k.getText().trim());
y=q?m.get("editCategorySuccess","\u4fee\u6539\u76ee\u5f55\u6210\u529f\u3002"):m.get("addCategorySuccess","\u65b0\u589e\u76ee\u5f55\u6210\u529f\u3002");b.getMessageCurtain().showSuccess(y,b.getMsgTimeOut());q||p(E)},function(y,q){return 9010002==y?(y=m.get("extreportGroupNameHasExist","\u8be5\u76ee\u5f55\u540d\u79f0\u5df2\u5b58\u5728\u3002"),b.getMessageCurtain().showPrompt(y,b.getMsgTimeOut()),k.requestFocus(),!0):9010005==y?(y=m.get("noOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002"),
b.getMessageCurtain().showPrompt(y,b.getMsgTimeOut()),G.remove(),!0):!1});l.setShowBlocking(!0);l.saveSnapGroup(c)},n=function(c){c&&c.stopPropagation();r.getExtReportSnapGroupID()?L():G.remove()},L=function(){var c=r.getExtReportSnapGroupID(),l=b.createFacade(function(y){(y=y.snapInfoList)&&0<y.length?(y=m.get("deleteSnapInfoBeforeSnapGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u5feb\u7167\u518d\u5220\u9664\u76ee\u5f55\u3002"),b.getMessageCurtain().showPrompt(y,b.getMsgTimeOut())):(y=
b.getSnapGroupModels(r.getExtReportSnapGroupType()),h.PERSONAL.getValue()==r.getExtReportSnapGroupType()&&1==y.length?(y=m.get("atLeastNeedOneUserExtReportGroup","\u81f3\u5c11\u9700\u8981\u4fdd\u7559\u4e00\u4e2a\u7528\u6237\u76ee\u5f55\u3002"),b.getMessageCurtain().showPrompt(y,b.getMsgTimeOut())):b.isSnapGroupEmpty(c)&&r.getExtReportSnapGroupType()==h.PUBLIC.getValue()&&null==r.getExistsOthersSnapInGroup()?b.checkExistsOthersSnapInGroup(c,function(q){q?(r.setExistsOthersSnapInGroup(!0),b.getMessageCurtain().showPrompt(m.get("deleteOthersSnapInfoBeforeSnapGroup",
"\u5f53\u524d\u76ee\u5f55\u5b58\u5728\u5176\u4ed6\u7528\u6237\u5df2\u4fdd\u5b58\u7684\u5feb\u7167\uff0c\u65e0\u6cd5\u5220\u9664\u3002"),b.getMsgTimeOut())):(r.setExistsOthersSnapInGroup(!1),q=m.get("confirmToDeleteCategory","\u786e\u5b9a\u8981\u5220\u9664\u76ee\u5f55'#1'\u5417\uff1f").replace("#1",r.getExtReportSnapGroupName()),b.showDeleteConfirmDialog(q,oa))}):r.getExistsOthersSnapInGroup()?b.getMessageCurtain().showPrompt(m.get("deleteOthersSnapInfoBeforeSnapGroup","\u5f53\u524d\u76ee\u5f55\u5b58\u5728\u5176\u4ed6\u7528\u6237\u5df2\u4fdd\u5b58\u7684\u5feb\u7167\uff0c\u65e0\u6cd5\u5220\u9664\u3002"),
b.getMsgTimeOut()):(y=m.get("confirmToDeleteCategory","\u786e\u5b9a\u8981\u5220\u9664\u76ee\u5f55'#1'\u5417\uff1f").replace("#1",r.getExtReportSnapGroupName()),b.showDeleteConfirmDialog(y,oa)))},function(y,q){return!1});l.setShowBlocking(!0);l.loadSnapInfoListByGroupID(c)},oa=function(){var c=r.getExtReportSnapGroupID(),l=b.createFacade(function(y){G&&G.remove();u(r);C();y=m.get("deleteExtReportGroupSuccess","\u5220\u9664\u76ee\u5f55\u6210\u529f\u3002");b.getMessageCurtain().showSuccess(y,b.getMsgTimeOut())},
function(y,q){return 9010003==y?(y=m.get("deleteSnapInfoBeforeSnapGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u5feb\u7167\u518d\u5220\u9664\u76ee\u5f55\u3002"),b.getMessageCurtain().showPrompt(y,b.getMsgTimeOut()),!0):9010008==y?(b.getMessageCurtain().showPrompt(m.get("deleteOthersSnapInfoBeforeSnapGroup","\u5f53\u524d\u76ee\u5f55\u5b58\u5728\u5176\u4ed6\u7528\u6237\u5df2\u4fdd\u5b58\u7684\u5feb\u7167\uff0c\u65e0\u6cd5\u5220\u9664\u3002"),b.getMsgTimeOut()),!0):!1});l.setShowBlocking(!0);
l.deleteSnapGroup(c)}}function fa(b){function r(){this.getTailBlankForDragging=function(){return-1};this.isRowDraggable=function(d,a){return!1};this.isColumnDraggable=function(d,a){return d.getColumnsCount()==a+1?!1:!0};this.getMinRowHeightLimited=function(d,a){return 3};this.getMinColumnWidthLimited=function(d,a){return 4};this.rowDraggedAction=function(d,a,n){var L=d.isSyncUIWhenModelChanged();d.setSyncUIWhenModelChanged(!0);a=d.getRow(a);a.setHeight(a.getHeight()+n);d.setSyncUIWhenModelChanged(L)};
this.setMinColumnWidth=function(d){};this.columnDraggedAction=function(d,a,n){var L=d.isSyncUIWhenModelChanged();d.setSyncUIWhenModelChanged(!0);a=d.getColumn(a);a.setWidth(a.getWidth()+n);d.setSyncUIWhenModelChanged(L)}}function E(d){KTDefaultCellRender.call(this,d);var a=this,n=this.paintCellUI;this.paintCellUI=function(c,l){var y=a.getCurrentRowIdx(),q=a.getCurrentRow(),S=a.getCurrentColIdx();q=q.getUserObject();var ra=0;q&&(ra=q.getLevel());if(y<t.getHeadRowCount())n(c,l),0==S&&1==y?(q=z&&z.isChecked()?
!0:!1,z=new O,z.setChecked(q),z.addCheckedListener(function(ka,ta){if(ta){ka=ka.isChecked();for(var ua=ta=0;ua<v.length;ua++){var wa=v[ua];wa.setChecked(ka,!1);0<wa.getLevel()&&ka&&ta++}t.refresh(k);p&&p(ta)}}),q=z.getJqUi(),q.addClass("snap-info-table-checkbox"),q.appendTo(c)):1==S&&1==y&&oa().appendTo(c);else if(0==S){q.getId();var T=new O;T.setChecked(q.getChecked());T.setUserObject(q);T.addCheckedListener(function(ka,ta){if(ta){var ua=ka.getUserObject();ka=ka.isChecked();ua.setChecked(ka,ta)}});
q=T.getJqUi();q.addClass("snap-info-table-checkbox");q.appendTo(c)}else 1==S?($(c).find("span").remove(),l=$("<div>"),y=q.getName(),l.attr("title",y),l.css("line-height","28px"),S="18px",0<ra&&(S="28px"),l.css("padding-left",S),l.css("padding-right","2px"),l.css("overflow","hidden"),l.css("text-overflow","ellipsis"),0==ra&&q.getUserObject().getDeleted()?L(l,y,y):L(l,F,y),0!=ra||q.getUserObject().getHasPerm()&&!q.getUserObject().getDeleted()?l.css("margin-left","5px"):(ra=q.getCreatorName(),q.getUserObject().getDeleted()&&
(T=y,l.css("padding-left","2px")),q.getUserObject().getHasPerm()||(T?T+=m.get("commaSymbol","\uff0c")+m.get("noSnapViewPermission","\u65e0\u6cd5\u67e5\u770b\u7531\u6b64\u62a5\u8868\u751f\u6210\u7684\u5feb\u7167\u3002"):(T=m.get("noSnapPermission","\u60a8\u6ca1\u6709\u8be5\u62a5\u8868\u7684\u6743\u9650"),ra&&(T+=m.get("contactCreator","\uff0c\u8bf7\u8054\u7cfb#1\u8fdb\u884c\u6388\u6743\u3002").replace("#1",ra)),l.css("padding-left","2px"))),q=$("<div>"),q.attr("title",T),ea.background(q,"error_tips"),
q.css({height:"14px",width:"14px","float":"left","margin-left":"23px","margin-top":"8px","margin-right":"3px",cursor:"pointer"}),q.appendTo(c),l.css("margin-left","20px")),(q=$(c).children())&&0<q.length&&$(q[0]).css("left","5px"),l.appendTo(c)):2==S?(T=$("<div>"),ra=q.getCreatorName(),T.attr("title",ra),T.addClass("snap-info-table-cell-text"),L(T,F,ra),T.appendTo(c)):3==S?(T=$("<div>"),q=q.getCreateFormatTime(),T.text(q),T.attr("title",q),T.addClass("snap-info-table-cell-text"),T.appendTo(c)):4==
S?(T=$("<div>"),q=q.getModifierName(),T.text(q),T.attr("title",q),T.addClass("snap-info-table-cell-text"),T.appendTo(c)):5==S&&(T=$("<div>"),q=q.getModifyFormatTime(),T.text(q),T.attr("title",q),T.addClass("snap-info-table-cell-text"),T.appendTo(c))};var L=function(c,l,y){if(l&&y){l=l.toUpperCase();var q=y.toUpperCase(),S=q.split(l),ra=l.length,T;for(T in S){var ka=q.indexOf(S[T]),ta=y.substr(wa,S[T].length);ka+=S[T].length;var ua=q.length-ka;q=q.substr(ka,ua);y=y.substr(ka,ua);ka=$("<span>");ka.text(ta);
ka.appendTo(c);if(T!=S.length-1&&1<S.length){var wa=q.indexOf(l);ta=y.substr(wa,ra);ka=wa+ra;ua=q.length-ka;q=q.substr(ka,ua);y=y.substr(ka,ua);ka=$("<span>");ka.text(ta);ka.css("color","red");ka.clone().appendTo(c)}}}else c.text(y)},oa=function(){var c=R(),l=$('<div style="overflow: hidden; position: absolute; left: 4px; top: 0px; width: 16px; height: 30px; cursor: pointer; z-index: 2;"></div>'),y=$('<div style="overflow: hidden; position: absolute; left: 2px; top: 7px; width: 9px; height: 9px; border: 1px solid rgb(138, 158, 191); border-radius: 3px; background-color: rgb(255, 255, 255);">\n<div style="overflow: hidden; position: absolute; left: 1px; top: 1px; width: 3px; height: 3px; border-bottom: 1px solid black; border-right: 1px solid black;"></div>\n<div style="overflow: hidden; position: absolute; left: 4px; top: 4px; width: 3px; height: 3px; border-top: 1px solid black; border-left: 1px solid black;"></div>\n</div>'),
q=$('<div style="overflow: hidden; position: absolute; left: 2px; top: 7px; width: 9px; height: 9px; border: 1px solid rgb(138, 158, 191); border-radius: 3px; background-color: rgb(255, 255, 255);">\n<div style="overflow: hidden; position: absolute; left: 1px; top: 1px; width: 7px; height: 3px; border-bottom: 1px solid black;"></div>\n</div>'),S=null==c||c;S?q.appendTo(l):y.appendTo(l);l.click(function(){$(this).empty();var ra=!S;ra?q.appendTo($(this)):y.appendTo($(this));var T=R();null!=T&&(ra=!T);
for(T=0;T<v.length;T++){var ka=v[T];ka.getExpand();0==ka.getLevel()?ka.setExpand(ra):ka.setHide(!ra)}K.updateUI()});return l}}function G(d){var a=this,n=d,L,oa,c,l,y,q,S,ra,T,ka,ta,ua,wa,Na,Oa,Pa,Ma;this.fromObject=function(ba){c=ba.getCreatorName();l=ba.getCreateTime();y=ba.getCreateFormatTime();q=ba.getModifierName();S=ba.getModifyTime();ra=ba.getModifyFormatTime()};this.getLevel=function(){return T};this.setLevel=function(ba){T=ba};this.getId=function(){return L};this.setId=function(ba){L=ba};
this.getName=function(){return oa};this.setName=function(ba){oa=ba};this.getCreatorName=function(){return c};this.setCreatorName=function(ba){c=ba};this.getCreateTime=function(){return l};this.setCreateTime=function(ba){l=ba};this.getCreateFormatTime=function(){return y};this.setCreateFormatTime=function(ba){y=ba};this.getModifierName=function(){return q};this.setModifierName=function(ba){q=ba};this.getModifyTime=function(){return S};this.setModifyTime=function(ba){S=ba};this.getModifyFormatTime=
function(){return ra};this.setModifyFormatTime=function(ba){ra=ba};this.getUserObject=function(){return n};this.setUserObject=function(ba){n=ba};this.setParentId=function(ba){ka=ba};this.getParentId=function(){return ka};this.setDisplay=function(ba){ta=ba};this.getDisplay=function(){return ta};this.setHide=function(ba){Oa=ba};this.getHide=function(){return Oa};this.setChecked=function(ba,Qa){ua=ba;n&&n.setChecked(ba);Ma&&Ma(a,Qa)};this.getChecked=function(){return ua};this.setRowStyle=function(ba){wa=
ba};this.getRowStyle=function(){return wa};this.setExpand=function(ba){0==T&&n&&n.setExpand(ba);Na=ba};this.getExpand=function(){return Na};this.setHasPerm=function(ba){Pa=ba};this.getHasPerm=function(){return Pa};this.setCheckListener=function(ba){Ma=ba}}var K=this,k,f,z,v=[],x,F,u,p;this.setNoDataUI=function(d){u=d};this.getFunTableRowCheckedCallback=function(){return p};var X=function(d,a){d=a.isExpanded();if(a=(a=a.getCell())&&a.getValue())if(a.setExpand(d),a=qa(a.getId()))for(var n=0;n<a.length;n++)a[n].setHide(!d);
t.refresh(k)};this.getJqUi=function(){if(!f){if(!k){k=t.createTable();k.setDraggableAdjusting(!0,3,0,new r);k.setColumnFitVisibleWidth(!0);var d=new E(k);d.setOutsideVisible(!1);k.setCellRender(d);k.addTreeExpandListener(X);k.setSyncUIWhenModelChanged(!1);B()}f=$(k.getUI());Ba.layoutCtrlWithLRTB(f,0,0,null,0,0,null)}return f};this.resize=function(){t.clear(k);B();K.updateUI()};this.isEmpty=function(){return!v||0==v.length};this.clear=function(){k&&t.clear(k);v=[];F=z=x=null};var R=function(){for(var d=
!0,a=!1,n=0;n<v.length;n++){var L=v[n];0==L.getLevel()&&(d=d&&L.getExpand(),a=a||L.getExpand())}return d?!0:a?null:!1};this.refreshTable=function(){z=null;var d=[];if(x)for(var a=x.getExtReportSnapGroupID(),n=b.getSnapInfoTreeModel(),L=com.kingdee.bos.qing.common,oa=0;oa<n.length;oa++){var c=n[oa];if(c.getSnapGroupId()==a&&c.getDisplay()){var l=new G(c);l.setLevel(0);l.fromObject(c);l.setId(c.getReportId());l.setHide(!1);l.setName(c.getReportName());l.setCheckListener(aa);var y=new KTStyle;y.setBackgroundColor(L.CommonTableSkin.EVEN_ROW_BACKGROUND_COLOR);
l.setRowStyle(y);l.setChecked(c.getChecked(),!1);l.setExpand(c.getExpand());l.setParentId("0");d.push(l);c=c.getChildren();for(y=0;y<c.length;y++){var q=c[y];if(q.getDisplay()){var S=new G(q);S.setLevel(1);S.fromObject(q);S.setId(q.getSnapId());S.setName(q.getSnapName());S.setChecked(q.getChecked(),!1);S.setExpand(!1);S.setHide(!l.getExpand());S.setCheckListener(aa);S.setParentId(l.getId());d.push(S)}}}}v=d;K.updateUI()};this.updateUI=function(){t.clear(k);if(!v||0>=v.length){F?u.setText(m.get("searchNoResult",
"\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):u.setText(m.get("noSnapInfo","\u6682\u65e0\u62a5\u8868\u5feb\u7167"));f.hide();u.show();var d=K.getSelectSnapInfoModel().length}else{B();f.show();u.hide();for(d=0;d<v.length;d++){var a=v[d],n=t.createRow(k,!1);n.setUserObject(a);var L=n.getCell(1);L.setValue(a);var oa=a.getLevel();oa=new KTCellTreeModel(oa);oa.setExpanded(a.getExpand());n.setHide(a.getHide());n.setStyle(a.getRowStyle());L.setTreeModel(oa)}t.refresh(k);d=K.getSelectSnapInfoModel().length}p&&
p(d)};var qa=function(d){for(var a=[],n=0;n<v.length;n++){var L=v[n];L.getParentId()==d&&a.push(L)}return a};this.setTableRowCheckedCallback=function(d){p=d};var aa=function(d,a){if(a){if(0==d.getLevel())for(var n=qa(d.getId()),L=0;L<n.length;L++)n[L].getChecked()!=d.getChecked()&&n[L].setChecked(d.getChecked(),!1);else{n=qa(d.getParentId());a=!0;for(L=0;L<n.length;L++)if(!n[L].getChecked()){a=!1;break}a:{d=d.getParentId();for(n=0;n<v.length;n++)if(L=v[n],L.getId()==d){d=L;break a}d=void 0}d.setChecked(a,
!1)}z&&z.setChecked(C());t.refresh(k);a=K.getSelectSnapInfoModel().length;p&&p(a)}};this.getSelectSnapInfoModel=function(){for(var d=[],a=0;a<v.length;a++){var n=v[a];n.getChecked()&&0<n.getLevel()&&d.push(n.getUserObject())}return d};var B=function(){if(k){k.addColumns(6);k.getColumn(0).setWidth(26);k.getColumn(1).setWidth(100);k.getColumn(2).setWidth(100);k.getColumn(3).setWidth(120);k.getColumn(4).setWidth(100);k.getColumn(5).setWidth(120);var d=t.createHeadRow(k),a=new KTStyle;a.setBackgroundColor(com.kingdee.bos.qing.common.CommonTableSkin.HEAD_ROW_BACKGROUND_COLOR);
a.setBold(!0);a.setTextAlign("center");d.setStyle(a);d.getCell(1).setValue(m.get("name","\u540d\u79f0"));d.getCell(2).setValue(m.get("creator","\u521b\u5efa\u4eba"));d.getCell(3).setValue(m.get("createtime","\u521b\u5efa\u65f6\u95f4"));d.getCell(4).setValue(m.get("modifier","\u4fee\u6539\u4eba"));d.getCell(5).setValue(m.get("modifytime","\u4fee\u6539\u65f6\u95f4"))}},C=function(){if(!v||0>=v.length)return!1;for(var d=0;d<v.length;d++)if(!v[d].getChecked())return!1;return!0};this.setSnapGroupModel=
function(d){x=d};this.getSnapGroupModel=function(){return x};this.getSearchText=function(){return F};this.setSearchText=function(d){F=d}}function W(b,r){var E,G=this,K=r,k=r.getValue()==h.PUBLIC.getValue()?m.get("public","\u516c\u5171"):m.get("personal","\u4e2a\u4eba"),f,z,v,x=[],F,u,p=b.getNoDataUI(m.get("noSnapGroup","\u6ca1\u6709\u76ee\u5f55\uff0c\u8bf7\u5148\u65b0\u5efa\u76ee\u5f55"));za.AbstractTabPane.call(this);this.getJqUi=function(){if(!E){E=$("<div>");var a=$("<div>");a.addClass("extreport-snap-group-container");
a.css({width:"100%",height:"100%"});z=$("<div>");z.addClass("extreport-snap-group-op");var n=$("<span>");n.addClass("extreport-snap-group-title");n.text(m.get("category","\u76ee\u5f55"));(r.getValue()==h.PERSONAL.getValue()||b.getAddPublicSnapGroupPerm())&&R();n.appendTo(z);z.appendTo(a);f=$("<div class='extreport-snap-group-all-list' />");f.appendTo(a);a.appendTo(E);p.getJqUi().appendTo(a);G.updateUI()}return E};this.setUpdateUIListener=function(a){F=a};var X=function(){p.hide();f.show();var a=new D;
a.setExtReportSnapGroupType(K.getValue());a=new P(b,a);a.setFunSnapGroupItemClickCallBack(qa);a.setFunDeleteSuccessCallBack(aa);a.setFunAddSuccessCallBack(d);a.setFunMoveUpGroupItemCallBack(C);a.setNoDataCallBack(G.updateUI);var n=!b.getSearchText()&&0<x.length;B(a,n);a.getJqUi().appendTo(f);a.editGroupName()},R=function(){var a=$(z).find(".add-extreport-snap-group");a&&0<a.length||(a=$("<span>"),a.addClass("add-extreport-snap-group"),a.attr("title",m.get("addExtReportSnapGroup","\u6dfb\u52a0\u76ee\u5f55")),
a.on("click",X),ea.backgroundWithHover(a,"btn-add-classification"),a.appendTo(z))},qa=function(a,n){a.hasClass("extreport-snap-group-selected")||($(f).find(".extreport-snap-group-selected").removeClass("extreport-snap-group-selected"),a.addClass("extreport-snap-group-selected"),u&&u(n),v=n)},aa=function(a){a=a.getExtReportSnapGroupID();for(var n=0,L=0;L<x.length;L++)if(a==x[L].getExtReportSnapGroupModel().getExtReportSnapGroupID()){x.splice(L,1);n=L;break}b.funRemoveSnapGroupById(K.getValue(),a);
v&&v.getExtReportSnapGroupID()!=a||(x&&0<x.length?(n>x.length-1&&(n=x.length-1),x[n].setSelected(!0)):v=null)},B=function(a,n){a=a.getJqUi().children(".moveup-button");n?a.css("display",""):a.css("display","none")},C=function(a){var n=a.getJqUi(),L=x.indexOf(a);if(-1<L){n.insertBefore(n.prev());n=x[L-1];x.splice(L-1,2,a,n);for(var oa=[],c=[],l=0,y=x.length;l<y;l++){var q=x[l].getExtReportSnapGroupModel();q.setOrderID(y-l);c.push(q);oa.push(q.toJsonObject())}0<oa.length&&(l=b.createFacade(function(S){K.getValue()==
h.PUBLIC.getValue()?b.setPublicSnapGroupModel(c):K.getValue()==h.PERSONAL.getValue()&&b.setPersonalSnapGroupModel(c)},function(S,ra){return!0}),l.setShowBlocking(!1),l.saveOrderSnapGroup(oa));1==L&&(B(n,!0),B(a,!1))}},d=function(a){x.push(a);b.getSnapGroupModels(K.getValue()).push(a.getExtReportSnapGroupModel());a.setSelected(!0)};this.updateUI=function(){var a=b.getSnapGroupModels(K.getValue());r.getValue()==h.PERSONAL.getValue()||b.getAddPublicSnapGroupPerm()?R():$(z).find(".add-extreport-snap-group").remove();
p.hide();f.show();var n;x=[];$(f).empty();for(var L=!1,oa=0;oa<a.length;oa++){var c=a[oa];if(c.getDisplay()){L=!0;var l=new P(b,c);l.setFunMoveUpGroupItemCallBack(C);l.setFunSnapGroupItemClickCallBack(qa);l.setFunAddSuccessCallBack(d);l.setFunDeleteSuccessCallBack(aa);l.setNoDataCallBack(G.updateUI);var y=!b.getSearchText()&&0!=oa;B(l,y);x.push(l);y=l.getJqUi();v&&v.getExtReportSnapGroupID()==c.getExtReportSnapGroupID()&&(n=l);y.appendTo(f)}}b.isLoadSnapGroup()&&(!a||0>=a.length?(p.setText(m.get("noSnapGroup",
"\u6ca1\u6709\u76ee\u5f55\uff0c\u8bf7\u5148\u65b0\u5efa\u76ee\u5f55"),48),f.hide(),p.show()):L||(p.setText(m.get("searchNoResult","\u641c\u7d22\u7ed3\u675f,\u6ca1\u6709\u5339\u914d\u7684\u7ed3\u679c"),48),f.hide(),p.show()));!n&&0<x.length&&(n=x[0]);n&&n.setSelected(!0);F&&F(x)};this.setItemClickCallBack=function(a){u=a};this.into=function(){G.updateUI()};this.getTitle=function(){return k};this.setTitle=function(a){k=a};this.getType=function(){return K};this.setType=function(a){K=a}}function N(b){var r,
E,G;this.getJqUi=function(){E||(r=new Ha,r.addSearchListener(K),r.setSearchListenerDelay(1E3),r.setPlaceholder(m.get("searchBoxPlaceholder","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9")),r.setShowSearchIcon(!0),E=r.getJqUi(),E.addClass("snap-search-box"));return E};this.clear=function(){r.clear()};var K=function(z){b.funLoadSnapInfoListBySnapGroupIds(b.getUnLoadSnapGroupID(),f)};this.getDoSearchCallBack=function(){return G};this.setDoSearchCallBack=function(z){G=z};var k=function(z,v){for(var x=0;x<
z.length;x++){var F=z[x];F.setDisplay(v);F.getChildren&&k(F.getChildren(),v)}},f=function(){var z;r&&(z=r.getText());z&&z.trim()&&(z=z.trim(),z=z.toUpperCase());var v=b.getSnapGroupModels(h.PUBLIC.getValue()),x=b.getSnapGroupModels(h.PERSONAL.getValue()),F=b.getSnapInfoTreeModel();b.resetModelSearchHitStatus();if(z){k(v,!1);k(x,!1);k(F,!1);var u=b.getSnapGroupModels(h.PUBLIC.getValue());v=b.getSnapGroupModels(h.PERSONAL.getValue());u=u.concat(v);F=b.getSnapInfoTreeModel();v=[];if(F&&0<F.length)for(x=
0;x<F.length;x++){var p=F[x],X=p.getReportName(),R=p.getCreatorName(),qa=-1,aa=-1;X&&(X=X.trim(),X=X.toUpperCase(),qa=X.indexOf(z));R&&(R=R.trim(),R=R.toUpperCase(),aa=R.indexOf(z));X=p.getChildren();R=!1;if(X){for(var B=0;B<X.length;B++){var C=X[B],d=C.getSnapName(),a=C.getCreatorName(),n=-1,L=-1;d&&(d=d.trim(),d=d.toUpperCase(),n=d.indexOf(z));a&&(a=a.trim(),a=a.toUpperCase(),L=a.indexOf(z));if(-1<n||-1<L)R=!0,C.setDisplay(!0)}if(-1<qa||-1<aa||R)if(p.setDisplay(!0),p.setSearchHit(!0),p.setExpand(!0),
-1>=v.indexOf(p.getSnapGroupId())&&v.push(p.getSnapGroupId()),!R)for(B=0;B<X.length;B++)C=X[B],C.setDisplay(!0)}else if(-1<qa||-1<aa)p.setDisplay(!0),-1>=v.indexOf(p.getSnapGroupId())&&v.push(p.getSnapGroupId())}F={};F[h.PUBLIC.getValue()]=0;F[h.PERSONAL.getValue()]=0;if(0<v.length)for(x=0;x<u.length;x++)p=u[x],-1<v.indexOf(p.getExtReportSnapGroupID())&&(p.setDisplay(!0),p=p.getExtReportSnapGroupType(),F[p]+=1);u=F}else k(v,!0),k(x,!0),k(F,!0);G&&G(z,u)}}function ca(b){var r=b,E,G,K;this.getJqUi=
function(){if(!E){var k=$("<div>");k.css({color:"#FFFFFF",width:"100%",height:"100%"});k.hide();G=$("<div>");G.text(r);G.appendTo(k);Ba.layoutCtrlCenterAlign(G,500);G.css({height:"20px","line-height":"20px","font-size":"16px","text-align":"center",color:"#BBBBBB","margin-top":G.parent().height()/2-110+270+"px"});K=$("<div>");ea.background(K,"no-data");K.appendTo(k);Ba.layoutCtrlCenterAlign(K,220);K.css({height:"220px","margin-top":K.parent().height()/2-110+"px"});E=k}return E};this.show=function(){E.show()};
this.hide=function(){E.hide()};this.setText=function(k,f){r=k;G&&G.text(k);f=f?f:0;k=G.parent().height()/2-110+270;G.css({"margin-top":(0<k?k:0)+f+"px"});k=K.parent().height()/2-110;K.css({"margin-top":(0<k?k:0)+f+"px"})}}"undefined"==typeof com&&(com={});"undefined"==typeof com.kingdee&&(com.kingdee={});"undefined"==typeof com.kingdee.bos&&(com.kingdee.bos={});"undefined"==typeof com.kingdee.bos.extreport&&(com.kingdee.bos.extreport={});"undefined"==typeof com.kingdee.bos.extreport.snapcenter&&(com.kingdee.bos.extreport.snapcenter=
{});"undefined"==typeof com.kingdee.bos.extreport.snapcenter.ui&&(com.kingdee.bos.extreport.snapcenter.ui={});var ja=com.kingdee.bos.extreport.snapcenter.ui;ja.Main=function(){var b,r,E,G,K,k=!1,f,z,v,x,F,u,p,X,R,qa,aa,B=new function(){var e=this,J,V,Z=[],la=[],xa=[],sa=[],Ia,Ka=!1,Ra=!1;this.getNoDataUI=function(A){return new ca(A)};this.getMsgTimeOut=function(){return 3E3};this.resetModelExpandAndCheckStatus=function(){for(var A=0;A<sa.length;A++){var M=sa[A];M.getSearchHit()||M.setExpand(!1);M.setChecked(!1);
M=M.getChildren();for(var Q=0;Q<M.length;Q++)M[Q].setChecked(!1)}};this.resetModelSearchHitStatus=function(){for(var A=0;A<sa.length;A++)sa[A].setSearchHit(!1)};this.isLoadSnapGroup=function(){return Ra};this.funLoadExtReportSnapGroupList=function(A){e.createFacade(function(M){Ra=!0;if(null==M){var Q=m.get("createCategoryFirst","\u60a8\u9700\u8981\u5148\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u3002");e.getMessageCurtain().showPrompt(Q,B.getMsgTimeOut())}else{Q=M.snapGroupList;Ka=M.editPublicSnapPerm;
M=[];var ma=[],ya=[];if(Q&&0<Q.length){for(var Ga=0;Ga<Q.length;Ga++){var La=new D;La.fromJsonObject(Q[Ga]);La.getExtReportSnapGroupType()==h.PUBLIC.getValue()?(M.push(La.getExtReportSnapGroupID()),ma.push(La)):La.getExtReportSnapGroupType()==h.PERSONAL.getValue()&&ya.push(La)}e.setPublicSnapGroupModel(ma);e.setPersonalSnapGroupModel(ya)}e.funLoadSnapInfoListBySnapGroupIds(M,A)}},function(M,Q){return!1}).loadSnapGroupList()};this.funLoadSnapInfoListBySnapGroupId=function(A,M){var Q=e.createFacade(function(ma){e.funMarkSnapGroupIdsLoaded([A]);
ma=ma.snapInfoList;Sa(ma);M&&M(ma)},function(ma,ya){return!1});Q.setShowBlocking(!0);Q.loadSnapInfoListByGroupID(A)};this.funLoadSnapInfoListBySnapGroupIds=function(A,M){if(!A||0>=A.length)M&&M();else{var Q=e.createFacade(function(ma){e.funMarkSnapGroupIdsLoaded(A);Sa(ma.snapInfoList);M&&M()},function(ma,ya){return!1});Q.setShowBlocking(!0);Q.loadSnapInfoListByGroupIDS(A)}};var Sa=function(A){if(A&&0<A.length)for(var M=0;M<A.length;M++){var Q=new U;Q.fromJsonObject(A[M]);0>=Q.getReportName().length&&
(Q.setDeleted(!0),Q.setReportName(m.get("extReportDeleted","\u8be5\u62a5\u8868\u5df2\u88ab\u5220\u9664")));e.addSnapInfoTreeModel(Q)}};this.checkExistsOthersSnapInGroup=function(A,M){var Q=e.createFacade(function(ma){M&&M(ma)},function(ma,ya){return!1});Q.setShowBlocking(!0);Q.checkExistsOthersSnapInGroup(A)};this.clear=function(){Z=[];la=[];xa=[];sa=[];Ka=!1;Ia=null};this.getSnapGroupModels=function(A){if(h.PUBLIC.getValue()==A)return Z;if(h.PERSONAL.getValue()==A)return la};this.getSnapInfoTreeModel=
function(){return sa};this.isSnapGroupEmpty=function(A){for(var M=0;M<sa.length;M++)if(sa[M].getSnapGroupId()==A)return!1;return!0};this.getSnapInfoTreeModelBySnapId=function(A){for(var M=0;M<sa.length;M++)for(var Q=sa[M],ma=Q.getChildren(),ya=0;ya<ma.length;ya++)if(ma[ya].getSnapId()==A)return Q};this.addSnapInfoTreeModel=function(A){a:{var M=A.getSnapGroupId()+"_"+A.getReportId();for(var Q=0;Q<sa.length;Q++){var ma=sa[Q];if(ma.getSnapGroupId()+"_"+ma.getReportId()==M){M=!0;break a}}M=!1}M||sa.push(A)};
this.funMarkSnapGroupIdsLoaded=function(A){for(var M=0;M<A.length;M++)xa.push(A[M])};this.isUnloadSnapGroupId=function(A){return-1>=xa.indexOf(A)};this.funFindSnapGroupByTypeAndId=function(A,M){A=e.getSnapGroupModels(A);for(var Q=0;Q<A.length;Q++){var ma=A[Q];if(ma.getExtReportSnapGroupID()==M)return ma}};this.funRemoveSnapGroupById=function(A,M){A=e.getSnapGroupModels(A);for(var Q=0;Q<A.length;Q++)A[Q].getExtReportSnapGroupID()==M&&A.splice(Q,1)};this.funRemoveSnapInfoModelByIds=function(A){for(var M=
0;M<A.length;M++)for(var Q=A[M],ma=0;ma<sa.length;ma++){for(var ya=sa[ma].getChildren(),Ga=0;Ga<ya.length;Ga++)Q==ya[Ga].getSnapId()&&ya.splice(Ga,1);0>=ya.length&&sa.splice(ma,1)}};this.getSearchText=function(){return Ia};this.setSearchText=function(A){Ia=A};this.setPublicSnapGroupModel=function(A){Z=A};this.setPersonalSnapGroupModel=function(A){la=A};this.getUnLoadSnapGroupID=function(){for(var A=Z.concat(la),M=[],Q=0;Q<A.length;Q++){var ma=A[Q];e.isUnloadSnapGroupId(ma.getExtReportSnapGroupID())&&
M.push(ma.getExtReportSnapGroupID())}return M};this.getMessageCurtain=function(){J||(J=new pa,J.getJqUi().appendTo($("body")));return J};this.createFacade=function(A,M,Q){var ma=Ta();return new ia(ma,A,function(ya,Ga){return M?M(ya,Ga):!1},Q)};this.getAddPublicSnapGroupPerm=function(){return e.getEditPublicSnapGroupPerm()};this.getDeletePublicSnapGroupPerm=function(){return e.getEditPublicSnapGroupPerm()};this.getEditPublicSnapGroupPerm=function(){return Ka};this.getParamPathPrefix=function(){var A=
va.decodeParamFromUrl(window.location.search,"path");return A?A:"/ierp"};var Ta=function(A){V||(A=va.decodeParamFromUrl(window.location.search,"path"),A=(A?A:"/ierp")+"/qing_rpt/snapcenter.do",V=new na,V.setRemoteUrl(A));return V};this.showDeleteConfirmDialog=function(A,M){var Q=Aa.createFeedbackDialog();Q.setOptionType(Aa.OPTION_OK_CANCEL);Q.setMsgImageType(Aa.MSG_DELETE);Q.setMessage(A);Q.setClosingChecker(function(ma){ma===Aa.RETURN_OK&&M();return!0});Q.showDialog()}};this.start=function(){C().appendTo($(document.body));
k=!0;Y.hookCollector(function(e,J){g.interestInBehavior(e,J)});g.interestInBehaviorEntrance(g.ENTRANCE_EXTREPORT_SNAP_CENTER);B.funLoadExtReportSnapGroupList(d)};var C=function(){b=$("<div>");b.addClass("extreport-snap-manage");n();L();a();var e=new Ca;e.setCallbackImmediately(function(){a();aa&&E&&(E.resize(),p&&p.getCurrentTabPane().updateUI(),aa.resize())});e.setDelay(250);e.observe();e=$("<div>");e.addClass("extreport-snap-manage-container");Oa(e);e.appendTo(b);return b},d=function(){if(!B.getEditPublicSnapGroupPerm()){for(var e=
[],J=B.getSnapInfoTreeModel(),V=0;V<J.length;V++){var Z=J[V];e.indexOf(-1>=Z.getSnapGroupId())&&e.push(Z.getSnapGroupId())}J=B.getSnapGroupModels(h.PUBLIC.getValue());for(V=J.length-1;0<=V;V--)-1>=e.indexOf(J[V].getExtReportSnapGroupID())&&J.splice(V,1)}p.getCurrentTabPane().updateUI()},a=function(){document.body.style.height=document.documentElement.clientHeight+"px"},n=function(){r=$("<div>");r.addClass("extreport-snap-manage-toolbar");f=wa(r,!1,q,"",m.get("preview","\u67e5\u770b"),m.get("preview",
"\u67e5\u770b"));z=wa(r,!1,ra,"",m.get("edit","\u7f16\u8f91"),m.get("edit","\u7f16\u8f91"));x=wa(r,!1,ta,"",m.get("deleteExtReport","\u5220\u9664"),m.get("deleteExtReport","\u5220\u9664"));v=wa(r,!1,c,"",m.get("editSnapInfo","\u4fee\u6539\u4fe1\u606f"),m.get("editSnapInfo","\u4fee\u6539\u4fe1\u606f"));f.setEnabled(!1);z.setEnabled(!1);x.setEnabled(!1);v.setEnabled(!1);wa(r,!1,S,"",m.get("scheduleMgr","\u8c03\u5ea6\u7ba1\u7406"),m.get("scheduleMgr","\u8c03\u5ea6\u7ba1\u7406"));wa(r,!1,l,"",m.get("refresh",
"\u5237\u65b0"),m.get("refresh","\u5237\u65b0"));wa(r,!1,ua,"",m.get("quit","\u9000\u51fa"),m.get("quit","\u9000\u51fa"));r.appendTo(b);var e=$("<div>");e.addClass("extreport-snap-toolbar-right");e.css({position:"relative","float":"right",height:"30px"});e.appendTo(r)},L=function(){X=new N(B);X.setDoSearchCallBack(function(e,J){aa.clear();aa.setSearchText(e);B.setSearchText(e);aa.updateUI();J&&(e=J[h.PUBLIC.getValue()],J=J[h.PERSONAL.getValue()],0<e&&0==J?p.setCurrentTabPane(R):0<J&&0==e&&p.setCurrentTabPane(qa));
p.getCurrentTabPane().updateUI()});X.getJqUi().appendTo(r)},oa=function(){var e=(aa&&aa.getSelectSnapInfoModel())[0],J=B.funFindSnapGroupByTypeAndId(F.getValue(),e.getSnapGroupId());J.getExtReportSnapGroupType()==h.PUBLIC.getValue()?e.setSnapGroupType(h.PUBLIC):J.getExtReportSnapGroupType()==h.PERSONAL.getValue()&&e.setSnapGroupType(h.PERSONAL);e=new ha(w.SNAP_CENTER,m.get("editSnapInfo","\u4fee\u6539\u4fe1\u606f"),{snapId:e.getSnapId(),reportId:e.getReportId(),snapName:e.getSnapName(),snapGroupName:J.getExtReportSnapGroupName(),
snapGroupId:J.getExtReportSnapGroupID(),snapGroupTypeName:F.getName(),snapGroupTypeId:F.getValue()});e.addSuccessCallback(function(V){B.getMessageCurtain().showSuccess(m.get("saveSnapSuccess","\u4fee\u6539\u5feb\u7167\u4fe1\u606f\u6210\u529f\u3002"),B.getMsgTimeOut());Y.occur(Y.SAVE_SNAP_TO_TYPE,V.getSnapName());l()});e.showDialog()},c=function(){var e=aa&&aa.getSelectSnapInfoModel();e&&0!=e.length?e&&1<e.length?B.getMessageCurtain().showPrompt(m.get("onlyOne","\u53ea\u80fd\u9009\u62e9\u4e00\u6761\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\u3002"),
B.getMsgTimeOut()):y(e[0],oa):B.getMessageCurtain().showPrompt(m.get("noData","\u8bf7\u5148\u9009\u62e9\u4e00\u6761\u6570\u636e\u3002"),B.getMsgTimeOut())},l=function(){B.clear();X.clear();aa.clear();B.funLoadExtReportSnapGroupList(d)},y=function(e,J){if(e&&e.getSnapId()){var V=e.getSnapId();e=B.getSnapInfoTreeModelBySnapId(V);var Z=e.getCreatorName(),la;e.getHasPerm()||(e.getDeleted()&&(la=e.getReportName()),la||(la=m.get("noSnapPermission","\u60a8\u6ca1\u6709\u8be5\u62a5\u8868\u7684\u6743\u9650")),
la+=m.get("commaSymbol","\uff0c")+m.get("noOperationPerm","\u65e0\u6cd5\u6267\u884c\u5f53\u524d\u64cd\u4f5c\u3002"));la?B.getMessageCurtain().showPrompt(la,B.getMsgTimeOut()):(la=B.createFacade(function(xa){xa&&V==xa?J&&J():"notExist"==xa?(B.getMessageCurtain().showPrompt(m.get("noSnapCurtain","\u5feb\u7167\u4e0d\u5b58\u5728\u3002"),B.getMsgTimeOut()),l()):"noPermission"==xa&&(xa=m.get("noSnapPermission","\u60a8\u6ca1\u6709\u8be5\u62a5\u8868\u7684\u6743\u9650"),B.getSnapInfoTreeModelBySnapId(V).getCreatorName()&&
(xa+=m.get("contactCreator","\uff0c\u8bf7\u8054\u7cfb#1\u8fdb\u884c\u6388\u6743\u3002").replace("#1",Z)),B.getMessageCurtain().showPrompt(xa,B.getMsgTimeOut()),l())},function(xa,sa){return!1}),la.setShowBlocking(!0),la.checkSnapPermission(V))}},q=function(){var e=aa&&aa.getSelectSnapInfoModel();if(e&&0!=e.length)if(e&&1<e.length)B.getMessageCurtain().showPrompt(m.get("onlyOne","\u53ea\u80fd\u9009\u62e9\u4e00\u6761\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\u3002"),B.getMsgTimeOut());else{var J=e[0];y(J,
function(){if(F.getValue()==h.PUBLIC.getValue()){var V=J.getSnapId(),Z=com.kingdee.bos.qing.behavior.BehaviorManager,la=va.createUUID();Z.initAccessRecordParams(V,la,Z.SourceType.QING_SNAPSHOT,Z.AppType.QING_RPT);Z.recordResourceOperation(Z.OperationType.QING_VISIT)}V=Ja.getUrlParamValue();Z=B.getParamPathPrefix()+"/qing_rpt/snapPreview.do";Z=va.appendParamToUrl(Z,"extReportId",J.getReportId());Z=va.appendParamToUrl(Z,"snapId",J.getSnapId());Z=va.appendParamToUrl(Z,"snapName",J.getSnapName());Z=va.appendParamToUrl(Z,
"snapGroupType",F.getValue());V&&(Z=va.appendParamToUrl(Z,"skin",V));da.openNewTab(J.getSnapName(),Z)})}else B.getMessageCurtain().showPrompt(m.get("noData","\u8bf7\u5148\u9009\u62e9\u4e00\u6761\u6570\u636e\u3002"),B.getMsgTimeOut())},S=function(){var e=Ja.getUrlParamValue(),J=B.getParamPathPrefix()+"/qing_rpt/scheduleCenterEntrance.do";e&&(J=va.appendParamToUrl(J,"skin",e));da.openNewTab(m.get("scheduleMgr","\u8c03\u5ea6\u7ba1\u7406"),J)},ra=function(){var e=aa&&aa.getSelectSnapInfoModel();if(e&&
0!=e.length)if(e&&1<e.length)B.getMessageCurtain().showPrompt(m.get("onlyOne","\u53ea\u80fd\u9009\u62e9\u4e00\u6761\u6570\u636e\u8fdb\u884c\u64cd\u4f5c\u3002"),B.getMsgTimeOut());else{var J=e[0],V=function(){if(F.getValue()==h.PUBLIC.getValue()){var Z=com.kingdee.bos.qing.behavior.BehaviorManager,la=va.createUUID();Z.initAccessRecordParams(J.getSnapId(),la,Z.SourceType.QING_SNAPSHOT,Z.AppType.QING_RPT);Z.recordResourceOperation(Z.OperationType.QING_SNAPSHOT_EDIT)}Z=J.getSnapName();Y.occur(Y.EXT_RPT_SNAP_EDIT,
Z)};y(J,function(){I.sendLaunchxletCommandOpenExtReportSnapEditor(J.getReportId(),J.getSnapId(),J.getSnapName(),V)})}else B.getMessageCurtain().showPrompt(m.get("noData","\u8bf7\u5148\u9009\u62e9\u4e00\u6761\u6570\u636e\u3002"),B.getMsgTimeOut())},T=function(){var e=aa&&aa.getSelectSnapInfoModel(),J=[];if(!e||0==e.length)return J;for(var V=0;V<e.length;V++)J.push(e[V].getSnapId());return J},ka=function(){var e=aa.getSnapGroupModel(),J=T(),V=B.createFacade(function(Z){Z=m.get("deleteSnapInfoSuccess",
"\u5220\u9664\u5feb\u7167\u6210\u529f\u3002");B.getMessageCurtain().showSuccess(Z,B.getMsgTimeOut());B.funRemoveSnapInfoModelByIds(J);B.isSnapGroupEmpty(e.getExtReportSnapGroupID())&&e.getExtReportSnapGroupType()==h.PUBLIC.getValue()&&null==e.getExistsOthersSnapInGroup()?B.checkExistsOthersSnapInGroup(e.getExtReportSnapGroupID(),function(la){la?e.setExistsOthersSnapInGroup(!0):e.setExistsOthersSnapInGroup(!1);aa.refreshTable()}):aa.refreshTable()},function(Z,la){return 9010006==Z?(B.getMessageCurtain().showPrompt(la+
m.get("noOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u3002"),B.getMsgTimeOut()),l(),!0):!1});V.setShowBlocking(!0);V.deleteSnapInfo(J)},ta=function(){var e=T();e&&0!=e.length?(e=m.get("confirmMessage","\u5220\u9664\u9009\u4e2d\u7684#1\u6761\u6570\u636e\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u5417\uff1f").replace("#1",e.length),B.showDeleteConfirmDialog(e,ka)):B.getMessageCurtain().showPrompt(m.get("noData","\u8bf7\u5148\u9009\u62e9\u4e00\u6761\u6570\u636e\u3002"),
B.getMsgTimeOut())},ua=function(){da.closeCurrentTab()},wa=function(e,J,V,Z,la,xa){var sa=new Ea;sa.setIconSetter(function(Ia,Ka){ea.background(Ia,Ka)});sa.setIconName(Z);sa.setText(la);sa.setTooltips(xa);J&&sa.setShowDropdownArrow(!0);sa.addActionListener(function(Ia,Ka){J?Na(Ia.getJqUi(),Ka,V,e):V(Ia)});sa.getJqUi().appendTo(e);return sa},Na=function(e,J,V,Z){var la=e.data("menu");if(la&&la.isShowing())e.data("menu",null),la.hide();else{la=new Fa;la.setModel(V());la.setHideListener(function(){e.data("menu",
null)});e.data("menu",la);V=e.prop("offsetLeft");var xa=e.prop("offsetHeight")+e.prop("offsetTop");la.show(Z,V,xa,J,!0)}},Oa=function(e){E=new H;E.setHorizontalSplit(!0);E.setEnabled(!0);E.setSplitLineWide(4);E.setResizeMode(H.RESIZE_MODE_FIRST_FIXED);E.setFirstSize(230,200,640);E.setSecondSize($(document).width()-234,0,-1);E.getJqUi().addClass("sa-qing-publish-manager");e.append(E.getJqUi());K=Ma();G=Pa();E.setFirstChild(H.createChildWrapper(G,function(){k&&(G&&G.css({width:E.getNonemptyFirstWide()+
"px"}),K&&K.css({width:E.getNonemptySecondWide()+"px"}),aa&&aa.resize())}));E.setSecondChild(H.createChildWrapper(K))},Pa=function(){var e=new za,J=e.getJqUi();e.addTabChangedListener(function(V,Z){Z&&(F=Z.getType())});qa=new W(B,h.PERSONAL);qa.setItemClickCallBack(ba);qa.setUpdateUIListener(Qa);R=new W(B,h.PUBLIC);R.setItemClickCallBack(ba);R.setUpdateUIListener(Qa);F||(F=h.PERSONAL);e.addTab(qa,F.getValue()==h.PERSONAL.getValue());e.addTab(R,F.getValue()==h.PUBLIC.getValue());J.css({"background-color":"#fff"});
p=e;return J},Ma=function(){var e=$("<div>");e.addClass("extreport-snap-container");var J=B.getNoDataUI(m.get("noSnapInfo","\u6682\u65e0\u62a5\u8868\u5feb\u7167"));J.getJqUi().appendTo(e);aa=new fa(B);aa.setTableRowCheckedCallback(function(V){0>=V?(f.setEnabled(!1),z.setEnabled(!1),v.setEnabled(!1),x.setEnabled(!1)):(1==V?(f.setEnabled(!0),z.setEnabled(!0),v.setEnabled(!0)):(f.setEnabled(!1),z.setEnabled(!1),v.setEnabled(!1)),x.setEnabled(!0))});aa.setNoDataUI(J);aa.getJqUi().appendTo(e);return e},
ba=function(e){var J=!1;u!=e&&(J=!0,u=e);var V=e.getExtReportSnapGroupID();aa.setSnapGroupModel(e);var Z=function(la){la?e.setExistsOthersSnapInGroup(!0):e.setExistsOthersSnapInGroup(!1);aa.refreshTable()};B.isUnloadSnapGroupId(V)?B.funLoadSnapInfoListBySnapGroupId(V,aa.refreshTable):B.isSnapGroupEmpty(V)&&e.getExtReportSnapGroupType()==h.PUBLIC.getValue()&&null==e.getExistsOthersSnapInGroup()?B.checkExistsOthersSnapInGroup(V,Z):(J&&B.resetModelExpandAndCheckStatus(),aa.refreshTable())},Qa=function(e){(!e||
0>=e.length)&&aa&&(e=aa.getSearchText(),aa.clear(),aa.setSearchText(e),aa.updateUI())}};var ia,ea,na,Y,g,m,Ca,pa,Aa,za,Da,O,Ea,Ha,H,Fa,Ba,va,da,Ja,D,U,h,ha,w,t,I;(function(){var b=com.kingdee.bos.qing;Ja=b.SkinUtil;b=com.kingdee.bos.qing.common;va=b.Util;Ba=b.DomUtil;b=com.kingdee.bos.extreport.snapcenter.common;ia=b.Facade;na=b.RemoteImpl;ea=b.Icons;Y=b.UserOperationReporter;b=com.kingdee.bos.qing.behavior;g=b.BehaviorManager;b=com.kingdee.bos.qing.common.ui;t=b.TableUtil;b=com.kingdee.bos.qing.ui.component;
pa=b.MessageCurtain;Aa=b.MessageDialog;O=b.CheckBox;za=b.TabContainer;Da=b.TextField;Ea=b.ToolbarButton;Ha=b.SearchBox;H=b.SplitPane;b=com.kingdee.bos.qing.framework.common;m=b.MultilanguageManager.createPackageAccessor(ja);Ca=b.WindowResizeObserver;da=b.TabbedUiUtil;b=com.kingdee.bos.extreport.snapcenter.model;D=b.ExtReportSnapGroupModel;h=b.ExtReportSnapGroupType;U=b.ExtReportTreeNodeModel;b=com.kingdee.bos.extreport.snapcenter.common.ui;ha=b.SaveSnapDialog;w=b.SaveSnapSourceType;b=com.kingdee.bos.extreport.launcher;
I=b.Launcher})()})();
//qingVersionTag: 20250415