var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(r,C,z){r instanceof String&&(r=String(r));for(var I=r.length,G=0;G<I;G++){var x=r[G];if(C.call(z,x,G,r))return{i:G,v:x}}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(r,C,z){if(r==Array.prototype||r==Object.prototype)return r;r[C]=z.value;return r};$jscomp.getGlobal=function(r){r=["object"==typeof globalThis&&globalThis,r,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var C=0;C<r.length;++C){var z=r[C];if(z&&z.Math==Math)return z}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(r,C){var z=$jscomp.propertyToPolyfillSymbol[C];if(null==z)return r[C];z=r[z];return void 0!==z?z:r[C]};
$jscomp.polyfill=function(r,C,z,I){C&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(r,C,z,I):$jscomp.polyfillUnisolated(r,C,z,I))};$jscomp.polyfillUnisolated=function(r,C,z,I){z=$jscomp.global;r=r.split(".");for(I=0;I<r.length-1;I++){var G=r[I];if(!(G in z))return;z=z[G]}r=r[r.length-1];I=z[r];C=C(I);C!=I&&null!=C&&$jscomp.defineProperty(z,r,{configurable:!0,writable:!0,value:C})};
$jscomp.polyfillIsolated=function(r,C,z,I){var G=r.split(".");r=1===G.length;I=G[0];I=!r&&I in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var x=0;x<G.length-1;x++){var f=G[x];if(!(f in I))return;I=I[f]}G=G[G.length-1];z=$jscomp.IS_SYMBOL_NATIVE&&"es6"===z?I[G]:null;C=C(z);null!=C&&(r?$jscomp.defineProperty($jscomp.polyfills,G,{configurable:!0,writable:!0,value:C}):C!==z&&(void 0===$jscomp.propertyToPolyfillSymbol[G]&&(z=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[G]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(G):$jscomp.POLYFILL_PREFIX+z+"$"+G),$jscomp.defineProperty(I,$jscomp.propertyToPolyfillSymbol[G],{configurable:!0,writable:!0,value:C})))};$jscomp.polyfill("Array.prototype.find",function(r){return r?r:function(C,z){return $jscomp.findInternal(this,C,z).v}},"es6","es3");
(function(){function r(u,D){var t=this,E,q,m,g,y,v,F,J,P,M,K=!1,S=!0,R,W,X,ba,T;this.getSchemaList=function(){return q};this.setClickEditPublishSchemeListener=function(b){T=b};this.getClickEditPublishSchemeListener=function(){return T};this.setCheckBeforeEditAndPublishScheme=function(b){ba=b};this.getCheckBeforeEditAndPublishScheme=function(){return ba};this.setJudgeHaveMorePublishSchema=function(b){X=b};this.getJudgeHaveMorePublishSchema=function(){return X};this.setDrawPublishSchemaList=function(b){W=
b};this.getDrawPublishSchemaList=function(){return W};this.setAllSchemas=function(b){y=b};this.getAllSchemas=function(){return y};this.setFunJudgePublishOper=function(b){R=b};this.setSchemas=function(b){v=b;null!=b&&0!=b.length||g.getJqUi().data("bIsSearch")?(S=y&&y.length!=v.length?!1:!0,q.getJqUi().css("top","0"),g.getJqUi().css("display","block")):(q.getJqUi().css("top","0"),g.getJqUi().css("display","none"));W&&q.setDrawPublishSchemaList(!0);ba&&q.setCheckBeforeEditAndPublishScheme(!0);T&&q.setClickEditPublishSchemeListener(T);
q.setItemModels(b);m.getJqUi().css("display","flex");b&&0<b.length&&m.getJqUi().css("display","none")};this.setSchemaStatus=function(b){b.setIsDefault(!b.IsDefault());for(var d=0;d<v.length;d++)v[d].getFId()==b.getFId()?v[d]=b:b.IsDefault()&&v[d].IsDefault()&&v[d].setIsDefault(!1);t.setSchemas(v)};this.setMaxHeight=function(b){var d=E.find(".schema-frequentlyused").css("marginTop"),n=0;null!=d&&2<d.length&&(n=d.substring(0,d.length-2));E.css("max-height",b+"px");q.getJqUi().css("max-height",b-q.getJqUi().parent().prop("offsetTop")-
q.getJqUi().prop("offsetTop")-n-2+"px")};this.setSelectedSchema=function(b){q.setSelected(b);b&&(W?F.show():b.getSchemaType()==N.SCHEMATYPE_SYSTEM?F.hide():F.show())};this.getSelectedSchema=function(){return q.getSelected()};this.getSchemas=function(){return q.getItemModels()};this.addActionListeners=function(b){q.addItemClickListener(function(d,n){b.ItemClickListener(d)});q.addSelectedChangedListener(function(d){b.selectedChangedListener(d)});q.addDeleteIconClickListener(function(d,n){K=!1;b.deleteListener(d,
n)});q.addEditIconClickListener(function(d,n){b.EditListener(d,n)});q.addSetDefaultListener(function(d){K=!1;b.setDefaultAttrListener(d,g.getText())});g.addSearchListener(function(d){K=!1;m.setText(f.get("nothingSearched","\u627e\u4e0d\u5230\u7b26\u5408\u7684\u7ed3\u679c"));g.getJqUi().data("bIsSearch",!0);b.searchLisenter(d)});q.addUpIconClickListener(function(d,n){n=[];for(var w=1;w<v.length;w++)if(v[w].getFId()==d.getFId()){d.setSeq(d.getSeq()+1);v[w-1].setSeq(v[w-1].getSeq()-1);n.push(d.toJsonObject());
n.push(v[w-1].toJsonObject());v.splice(w,1);v.splice(w-1,0,d);break}b.doSeqListener(n,v,function(){K=!1;t.setSchemas(v)})});F.on("click",function(){K=!1;b.saveListener()});J.on("click",function(){R?R(function(){K=!1;b.saveAsListener()}):(K=!1,b.saveAsListener())});P.on("click",function(){R?R(function(){K=!1;b.createListener()}):(K=!1,b.createListener())});M.on("click",b.exportSqlListener)};this.getJqUi=function(){return E};this.initSchemaList=function(){var b=$("div.schema-manage-list");0<b.length&&
(q.getJqUi().css("height","30px"),q.getJqUi().css("height",b.prop("scrollHeight")))};var da=function(b){b=b.currentTarget.childNodes;for(var d=0;d<b.length;d++){var n=$(b[d]);n.hasClass("schema-icon-hide")&&n.removeClass("schema-icon-hide")}},Z=function(b){b=b.currentTarget.childNodes;for(var d=0;d<b.length;d++){var n=$(b[d]);(n.hasClass("schema-delete-icon-show")||n.hasClass("schema-default-icon-show")||n.hasClass("schema-undefault-icon-show")||n.hasClass("schema-edit-icon-show")||n.hasClass("schema-up-icon-show"))&&
n.addClass("schema-icon-hide")}},aa=function(b,d,n){n.text(d.getSchemaName());n.prop("title",d.getSchemaName());var w=d.getSchemaType(),A=$("<div>");A.data("setDefaultModel",d);A.addClass("schema-setdefault-icon");A.addClass("schema-icon-hide");A.prop("title",f.get("setDefaultScheme","\u8bbe\u4e3a\u9ed8\u8ba4\u65b9\u6848"));d&&d.IsDefault()?(n.text(f.get("def","(\u9ed8\u8ba4)")+d.getSchemaName()),n.prop("title",f.get("def","(\u9ed8\u8ba4)")+d.getSchemaName()),n.css("font-weight","bold"),A.addClass("schema-default-icon-show"),
x.background(A,"icon_default"),A.prop("title",f.get("cancelDefaultScheme","\u53d6\u6d88\u9ed8\u8ba4\u65b9\u6848"))):(A.addClass("schema-undefault-icon-show"),x.background(A,"icon_undefault"),A.on("mouseover",function(h){x.background(A,"icon_default")}),A.on("mouseout",function(h){x.background(A,"icon_undefault")}));var L;W?L=ca(d):w!=N.SCHEMATYPE_SYSTEM&&(L=ca(d));if(L){var a=L.deleteIcon;var c=L.editIcon;var e=L.upIcon}u||(b.on("mouseover",da),b.on("mouseout",Z));b.append(n);b.append(A);c&&b.append(c);
a&&b.append(a);e&&b.append(e)},ca=function(b){var d=$("<div>");d.data("deleteModel",b);d.addClass("schema-delete-icon");d.addClass("schema-delete-icon-show");x.background(d,"icon_delete");d.on("mouseover",function(A){x.background(d,"icon_delete_hover")});d.on("mouseout",function(A){x.background(d,"icon_delete")});d.addClass("schema-icon-hide");d.prop("title",f.get("deleteScheme","\u5220\u9664\u65b9\u6848"));var n=$("<div>");n.data("EditModel",b);n.addClass("schema-edit-icon");n.addClass("schema-edit-icon-show");
x.background(n,"icon_edit");n.on("mouseover",function(A){x.background(n,"icon_edit_hover")});n.on("mouseout",function(A){x.background(n,"icon_edit")});n.addClass("schema-icon-hide");n.prop("title",f.get("editScheme","\u4fee\u6539\u65b9\u6848\u540d\u79f0"));if(K&&S){var w=$("<div>");w.data("UpModel",b);w.addClass("schema-up-icon");w.addClass("schema-up-icon-show");x.background(w,"icon_up_schema");w.on("mouseover",function(A){x.background(w,"icon_up_schema_on")});w.on("mouseout",function(A){x.background(w,
"icon_up_schema")});w.addClass("schema-icon-hide");w.prop("title",f.get("upScheme","\u4e0a\u79fb\u65b9\u6848"))}K=!0;return{deleteIcon:d,editIcon:n,upIcon:w}},fa=function(){var b=new ia(f.get("usedScheme","\u5206\u6790\u65b9\u6848"));b.getJqUi().addClass("schema-name-label");var d=$("<div tabIndex=-1 style='outline: none;'>");d.css({width:"10px","float":"left",height:"34px"});d.on("mousedown",p);d.on("mouseup",p);d.on("keydown",p);d.on("keyup",p);var n=$("<div>");n.addClass("schema-title");n.append(d);
n.append(b.getJqUi());M=$("<span>");M.addClass("schema-head-exportBtn");M.addClass("schema-head-exportBtn-hide");M.addClass("schema-head-button");M.text(f.get("exportSql","\u5bfc\u51fa\u811a\u672c"));J=$("<span>");J.addClass("schema-head-button");J.text(f.get("saveAs","\u53e6\u5b58\u4e3a"));F=$("<span>");F.addClass("schema-head-button");F.text(f.get("save","\u4fdd\u5b58"));P=$("<span>");P.addClass("schema-head-button");P.text(f.get("create","\u65b0\u5efa"));b=f.get("usedSchemeEmpty","\u53ef\u7528\u65b9\u6848\u4e3a\u7a7a\uff0c\u8bf7\u5148\u65b0\u5efa\u65b9\u6848\u3002");
m=new ia(b);m.setAlign(ia.ALIGN_CENTER);m.getJqUi().addClass("label-empty-schema");m.getJqUi().attr("title",b);q=new C;q.setCustomItemPainter(aa);u||(!D||D.protectedParseDesignable()?(M.appendTo(n),J.appendTo(n),F.appendTo(n),P.appendTo(n)):(F.appendTo(n),b=f.get("usedSchemeEmptyReadOnly","\u53ef\u7528\u65b9\u6848\u4e3a\u7a7a")),m.setText(b),q.getJqUi().append(m.getJqUi()));b=$("<div>");b.addClass("schema-content-div");g=new ma;g.setAlwaysShowCleanIcon(!0);"IE"==ka.getBrowserName()&&"11"==ka.getBrowserVersion()||
g.setPlaceholder(f.get("inputSchemaName","\u641c\u7d22\u65b9\u6848\u540d\u79f0"));g.setShowSearchIcon(!0);d=g.getJqUi();d.css({left:"0",top:"0",width:"100%",height:"26px",position:"relative"});b.append(d);b.append(q.getJqUi());d=$("<div>");d.addClass("schema-border");var w=$("<div>");w.addClass("schema-frequentlyused");w.addClass("schema-default");w.append(d);w.append(n);w.append(b);return w},ea=!1,U=!1,l=!1,p=function(b){var d=b.type;b=b.keyCode;d&&"mousedown"===d&&(U=!0);d&&"mouseup"===d&&(U=!1);
d&&b&&"keydown"===d&&"17"==b&&(ea=!0);d&&b&&"keyup"===d&&"17"==b&&(ea=!1);ea&&U&&!l&&(l=!0,M.removeClass("schema-head-exportBtn-hide"))};(function(){E=$("<div>");E.on("click",function(b){b&&b.stopPropagation?b.stopPropagation():window.event.cancelBubble=!0});E.addClass("schema-mainPan");E.append(fa())})()}function C(){var u=this,D=[],t,E,q,m,g,y,v,F,J,P,M,K,S,R,W,X;this.setPublishAppMenuAndCenter=function(l){R=l};this.setClickEditPublishSchemeListener=function(l){X=l};this.getClickEditPublishSchemeListener=
function(){return X};this.setCheckBeforeEditAndPublishScheme=function(l){W=l};this.getCheckBeforeEditAndPublishScheme=function(){return W};this.setDrawRightSchemaList=function(l){M=l};this.setDrawPublishSchemaList=function(l){P=l};this.setItemModels=function(l,p){D=l?l:[];K=p?p:ba;Z()};var ba=function(l,p){return l===p};this.getItemModels=function(){return D};this.setSelected=function(l){var p=t;u.getSelected()==l?fa():(t=l,m&&m(u,p,t))};this.getSelected=function(){return t};this.getJqUi=function(){if(!E){E=
$("<div>");E.addClass("schema-manage-list");var l=$("<div>");l.addClass("schema-manage-list-owner");l.on("mouseup",ea);l.appendTo(E);Z();fa()}return E};this.initDeleteIcon=function(){E.find(".schema-delete-icon").hasClass("schema-delete-icon-hide")?E.find(".schema-delete-icon").removeClass("schema-delete-icon-hide"):E.find(".schema-delete-icon").addClass("schema-delete-icon-hide")};this.setCustomItemPainter=function(l){q=l};this.addSelectedChangedListener=function(l){m=l};this.addItemClickListener=
function(l){F=l};this.addDeleteIconClickListener=function(l){g=l};this.addEditIconClickListener=function(l){y=l};this.addUpIconClickListener=function(l){J=l};this.addSetDefaultListener=function(l){v=l};var T=function(l,p){l.text(p)},da=function(){return E.find(".schema-manage-list-item")},Z=function(){if(E){E.find(".schema-manage-list-item-container").remove();da().remove();var l=E.find(".schema-manage-list-owner");l.empty();if(0==D.length&&R){var p=$("<div>");p.addClass("sa-qing-search-content-container");
var b=$("<div>");b.addClass("sa-qing-search-no-data-tips");b.css({width:"130px",height:"130px"});x.background(b,"public-no-data");var d=$("<div>");d.addClass("sa-qing-search-manager-content-emptytip");d.text(f.get("noSaveSchema","\u6682\u65e0\u5df2\u4fdd\u5b58\u7684\u5206\u6790\u65b9\u6848"));p.append(b);p.append(d);l.append(p)}else{b=p=!1;for(var n,w,A=0;A<D.length;A++)if(M)ca(D[A],l);else if(D[A].getSchemaType()==N.SCHEMATYPE_SYSTEM){S=!0;if(0==p){p=!0;d=$("<div>");d.addClass("schema-manage-list-item-container");
var L=$("<div>");L.addClass("schema-manage-list-nodeline-head");x.background(L,"tree-expanded_hover");L.on("click",aa);L.on("mouseover",function(B){x.background(L,"tree-expanded")});L.on("mouseout",function(B){x.background(L,"tree-expanded_hover")});var a=$("<div>");a.addClass("schema-manage-item-system-icon");x.background(a,"icon_system");var c=$("<div>");c.addClass("schema-manage-item-text");c.text(f.get("systemSchema","\u7cfb\u7edf\u65b9\u6848"));c.css("margin-left","10px");if(P){var e=new la;
e.setIconType(la.ICON_TYPE_QUESTION);e.setTipsText(f.get("PublishSchemaInfoTip","\u62e5\u6709\u8be5\u53d1\u5e03\u8bb0\u5f55\u6743\u9650\u7684\u7528\u6237\u548c\u89d2\u8272\u53ef\u67e5\u770b\u4ee5\u4e0b\u6240\u6709\u65b9\u6848"));e=e.getJqUi();var h=4<c.text().length?128:87;e.css({left:h+"px",top:"6px",cursor:"pointer"})}h=$("<div>");h.addClass("schema-manage-list-title-item");L.appendTo(h);a.appendTo(h);c.appendTo(h);P&&e.appendTo(h);h.appendTo(d)}ca(D[A],d)}else if(D[A].getSchemaType()==N.SCHEMATYPE_USERDEFINED){if(0==
b){b=!0;n=$("<div>");n.addClass("schema-manage-list-item-container");var k=$("<div>");k.addClass("schema-manage-list-nodeline-head");x.background(k,"tree-expanded_hover");k.on("click",aa);k.on("mouseover",function(B){x.background(k,"tree-expanded")});k.on("mouseout",function(B){x.background(k,"tree-expanded_hover")});a=$("<div>");a.addClass("schema-manage-item-user-icon");x.background(a,"icon_user");c=$("<div>");c.addClass("schema-manage-item-text");c.text(f.get("userSchema","\u7528\u6237\u65b9\u6848"));
c.css("margin-left","10px");w=$("<div>");w.addClass("schema-manage-list-title-item");k.appendTo(w);a.appendTo(w);c.appendTo(w);w.appendTo(n)}ca(D[A],n)}!p&&b?(!S&&w.remove(),n.appendTo(l),!S&&da().css("padding","5px 5px 5px 15px")):p&&b?(d.appendTo(l),n.appendTo(l)):p&&!b&&d.appendTo(l)}}},aa=function(l){var p=$(l.target);p.off("mouseover");p.off("mouseout");l=p.parents(".schema-manage-list-title-item").siblings(".schema-manage-list-item");"block"==l.css("display")?(l.css("display","none"),x.background(p,
"tree-collapsed"),p.on("mouseover",function(b){x.background(p,"tree-collapsed")}),p.on("mouseout",function(b){x.background(p,"tree-collapsed_hover")})):(l.css("display","block"),x.background(p,"tree-expanded"),p.on("mouseover",function(b){x.background(p,"tree-expanded")}),p.on("mouseout",function(b){x.background(p,"tree-expanded_hover")}))},ca=function(l,p){var b=$("<div>");b.addClass("schema-manage-list-item");M&&b.css("padding-left","12px");var d=$("<div>");d.addClass("schema-manage-list-item-value");
d.data("model",l);b.data("model",l);(q?q:T)(b,l,d);p.append(b)},fa=function(){if(E){var l=da();l.removeClass("schema-manage-list-item_selected_enabled");for(var p=0;p<l.length;p++){var b=$(l[p]),d=b.data("model");if(t&&K(d,t)){b.addClass("schema-manage-list-item_selected_enabled");break}}}},ea=function(l){var p=$(l.target),b=p.data("deleteModel"),d=p.data("setDefaultModel"),n=p.data("EditModel"),w=p.data("UpModel"),A=p.data("model");F&&A&&!b&&!d&&U(function(){u.setSelected(A);F(A)},A);b&&U(function(){g(b,
p)},b);n&&U(function(){var L=p.siblings(".schema-manage-list-item-value");y(n,L)},n);w&&U(function(){J(w,p)},w);d&&U(function(){v(d)},d)},U=function(l,p){W?X&&X(l,p):l()}}function z(){var u,D,t,E,q,m,g;this.setSize=function(v,F){};this.getDefault=function(){return m};this.setScheamList=function(v){q=v};this.setInputValue=function(v){g.setText(v)};this.getInputValue=function(){return g.getText()};this.setFocus=function(){g.requestFocus()};this.showMessage=function(v,F){clearTimeout(E);D.text(v);F&&
D.css("color",F);E=setTimeout(function(){D.text("")},5E3)};this.getJqUi=function(){if(!u){u=$("<div>");var v=$("<div>");v.addClass("schema-input-container");var F=new ia;F.setText(f.get("schemeName","\u65b9\u6848\u540d\u79f0"));F.setRequired(!0);F=F.getJqUi();na.layoutCtrl(F,8,0,72,21);g=new oa;var J=g.getJqUi();J.addClass("schema-name-input");D=$("<div>");D.addClass("message-tips");q&&(t=$("<div>"),t.addClass("schema_default_icon"),t.on("click",y),0==q.length?(t.addClass("icon_default"),x.background(t,
"icon_default"),t.removeClass("icon_undefault"),t.attr("title",f.get("cancelDefaultScheme","\u53d6\u6d88\u9ed8\u8ba4\u65b9\u6848")),m=!0):(t.addClass("icon_undefault"),x.background(t,"icon_undefault"),t.removeClass("icon_default"),t.attr("title",f.get("setDefaultScheme","\u8bbe\u4e3a\u9ed8\u8ba4\u65b9\u6848")),m=!1));v.append(F);v.append(J);q&&v.append(t);u.append(v);u.append(D)}return u};var y=function(){m?(t.addClass("icon_undefault"),x.background(t,"icon_undefault"),t.removeClass("icon_default"),
t.attr("title",f.get("setDefaultScheme","\u8bbe\u4e3a\u9ed8\u8ba4\u65b9\u6848")),m=!1):(t.addClass("icon_default"),x.background(t,"icon_default"),t.removeClass("icon_undefault"),t.attr("title",f.get("cancelDefaultScheme","\u53d6\u6d88\u9ed8\u8ba4\u65b9\u6848")),m=!0)}}function I(u){var D=$("<div class='sa-ctrl-common-modallayer'>"),t=new pa(D),E=0,q=0,m=320,g=240,y=u?u:$(document.body),v,F;this.setTitle=function(J){F=J};this.setClosingListener=function(J){v=J};this.setSize=function(J,P){m=J;g=P};
this.showDialog=function(J){D.appendTo(y);if(!E){var P=y.prop("clientWidth"),M=y.prop("clientHeight");E=P-m>>1;q=(M-g)/3}t.setBounds(E,q,m,g);t.setToolbarVisible(!1);t.setContent(J);t.setTitle(F);t.addClosingListener(function(K,S){if(S)v(S);else return K.destroy(),D.remove(),!0});t.addClosedListener(function(K){K.destroy();D.remove()});t.showFooterPane();t.show()};this.destroy=function(){t.destroy();D.remove()}}"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.schemamanage&&(com.kingdee.bos.qing.schemamanage={});"undefined"==typeof com.kingdee.bos.qing.schemamanage.ui&&(com.kingdee.bos.qing.schemamanage.ui={});var G=com.kingdee.bos.qing.schemamanage.ui;G.List=C;G.SaveOrEditSchemaDialog=I;G.SchemaNameInputPane=z;var x,f,pa,ia,N,ja,na,ka,la,ha,V,Q,qa,oa,ma;(function(){var u=com.kingdee.bos.qing.framework.common;
f=u.MultilanguageManager.createPackageAccessor(G);u=com.kingdee.bos.qing.schemamanage;x=u.MyIcons;ha=u.SchemaManage;u=com.kingdee.bos.qing.ui.component;pa=u.Dialog;ia=u.Label;Q=u.MessageDialog;qa=u.SimpleConfirmer;oa=u.TextField;ma=u.SearchBox;la=u.HelpIcon;u=com.kingdee.bos.qing.schemamanage.model;N=u.SchemaAttrModel;ja=u.SchemaModel;u=com.kingdee.bos.qing.common;na=u.DomUtil;ka=u.BrowserUtil;u=com.kingdee.bos.qing.schemamanage.common;V=u.SchemaManageFacade})();G.Main=function(u,D){var t=this,E,
q,m,g,y=[],v,F,J,P,M=!1,K,S,R;this.setClickPublishSchemaUpIcon=function(a){K=a};this.getClickPublishSchemaUpIcon=function(){return K};this.setCurrentPublishSchema=function(a){var c=new N;c.setFId(a.getCurrentSchemaId());c.setSchemaName(a.getCurrentSchemaName());c.setSchemaType(a.getCurrentSchemaType());S=c};this.setCreatePublishPlan=function(a){M=a};this.setOperatorPrevCheckListener=function(a){P=a};this.setCacheSchemaListener=function(a){v=a};this.setSchemaList=function(a){y=a};this.setJudger=function(a){F=
a};this.setFunJudgePublishOper=function(a){J=a};this.setPageOpenWay=function(a){};this.getJqUi=function(){E||(m||(m=new r(g.getSchemaReadOnly(),F)),m.addActionListeners(da),m.setFunJudgePublishOper(J),E=m.getJqUi());return E};this.getHeight=function(){return E.prop("offsetHeight")+1};this.setRemoteImpl=function(a){q=a};this.loadPublishSchemaAttrs=function(a,c,e){R=e;m||(m=new r(g.getSchemaReadOnly()));(new V(q,function(h){m.setDrawPublishSchemaList(!0);m.setCheckBeforeEditAndPublishScheme(!0);m.setClickEditPublishSchemeListener(W);
m.setJudgeHaveMorePublishSchema(!0);ba(h,!1)},function(h){if(701001===h)return m.showMessage(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+oData+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458"),"error"),!0})).loadAllPublishSchemaAttrByBizTag(a,c)};var W=function(a,c){(new V(q,function(e){e?a&&a():g.showPrompt(f.get("currentSchemaNotExist","\u5f53\u524d\u53d1\u5e03\u65b9\u6848\u4e0d\u5b58\u5728"))})).judgeSchemaIsDel(c.getFId())};this.loadAttrs=
function(a){R=a;m||(m=new r(g.getSchemaReadOnly(),F),m.setFunJudgePublishOper(J));(new V(q,function(c){ba(c,!1)},function(c){if(701001===c)return m.showMessage(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+c+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458"),"error"),!0})).schemaManage_loadAttrs(D,u)};var X=function(){var a=g.getMaxHeight();null!=a&&m.setMaxHeight(a-30)},ba=function(a,c){if(a){for(var e=[],h=0;h<a.length;h++){var k=new N;k.fromJsonObject(a[h]);
e.push(k)}y=e;m.setAllSchemas(e);m.setSchemas(e);c||m.initSchemaList();T();g&&!c&&g.setAnimateHeight(t.getHeight(),X)}};this.setParameterPassToUI=function(a){g=a};var T=function(){for(var a=g.getCurrentSchemaId(),c=m.getSchemas(),e=0;e<c.length;e++)if(c[e].getFId()==a){m.setSelectedSchema(c[e]);break}};this.resize=function(){m.initSchemaList();g&&g.setAnimateHeight(t.getHeight(),X)};var da={ItemClickListener:function(a){Z(function(){if(g.getDesigner().getConductor().isDirty()){var c=f.get("sureSwitch",
"\u76f4\u63a5\u5207\u6362"),e=f.get("confirmExitPrefix","\u68c0\u6d4b\u5230\u60a8\u6709\u66f4\u6539\u5185\u5bb9\uff0c\u662f\u5426\u4e0d\u4fdd\u5b58")+c+f.get("confirmExitSuffix","\uff1f\u82e5\u4e0d\u4fdd\u5b58\uff0c\u5c06\u4e22\u5931\u8fd9\u4e9b\u66f4\u6539\u3002"),h=f.get("sureReturn","\u8fd4\u56de\u7f16\u8f91"),k=Q.createFeedbackDialog();k.setMsgImageType(Q.MSG_CONFIRM);k.setButtonText(Q.RETURN_OK,c);k.setButtonText(Q.RETURN_CANCEL,h);k.setMessage(e);k.showDialog();k.setClosingChecker(function(B){B==
Q.RETURN_OK&&n();T();return!0})}else n()},a)},setDefaultAttrListener:function(a){w(a)},deleteListener:function(a,c){A(a,c)},EditListener:function(a,c){p(a,c)},selectedChangedListener:function(a){a=a.getSelected();m.setSelectedSchema(a);a&&a.getFId()&&g.cacheSelectedSchemaName(a.getSchemaName())},searchLisenter:function(a){if(a=a.getText().trim()){for(var c=m.getAllSchemas(),e=[],h=0;h<c.length;h++)0<=c[h].getSchemaName().toLowerCase().indexOf(a.toLowerCase())&&e.push(c[h]);m.setSchemas(e)}else m.setSchemas(y);
T();t.resize()},saveListener:function(){Z(ca,S)},saveAsListener:function(){Z(fa,S)},createListener:function(){Z(ea,null)},exportSqlListener:function(){var a;m.getSelectedSchema()&&(a=m.getSelectedSchema().getFId());a?(new V(q,function(c){(new V).getExportedData(c)},function(c,e){return!1})).schemaManage_exportSql(a):g.showPrompt(f.get("selectScheme","\u8bf7\u9009\u62e9\u65b9\u6848"),"prompt")},doSeqListener:function(a,c,e){d(a,function(){y=c;v&&v(y);e&&e();T()},c)}},Z=function(a,c){c&&c.getSchemaType()==
N.SCHEMATYPE_SYSTEM&&P?P(function(){(new V(q,function(e){e.publishInfoPerCheck==ha.PUBLISHINFO_PERMISSION_PUBLISHPLAN_EXIST?a&&a():e.publishInfoPerCheck==ha.THEME_IS_DEL?aa($(document.body),"msg-warning",f.get("ThemeIsDel","\u8be5\u53d1\u5e03\u8bb0\u5f55\u7684\u6765\u6e90\u88ab\u5220\u9664")):e.publishInfoPerCheck==ha.PUBLISHINFO_NOEXIST?aa($(document.body),"msg-warning",f.get("publishInfoExist","\u53d1\u5e03\u8bb0\u5f55\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664")):e.publishInfoPerCheck==ha.PERMISSION_CANCEL?
aa($(document.body),"msg-jurisdiction",f.get("notAuthority","\u60a8\u6ca1\u6709\u8be5\u53d1\u5e03\u8bb0\u5f55\u7684\u67e5\u770b\u6743\u9650, \u8bf7\u8054\u7cfb\u53d1\u5e03\u4eba")+'"'+e.publishInfoUserName+'"'+f.get("authority","\u6388\u6743")):e.publishInfoPerCheck==ha.PUBLSIHPLAN_DELETE&&aa($(document.body),"msg-warning",f.get("publishPlanExist","\u8be5\u5206\u6790\u65b9\u6848\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664"))})).checkPublishInfoAndAuthority(D,c)}):a&&a()},aa=function(a,c,e){a=
new Q;a.setOptionType(Q.OPTION_OK);a.setButtonText(Q.RETURN_OK,f.get("ISee","\u6211\u77e5\u9053\u4e86"));a.setMessage([e,c]);a.setCustomPainter(function(h,k){var B=$("<div>");B.addClass("sa-ctrl-msgdlg-icon");x.background(B,k[1]);var H=$("<div>");H.addClass("sa-ctrl-msgdlg-content");H.text(k[0]);h.append(B);h.append(H)});a.showDialog(380,280)},ca=function(){var a=g.getCurrentSchemaId(),c=new N,e=new ja;e.setSchemaContent(g.getDesigner().getJsonModelBook());if(null==a||""==a){var h=new z;h.setSize(null,
100);h.setScheamList(y);var k=new I($(document.body));k.setSize(312,156);k.setTitle(f.get("saveScheme","\u4fdd\u5b58\u65b9\u6848"));k.setClosingListener(function(B){if(B){B=h.getDefault();var H=h.getInputValue().trim();l(H,h)&&(c.setSchemaName(H),c.setSchemaType(M?N.SCHEMATYPE_SYSTEM:N.SCHEMATYPE_USERDEFINED),c.setIsDefault(B),c.setSource(u),c.setSeq(y.length),e.setSchemaAttr(c),(B=g.getSaveSchemaListener())&&B(e,h,k,function(){R&&R.animateHeight(0);L(e.getSchemaAttr())}))}});k.showDialog(h.getJqUi())}else c.setFId(a),
c.setSchemaName(g.getCurrentSchemaName()),e.setSchemaAttr(c),(a=g.getSaveSchemaListener())&&a(e);setTimeout(function(){h&&h.setFocus()},100)},fa=function(){var a=new z;a.setSize(null,100);a.setScheamList(y);var c=new I($(document.body));c.setSize(312,156);c.setTitle(f.get("saveAsScheme","\u53e6\u5b58\u65b9\u6848"));c.setClosingListener(function(e){if(e){var h=a.getDefault();e=a.getInputValue().trim();if(l(e,a)){var k=new N,B=new ja;k.setSchemaType(M?N.SCHEMATYPE_SYSTEM:N.SCHEMATYPE_USERDEFINED);k.setIsDefault(h);
if(h)for(h=0;h<y.length;h++)y[h].setIsDefault(!1);k.setSchemaName(e);k.setSource(u);k.setSeq(y.length);B.setSchemaAttr(k);e=g.getDesigner();B.setSchemaContent(e.getJsonModelBook());(e=g.getSaveSchemaListener())&&e(B,a,c,function(){R&&R.animateHeight(0);L(B.getSchemaAttr())})}}});c.showDialog(a.getJqUi());setTimeout(function(){a&&a.setFocus()},100)},ea=function(){if(g.getDesigner().getConductor().isDirty()){var a=f.get("sureCreate","\u76f4\u63a5\u65b0\u5efa"),c=f.get("confirmExitPrefix","\u68c0\u6d4b\u5230\u60a8\u6709\u66f4\u6539\u5185\u5bb9\uff0c\u662f\u5426\u4e0d\u4fdd\u5b58")+
a+f.get("confirmExitSuffix","\uff1f\u82e5\u4e0d\u4fdd\u5b58\uff0c\u5c06\u4e22\u5931\u8fd9\u4e9b\u66f4\u6539\u3002"),e=f.get("sureReturn","\u8fd4\u56de\u7f16\u8f91"),h=Q.createFeedbackDialog();h.setMsgImageType(Q.MSG_CONFIRM);h.setButtonText(Q.RETURN_OK,a);h.setButtonText(Q.RETURN_CANCEL,e);h.setMessage(c);h.showDialog();h.setClosingChecker(function(k){k==Q.RETURN_OK&&U();return!0})}else U()},U=function(){var a=new z;a.setSize(null,100);a.setScheamList(y);var c=new I($(document.body));c.setSize(312,
156);c.setTitle(f.get("createScheme","\u65b0\u5efa\u65b9\u6848"));c.setClosingListener(function(e){if(e){var h=a.getDefault(),k=a.getInputValue().trim();if(l(k,a)){for(e=0;e<y.length;e++){var B=M?N.SCHEMATYPE_SYSTEM:N.SCHEMATYPE_USERDEFINED;if(y[e].getSchemaType()==B&&y[e].getSchemaName()==k){a.showMessage(f.get("schemeNameCanNotRepeat","\u65b9\u6848\u540d\u79f0\u5df2\u5b58\u5728"),"#FCAD05");return}}e=function(){var H=new N,O=new ja;H.setSchemaType(M?N.SCHEMATYPE_SYSTEM:N.SCHEMATYPE_USERDEFINED);
H.setIsDefault(h);if(h)for(var Y=0;Y<y.length;Y++)y[Y].setIsDefault(!1);H.setSchemaName(k);H.setSource(u);H.setSeq(y.length);O.setSchemaAttr(H);H=g.getDesigner();H.setJsonModelBook(null);H.born();O.setSchemaContent(H.getJsonModelBook());(H=g.getSaveSchemaListener())&&H(O,a,c,function(ra){L(ra)})};(B=g.getReloadMetaFun())?B(e):e()}}});c.showDialog(a.getJqUi());setTimeout(function(){a&&a.setFocus()},100)},l=function(a,c){return null==a||""==a||0==a.length?(c.showMessage(f.get("schemeNameCanNotNull",
"\u8bf7\u8f93\u5165\u65b9\u6848\u540d\u79f0"),"#FCAD05"),!1):50<a.length?(c.showMessage(f.get("schemeNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26"),"#FCAD05"),!1):!0},p=function(a,c){var e=new z;e.setSize(null,100);var h=new I($(document.body));h.setSize(312,156);var k=a.getSchemaName(),B=e.getJqUi();e.setInputValue(k);h.setTitle(f.get("editScheme","\u4fee\u6539\u65b9\u6848\u540d\u79f0"));h.setClosingListener(function(H){if(H){var O=e.getInputValue().trim();null==
O||""==O||0==O.length?e.showMessage(f.get("schemeNameCannotNUll","\u8bf7\u8f93\u5165\u65b9\u6848\u540d\u79f0"),"#FCAD05"):50<O.length?e.showMessage(f.get("schemeNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26"),"#FCAD05"):b(O,c)?e.showMessage(f.get("existSchemeName","\u65b9\u6848\u540d\u79f0\u91cd\u590d"),"#FCAD05"):k!=O?(new V(q,function(Y){Y&&(a.IsDefault()?(c.text(f.get("def","(\u9ed8\u8ba4)")+O),c.prop("title",f.get("def","(\u9ed8\u8ba4)")+O)):(c.text(O),c.prop("title",
O)),a.setSchemaName(O),g.getCurrentSchemaId()==a.getFId()&&(g.cacheCurrentSchemaName(O),g.setCurrentSchemaName(f.get("currentScheme","\u5f53\u524d\u65b9\u6848\uff1a")+O)),g.showSuccess(f.get("editSuccess","\u4fee\u6539\u6210\u529f\u3002")));h&&h.destroy()},function(Y,ra){return 701001===Y?(e&&e.showMessage(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+Y+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458"),"#f62222"),!0):703001===Y||2201001===Y?(e&&
e.showMessage(f.get("existSchemeName","\u65b9\u6848\u540d\u79f0\u91cd\u590d"),"#FCAD05"),!0):!1})).schemaManage_editSchema(a.getFId(),O,D,u,a.getSchemaType()):h&&h.destroy()}});h.showDialog(B);setTimeout(function(){e&&e.setFocus()},100)},b=function(a,c){c=c.parent(".schema-manage-list-item").siblings();for(var e=0;e<c.length;e++)if($(c[e]).find(".schema-manage-list-item-value").text()==a)return!0;return!1},d=function(a,c,e){var h=new V(q,function(H){c&&c()},function(H,O){return!1}),k=[];if(K)for(var B=
0;B<e.length;B++)k.push(e[B].toJsonObject());h.schemaManage_updateSeq(a,D,K,0<k.length?k:null)},n=function(){var a=m.getSelectedSchema();a&&null!=a.getFId()?(new V(q,function(c){c&&g&&(g.loadSchemaContent(c.schemaContent),g.cacheCurrentSchemaName(c.schemaName),g.setCurrentSchemaName(f.get("currentScheme","\u5f53\u524d\u65b9\u6848\uff1a")+c.schemaName),g.cacheCurrentSchemaId(c.fId),g.setCurrentSchemaType(c.schemaType),g.setAnimateHeight(0),c.schemaContent&&c.schemaContent.isTooModern&&(c=new Q,c.setOptionType(Q.OPTION_OK),
c.setCustomPainter(function(e,h){var k=$("<div>");k.css("text-align","center");k.css("margin-top","42px");k.text(h);e.append(k)}),c.setMessage(f.get("compatibleHighVersion","\u6b64\u65b9\u6848\u662f\u7531\u9ad8\u7248\u672c\u7684\u8f7b\u5206\u6790\u6240\u521b\u5efa\uff0c\u7cfb\u7edf\u5df2\u81ea\u52a8\u517c\u5bb9\u5176\u4e2d\u7684\u53ef\u8bc6\u522b\u90e8\u5206\u3002")),c.showDialog(420,210)))},function(c){if(701001===c||702001===c)return g.showError(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+
c+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458")),!0})).schemaManage_loadContent(a.getFId(),D,u):g.showPrompt(f.get("selectScheme","\u8bf7\u9009\u62e9\u65b9\u6848"))},w=function(a){if(a){m.setSchemaStatus(a);var c=a.IsDefault();if(c)for(var e=0;e<y.length;e++){var h=y[e];h.getFId()!=a.getFId()&&h.setIsDefault(!1)}T();(new V(q,function(k){!0===k&&(g.showSuccess(c?f.get("setSuccess","\u8bbe\u7f6e\u6210\u529f\u3002"):f.get("cancelSuccess","\u53d6\u6d88\u6210\u529f\u3002")),
g.cacheSelectedSchemaName(a.getSchemaName()))},function(k){if(701001===k)return m.setSchemaStatus(a),g.showError(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+k+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458")),!0})).schemaManage_setDefaultAttr(a,D,m.getJudgeHaveMorePublishSchema())}else g.showPrompt(f.get("selectScheme","\u8bf7\u9009\u62e9\u65b9\u6848"))},A=function(a,c){if(m.getJudgeHaveMorePublishSchema()&&1==m.getAllSchemas().length)g.showPrompt(f.get("atLeastOneSchema",
"\u81f3\u5c11\u4fdd\u7559\u4e00\u4e2a\u53d1\u5e03\u65b9\u6848"));else if(a){var e=new qa;e.setText(f.get("confrimDeleteShceme","\u5220\u9664\u65b9\u6848\u201c#1\u201d\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u65b9\u6848\u5417\uff1f").replace("#1",a.getSchemaName()));e.setConfirmedListener(function(h){h&&(new V(q,function(k){if(!0===k){a.getFId()==g.getCurrentSchemaId()&&(g.cacheCurrentSchemaId(null),g.cacheCurrentSchemaName(null),g.setCurrentSchemaName(""));g.cacheSelectedSchemaName(null);
g.showSuccess(f.get("deleteSuccess","\u5220\u9664\u6210\u529f"));for(k=0;k<y.length;k++){var B=y[k];B.getFId()==a.getFId()&&y.splice(k,1)}var H=m.getSchemas();for(k=0;k<H.length;k++)B=H[k],B.getFId()==a.getFId()&&H.splice(k,1);m.setSchemas(H);T();v&&v(y);t.resize()}else"noSchema"==k&&g.showPrompt(f.get("deleteSchemaTip","\u60a8\u5728\u5176\u4ed6\u9875\u9762\u7f16\u8f91\u8be5\u53d1\u5e03\u8bb0\u5f55\u65f6\uff0c\u5220\u9664\u4e86\u5176\u4ed6\u65b9\u6848\uff0c\u8bf7\u81f3\u5c11\u4fdd\u7559\u4e00\u4e2a\u53d1\u5e03\u65b9\u6848\u3002"))},
function(k){if(701001===k)return g.showError(f.get("exeError","\u6267\u884c\u9519\u8bef\uff0c\u9519\u8bef\u7801\uff1a")+k+f.get("contactSupport","\uff0c\u8bf7\u8054\u7cfb\u652f\u6301\u4eba\u5458")),!0})).schemaManage_deleteSchema(a.getFId(),D,u,m.getJudgeHaveMorePublishSchema())});e.show(c)}},L=function(a){y.unshift(a);m.setSchemas(y);m.setSelectedSchema(a);v&&v(y);t.resize()}}})();
//qingVersionTag: 20250415