var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(ja){var na=0;return function(){return na<ja.length?{done:!1,value:ja[na++]}:{done:!0}}};$jscomp.arrayIterator=function(ja){return{next:$jscomp.arrayIteratorImpl(ja)}};$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(ja,na,va){if(ja==Array.prototype||ja==Object.prototype)return ja;ja[na]=va.value;return ja};$jscomp.getGlobal=function(ja){ja=["object"==typeof globalThis&&globalThis,ja,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var na=0;na<ja.length;++na){var va=ja[na];if(va&&va.Math==Math)return va}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(ja,na){var va=$jscomp.propertyToPolyfillSymbol[na];if(null==va)return ja[na];va=ja[va];return void 0!==va?va:ja[na]};
$jscomp.polyfill=function(ja,na,va,za){na&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(ja,na,va,za):$jscomp.polyfillUnisolated(ja,na,va,za))};$jscomp.polyfillUnisolated=function(ja,na,va,za){va=$jscomp.global;ja=ja.split(".");for(za=0;za<ja.length-1;za++){var Fa=ja[za];if(!(Fa in va))return;va=va[Fa]}ja=ja[ja.length-1];za=va[ja];na=na(za);na!=za&&null!=na&&$jscomp.defineProperty(va,ja,{configurable:!0,writable:!0,value:na})};
$jscomp.polyfillIsolated=function(ja,na,va,za){var Fa=ja.split(".");ja=1===Fa.length;za=Fa[0];za=!ja&&za in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Ga=0;Ga<Fa.length-1;Ga++){var Oa=Fa[Ga];if(!(Oa in za))return;za=za[Oa]}Fa=Fa[Fa.length-1];va=$jscomp.IS_SYMBOL_NATIVE&&"es6"===va?za[Fa]:null;na=na(va);null!=na&&(ja?$jscomp.defineProperty($jscomp.polyfills,Fa,{configurable:!0,writable:!0,value:na}):na!==va&&(void 0===$jscomp.propertyToPolyfillSymbol[Fa]&&(va=1E9*Math.random()>>>0,
$jscomp.propertyToPolyfillSymbol[Fa]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(Fa):$jscomp.POLYFILL_PREFIX+va+"$"+Fa),$jscomp.defineProperty(za,$jscomp.propertyToPolyfillSymbol[Fa],{configurable:!0,writable:!0,value:na})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(ja){if(ja)return ja;var na=function(Ga,Oa){this.$jscomp$symbol$id_=Ga;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:Oa})};na.prototype.toString=function(){return this.$jscomp$symbol$id_};var va="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",za=0,Fa=function(Ga){if(this instanceof Fa)throw new TypeError("Symbol is not a constructor");return new na(va+(Ga||"")+"_"+za++,Ga)};return Fa},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(ja){if(ja)return ja;ja=Symbol("Symbol.iterator");for(var na="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),va=0;va<na.length;va++){var za=$jscomp.global[na[va]];"function"===typeof za&&"function"!=typeof za.prototype[ja]&&$jscomp.defineProperty(za.prototype,ja,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return ja},
"es6","es3");$jscomp.iteratorPrototype=function(ja){ja={next:ja};ja[Symbol.iterator]=function(){return this};return ja};$jscomp.iteratorFromArray=function(ja,na){ja instanceof String&&(ja+="");var va=0,za=!1,Fa={next:function(){if(!za&&va<ja.length){var Ga=va++;return{value:na(Ga,ja[Ga]),done:!1}}za=!0;return{done:!0,value:void 0}}};Fa[Symbol.iterator]=function(){return Fa};return Fa};
$jscomp.polyfill("Array.prototype.keys",function(ja){return ja?ja:function(){return $jscomp.iteratorFromArray(this,function(na){return na})}},"es6","es3");$jscomp.findInternal=function(ja,na,va){ja instanceof String&&(ja=String(ja));for(var za=ja.length,Fa=0;Fa<za;Fa++){var Ga=ja[Fa];if(na.call(va,Ga,Fa,ja))return{i:Fa,v:Ga}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(ja){return ja?ja:function(na,va){return $jscomp.findInternal(this,na,va).v}},"es6","es3");
$jscomp.checkStringArgs=function(ja,na,va){if(null==ja)throw new TypeError("The 'this' value for String.prototype."+va+" must not be null or undefined");if(na instanceof RegExp)throw new TypeError("First argument to String.prototype."+va+" must not be a regular expression");return ja+""};
$jscomp.polyfill("String.prototype.endsWith",function(ja){return ja?ja:function(na,va){var za=$jscomp.checkStringArgs(this,na,"endsWith");na+="";void 0===va&&(va=za.length);va=Math.max(0,Math.min(va|0,za.length));for(var Fa=na.length;0<Fa&&0<va;)if(za[--va]!=na[--Fa])return!1;return 0>=Fa}},"es6","es3");
(function(){function ja(){var ea=this,Pa,M,Na,Ba,Ja,Ha,Xa,Ea,Aa,Ta=!0,ya=[],ha=[],Ca=[],cb=[],hb,ua,Ma,eb,Ra,jb,ib,fb=!1,ka=!1,Ua,ba,$a,F=[],e,k,f;this.setWidgetsExecutingTag=function(b){f=b};this.setSchemaTag=function(b){_sSchemaTag=b};this.setPublishSourceFId=function(b){k=b};this.getPublishSourceFId=function(){return k};this.getId=function(){return Pa};this.setId=function(b){Pa=b};this.getPublishTargetType=function(){return M};this.setPublishTargetType=function(b){M=b};this.getPublishSourceType=
function(){return Na};this.setPublishSourceType=function(b){Na=b};this.getPublishSourceName=function(){return Ba};this.setPublishSourceName=function(b){Ba=b};this.getPublishSourceGroupName=function(){return Ja};this.setPublishSourceGroupName=function(b){Ja=b};this.getName=function(){return Ha};this.setName=function(b){Ha=b};this.getPath=function(){return Xa};this.setPath=function(b){Xa=b};this.getPathText=function(){return Ea};this.setPathText=function(b){Ea=b};this.getSchemeId=function(){return Aa};
this.setSchemeId=function(b){Aa=b};this.isAnalysis=function(){return Ta};this.setAnalysis=function(b){Ta=b};this.getUsers=function(){return ya};this.setUsers=function(b){ya=b};this.getSchemaAttrSelected=function(){return Ca};this.setSchemaAttrSelected=function(b){Ca=b};this.getSchemaModelSelected=function(){return cb};this.setSchemaModelSelected=function(b){cb=b};this.getRoles=function(){return ha};this.setRoles=function(b){ha=b};this.getTagId=function(){return hb};this.setTagId=function(b){hb=b};
this.getCarryData=function(){return ua};this.setCarryData=function(b){ua=b};this.getCreateTime=function(){return eb};this.setCreateTime=function(b){eb=b};this.getCreateFormatTime=function(){return Ra};this.setCreateFormatTime=function(b){Ra=b};this.getUpdateTime=function(){return ib};this.setUpdateTime=function(b){ib=b};this.getUpdateFormatTime=function(){return jb};this.setUpdateFormatTime=function(b){jb=b};this.getThumbnailInfo=function(){return Ma};this.setThumbnailInfo=function(b){Ma=b};this.getIsOverwrite=
function(){return fb};this.setIsOverwrite=function(b){fb=b};this.getIsAddOldPermission=function(){return ka};this.setIsAddOldPermission=function(b){ka=b};this.isPreset=function(){return Ua};this.setIsPreset=function(b){Ua=b};this.setFailedUserIds=function(b){ba=b};this.getFailedUserIds=function(){return ba};this.setNoOperValueMap=function(b){$a=b};this.getNoOperValueMap=function(){return $a};this.setCarryUsers=function(b){F=b};this.getCarryUsers=function(){return F};this.setLastBiztag=function(b){e=
b};this.getLastBiztag=function(){return e};this.toJsonObject=function(){var b={};b.id=Pa;b.name=Ha;b.publishTargetType=M;b.publishSourceType=Na;b.publishSourceName=Ba;b.publishSourceGroupName=Ja;b.path=Xa;b.pathText=Ea;b.isCanAnalysis=Ta;b.schemaId=Aa;b.tagId=hb;b.carryData=ua;b.createTime=eb;b.updateTime=ib;b.thumbnailInfo=Ma;b.isOverwrite=fb;b.isAddOldPermission=ka;b.isPreset=Ua;b.failedUserIds=ba;b.noOperValueMap=$a;b.publishSourceFId=k;b.lastBiztag=e;for(var a=[],c=0;c<ya.length;c++){var m=ya[c];
a.push(m.toJsonObject())}b.users=a;c=[];for(m=0;m<ha.length;m++)c.push(ha[m].toJsonObject());b.roles=c;if(F){a=[];for(c=0;c<F.length;c++)m=F[c],a.push(m.toJsonObject());b.carryUsers=a}b.executingTagMap=f;return b};this.fromJsonObject=function(b){ea.setId(b.id);ea.setName(b.name);ea.setPublishTargetType(b.publishTargetType);ea.setPublishSourceType(b.publishSourceType);ea.setPublishSourceName(b.publishSourceName);ea.setPublishSourceGroupName(b.publishSourceGroupName);ea.setPath(b.path);ea.setPathText(b.pathText);
ea.setAnalysis(b.isCanAnalysis);ea.setSchemeId(b.schemaId);ea.setCarryData(b.carryData);ea.setTagId(b.tagId);ea.setCreateTime(b.createTime);ea.setCreateFormatTime(b.createFormatTime);ea.setUpdateFormatTime(b.updateFormatTime);if(b.thumbnailInfo){var a=b.thumbnailInfo;Ma=new Fa;Ma.fromJsonObject(a)}ea.setIsOverwrite(b.isOverwrite);ea.setIsAddOldPermission(b.isAddOldPermission);ea.setIsPreset(b.isPreset);ea.setFailedUserIds(b.failedUserIds);ea.setLastBiztag(b.lastBiztag);(a=b.noOperValueMap)&&ea.setNoOperValueMap(a);
var c=[],m=b.users;if(m){for(a=0;a<m.length;a++){var B=new Ka;B.fromJsonObject(m[a]);c.push(B)}ea.setUsers(c)}a=[];if(B=b.roles){for(c=0;c<B.length;c++)m=new Ka,m.fromJsonObject(B[c]),a.push(m);ea.setRoles(a)}c=[];if(b=b.carryUsers){for(a=0;a<b.length;a++)B=new Ka,B.fromJsonObject(b[a]),c.push(B);ea.setCarryUsers(c)}};this.copy=function(){var b=new ja;b.fromJsonObject(ea.toJsonObject());return b}}function na(){var ea,Pa,M,Na,Ba,Ja,Ha,Xa,Ea;this.setOrderId=function(Aa){Ea=Aa};this.getOrderId=function(){return Ea};
this.setRelationId=function(Aa){Ha=Aa};this.getRelationId=function(){return Ha};this.setId=function(Aa){ea=Aa};this.getId=function(){return ea};this.setName=function(Aa){Pa=Aa};this.getName=function(){return Pa};this.setParentId=function(Aa){M=Aa};this.getParentId=function(){return M};this.setIsPreset=function(Aa){Na=Aa};this.getIsPreset=function(){return Na};this.setParentNode=function(Aa){Ba=Aa};this.getParentNode=function(){return Ba};this.setIsHidden=function(Aa){Ja=Aa};this.getIsHidden=function(){return Ja};
this.setIsSearch=function(Aa){Xa=Aa};this.getIsSearch=function(){return Xa};this.getSubNodeLevel=function(){for(var Aa=0,Ta=Ba;Ta;)Aa++,Ta=Ta.getParentNode();return Aa}}function va(){na.call(this);var ea=this,Pa=[],M,Na,Ba,Ja,Ha,Xa;this.setCenterId1=function(Ea){Na=Ea};this.getCenterId1=function(){return Na};this.setCenterId2=function(Ea){Ba=Ea};this.getCenterId2=function(){return Ba};this.setCenterId3=function(Ea){Ja=Ea};this.getCenterId3=function(){return Ja};this.setCenterId4=function(Ea){Ha=Ea};
this.getCenterId4=function(){return Ha};this.setChildren=function(Ea){Pa=Ea};this.getChildren=function(){return Pa};this.setIsOpenDir=function(Ea){M=Ea};this.getIsOpenDir=function(){return M};this.getIsShow=function(){return Xa};this.setIsShow=function(Ea){Xa=Ea};this.toJsonObject=function(){var Ea={};Ea.children=Pa;return Ea};this.fromJsonObject=function(Ea){ea.setName(Ea.name);ea.setId(Ea.id);ea.setIsPreset(Ea.isPreset);ea.setParentId(Ea.parentId);ea.setRelationId(Ea.relationId);ea.setIsHidden(!1);
ea.setIsOpenDir(!0);ea.setOrderId(Ea.orderId);ea.setCenterId1(Ea.levelId1);ea.setCenterId2(Ea.levelId2);ea.setCenterId3(Ea.levelId3);ea.setCenterId4(Ea.levelId4);if(Ea=Ea.children)for(var Aa=0;Aa<Ea.length;Aa++){var Ta=Ea[Aa];if(Ta.tagId||Ta.source){var ya=new za;ya.fromJsonObject(Ta);ya.setParentNode(ea);Pa.push(ya)}else ya=new va,ya.fromJsonObject(Ta),ya.setParentNode(ea),Pa.push(ya)}}}function za(){na.call(this);var ea=this,Pa,M;this.setTagId=function(Na){Pa=Na};this.getTagId=function(){return Pa};
this.setSource=function(Na){M=Na};this.getSource=function(){return M};this.fromJsonObject=function(Na){ea.setName(Na.name);ea.setId(Na.id);ea.setIsPreset(Na.isPreset);ea.setParentId(Na.parentId);ea.setTagId(Na.tagId);ea.setIsHidden(!1);ea.setSource(Na.source);ea.setOrderId(Na.orderId)}}function Fa(){var ea,Pa,M=0,Na=0,Ba=760,Ja=380,Ha=0,Xa=0,Ea,Aa,Ta,ya;this.getAnalysisId=function(){return ea};this.setAnalysisId=function(ha){ea=ha};this.getPublishId=function(){return Pa};this.setPublishId=function(ha){Pa=
ha};this.setApertureTop=function(ha){M=ha};this.getApertureTop=function(){return M};this.setApertureLeft=function(ha){Na=ha};this.getApertureLeft=function(){return Na};this.setApertureWidth=function(ha){Ba=ha};this.getApertureWidth=function(){return Ba};this.setApertureHeight=function(ha){Ja=ha};this.getApertureHeight=function(){return Ja};this.setScrollTop=function(ha){Ha=ha};this.getScrollTop=function(){return Ha};this.setScrollLeft=function(ha){Xa=ha};this.getScrollLeft=function(){return Xa};this.setSchemaModelBook=
function(ha){Ea=ha};this.getSchemaModelBook=function(){return Ea};this.setSchemaId=function(ha){Ta=ha};this.getSchemaId=function(){return Ta};this.setSchedule=function(ha){Aa=ha};this.getSchedule=function(){return Aa};this.setScheduled=function(ha){ya=ha};this.isScheduled=function(){return ya};this.toJsonObject=function(){var ha={};ha.analysisId=ea;ha.publishId=Pa;ha.apertureTop=M;ha.apertureLeft=Na;ha.apertureWidth=Ba;ha.apertureHeight=Ja;ha.scrollTop=Ha;ha.scrollLeft=Xa;ha.schedule=Aa?Aa.toJsonObject():
null;ha.modelBook=Ea;ha.isScheduled=ya;return ha};this.fromJsonObject=function(ha){ea=ha.analysisId;Pa=ha.publishId;M=ha.apertureTop;Na=ha.apertureLeft;Ba=ha.apertureWidth;Ja=ha.apertureHeight;Ha=ha.scrollTop;Xa=ha.scrollLeft;ya=ha.isScheduled;var Ca=ha.schedule;Ca&&(Aa=new La,Aa.fromJsonObject(Ca));Ea=ha.modelBook;Ta=ha.schemaId;return ha};this.copy=function(){var ha=new Fa;ha.fromJsonObject(this.toJsonObject());ha.setSchemaId(Ta);return ha}}function Ga(){function ea(M){com.kingdee.bos.qing.core.LongerDesignerOperationJudger.call(this);
M&&0!=M&&(this.protectedParseDesignable=function(){return 0==(M&Qa.ANALYSIS_EDITABLE)},this.protectedParseDataDetailReadable=function(){return 0==(M&Qa.ANALYSIS_DETAIL)},this.protectedParseExportable=function(){return 0==(M&Qa.ANALYSIS_EXPORT)},this.protectedParsePrintable=function(){return 0==(M&Qa.ANALYSIS_PRINT)},this.protectedParsePublishable=function(){return 0==(M&Qa.ANALYSIS_PUBLISH)},this.protectedParseTimingPushable=function(){return 0==(M&Qa.ANALYSIS_TIMEPUSH)})}function Pa(M){com.kingdee.bos.qing.core.SquareDesignerOperationJudger.call(this);
M&&0!=M&&(this.protectedParsePublishable=function(){return 0==(M&Qa.CARD_PUBLISH)},this.protectedParseTimingPushable=function(){return 0==(M&Qa.CARD_TIMEPUSH)})}this.protectedMethod={parseLongerDesignerOperationJudger:function(M){return new ea(M)},parseSquareDesignerOperationJudger:function(M){return new Pa(M)}}}"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.publish&&(com.kingdee.bos.qing.publish={});"undefined"==typeof com.kingdee.bos.qing.publish.model&&(com.kingdee.bos.qing.publish.model={});var Oa=com.kingdee.bos.qing.publish.model,La=com.kingdee.bos.qing.schedule.QingSchedule,Ka=com.kingdee.bos.qing.biz.common.ValueTextPair,Za={},aa={},Wa={},Qa={},ab={},db={};Oa.PublishSourceType=Za;Oa.PublishTargetType=aa;Oa.PushTargetType=Wa;Oa.OperCodeType=Qa;Oa.PublishModel=ja;Oa.FolderNode=va;Oa.LeafNode=za;Oa.ThumbnailInfo=
Fa;Oa.OperCodeMap=function(){this.getOperCodeMap=function(){var ea={};ea[db.SQUARE_LONGER]={1:"canSquare",2:"editable",4:"export",8:"print",16:"publishTo",32:"timingPush",64:"scanDetails"};ea[db.LONGER]={1:"canAnalysis",2:"editable",4:"export",8:"print",16:"publishTo",32:"timingPush",64:"scanDetails"};ea[db.SQUARE]={256:"publishTo",512:"timingPush",128:"canSquare"};ea[db.QING_RPT]={4:"export",8:"print",16:"saveSnapshot"};return ea};this.getOperNameMap=function(){return{readOnly:"\u4ec5\u67e5\u770b",
editable:"\u53ef\u7f16\u8f91","export":"\u5bfc\u51fa",print:"\u6253\u5370",publishTo:"\u53d1\u5e03\u5230",timingPush:"\u5b9a\u65f6\u63a8\u9001",scanDetails:"\u67e5\u770b\u660e\u7ec6",canAnalysis:"\u53ef\u8fdb\u5165\u201c\u6570\u636e\u5206\u6790\u201d",canSquare:"\u53ef\u8fdb\u5165\u8bbe\u8ba1\u5668",saveSnapshot:"\u4fdd\u5b58\u5feb\u7167"}}};Oa.PublishOperModel=function(){var ea=this,Pa,M,Na,Ba;this.getPublishId=function(){return Pa};this.setPublishId=function(Ja){Pa=Ja};this.getType=function(){return M};
this.setType=function(Ja){M=Ja};this.getNoOperAuthValue=function(){return Na};this.setNoOperAuthValue=function(Ja){Na=Ja};this.getLevel=function(){return Ba};this.setLevel=function(Ja){Ba=Ja};this.toJsonObject=function(){var Ja={};Ja.publishId=Pa;Ja.type=M;Ja.noOperAuthValue=Na;return Ja};this.fromJsonObject=function(Ja){Ja&&(Ja.publishId&&ea.setPublishId(Ja.publishId),Ja.type&&ea.setType(Ja.type),Ja.noOperAuthValue&&ea.setNoOperAuthValue(Ja.noOperAuthValue))}};Oa.OCarryDataType=ab;Oa.OperType=db;
Oa.RtSquareEditableConfirmerModel=function(ea){com.kingdee.bos.qing.core.RtSquareEditableConfirmer.call(this);Ga.call(this);var Pa=this.protectedMethod;this.protectedParseSquareDesignerAccessable=function(){return 0==(ea&Qa.ENTRY_SQUARE)};this.protectedParseSquareDesignerOperationJudger=function(){return Pa.parseSquareDesignerOperationJudger(ea)};this.protectedParseAdvancedAnalysisAccessable=function(){return 0==(ea&Qa.ENTRY_ANALYSIS)};this.protectedParseAdvancedAnalysisOperationJudger=function(){return Pa.parseLongerDesignerOperationJudger(ea)}};
Oa.RtLongerEditableConfirmerModel=function(ea){com.kingdee.bos.qing.core.RtLongerEditableConfirmer.call(this);Ga.call(this);var Pa=this.protectedMethod;this.protectedParseLongerDesignerAccessable=function(){return 0==(ea&Qa.ENTRY_ANALYSIS)};this.protectedParseLongerDesignerOperationJudger=function(){return Pa.parseLongerDesignerOperationJudger(ea)}};Oa.LongerDesignerOperationJudgerModel=function(ea){com.kingdee.bos.qing.core.LongerDesignerOperationJudger.call(this);ea&&0!=ea&&(this.protectedParseDesignable=
function(){return 0==(ea&Qa.ANALYSIS_EDITABLE)},this.protectedParseDataDetailReadable=function(){return 0==(ea&Qa.ANALYSIS_DETAIL)},this.protectedParseExportable=function(){return 0==(ea&Qa.ANALYSIS_EXPORT)},this.protectedParsePrintable=function(){return 0==(ea&Qa.ANALYSIS_PRINT)},this.protectedParsePublishable=function(){return 0==(ea&Qa.ANALYSIS_PUBLISH)},this.protectedParseTimingPushable=function(){return 0==(ea&Qa.ANALYSIS_TIMEPUSH)})};Oa.PublishVO=function(){var ea=this,Pa,M;this.getName=function(){return Pa};
this.setName=function(Na){Pa=Na};this.getCreatorName=function(){return M};this.setCreatorName=function(Na){M=Na};this.fromJsonObject=function(Na){ea.setName(Na.name);ea.setCreatorName(Na.creatorName)}};Za.SUBJECT="subject";Za.BILL="bill";Za.DASHBOARD="dashboard";Za.REPORT="report";Za.CONTROL="control";Za.EXTREPORT="extreport";aa.APPMENU=0;aa.CENTER=1;aa.MOBILE=2;aa.GUIMENU=4;aa.CARD_REPOSITORY=5;aa.EMAIL=6;Wa.YZJ_ROBOT=0;Wa.WXQYH_ROBOT=1;Wa.DINGDING=3;Qa.ANALYSIS_EDITABLE=2;Qa.ANALYSIS_EXPORT=4;Qa.ANALYSIS_PRINT=
8;Qa.ANALYSIS_PUBLISH=16;Qa.ANALYSIS_TIMEPUSH=32;Qa.ANALYSIS_DETAIL=64;Qa.CARD_PUBLISH=256;Qa.CARD_TIMEPUSH=512;Qa.ENTRY_ANALYSIS=1;Qa.ENTRY_SQUARE=128;Qa.RPT_EXPORT=4;Qa.RPT_PRINT=8;Qa.RPT_SAVE_SNAPSHOT=16;ab.REALTIMECARRYDATA="0";ab.NEVERCARRYDATA="1";ab.CARRRYDATABYUSER="2";db.SQUARE_LONGER="0";db.LONGER="1";db.SQUARE="2";db.QING_RPT="3";ja.CURRENT_SCHEMA_ID="currentAnalysisState";ja.QING_CENTER_ID="c81a0135-1157-41a4-8e08-de55179916c1"})();(function(){function ja(){var F,e,k,f,b,a,c,m,B,q,x,t,H,y,u,v;this.setDashBoardAnalysis=function(r){v=r};this.getDashBoardAnalysis=function(){return v};this.setWidgetsExecutingTag=function(r){u=r};this.getWidgetsExecutingTag=function(){return u};this.setSchemaTag=function(r){y=r};this.getSchemaTag=function(){return y};this.getChoiceAnalysisSchema=function(){return H};this.setChoiceAnalysisSchema=function(r){H=r};this.getSource=function(){return t};this.setSource=function(r){t=r};this.getBizTag=function(){return F};
this.setBizTag=function(r){F=r};this.getCurrentSourceType=function(){return e};this.setCurrentSourceType=function(r){e=r};this.setHaveToCarryData=function(r){k=r};this.isHaveToCarryData=function(){return k};this.setHasDirectModeTable=function(r){f=r};this.getHasDirectModeTable=function(){return f};this.getCurrentContentModel=function(){return b};this.setCurrentContentModel=function(r){b=r};this.setScene=function(r){a=r};this.getScene=function(){return a};this.setMobilePreviewUrl=function(r){c=r};
this.getMobilePreviewUrl=function(){return c};this.getLappEntranceUrl=function(){return m};this.setLappEntranceUrl=function(r){m=r};this.setParamPathPrefix=function(r){B=r};this.getParamPathPrefix=function(){return B};this.supportPublishWithCarryData=function(){return e!=cb.REPORT&&e!=cb.CONTROL&&e!=cb.EXTREPORT?!0:!1};this.setRefToId=function(r){q=r};this.getRefToId=function(){return q};this.setDsbPublishId=function(r){x=r};this.getDsbPublishId=function(){return x};this.supportPublishMoreSchemaScene=
function(r){return a==ja.Scene.Longer&&(r==ua.APPMENU||r==ua.CENTER)}}function na(F,e,k){Qa.call(this);var f=this,b=this.protectedMethod,a=[],c,m,B,q,x,t;(function(){b.setTitle(F);f.setSize(e.getWidth(e.isEditPublish()),e.getHeight(e.isEditPublish()));b.setSelectable(!0);e.setOuterMessageCurtain(b.getMessageCurtain());e.setPublishContentEditEntrance(k);e.setFuncReSize(b.getDialogCtrl().setBounds);b.setContentPaneCreator(function(){return e.getJqUi()});b.setClosingChecker(function(C){y(C)},!0);b.setClosingAction(function(C){})})();
this.setEditPublishInfo=function(C){t=C};this.getEditPublishInfo=function(){return t};this.getDialogCtrl=function(){return b.getDialogCtrl()};this.setOuterMessageCurtain=function(C){c=C};this.addSuccessCallback=function(C){a.push(C)};this.setBiztag=function(C){m=C};this.setDsbPublishId=function(C){B=C};this.setDsbRefToId=function(C){q=C};this.setScene=function(C){x=C};var H=function(C,W){if(a&&0<a.length)for(var P=0;P<a.length;P++){var T=a[P];T&&T(C,c,W)}},y=function(C){var W=e.checkUIInput(function(P,
T,K,Q){if(P)if(e.isEditPublish())r(C,T);else{P=e.getModelFromUI();var J=e.getPublishContext();P.getPublishSourceType()==cb.DASHBOARD&&P.getCarryData()&&!J.getWidgetsExecutingTag()?(b.getMessageCurtain().showPrompt(aa.get("publishNotReadyToCarryData",'\u5f00\u542f"\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e"\uff0c\u9700\u6570\u636e\u51c6\u5907\u5b8c\u6210\u540e\u624d\u53ef\u8fdb\u884c\u53d1\u5e03\u64cd\u4f5c\uff0c\u8bf7\u5173\u95ed\u53d1\u5e03\u5f39\u7a97\u540e\u91cd\u8bd5\u3002'),2E3),C(!1)):
u(C,K?K:!1,T,Q?Q:!1)}else C(P)},t,function(P){b.getMessageCurtain().showPrompt(P,2E3);C(!1)});W&&(b.getMessageCurtain().showPrompt(W,2E3),C(!1))},u=function(C,W,P,T){var K=e.getModelFromUI();K.setIsOverwrite(W);K.setIsAddOldPermission(T);B?K.setPublishSourceFId(q?q:m):K.setPublishSourceFId(m);W=K.getId();K.setId(null);T=e.getPublishContext().getWidgetsExecutingTag();K.setWidgetsExecutingTag(T);T=e.getAnalysisSchemaArray();var Q=[];if(null!=T)for(var J=0;J<T.length;J++)Q.push(T[J].toJsonObject());
T=null==T?[e.getJsonModel()]:Q;Ua.createPublishFacade(e.getPublishTargetType(),e.getRemoteImpl(),function(E){K.setId(E);a&&0!=a.length?H(K,P):P||c&&c.showSuccess(aa.get("publishSuccess","\u53d1\u5e03\u6210\u529f\u3002"));C(!0);E=com.kingdee.bos.qing.behavior.BehaviorManager;E.recordResourceOperation(E.OperationType.QING_PUBLISH)},function(E,L){if(2301005==E)return b.getMessageCurtain().showPrompt(aa.get("publishNoCascadePermission","\u60a8\u6ca1\u6709\u8be5\u8bb0\u5f55\u7684\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u201c#1\u201d\u68c0\u67e5\u6388\u6743\u3002").replace("#1",
L),2E3),C(!1),!0;if(2301006==E)return b.getMessageCurtain().showPrompt(aa.get("publishSourcePublishNotExistException","\u539f\u53d1\u5e03\u4fe1\u606f\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),C(!1),!0;if(2301007==E)return b.getMessageCurtain().showPrompt(aa.get("publishSourceSubjectNotExist","\u539f\u4e1a\u52a1\u4e3b\u9898\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),C(!1),!0;if(2301008==E)return b.getMessageCurtain().showPrompt(aa.get("publishSourceDashboardNotExist",
"\u539f\u4eea\u8868\u677f\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),C(!1),!0;if(2301009==E)return b.getMessageCurtain().showPrompt(aa.get("publishNameExist","\u53d1\u5e03\u8def\u5f84\u4e0b\u5df2\u5b58\u5728\u76f8\u540c\u7684\u53d1\u5e03\u540d\u79f0\u3002"),2E3),C(!1),!0;if(2301010==E)return b.getMessageCurtain().showPrompt(aa.get("qingFileStorageLimit","\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),2E3),C(!1),!0;if(2301011==E)return b.getMessageCurtain().showPrompt(aa.get("publishSourceExtReportNotExist",
"\u539f\u62a5\u8868\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),C(!1),!0;if(2300001==E)return b.getMessageCurtain().showPrompt(aa.get("qingStorageNoSpace","\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\uff0c\u8bf7\u8054\u7cfb\u8fd0\u7ef4\u4eba\u5458\u6dfb\u52a0\u78c1\u76d8\u3002"),2E3),C(!1),!0;if(2301013==E)return b.getMessageCurtain().showPrompt(aa.get("mapNotFound","\u627e\u4e0d\u5230\u5f15\u7528\u7684\u5730\u56fe\u6a21\u677f\uff0c\u65e0\u6cd5\u53d1\u5e03\u3002"),2E3),C(!1),!0;if(2301014==
E)return b.getMessageCurtain().showPrompt(aa.get("publishCascadeMaxLimit","\u6700\u5927\u53d1\u5e03\u5c42\u7ea7\u4e0d\u80fd\u8d85\u8fc7#1\u5c42\u3002").replace("#1",L),2E3),C(!1),!0;if(2301002==E)return v(C,K,P),!0;if(2301016==E)return b.getMessageCurtain().showPrompt(aa.get("publishNoOperAuthException","\u6ca1\u6709\u64cd\u4f5c\u6743\u9650\u3002"),2E3),C(!1),!0;C(!1);return!1}).savePublishInfo(e.getPublishTargetType(),K,T,W,B,x)},v=function(C,W,P){W=$(document.body);var T=$("<div class='sa-ctrl-common-modallayer'>");
T.appendTo(W);var K=new Pa(T),Q=aa.get("operateConfirm","\u64cd\u4f5c\u786e\u8ba4");K.setTitle(Q);Q=W.prop("clientWidth");var J=W.prop("clientHeight");K.setBounds(Q-300>>1,J-200>>1,300,200);K.setToolbarVisible(!1);Q=$("<div>");var E=aa.get("publishSameSourceNameDuplicate","\u53d1\u5e03\u540d\u79f0\u5df2\u5b58\u5728\uff0c\u786e\u5b9a\u8981\u8986\u76d6\u5417\uff1f");J=$("<span>");J.text(E);J.attr("title",E);var L=aa.get("isAddOldPermission","\u540c\u65f6\u6388\u6743\u7ed9\u539f\u83dc\u5355\u5df2\u6388\u6743\u7684\u7528\u6237\u548c\u89d2\u8272");
E=(new ea(L)).getJqUi();E.attr("title",L);var I=new M;L=I.getJqUi();ka.layoutCtrl(J,5,10,270,23);ka.layoutCtrl(E,5,45,210,23);ka.layoutCtrlWithLRTB(L,215,null,31,47,null,19);J.appendTo(Q);E.appendTo(Q);L.appendTo(Q);K.setContent(Q);K.addClosingListener(function(U,l){l?u(C,!0,P,I.isOn()):C(!1);U.destroy();T.remove();return!0});K.showFooterPane();K.show();T.appendTo(W)},r=function(C,W){var P=e.getModelFromUI(),T=Ua.createPublishFacade(e.getPublishTargetType(),e.getRemoteImpl(),function(E){var L=new com.kingdee.bos.qing.publish.CardModel;
L.fromJsonObject(E);L&&L.getImagePath()&&P.setImagePath(L.getImagePath());H(P);W||c&&c.showSuccess(aa.get("updateSuccess","\u4fee\u6539\u6210\u529f\u3002"));C(!0)},function(E,L){L=!1;2301001==E||2301005==E?(b.getMessageCurtain().showPrompt(aa.get("publishInfoNotExistException","\u8be5\u8bb0\u5f55\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),2E3),L=!0):2301002==E?(E=P.getPublishSourceType(),aa.get(E,E),b.getMessageCurtain().showPrompt(aa.get("publishUpdateSameSourceNameDuplicate","\u53d1\u5e03\u8def\u5f84\u4e0b\u5df2\u5b58\u5728\u76f8\u540c\u7684\u53d1\u5e03\u540d\u79f0\u3002"),
2E3),L=!0):2301016==E?(b.getMessageCurtain().showPrompt(aa.get("publishNoOperAuthException","\u6ca1\u6709\u64cd\u4f5c\u6743\u9650\u3002"),2E3),L=!0):3001002==E&&(b.getMessageCurtain().showPrompt(aa.get("publishNotExist","\u60a8\u5728\u5176\u4ed6\u9875\u9762\u5220\u9664\u4e86\u8be5\u53d1\u5e03\u8bb0\u5f55\u3002"),2E3),L=!0);C(!1);return L}),K=[],Q=P.getSchemaModelSelected();if(Q&&0<Q.length)for(var J=0;J<Q.length;J++)K.push(Q[J].toJsonObject());K=0==K.length?null:K;Q=null==K?na.UPDATE_NOSCHEME:na.UPDATE_ALL;
T.updatePublishInfo(e.getPublishTargetType(),P,K,Q);P.setSchemaModelSelected(null)}}function va(F,e){var k,f,b;this.getRemoteImpl=function(){return F};this.getPublishTargetType=function(){return e};this.setOuterMessageCurtain=function(a){k=a};this.getWidth=function(a){return a?365:415};this.getHeight=function(a){return a?360:380};this.setPublishContentEditEntrance=function(a){f=a};this.getPublishContentEditEntrance=function(){return f};this.setFuncReSize=function(a){b=a};this.getFunResize=function(){return b};
this.protectedMethod={createFacade:function(a,c,m){return Ua.createPublishFacade(e,F,a,c,m)},getOuterMessageCurtain:function(){return k}}}function za(){ab.AbstractTabPane.call(this);var F=this,e,k,f;this.setOperJqUi=function(b){f=b};this.protectedInit=function(b){f.appendTo(b)};this.setTitle=function(b){e=b};this.getTitle=function(){return e};this.getJqUi=function(){k||(k=$("<div>"),F.protectedInit(k));return k};this.protectedInit=function(b){f.appendTo(b)};this.protectedUpdateUi=function(b){};this.protectedModelChanged=
function(b,a){}}function Fa(F,e){var k=this,f,b,a,c=[],m,B=new eb,q,x,t,H=jb.NEVERCARRYDATA;new Ha;var y={CHILDREN:1,PARENT:2},u;this.setTimedPush=function(r){u=r};this.getTimedPush=function(){return u};this.setOuterMessageCurtain=function(r){f=r};this.setPublishTargetType=function(r){b=r};this.setRemoteImpl=function(r){a=r};this.setParentNoOperValue=function(r){m=r};this.setTimingCarryData=function(r){};this.setInitSuccessCallBackHandler=function(r){q=r};this.setRefreshWidth=function(r){x=r};this.getCarryData=
function(){return H};this.getCarryDataUsers=function(){return[]};this.getNoOperValueMap=function(){for(var r={},C=0;C<c.length;C++){var W=c[C];if(!W.isChecked()){W=W.getUserObject();var P=W.getNoOperAuthValue()|r[W.getType()];r[W.getType()]=P}}return r};var v=function(r){var C=new Na;C.setUserObject(r);c.push(C);r=B.getOperCodeMap()[r.getType()][r.getNoOperAuthValue()];C.setText(aa.get(r,B.getOperNameMap()[r]));return C};this.setCarryDataUsers=function(r){};this.roleSelectedHandler=function(r){};
this.userSelectedHandler=function(r){};this.initUi=function(){throw Error("Override me");};this.loadPublishOperModel=function(){var r=Ua.createPublishFacade(b,a,function(P){k.setParentNoOperValue(P.noOperValueMap);k.setTimingCarryData(P.isTimingCarryData);P.parentPublishVo&&(t=new fb,t.fromJsonObject(P.parentPublishVo));q&&q(k.initUi(),x)},function(P,T){if(2301006==P)return f.showPrompt(aa.get("publishSourcePublishNotExistException","\u539f\u53d1\u5e03\u4fe1\u606f\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),
2E3),!0});if(F){var C=F.getBizTag();var W=F.getDsbPublishId();F.getRefToId()&&(C=F.getRefToId())}e&&(C=e.getId(),W=null);r.loadPublishOperModel(C,null!=e,W)};this.showOrHide=function(r,C){C?r.show():r.hide()};this.protectedMethod={createOperPerLabelUI:function(r){var C=new ea;C.setText(aa.get("funcPer","\u64cd\u4f5c\u6743\u9650\uff1a"));C=C.getJqUi();C.appendTo(r);ka.layoutCtrl(C,40,0,60,23)},createHelpIcon:function(){var r=new Ja;r.setIconType(Ja.ICON_TYPE_QUESTION);var C=aa.get("whatsFuncPer","\u672a\u6388\u6743\u7684\u64cd\u4f5c\u6743\u9650\u5df2\u88ab\u7f6e\u7070");
t&&(C=t.getName()?aa.get("helpInstruction","\u201c#1\u201d\u53d1\u5e03\u5e76\u6388\u6743\u7ed9\u60a8\u7684\u201c#2\u201d\u4e2d\uff0c\u672a\u6388\u6743\u7684\u64cd\u4f5c\u6743\u9650\u5df2\u88ab\u7f6e\u7070").replace("#1",t.getCreatorName()).replace("#2",t.getName()):aa.get("helpInstructionForDel","\u8be5\u53d1\u5e03\u8bb0\u5f55\u5c5e\u4e8e\u518d\u6b21\u53d1\u5e03\uff0c\u6765\u6e90\u53d1\u5e03\u8bb0\u5f55\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\uff0c\u672a\u6388\u6743\u7684\u64cd\u4f5c\u6743\u9650\u5df2\u88ab\u7f6e\u7070"));
var W=C,P=$("<div>");P.css({visibility:"hidden","font-size":"12px",width:220});$("body").append(P);P.text(W);W=P.height();P.remove();r.setTipsSize(250,W+20);r.setTipsText(C);return r.getJqUi()},createOperSelectedUi:function(r,C){for(var W=0,P=$("<div>"),T=[],K=[],Q=0;Q<C.length;Q++){var J=C[Q],E=v(J),L=E.getJqUi();J.getLevel()==y.CHILDREN?(ka.layoutCtrl(L,r+10,W,200,23),K.push(E)):(T.push(E),ka.layoutCtrl(L,r,W,200,23));W+=23;L.appendTo(P)}if(0!=T.length)for(Q=0;Q<T.length;Q++)E=T[Q],E.addCheckedListener(function(I,
U){if(!I.isChecked())for(U=0;U<K.length;U++){var l=K[U];l.isEnabled()&&l.setChecked(I.isChecked())}});if(0!=K.length)for(Q=0;Q<K.length;Q++)E=K[Q],E.addCheckedListener(function(I,U){if(I.isChecked())for(U=0;U<T.length;U++){var l=T[U];l.isEnabled()&&l.setChecked(I.isChecked())}});return P},getOperLevelType:function(){return y},updateAdavanceSetUi:function(){for(var r=!1,C=0;C<c.length;C++){var W=c[C],P=W.getUserObject(),T=!0;m&&(T=0==(m[P.getType()]&P.getNoOperAuthValue()));W.setEnabled(T);T||(r=!0);
e&&e.getNoOperValueMap()?(P=0==(e.getNoOperValueMap()[P.getType()]&P.getNoOperAuthValue()),W.setChecked(P&&T)):W.setChecked(T)}return r},createPublishOperModel:function(r,C,W){var P=new ib;P.setType(r);P.setNoOperAuthValue(C);P.setLevel(W);return P}}}function Ga(F,e){Fa.call(this,F,e);var k=this,f=this.protectedMethod;this.initUi=function(){var b=$("<div>");b.addClass("sa-qing-publish-advance-set-ui");b.hide();f.createOperPerLabelUI(b);var a=new za,c=[],m=f.createPublishOperModel(Ra.SQUARE_LONGER,
Ma.ENTRY_ANALYSIS,f.getOperLevelType().PARENT);c.push(m);m=f.createPublishOperModel(Ra.SQUARE_LONGER,Ma.ANALYSIS_EDITABLE,f.getOperLevelType().CHILDREN);c.push(m);m=f.createPublishOperModel(Ra.SQUARE_LONGER,Ma.ANALYSIS_EXPORT,f.getOperLevelType().CHILDREN);c.push(m);m=f.createPublishOperModel(Ra.SQUARE_LONGER,Ma.ANALYSIS_PRINT,f.getOperLevelType().CHILDREN);c.push(m);m=f.createPublishOperModel(Ra.SQUARE_LONGER,Ma.ANALYSIS_DETAIL,f.getOperLevelType().CHILDREN);c.push(m);c=f.createOperSelectedUi(10,
c);a.setTitle(aa.get("moduleLonger","\u6570\u636e\u5206\u6790"));a.setOperJqUi(c);c=new za;var B=$("<div>"),q=[],x=f.createPublishOperModel(Ra.SQUARE,Ma.ENTRY_SQUARE,f.getOperLevelType().PARENT);q.push(x);x=f.createOperSelectedUi(10,q);ka.layoutCtrl(x,0,0,350,23*q.length);x.appendTo(B);x=[];m=f.createPublishOperModel(Ra.LONGER,Ma.ENTRY_ANALYSIS,f.getOperLevelType().PARENT);x.push(m);m=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_EDITABLE,f.getOperLevelType().CHILDREN);x.push(m);m=f.createPublishOperModel(Ra.LONGER,
Ma.ANALYSIS_EXPORT,f.getOperLevelType().CHILDREN);x.push(m);m=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_PRINT,f.getOperLevelType().CHILDREN);x.push(m);k.getTimedPush()||(m=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_PUBLISH,f.getOperLevelType().CHILDREN),x.push(m),m=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_TIMEPUSH,f.getOperLevelType().CHILDREN),x.push(m));m=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_DETAIL,f.getOperLevelType().CHILDREN);x.push(m);m=f.createOperSelectedUi(10,x);
ka.layoutCtrl(m,0,23*q.length+6,350,23*x.length);m.appendTo(B);c.setTitle(aa.get("moduleSquare","\u6570\u636e\u6597\u65b9"));c.setOperJqUi(B);B=new ab;B.setTabLevel(ab.SECOND_LEVEL);B.addTab(c,!0);B.addTab(a);a=B.getJqUi();a.children(".sa-ctrl-second-tab-container").css({border:"0px solid #ccc"});ka.layoutCtrl(a,60,26,230,280);a.appendTo(b);f.updateAdavanceSetUi()&&(a=f.createHelpIcon(b),ka.layoutCtrl(a,105,3,16,16),a.appendTo(b));return b}}function Oa(){function F(){Aa.call(this);var m=new Ca,B=
new Ca,q=new Ba,x=new Ba,t,H,y=!1,u=!1,v,r,C=[],W,P,T,K,Q;this.setSelectableAndSelected=function(d,g){t=d;H=g;d=t;m.setPublishAppMenuAndCenter(!0);m.setCustomItemPainter(J);m.addSelectedChangedListener(E);m.setItemModels(d);I(H)};var J=function(d,g,h){L(g,d,h)},E=function(d,g,h){d.setSelected(h)},L=function(d,g,h){g.on("click",function(){m.setSelected(d)});h.css("max-width","220px");y?A(h,v,d.getSchemaName()):h.text(d.getSchemaName());h.prop("title",d.getSchemaName());g.append(h)},I=function(d,g){B.setDrawRightSchemaList(!0);
B.setCustomItemPainter(pa);B.addSelectedChangedListener(E);B.setItemModels(d);g&&B.setSelected([g])},U=function(d,g,h){var n=g.getFId()?g.getSchemaName():g.getSchemaName()+aa.get("editingPlanContent","(\u6b63\u5728\u7f16\u8f91\u7684\u5185\u5bb9)");h.prop("title",n);h.css("max-width","230px");var O=$("<div>");O.data("defaultModel",g);O.addClass("public-setdefault-icon");O.addClass("public-icon-hide");O.prop("title",aa.get("setDefaultScheme","\u8bbe\u4e3a\u9ed8\u8ba4\u65b9\u6848"));if(g&&g.IsDefault()){var Z=
aa.get("cancelDefaultScheme","\u53d6\u6d88\u9ed8\u8ba4\u65b9\u6848");l(h,O,n,Z,g.IsDefault());h.html(aa.get("def","(\u9ed8\u8ba4)")+h.html())}else Z=aa.get("setDefaultScheme","\u8bbe\u4e3a\u9ed8\u8ba4\u65b9\u6848"),l(h,O,n,Z,g.IsDefault());O.on("click",w);var ma=$("<div>");ma.data("EditModel",g);ma.addClass("public-edit-icon");ma.addClass("public-edit-icon-show");Ka.MyIcons.background(ma,"icon_edit");ma.on("mouseover",function(Ia){Ka.MyIcons.background(ma,"icon_edit_hover")});ma.on("mouseout",function(Ia){Ka.MyIcons.background(ma,
"icon_edit")});ma.addClass("public-icon-hide");ma.prop("title",aa.get("editScheme","\u4fee\u6539\u65b9\u6848\u540d\u79f0"));B.addEditIconClickListener(N);d.on("mouseover",V);d.on("mouseout",p);d.append(h);d.append(O);d.append(ma)},l=function(d,g,h,n,O){u?A(d,r,h):d.text(h);O?(g.addClass("public-default-icon-show"),Ka.MyIcons.background(g,"icon_default")):(Ka.MyIcons.background(g,"icon_undefault"),g.addClass("public-undefault-icon-show"),g.on("mouseenter",function(Z){Ka.MyIcons.background(g,"icon_default")}),
g.on("mouseleave",function(Z){Ka.MyIcons.background(g,"icon_undefault")}));g.prop("title",n)},A=function(d,g,h){if(g&&h){g=g.toUpperCase();var n=h.toUpperCase(),O=n.split(g),Z=g.length,ma;for(ma in O){var Ia=n.indexOf(O[ma]),oa=h.substr(la,O[ma].length);Ia+=O[ma].length;var ia=n.length-Ia;n=n.substr(Ia,ia);h=h.substr(Ia,ia);Ia=$("<span>");Ia.text(oa);Ia.appendTo(d);if(ma!=O.length-1&&1<O.length){var la=n.indexOf(g);oa=h.substr(la,Z);Ia=la+Z;ia=n.length-Ia;n=n.substr(Ia,ia);h=h.substr(Ia,ia);Ia=$("<span>");
Ia.text(oa);Ia.css("color","red");Ia.clone().appendTo(d)}}}else d.text(h)};this.getSelecteds=function(){return H};this.protectedCreateLeftJqTitle=function(){var d=$("<div>");d.text(aa.get("savedAnalysisPlan","\u5df2\u4fdd\u5b58\u7684\u5206\u6790\u65b9\u6848"));return d};this.protectedCreateRightJqTitle=function(){var d=$("<div>");d.text(aa.get("publishAnalysisSchema","\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848"));P=new Ea;P.setText("\u2191");P.addActionListener(ra);T=new Ea;T.setText("\u2193");
T.addActionListener(X);var g=$("<div>");g.append(d);g.append(P.getJqUi());g.append(T.getJqUi());ka.layoutCtrlWithLRTB(d,0,40,null,0,0,null);ka.layoutCtrlWithLRTB(P.getJqUi(),null,20,20,0,0,null);ka.layoutCtrlWithLRTB(T.getJqUi(),null,0,20,0,0,null);return g};this.protectedGetLeftCtrl=function(){var d=new La;d.setSearchBox(q);q.addSearchListener(function(g){var h=g.getText(),n=g.getJqUi().parents(".import-square-searchBar").siblings(".schema-manage-list-owner");n.empty();""==h?(v=h,y=!1,m.setItemModels(t,
function(O,Z){var ma=O.getSchemaName()==Z.getSchemaName()&&O.getSchemaType()==Z.getSchemaType();return O&&Z?ma:O==Z}),(g=fa(m))&&m.setSelected(g)):(v=h.trim(),y=!0,D(h,t,n,g,m,Oa.Selector_LEFT_CONTAINER_MARK))});d.setList(m);d.setPainterMark(Oa.Selector_LEFT_CONTAINER_MARK);d.setHasSystemSchema(c);return d};this.protectedGetRightCtrl=function(){var d=new La;d.setSearchBox(x);x.addSearchListener(function(g){var h=g.getText(),n=g.getJqUi().parents(".import-square-searchBar").siblings(".schema-manage-list-owner");
n.empty();""==h?(P.setEnabled(!0),T.setEnabled(!0),r=h,u=!1,B.setItemModels(H,function(O,Z){return O&&Z?O.getSchemaName()==Z.getSchemaName():O==Z}),(g=fa(B))&&B.setSelected(g)):(P.setEnabled(!1),T.setEnabled(!1),r=h.trim(),u=!0,D(h,H,n,g,B,Oa.Selector_RIGHT_CONTAINER_MARK))});d.setList(B);d.setPainterMark(Oa.Selector_RIGHT_CONTAINER_MARK);d.setHasSystemSchema(c);return d};var z=function(d,g,h){h==Oa.Selector_LEFT_CONTAINER_MARK?b=[]:a=[];for(var n=[],O=0;O<g.length;O++){var Z=g[O];-1<Z.getSchemaName().trim().toUpperCase().indexOf(d.trim().toUpperCase())&&
(n.push(Z),h==Oa.Selector_LEFT_CONTAINER_MARK?b.push(Z):a.push(Z))}return n},D=function(d,g,h,n,O,Z){d=z(d,g,Z);0!=d.length?(O.setItemModels(d,function(ma,Ia){return ma&&Ia?ma.getSchemaName()==Ia.getSchemaName()&&ma.getSchemaType()==Ia.getSchemaType():ma==Ia}),(h=fa(O))&&O.setSelected(h)):G(n,h)},G=function(d,g){d=$("<div>");d.addClass("sa-qing-search-content-container");var h=$("<div>");h.addClass("sa-qing-search-no-data-tips");h.css({width:"130px",height:"130px"});Ka.MyIcons.background(h,"public-no-data");
var n=$("<div>");n.addClass("sa-qing-search-manager-content-emptytip");n.text(aa.get("noResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"));d.append(h);d.append(n);g.append(d)};this.protectedSelect=function(d){if(d)if(d=fa(m)){if(-1<Y(d.getSchemaName(),H)){for(var g=1;;){var h=d.getSchemaName();h+="_"+g;if(-1<$.inArray(h,C))g++;else if(-1<Y(h,H))g++,C.push(h);else break}d.setSchemaName(h)}H.push(d);r&&""!=r?(a.push(d),I(a,d)):I(H,d);B.setSelected(d)}else e.warn(aa.get("briefSchemaPrompt1",
"\u672a\u9009\u4e2d\u201c\u5df2\u4fdd\u5b58\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"));else 1==H.length?e.warn(aa.get("atLeastSaveAnalysisPlan","\u81f3\u5c11\u4fdd\u7559\u4e00\u4e2a\u5206\u6790\u65b9\u6848\u3002")):(d=fa(B))?(h=C.indexOf(d.getSchemaName()),-1<h&&C.splice(h,1),r&&""!=r?(h=Y(d.getSchemaName(),a),ca(d.getSchemaName(),a,!0),R(a,h)):(h=Y(d.getSchemaName(),H),ca(d.getSchemaName(),H,!1),R(H,h))):e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"))};
var R=function(d,g){0<d.length&&(0==g?B.setSelected(d[0]):B.setSelected(d[g-1]))},Y=function(d,g){for(var h=0;h<g.length;h++)if(g[h].getSchemaName()==d)return h;return-1},ca=function(d,g,h){var n=Y(d,g);-1<n?(h&&(d=Y(d,H),-1<d&&H.splice(d,1)),g.splice(n,1),m.setSelected(null),I(g,null)):e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"))},fa=function(d){var g=d.getSelected();d=null;g&&(d=new ya,g=$.extend(!0,{},g.toJsonObject()),
d.fromJsonObject(g),d.setIsDefault(!1),d.setSchemaType(ya.SCHEMATYPE_USERDEFINED));return d},ra=function(d){if(0<H.length)if(d=B.getSelected()){var g=Y(d.getSchemaName(),H);0<g?(H.splice(g,1),H.splice(g-1,0,d),I(H,d),B.setSelected(d)):0==g&&e.warn(aa.get("currentFirstRecord","\u5f53\u524d\u8bb0\u5f55\u5df2\u7ecf\u662f\u7b2c\u4e00\u6761\u8bb0\u5f55\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4e0a\u79fb"))}else e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"));
else e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"))},X=function(d){if(0<H.length)if(d=B.getSelected()){var g=Y(d.getSchemaName(),H);g<H.length-1?(H.splice(g,1),H.splice(g+1,0,d),I(H,d),B.setSelected(d)):g==H.length-1&&e.warn(aa.get("currentLastRecord","\u5f53\u524d\u8bb0\u5f55\u5df2\u7ecf\u662f\u6700\u540e\u4e00\u6761\u8bb0\u5f55\uff0c\u65e0\u6cd5\u7ee7\u7eed\u4e0b\u79fb"))}else e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"));
else e.warn(aa.get("briefFieldPrompt4","\u672a\u9009\u4e2d\u201c\u5c06\u8981\u53d1\u5e03\u7684\u5206\u6790\u65b9\u6848\u201d\u3002"))},pa=function(d,g,h){d.on("click",function(){B.setSelected(g)});if(Q&&W&&g.getSchemaName()==W.getSchemaName()){h=$("<div>");h.data("InputModel",W);h.addClass("pubilc-input-text");var n=new Ta;n.setText(K?K:g.getSchemaName());n.addBlurListener(function(){sa(n,g)});n.addAcceptableListener(function(){sa(n,g)});var O=n.getJqUi();O.css("height","26px");O.removeClass("sa-ctrl-common-singlelineborder");
O.find(".sa-ctrl-textfield-input").addClass("sa-qing-publish-ctrl-textfield-input");h.append(O);d.append(h);n.requestFocus()}else U(d,g,h)},sa=function(d,g){d=d.getText();if(""==d)e.warn(aa.get("schemeNameCanNotNull","\u8bf7\u8f93\u5165\u65b9\u6848\u540d\u79f0"));else if(50<d.length)e.warn(aa.get("schemeNameCanNotExceedLimit","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26"));else{var h;a:{for(h=0;h<H.length;h++){var n=H[h];if(n!=g&&n.getSchemaName()==d){h=!0;break a}}h=!1}h?(e.warn(aa.get("existSchemeName",
"\u65b9\u6848\u540d\u79f0\u91cd\u590d")),K=d,W=g):(K=null,Q=W.getSchemaName()!=g.getSchemaName(),g.setSchemaName(d));r&&""!=r?B.setItemModels(a):B.setItemModels(H);B.setSelected(W)}},N=function(d,g){W=d;var h=g.siblings(".public-edit-icon");B.setSelected(d);h.hide();h.siblings(".public-setdefault-icon, .schema-manage-list-item-value").hide();h=$("<div>");h.data("InputModel",d);h.addClass("pubilc-input-text");var n=new Ta;n.setText(d.getSchemaName());n.addBlurListener(function(){sa(n,d)});n.addAcceptableListener(function(){sa(n,
d)});var O=n.getJqUi();O.css("height","26px");O.removeClass("sa-ctrl-common-singlelineborder");O.find(".sa-ctrl-textfield-input").addClass("sa-qing-publish-ctrl-textfield-input");h.append(O);g.parent(".schema-manage-list-item").append(h);n.requestFocus()},w=function(d){d=$(d.currentTarget).data("defaultModel");d.setIsDefault(!d.IsDefault());for(var g=0;g<H.length;g++){var h=H[g];d.getSchemaName()!=h.getSchemaName()&&h.IsDefault()&&h.setIsDefault(!1)}r&&""!=r?B.setItemModels(a):B.setItemModels(H);
B.setSelected(d)},V=function(d){d=$(d.currentTarget);0<d.find(".public-icon-hide").length&&d.find(".public-icon-hide").removeClass("public-icon-hide")},p=function(d){d=$(d.currentTarget);0<d.find(".public-default-icon-show").length&&d.find(".public-default-icon-show").addClass("public-icon-hide");0<d.find(".public-edit-icon-show").length&&d.find(".public-edit-icon-show").addClass("public-icon-hide");0<d.find(".public-undefault-icon-show").length&&d.find(".public-undefault-icon-show").addClass("public-icon-hide")}}
Qa.call(this);var e=this,k=this.protectedMethod,f,b,a,c=!1;this.show=function(m,B,q,x,t,H){c=H;var y;e.setSize(720,480);k.setTitle(aa.get("analysisScheme","\u540c\u65f6\u9009\u62e9\u66f4\u591a\u65b9\u6848"));k.setContentPaneCreator(function(){y=new F;y.setSelectableAndSelected(m,B);return y.getJqUi()});k.setClosingChecker(function(){var u=q(y.getSelecteds());return f=u},f);k.setClosingAction(function(u){u?t(y.getSelecteds()):x()});e.showDialog();y.relayout()};this.warn=function(m){k.getMessageCurtain().showPrompt(m)}}
function La(){var F,e,k,f,b;this.getSearchBox=function(){return e};this.setSearchBox=function(a){e=a};this.getList=function(){return k};this.setList=function(a){k=a};this.getPainterMark=function(){return f};this.setPainterMark=function(a){f=a};this.getHasSystemSchema=function(){return b};this.setHasSystemSchema=function(a){b=a};this.getJqUi=function(){if(F)return F;F=$("<div>");var a=$("<div>");a.addClass("import-square-searchBar");e.setShowSearchIcon(!0);e.setPlaceholder(aa.get("enterSearchText",
"\u641c\u7d22\u65b9\u6848\u540d\u79f0"));var c=e.getJqUi();ka.layoutCtrlWithLRTB(c,4,null,200,0,null,30);c.css({width:"98%",position:"relative","margin-bottom":"5px"});a.append(c);c=k.getJqUi();var m=c.find(".schema-manage-list-owner");m.parent().css({"max-height":"343px","overflow-y":"hidden"});m.css({"overflow-y":"auto","max-height":"301px"});$(m).before(a);F.append(c);F.css("border","1px solid #dbdbdb");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.qing&&(com.kingdee.bos.qing={});"undefined"==typeof com.kingdee.bos.qing.publish&&(com.kingdee.bos.qing.publish={});"undefined"==typeof com.kingdee.bos.qing.publish.common&&(com.kingdee.bos.qing.publish.common={});var Ka=com.kingdee.bos.qing.publish.common;Ka.PublishContext=ja;Ka.PublishFacade=function(F,e,k,f){Wa.call(this,F,e,k,f);var b=this.protectedMethod;this.savePublishInfo=function(a,c,m,B,q,x){m=
{publishTargetType:a,publishInfo:JSON.stringify(c.toJsonObject()),schemeModel:m?JSON.stringify(m):null,oldPublishId:B,sDsbPublishId:q,scene:x};b.remote("savePublishInfo",m);c=c.getCarryData()?ba.PUBLISH_CARRY_DATA:"";ba.occur(ba.PUBLISH_TO_TYPE,ba.getPublishTargetName(a),c)};this.deletePublishInfo=function(a,c){b.remote("deletePublishInfo",{publishTargetType:a,id:c})};this.deletePublishInfos=function(a,c){a={publishTargetType:a,ids:JSON.stringify(c)};b.remote("deletePublishInfos",a)};this.updatePublishInfo=
function(a,c,m,B,q){a={publishTargetType:a,publishInfo:JSON.stringify(c.toJsonObject()),schemeModel:m?JSON.stringify(m):null,updateType:B,name:q};b.remote("updatePublishInfo",a)};this.loadUserOrRole=function(a){b.remote("loadUserOrRole",{publishTargetType:-1,permissionType:a})};this.saveMessage=function(a){a={publishIdUserMap:JSON.stringify(a)};b.remote("saveMessage",a)};this.loadPublishOperModel=function(a,c,m){b.remote("loadPublishOperModel",{biztag:a,isEdit:c,dsbRefToPublishId:m})};this.loadPublishOperList=
function(a,c,m){b.remote("loadPublishOperList",{publishId:a,dsbPublishId:c,timedPush:m})};this.loadUserByRoles=function(a){a={roles:JSON.stringify(a)};b.remote("loadUserByRoles",a)};this.judgePublishOper=function(a,c,m,B){b.remote("judgePublishOper",{publishId:a,dsbPublishId:c,scene:m,publishOperValue:B})};this.getAllSchemaAttrs=function(a,c,m,B){b.remote("getAllSchemaAttrs",{bizTag:a,publishSourceType:c,source:m,isEditPublishInfo:B})};this.getSchemaAttrByPublishId=function(a,c,m){b.remote("getSchemaAttrByPublishId",
{publishId:a,publishSourceType:c,source:m})};this.getPublishedRecordNameByInputText=function(a,c,m){b.remote("getPublishedRecordNameByInputText",{publishSourceType:a,inputText:c,publishTargetType:m})};this.checkOperatorResourceLock=function(a,c,m){b.remote("checkOperatorResourceLock",{groupId:a,OpResourceId:c,resourceId:m})};this.tryRequireResourceLock=function(a,c){b.remote("tryRequireResourceLock",{groupId:a,resourceId:c})};this.tryAddResourceLock=function(a,c){b.remote("tryAddResourceLock",{groupId:a,
resourceId:c})};this.closeResourceLock=function(a,c,m){b.remote("closeResourceLock",{groupId:a,resourceId:c,OpResourceId:m})};this.checkBeforeEditAndPublishInfo=function(a,c,m){a={publishId:a,publishSourceType:c,arrJsonSelectSchemaModel:JSON.stringify(m)};b.remote("checkBeforeEditAndPublishInfo",a)};this.checkPublishInfoIsExist=function(a){b.remote("checkPublishInfoIsExist",{publishId:a})}};Ka.PublishManagerDialog=function(F,e,k,f){Qa.call(this);var b=this,a=this.protectedMethod,c,m;(function(){a.setTitle(aa.get("publishManage",
"\u53d1\u5e03\u7ba1\u7406"));b.setSize(810,570);a.setSelectable(!0);a.getDialogCtrl().setMinSize(810,570);a.getDialogCtrl().setFullScreenEnabled();a.getDialogCtrl().setResizeEnabled();a.getDialogCtrl().addResizeListener(function(){var x=c.getCurrentTabPane();q(null,x)});a.setContentPaneCreator(function(){c=new ab;c.setTabLevel(ab.SECOND_LEVEL);c.addTabChangedListener(q);for(var x=Ua.getAllPublishManageTargetType(),t=!(m&&-1!=x.indexOf(m.type)),H=function(){c.setCurrentTabPane(c.getCurrentTabPane())},
y=0,u=x.length;y<u;y++){var v=x[y];if(!f||v!=ua.CARD_REPOSITORY&&v!=ua.MOBILE)v=Ua.createPublishManagePanel(F,x[y]),v.setPublishContext(e),v.setRefreshCurrentPanel(H),v.setOuterMessageCurtain(a.getMessageCurtain()),v.setPublishContentEditEntrance(k),m&&m.type==x[y]&&(t=!0,v.setAutoSelectedData(m)),c.addTab(v,t),t=!1}return c.getJqUi()});a.setFooterClosingOnly(!0);a.setClosingChecker2(null,function(x){a.destroy();B();return!0});a.setClosingAction(function(x){B()})})();var B=function(){com.kingdee.bos.qing.publish.common.PublishSubscribeHelper.clear()},
q=function(x,t){t&&t.relayoutViews()};this.setSelectedData=function(x){m=x}};Ka.SinglePublishManagerDialog=function(F){Qa.call(this);var e=this,k=this.protectedMethod,f;(function(){k.setTitle(aa.get("publishManage","\u53d1\u5e03\u7ba1\u7406")+"-"+F.getTitle());e.setSize(850,570);k.setSelectable(!0);k.getDialogCtrl().setMinSize(850,570);k.getDialogCtrl().setFullScreenEnabled();k.getDialogCtrl().setResizeEnabled();k.getDialogCtrl().addResizeListener(function(){F&&F.relayoutViews()});F.setOuterMessageCurtain(k.getMessageCurtain());
k.setContentPaneCreator(function(){var a=F.getJqUi();a.css("top","2px");return a});k.setFooterClosingOnly(!0);k.setClosingChecker2(null,function(a){b();f&&f(F);k.destroy();return!0});k.setClosingAction(function(a){b();f&&f(F)})})();this.setClosedCallback=function(a){f=a};var b=function(){com.kingdee.bos.qing.publish.common.PublishSubscribeHelper.clear()}};Ka.PublishToDialog=na;Ka.PushManager=function(F){Qa.call(this);var e=this,k=this.protectedMethod,f,b,a,c,m,B,q,x;(function(){k.setTitle(aa.get("pushManagement",
"\u5b9a\u65f6\u63a8\u9001\u7ba1\u7406"));e.setSize(850,570);k.setSelectable(!0);k.getDialogCtrl().setMinSize(850,570);k.getDialogCtrl().setFullScreenEnabled();k.getDialogCtrl().setResizeEnabled();k.getDialogCtrl().addResizeListener(function(){var y=_oTabContainer.getCurrentTabPane();t(null,y)});k.setContentPaneCreator(function(){_oTabContainer=new ab;_oTabContainer.setTabLevel(ab.SECOND_LEVEL);_oTabContainer.addTabChangedListener(t);_oTabContainer.addTabChangedListener(H);var y=!(x&&x.type&&"-1"!=
x.type),u=k.getMessageCurtain();if(f){var v=new f(a,m,c,F);v.setOuterMessageCurtain(u);x&&"-1"==x.type&&(y=!0,v.setAutoSelectedData(x));_oTabContainer.addTab(v,y);y=!1}v=Object.keys(hb);for(var r=0,C=v.length;r<C;r++){var W=hb[v[r]],P=new b(W,u,B,q,F);x&&x.type==W&&(y=!0,P.setAutoSelectedData(x));_oTabContainer.addTab(P,y);y=!1}return _oTabContainer.getJqUi()});k.setFooterClosingOnly(!0);k.setClosingChecker2(null,function(y){k.destroy();return!0});k.setClosingAction(function(y){})})();this.setSelectedData=
function(y){x=y};this.registerEmailPushPanelConstructor=function(y){f=y};this.initEmailPushConfig=function(y,u,v){a=y;m=u;c=v};this.registerLappPushPanelConstructor=function(y){b=y};this.initLappPushConfig=function(y,u){B=y;q=u};var t=function(y,u){u&&u.relayoutViews()},H=function(y,u){null==x&&u&&u.setAutoSelectedData(null)}};Ka.PublishSubscribeHelper=new function(){var F={},e=com.kingdee.bos.qing.framework.common.RemoteFramework;this.putSubscribe=function(k,f){F[k+""]=f;e.subscribeChannel(k+"",
f)};this.clear=function(){for(var k=Object.keys(F),f=0;f<k.length;f++){var b=k[f];e.unsubscribeChannel(b,F[b])}F={}};this.getCurrentPageClientId=function(){return e.getClientID()}};Ka.AbstractPublishPanel=va;Ka.AbstractPublishToPanel=function(F,e){va.call(this,F,e);this.setPublishModel=function(k){throw Error("Override me");};this.isEditPublish=function(){throw Error("Override me");};this.setPublishSourceType=function(k){throw Error("Override me");};this.getJqUi=function(){throw Error("Override me");
};this.checkUIInput=function(k){throw Error("Override me");};this.getModelFromUI=function(){throw Error("Override me");};this.getJsonModel=function(){throw Error("Override me");};this.getNewPublishSuccessCallback=function(){return null};this.getUpdatePublishSuccessCallback=function(){return null}};Ka.AbstractPublishManagerPanel=function(F,e){va.call(this,F,e);ab.AbstractTabPane.call(this);var k,f,b;this.setAutoSelectedData=function(a){b=a};this.getAutoSelectedData=function(){return b};this.setPathSelectorModel=
function(a){throw Error("Override me");};this.relayoutViews=function(){throw Error("Override me");};this.setPublishContext=function(a){k=a};this.getPublishContext=function(){return k};this.setRefreshCurrentPanel=function(a){f=a};this.refreshCurrentPanel=function(){f&&f()}};Ka.AbstractPublishItem=function(F){var e;this.getPublishModel=function(){return F};this.getJqUi=function(){e||(e=$("<div>"));return e}};Ka.AnalysisSchemeDialogSelector=function(F,e){com.kingdee.bos.qing.biz.common.AbstractDialogSelector.call(this);
var k=this,f,b,a,c=[],m,B=[],q=!1,x=[];this.setSuccessCallBack=function(u){m=u};this.setPublishModel=function(u){a=u};this.getPublishModel=function(){return a};this.setPublishContext=function(u){b=u};this.getPublishContext=function(){return b};this.setSelectedListener=function(u){};var t=k.getJqUi;this.getJqUi=function(){f||(f=t());return f};this.protectedClickEvent=function(){H()};this.setSelectedValue=function(u){c=u;k.updateUI()};this.getSelectedValue=function(){return c};this.getDisplayText=function(){return 0==
c.length?aa.get("PleaseChoiceOtherPlan","\u8bf7\u9009\u62e9\u9700\u8981\u540c\u65f6\u53d1\u5e03\u7684\u5176\u4ed6\u65b9\u6848"):1==c.length?c[0].getFId()?aa.get("selectMultiPlan","\u5df2\u9009\u62e9#1\u4e2a\u65b9\u6848").replace("#1",c.length):aa.get("PleaseChoiceOtherPlan","\u8bf7\u9009\u62e9\u9700\u8981\u540c\u65f6\u53d1\u5e03\u7684\u5176\u4ed6\u65b9\u6848"):aa.get("selectMultiPlan","\u5df2\u9009\u62e9#1\u4e2a\u65b9\u6848").replace("#1",c.length)};this.getAllSchemaAttrByFid=function(){var u=a.getId();
Ua.createPublishFacade(e,F,m,void 0).getSchemaAttrByPublishId(u,a.getPublishSourceType(),0)};var H=function(){if(null==a){var u=b.getDashBoardAnalysis()?b.getSchemaTag():b.getBizTag();var v=b.getCurrentSourceType();var r=!1;if(0==c.length){var C=b.getCurrentContentModel(),W=new ya;W.fromJsonObject(C.schemaAttr);W.setSchemaType(ya.SCHEMATYPE_USERDEFINED);c.push(W)}}else u=a.getId(),v=a.getPublishSourceType(),r=!0,0==B.length&&(B=y(a.getSchemaAttrSelected()));Ua.createPublishFacade(e,F,function(P){for(var T=
new Oa,K=[],Q=0;Q<P.length;Q++){var J=new ya;J.fromJsonObject(P[Q]);K.push(J);J.getSchemaType()==ya.SCHEMATYPE_SYSTEM&&(q=!0)}T.show(K,c,function(E){if(0<E.length)return!0;T.warn(aa.get("addAnalysisPlan","\u81f3\u5c11\u6dfb\u52a0\u4e00\u4e2a\u5206\u6790\u65b9\u6848\u3002"));return!1},function(){null!=a?(c=y(B),a.setSchemaModelSelected(null)):c=y(x);k.setSelectedValue(c)},function(E){x=y(E);for(var L=!1,I=0;I<E.length;I++)if(E[I].IsDefault()){L=!0;break}c=E;!L&&c[0].setIsDefault(!0);k.setSelectedValue(E);
L=[];var U=[];for(I=0;I<E.length;I++){var l=new ha,A=E[I];A.setSchemaType(ya.SCHEMATYPE_SYSTEM);l.setSchemaAttr(A);if(!A.getFId()){var z=b.getCurrentContentModel();l.setSchemaContent(z.schemaContent)}L.push(A);U.push(l)}null!=a?(a.setSchemaAttrSelected(L),a.setSchemaModelSelected(U)):b.setChoiceAnalysisSchema(U)},q)},function(P,T){}).getAllSchemaAttrs(u,v,0,r)},y=function(u){for(var v=[],r=0;r<u.length;r++){var C=new ya;C.fromJsonObject(JSON.parse(JSON.stringify(u[r].toJsonObject())));v.push(C)}return v}};
Ka.DisplayPublishedRecordName=function(F,e){var k,f;this.setPublishModel=function(b){f=b};this.getPublishModel=function(){return f};this.setPublishContext=function(b){k=b};this.getPublishContext=function(){return k};this.getPublishedRecordNameByInputText=function(b,a,c,m){var B=null==f?k.getCurrentSourceType():f.getPublishSourceType();c=Ua.createPublishFacade(a,e,c,m);c.setShowBlocking(!1);c.getPublishedRecordNameByInputText(B,b,a)}};Ka.CarrryDataUserDialogSelector=function(F){com.kingdee.bos.qing.biz.common.AbstractDialogSelector.call(this);
var e=this,k=[],f=!1,b,a,c,m,B,q,x,t=160,H=[],y=[],u=aa.get("selectedUserLabel","\u5df2\u9009 #1 \u9879");this.setSelectedListener=function(K){};var v=e.getJqUi;this.getJqUi=function(){b||(b=v(),r(),b.on("mouseover",function(){0<k.length&&a.show()}),b.on("mouseleave",function(){a.hide()}));return b};this.setHeight=function(K){t=K};this.setSelectedValue=function(K){k=K;e.updateUI()};this.setDataModel=function(K){H=K;y=[];for(var Q=[],J=0;J<k.length;J++){for(var E=!1,L=0;L<K.length;L++)if(k[J].getValue()==
K[L].getValue()){E=!0;break}E&&Q.push(k[J])}C(H);e.setSelectedValue(Q)};this.getSelectedValue=function(){return k};this.protectedClickEvent=function(){c||W();(f=!f)?c.css("display","block"):c.css("display","none");document.body.addEventListener("mousedown",P,!0)};this.getDisplayText=function(){var K=k[0];if(0!=k.length&&K){K=K.getText();var Q=aa.get("selectMultiUser","\u5df2\u9009\u62e9#1\u7b49#2\u4e2a\u7528\u6237").replace("#2",k.length);var J=aa.get("selectSingleUser","\u5df2\u9009\u62e9\u7528\u6237#1");
Q=1==k.length?J:Q;Q=Q.replace("#1",K)}else Q=aa.get("selectNoUser","\u5c1a\u672a\u9009\u62e9\u7528\u6237");u=aa.get("selectedUserLabel","\u5df2\u9009 #1 \u9879").replace("#1","<b style='color:red'>"+k.length+" </b>");B&&B.html(u);return Q};var r=function(){a=$("<div>");a.css({position:"absolute",height:"18px",width:"18px",right:"25px",bottom:"6px",cursor:"pointer",display:"none"});com.kingdee.bos.qing.publish.common.MyIcons.background(a,"btn_delete");a.on("click",function(){var K=Xa.createFeedbackDialog();
K.setMsgImageType(Xa.MSG_CONFIRM);K.setMessage(aa.get("confirmClearUser","\u786e\u5b9a\u6e05\u7a7a\u7528\u6237\uff1f"));K.setClosingChecker(function(Q){Q==Xa.RETURN_OK&&(k=[],y=[],e.setSelectedValue(k),C(H));return!0});K.showDialog()});a.appendTo(b)},C=function(K){if(m){m.find(".sa-qing-publish-carry-user-selector-user-cbox").remove();for(var Q=0;Q<K.length;Q++)if(-1==y.indexOf(K[Q].getValue())){var J=K[Q];y.push(J.getValue());var E=new Na;E.setUserObject(J);E.setText(J.getText());for(var L=!1,I=
0;I<k.length;I++)if(k[I].getValue()==J.getValue()){L=!0;break}E.setChecked(L);E.addCheckedListener(function(U,l){l=U.getUserObject();if(U.isChecked())k.push(l);else{U=-1;for(var A=0;A<k.length;A++)if(k[A].getValue()==l.getValue()){U=A;break}k.splice(U,1)}e.setSelectedValue(k)});J=E.getJqUi();J.addClass("sa-qing-publish-carry-user-selector-user-cbox");J.appendTo(m)}}},W=function(){c=$("<div>");c.addClass("sa-qing-publish-select-user-ui");var K=$("<div>");K.addClass("sa-qing-publish-search-head-ui");
q=new Ba;q.setSearchListenerDelay(1E3);q.setPlaceholder(aa.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));q.addSearchListener(T);q.setAlwaysShowCleanIcon(!0);var Q=q.getJqUi();Q.addClass("sa-qing-publish-search-box");Q.removeClass("sa-ctrl-common-singlelineborder");var J=$("<div>");J.addClass("sa-qing-publish-select-user-search-icon");J.attr("title",aa.get("search","\u641c\u7d22"));com.kingdee.bos.qing.publish.common.MyIcons.background(J,"icon_search");J.appendTo(K);Q.appendTo(K);
K.appendTo(c);m=$("<div>");m.addClass("sa-qing-publish-select-user-middle");C(H);m.appendTo(c);K=$("<div>");K.addClass("sa-qing-publish-select-user-bottom-ui");B=$("<div>");u=u.replace("#1","<b style='color:red'>"+k.length+" </b>");B.html(u);B.appendTo(K);Q=$("<div>");Q.text(aa.get("clearBtn","\u6e05\u7a7a"));Q.addClass("sa-qing-publish-select-user-clear-btn");Q.on("click",function(E){k=[];y=[];e.setSelectedValue(k);C(H)});Q.appendTo(K);x=new db(aa.get("confirm","\u786e\u5b9a"));x.setHighlight(!0);
J=x.getJqUi();J.addClass("sa-qing-publish-select-user-ok-btn");J.appendTo(K);x.addActionListener(function(E){f=!f;c.css("display","none")});K.appendTo(c);c.appendTo(F);ka.layoutCtrl(B,10,5,60,16);ka.layoutCtrl(Q,70,5,30,16);ka.layoutCtrl(J,180,5,30,16);ka.layoutCtrl(c,10,0,300,t);document.body.addEventListener("mousedown",P,!0)},P=function(K){for(K=K.target;K!=document.body;){if(K==c[0]||K==b[0])return;K=K.parentNode}f=!f;c.css("display","none");document.body.removeEventListener("mousedown",P,!0)},
T=function(){if(q){for(var K=q.getText().trim(),Q=[],J=0;J<H.length;J++)-1!=H[J].getText().indexOf(K)&&Q.push(H[J]);y=[];C(Q)}}};Ka.AdvanceSetPanel=Fa;Ka.DsbAdvanceSetPanel=Ga;var Za={DSB_VIEW:"1",LONGER_VIEW:"2",SQUARE_VIEW:"3",QING_RPT_VIEW:"4"};Ka.PublishAdvanceViewType=Za;var aa,Wa,Qa,ab,db,ea,Pa,M,Na,Ba,Ja,Ha,Xa,Ea,Aa,Ta,ya,ha,Ca,cb,hb,ua,Ma,eb,Ra,jb,ib,fb,ka;(function(){var F=com.kingdee.bos.qing.framework.common;aa=F.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.publish);
Wa=F.AbstractFacade;F=com.kingdee.bos.qing.ui.component;Qa=F.AbstractModalDialog;ab=F.TabContainer;db=F.Button;Pa=F.Dialog;ea=F.Label;M=F.SwitchButton;Ea=F.WorkButton;Ba=F.SearchBox;Ta=F.TextField;Na=F.CheckBox;Ja=F.HelpIcon;Ha=F.RadioButtonGroup;Xa=F.MessageDialog;F=com.kingdee.bos.qing.publish.model;cb=F.PublishSourceType;hb=F.PushTargetType;ua=F.PublishTargetType;Ma=F.OperCodeType;jb=F.OCarryDataType;eb=F.OperCodeMap;Ra=F.OperType;ib=F.PublishOperModel;fb=F.PublishVO;F=com.kingdee.bos.qing.common;
ka=F.DomUtil;F=com.kingdee.bos.qing.common.ui;Aa=F.AbstractLeftRightSelector;F=com.kingdee.bos.qing.schemamanage.model;ya=F.SchemaAttrModel;ha=F.SchemaModel;F=com.kingdee.bos.qing.schemamanage.ui;Ca=F.List})();ja.Scene={};ja.Scene.Square="Square";ja.Scene.Longer="Longer";ja.Scene.Dashboard="Dashboard";ja.Scene.Dashboard_Analysis="Dashboard-Analysis";Ka.PublishFactory=new function(){var F={};this.addPublishToPanel=function(b,a){F[b]=a};var e=[],k={};this.addPublishManagePanel=function(b,a){for(var c=
!1,m=0,B=e.length;m<B;m++)if(e[m]==b){c=!0;e[m]=b;break}c||e.push(b);e.sort();k[b]=a};var f={};this.addPublishFacade=function(b,a){f[b]=a};this.getAllPublishManageTargetType=function(){return e};this.createPublishToDialog=function(b,a,c,m,B){m=new F[m](a,m);m.setPublishContext(c);a=m.getNewPublishSuccessCallback();b=new na(b,m,B);b.setBiztag(c.getBizTag());b.setDsbPublishId(c.getDsbPublishId());b.setDsbRefToId(c.getRefToId());b.setScene(c.getScene());a&&b.addSuccessCallback(a);return b};this.createPublishToEditDialog=
function(b,a,c){var m=c.getPublishTargetType();b=new F[m](b,m);b.setPublishContext(a);b.setPublishModel(c);c=aa.get("editPublishInfoItem","\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f");a=b.getUpdatePublishSuccessCallback();c=new na(c,b);a&&c.addSuccessCallback(a);return c};this.createPublishManagePanel=function(b,a){return new k[a](b,a)};this.createPublishFacade=function(b,a,c,m,B){return new f[b](a,c,m,B)}};var Ua=Ka.PublishFactory;na.UPDATE_NAME=0;na.UPDATE_PATH=1;na.UPDATE_USER=2;na.UPDATE_ROLE=3;na.UPDATE_SCHEME=
4;na.UPDATE_ANALYSIS=5;na.UPDATE_ALL=6;na.UPDATE_NOSCHEME=7;na.UPDATE_USER_AND_ROLE=9;var ba=new function(){var F;this.hookCollector=function(e){F=e};this.occur=function(e,k,f){try{F&&F(e,k,f)}catch(b){window.console&&console.warn(b)}};this.getPublishTargetName=function(e){if(0==e)return"Appmenu";if(1==e)return"Center";if(2==e)return"Mobile";if(4==e)return"Guimenu";if(5==e)return"Card";if(6==e)return"Email"}};ba.PUBLISH_TO_TYPE="publish-to-type";ba.PUBLISH_CARRY_DATA="\u643a\u5e26\u6570\u636e";ba.COMMUNICATE_TYPE=
"communicate-type";ba.YZJ_COMMUNICATE="\u4e91\u4e4b\u5bb6\u6c9f\u901a";ba.EMAIL_SCHEDULE_PUSH="\u90ae\u4ef6\u5b9a\u65f6\u63a8\u9001";ba.CHAT_ROBOT_SCHEDULE_PUSH="\u7fa4\u7ec4\u673a\u5668\u4eba\u5b9a\u65f6\u63a8\u9001";ba.MISSION_CLOUD_SCHEDULE_PUSH="\u7f8e\u4fe1\u4e91\u5b9a\u65f6\u63a8\u9001";Ka.UserOperationReporter=ba;Ka.PublishAdvancePanelFactory=new function(){var F={};this.addPublishAdvancePanel=function(e,k){F[e]=k};this.createPublishAdvancePanel=function(e,k,f){if(e=F[e])return new e(k,f)}};
var $a=Ka.PublishAdvancePanelFactory;$a.addPublishAdvancePanel(Za.DSB_VIEW,Ga);$a.addPublishAdvancePanel(Za.LONGER_VIEW,function(F,e){Fa.call(this,F,e);var k=this,f=this.protectedMethod;this.initUi=function(){var b=$("<div>");b.addClass("sa-qing-publish-advance-set-ui");b.hide();f.createOperPerLabelUI(b);var a=[],c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_EDITABLE,f.getOperLevelType().CHILDREN);a.push(c);c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_EXPORT,f.getOperLevelType().CHILDREN);
a.push(c);c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_PRINT,f.getOperLevelType().CHILDREN);a.push(c);k.getTimedPush()||(c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_PUBLISH,f.getOperLevelType().CHILDREN),a.push(c),c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_TIMEPUSH,f.getOperLevelType().CHILDREN),a.push(c));c=f.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_DETAIL,f.getOperLevelType().CHILDREN);a.push(c);a=f.createOperSelectedUi(20,a);ka.layoutCtrl(a,40,23,350,220);a.appendTo(b);f.updateAdavanceSetUi()&&
(a=f.createHelpIcon(b),ka.layoutCtrl(a,105,3,16,16),a.appendTo(b));return b}});$a.addPublishAdvancePanel(Za.SQUARE_VIEW,function(F,e){Fa.call(this,F,e);var k=this.protectedMethod;this.initUi=function(){var f=$("<div>");f.addClass("sa-qing-publish-advance-set-ui");f.hide();k.createOperPerLabelUI(f);var b=23,a=[],c=k.createPublishOperModel(Ra.SQUARE,Ma.ENTRY_SQUARE,k.getOperLevelType().PARENT);a.push(c);c=k.createPublishOperModel(Ra.SQUARE,Ma.CARD_PUBLISH,k.getOperLevelType().CHILDREN);a.push(c);c=
k.createPublishOperModel(Ra.SQUARE,Ma.CARD_TIMEPUSH,k.getOperLevelType().CHILDREN);a.push(c);c=k.createOperSelectedUi(20,a);ka.layoutCtrl(c,40,b,350,23*a.length);c.appendTo(f);b+=23*a.length;a=[];c=k.createPublishOperModel(Ra.LONGER,Ma.ENTRY_ANALYSIS,k.getOperLevelType().PARENT);a.push(c);c=k.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_EDITABLE,k.getOperLevelType().CHILDREN);a.push(c);c=k.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_EXPORT,k.getOperLevelType().CHILDREN);a.push(c);c=k.createPublishOperModel(Ra.LONGER,
Ma.ANALYSIS_PRINT,k.getOperLevelType().CHILDREN);a.push(c);c=k.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_PUBLISH,k.getOperLevelType().CHILDREN);a.push(c);c=k.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_TIMEPUSH,k.getOperLevelType().CHILDREN);a.push(c);c=k.createPublishOperModel(Ra.LONGER,Ma.ANALYSIS_DETAIL,k.getOperLevelType().CHILDREN);a.push(c);c=k.createOperSelectedUi(20,a);ka.layoutCtrl(c,40,b+6,350,23*a.length);c.appendTo(f);k.updateAdavanceSetUi()&&(b=k.createHelpIcon(f),ka.layoutCtrl(b,
105,3,16,16),b.appendTo(f));return f}});$a.addPublishAdvancePanel(Za.QING_RPT_VIEW,function(F,e){Fa.call(this,F,e);var k=this.protectedMethod;this.initUi=function(){var f=$("<div>");f.addClass("sa-qing-publish-advance-set-ui");f.hide();k.createOperPerLabelUI(f);var b=[],a=k.createPublishOperModel(Ra.QING_RPT,Ma.RPT_EXPORT,k.getOperLevelType().CHILDREN);b.push(a);a=k.createPublishOperModel(Ra.QING_RPT,Ma.RPT_PRINT,k.getOperLevelType().CHILDREN);b.push(a);a=k.createPublishOperModel(Ra.QING_RPT,Ma.RPT_SAVE_SNAPSHOT,
k.getOperLevelType().CHILDREN);b.push(a);b=k.createOperSelectedUi(20,b);ka.layoutCtrl(b,40,23,350,220);b.appendTo(f);k.updateAdavanceSetUi()&&(b=k.createHelpIcon(f),ka.layoutCtrl(b,105,3,16,16),b.appendTo(f));return f}});Oa.Selector_LEFT_CONTAINER_MARK="leftList";Oa.Selector_RIGHT_CONTAINER_MARK="rightList"})();(function(){function ja(){var e,k,f,b;this.setGroupName=function(a){b=a};this.getGroupName=function(){return b};this.setPropertyName=function(a){k=a};this.getPropertyName=function(){return k};this.setDescName=function(a){e=a};this.getDescName=function(){return e};this.setUserObject=function(a){f=a};this.getUserObject=function(){return f}}function na(){var e=this,k=[],f,b,a,c,m=na.SORT_TYPE_DESC;this.sort=function(){c&&c(a,m)};this.setFunSortModel=function(x){c=x};this.setSortTitle=function(x){f=x};
this.setArrSortField=function(x){k=x};this.getArrSortField=function(){return k};this.getSortMenuModel=function(){if(!b&&k&&0!==k.length){b=new Ca;var x=f?f:M.get("sort","\u6392\u5e8f");b.setText(x);b.setGroupName(x);for(var t in k){x=k[t];var H=!1;0==t&&(H=!0,a=x);x=B(x,H);b.addItemModel(x)}b.addSeperator();t=new ja;t.setDescName(M.get("DESC","\u964d\u5e8f"));t.setGroupName("SortType");t.setPropertyName(na.SORT_TYPE_DESC);t=B(t,!0);b.addItemModel(t);t=new ja;t.setDescName(M.get("ASC","\u5347\u5e8f"));
t.setGroupName("SortType");t.setPropertyName(na.SORT_TYPE_ASC);t=B(t,!1);b.addItemModel(t)}return b};var B=function(x,t){t=ha.createRadio(x.getDescName(),x.getPropertyName(),t,q);t.setUserObject(x);t.setGroupName(x.getGroupName());return t},q=function(x){if(x=x.getUserObject()){var t=x.getPropertyName();t==na.SORT_TYPE_DESC||t==na.SORT_TYPE_ASC?m=t:a=x;e.sort()}}}function va(){var e=this,k,f,b,a,c,m=!0,B;this.setEnable=function(v){m=v};this.getDropDownContent=function(v){throw Error("orrive me");
};this.getPopupHeight=function(){throw Error("orrive me");};this.showRefreshBtn=function(){return!1};this.getJqUi=function(){k||q();return k};this.setPlaceholder=function(v){q();"placeholder"in f[0]?f.attr("placeholder",v):(c&&c.remove(),c=$("<div>"),c.text(v),c.css("color","#ccc"),c.on("mousedown",function(r){f.focus()}),c.appendTo(e.getJqUi()),Ba.layoutCtrlWithLRTB(c,4,4,null,2,2,null),u())};var q=function(){if(!k){k=$("<div>");k.addClass("sa-ctrl-combobox");if(m)k.on("click",t);k.css("border-bottom",
"1px solid #ccc");f=$("<input readonly=readonly>");f.addClass("sa-ctrl-textfield-input");f.css({color:"#666","text-overflow":"ellipsis",padding:"0px 16px 0px 4px"});f.appendTo(k);b=$("<div>");b.addClass("sa-ctrl-combobox-arrow sa-ctrl-combobox-arrow_enabled");b.appendTo(k);b.on("mouseenter",function(v){x(!0)});b.on("mouseleave",function(v){x(!1)});x(!1)}},x=function(v){var r=a?"arrow-up":"arrow-down";v&&(r+="_hover");ab.background(b,r)},t=function(){if(m){if(a)$(document.body).off("mousedown",y),
a.detach(),a=null;else{var v=$(document.body),r=a=$("<div>"),C=$("<div>");C.addClass("sa-ctrl-common-border");C.appendTo(r);a.addClass("sa-qing-publish-dropdown-selector");B=e.getDropDownContent(!1);B.appendTo(a);e.showRefreshBtn()&&(r=$("<div>"),r.addClass("sa-qing-publish-menuRefresh"),ba.background(r,"refresh"),r.on("click",H),r.attr("title",M.get("refreshMenu","\u5237\u65b0\u5e94\u7528\u83dc\u5355")),r.appendTo(a),a.css("border","1px solid rgba(138, 153, 170, 0.4)"));var W=e.getPopupHeight();
a.css("z-index",999999);a.appendTo(v);var P=v.prop("clientHeight"),T=k.outerHeight();r=k.outerWidth();var K=[0,T-1];K=Ba.upwardCoordinate(k[0],K,v[0]);C=K[0];var Q=K[1];W=0>W?Math.max(0,(P>>1)-T):W;Q+W>P&&(K=[0,0],K=Ba.upwardCoordinate(k[0],K,v[0]),v=K[1]-W+1,0<=v&&(Q=v));Ba.layoutCtrl(a,C,Q,r,W);$(document.body).on("mousedown",y)}x(!1)}},H=function(){B&&(B.remove(),B=e.getDropDownContent(!0),B.appendTo(a))},y=function(v){for(var r=$(document.body),C=$(v.target);C[0]!=r[0];){if(C[0]==k[0])return;
C=C.parent()}for(C=$(v.target);C[0]!=r[0];){if(C[0]==a[0])return;C=C.parent()}t()},u=function(){c&&setTimeout(function(){c.css("display",f.val()?"none":"")},0)};this.protectedMethod={updateText:function(v){q();f.val(v?v:"");v&&f.attr("title",v);"placeholder"in f[0]||u()},doDropdown:t}}function za(e,k){var f=this,b,a,c,m,B,q,x=e,t,H,y;this.getJqUi=function(){b||W();return b};this.getModel=function(){return x};this.setModel=function(Q){x=Q;K()};this.setItemClickListener=function(Q){H=Q};var u=function(){m&&
k&&m.show()},v=function(){m&&m.hide()},r;this.addDeleteOperate=function(Q,J){m||(m=$("<div class='sa-qing-publish-manager-dir-op'>"),m.appendTo(b));B=$("<span>");B.addClass("sa-qing-publish-manager-dir-op-item");ba.background(B,Q);B.on("click",function(E){clearTimeout(r);E.stopPropagation();r=setTimeout(function(){v();J(f)},300)});B.appendTo(m)};this.addEditOperate=function(Q,J){m||(m=$("<div class='sa-qing-publish-manager-dir-op'>"),m.appendTo(b));q=$("<span>");q.addClass("sa-qing-publish-manager-dir-op-item");
ba.background(q,Q);q.on("click",function(E){clearTimeout(r);E.stopPropagation();r=setTimeout(function(){v();J(f)},300)});q.appendTo(m)};var C=function(Q){clearTimeout(r);Q&&Q.stopPropagation();r=setTimeout(function(){f.setSelected(!0)},300)},W=function(){b=$("<div>");b.addClass("sa-qing-publish-manager-dir-item");b.on("click",C);b.on("mousemove",function(J){J.stopPropagation()});if(x&&x.isPreset())P();else{b.on("mouseover",u);b.on("mouseout",v);c=new Pa;var Q=c.getJqUi();Q.addClass("sa-qing-publish-manager-dir-item-name-edit");
Q.hide();c.setEnabled(!0);c.addBlurListener(function(){var J=c.getText();J&&(J=J.trim(),c.setText(J),Q.attr("title",J));y(f,J,T)});Q.on("keydown",function(J){if(13==(J.keyCode||J.which||J.charCode)){if(J=c.getText())J=J.trim(),c.setText(J),Q.attr("title",J);y(f,J,T)}});Q.appendTo(b)}a=$("<span>");a.addClass("sa-qing-publish-manager-dir-item-name");x&&x.isPreset()&&a.css("margin-left","8px");a.appendTo(b);K()};this.setFinishEditCallback=function(Q){y=Q};var P=function(){var Q=$("<div>");Q.text(M.get("preset",
"\u9884\u7f6e"));Q.addClass("sa-qing-publish-manager-menuPanel-preset-tag");Q.appendTo(b)},T=function(){b.on("click",C);a.show();c.getJqUi().hide()};this.edit=function(){b.off("click");a.hide();var Q=c.getJqUi();Q.show();var J=x?x.getText():"";c.setText(J);Q.attr("title",J);c.requestFocus()};this.setSelected=function(Q){t=Q;K()};var K=function(){var Q=x?x.getText():"";a&&a.text(Q);a&&a.attr("title",Q);t?(b.addClass("sa-qing-publish-manager-dir-item-name-selected"),Q=b.find(".sa-qing-publish-manager-menuPanel-preset-tag"),
Q.addClass("sa-qing-publish-manager-menuPanel-preset-tag-Selected"),b.removeClass("sa-qing-publish-manager-dir-item"),H(f)):(b.removeClass("sa-qing-publish-manager-dir-item-name-selected"),Q=b.find(".sa-qing-publish-manager-menuPanel-preset-tag"),Q.removeClass("sa-qing-publish-manager-menuPanel-preset-tag-Selected"),b.addClass("sa-qing-publish-manager-dir-item"))}}function Fa(e,k){this.getTypeName=function(){return e};this.getTypeId=function(){return k}}function Ga(){var e;this.setSyncSearchingUI=
function(k){e=k};this.getTailBlankForDragging=function(){return-1};this.isRowDraggable=function(k,f){return!1};this.isColumnDraggable=function(k,f){return k.getColumnsCount()==f+1?!1:!0};this.getMinRowHeightLimited=function(k,f){return 3};this.getMinColumnWidthLimited=function(k,f){return 4};this.rowDraggedAction=function(k,f,b){var a=k.isSyncUIWhenModelChanged();k.setSyncUIWhenModelChanged(!0);f=k.getRow(f);f.setHeight(f.getHeight()+b);k.setSyncUIWhenModelChanged(a)};this.setMinColumnWidth=function(k){};
this.columnDraggedAction=function(k,f,b){var a=k.isSyncUIWhenModelChanged();k.setSyncUIWhenModelChanged(!0);f=k.getColumn(f);f.setWidth(f.getWidth()+b);k.setSyncUIWhenModelChanged(a);e&&e()}}function Oa(){function e(J){var E,L,I,U,l;this.showDeletePrompt=function(A){A?(L.css({"margin-left":"17px"}),l.show()):(L.css({"margin-left":"0px"}),l.hide())};this.setContent=function(A){L.attr("title",A);l.attr("title",A);U.addClass("sa-publish-detail-desc-item-head-name");var z=251-I.width()-2;L.text(A);U.css("width",
z+"px")};this.getJqUi=function(){if(!E){var A=$("<div>");I=$("<span class='sa-qing-publish-detail-message-title'>");I.attr("title",J);I.text(J);U=$("<div>");l=jb.createWarning();Ba.layoutCtrl(l,62,2);L=$("<span>");L.attr("title","");L.text("");l.appendTo(U);L.appendTo(U);I.appendTo(A);U.appendTo(A);l.hide();E=A}return E}}var k,f,b,a,c,m,B,q,x,t,H,y=!1,u,v,r,C,W={1:M.get("moduleLonger","\u6570\u636e\u5206\u6790"),2:M.get("moduleSquare","\u6570\u636e\u6597\u65b9"),3:M.get("dashboard","\u4eea\u8868\u677f")},
P={dashboard:M.get("dashboard","\u4eea\u8868\u677f"),subject:M.get("moduleSquare","\u6570\u636e\u6597\u65b9"),bill:M.get("moduleSquare","\u6570\u636e\u6597\u65b9")},T={dashboard:M.get("dashboard","\u4eea\u8868\u677f"),subject:M.get("moduleLonger","\u6570\u636e\u5206\u6790"),extreport:M.get("qReport","\u62a5\u8868"),bill:M.get("moduleLonger","\u6570\u636e\u5206\u6790")};this.setTabType=function(J){H=J};this.setIsCardSelector=function(J){y=J};this.setLappMapIdCardModelDetail=function(J){r=J};this.setCardImgUrlCreator=
function(J){};this.setProfile=function(J,E){(new ib).setFormatString("yyyy-MM-dd HH:mm:ss");k.text(J.getName());k.attr("title",J.getName());b.setContent(J.getName());switch(H){case F.APPMENU:c.setContent(T[J.getPublishSourceType()]);var L=Q(J.getPublishSourceType(),J.getPublishSourceGroupName(),J.getPublishSourceName());break;case F.CENTER:c.setContent(T[J.getPublishSourceType()]);L=Q(J.getPublishSourceType(),J.getPublishSourceGroupName(),J.getPublishSourceName());break;case F.LAPP:c.setContent(W[J.getViewType()]);
a.attr("src",E);L=J.getCardDesc();q.setContent(L?L:M.get("noDescription","\u6682\u65e0\u63cf\u8ff0"));E=J.getViewType();L=J.getPublishSourceName();var I={1:"subject",2:"subject",3:"dashboard"},U={1:M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"),2:M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"),3:M.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u5220\u9664")};L?(m.showDeletePrompt(!1),E=I[E],r[J.getPublishId()]&&(E=r[J.getPublishId()].getPublishSourceGroupName()),
L=E+"/"+L):(m.showDeletePrompt(!0),L=U[E]);break;case F.CARD:c&&c.setContent(P[J.getPublishSourceType()]),a.attr("src",E),L=J.getCardDesc(),q.setContent(L?L:M.get("noDescription","\u6682\u65e0\u63cf\u8ff0")),L=Q(J.getPublishSourceType(),J.getPublishSourceGroupName(),J.getPublishSourceName()),u&&u.setContent(J.isPreset()?M.get("systemPreset","\u7cfb\u7edf\u9884\u7f6e"):J.getCreatorName()),v&&v.setContent(J.getPathText())}J.isPreset()?(E=J.getRoles(),I=J.getUsers(),E=0==E.length&&0==I.length?M.get("permissionNoRoleAndUserText",
"\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=E.length&&0!=I.length?M.get("roleAndUserNames","\u89d2\u8272\uff1a#1\uff0c\u7528\u6237\uff1a#2").replace("#1",K(E)).replace("#2",K(I)):0!=E.length?M.get("roleNames","\u89d2\u8272\uff1a#1").replace("#1",K(E)):M.get("userNames","\u7528\u6237\uff1a#1").replace("#1",K(I))):(E=J.getRoles(),I=J.getUsers(),E=0==E.length&&0==I.length?M.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=E.length&&0!=I.length?M.get("permissionRolesAndUsersText",
"\u89d2\u8272#1\u4e2a\uff0c\u7528\u6237#2\u4e2a").replace("#1",E.length).replace("#2",I.length):0!=E.length?M.get("permissionRolesText","\u89d2\u8272#1\u4e2a").replace("#1",E.length):M.get("permissionUsersText","\u7528\u6237#1\u4e2a").replace("#1",I.length));m&&m.setContent(L);B&&B.setContent(E);t&&t.setContent(J.getCarryData()?M.get("yes","\u4e0d\u518d\u66f4\u65b0\u6570\u636e"):M.get("no","\u66f4\u65b0\u6570\u636e"));x.setContent(J.getCreateFormatTime());C.setContent(J.getUpdateFormatTime())};this.getJqUi=
function(){if(!f){var J=$("<div>"),E=$("<div class='sa-publish-item'>"),L=$("<div class='sa-publish-item-head'>");k=$("<div class='sa-publish-item-head-name sa-qing-publish-fontfamily'>");k.css("width","200px");k.text("");k.appendTo(L);a=$("<img class='sa-publish-item-img'>");a.attr("src",null);L.appendTo(E);a.appendTo(E);E.appendTo(J);var I=$("<div>"),U=7;b=new e(M.get("detailPublishName","\u53d1\u5e03\u540d\u79f0\uff1a "));var l=b.getJqUi();Ba.layoutCtrl(l,10,U,251,18);l.appendTo(I);y?(U+=23,u=
new e(M.get("creatorName","\u53d1\u5e03\u4eba\uff1a ")),l=u.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I),U+=23,v=new e(M.get("PublishContent","\u53d1\u5e03\u76ee\u5f55\uff1a ")),l=v.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I)):(U+=23,c=new e(M.get("detailPublishType","\u7c7b\u578b\uff1a ")),l=c.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I),U+=23,m=new e(M.get("detailPublishSource","\u53d1\u5e03\u6765\u6e90\uff1a ")),l=m.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I),
U+=23,B=new e(M.get("detailPermission","\u6388\u6743\uff1a ")),l=B.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I),U+=23,t=new e(M.get("detailCarryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e\uff1a ")),l=t.getJqUi(),Ba.layoutCtrl(l,10,U,251,18),l.appendTo(I));U+=23;x=new e(M.get("detailPublishTime","\u53d1\u5e03\u65f6\u95f4\uff1a "));l=x.getJqUi();Ba.layoutCtrl(l,10,U,251,18);l.appendTo(I);U+=23;C=new e(M.get("detailModifyTime","\u65b9\u6848\u4fee\u6539\u65f6\u95f4\uff1a "));l=C.getJqUi();
Ba.layoutCtrl(l,10,U,251,18);l.appendTo(I);U+=23;q=new e(M.get("detailDescription","\u63cf\u8ff0\uff1a "));l=q.getJqUi();Ba.layoutCtrl(l,10,U,251,18);l.appendTo(I);I.appendTo(J);I.css({position:"relative",top:"186px","line-height":"20px",color:"#666666"});if(H==F.APPMENU||H==F.CENTER)l.remove(),L.remove(),a.remove(),E.removeClass("sa-publish-item"),I.css({position:"relative",top:"18px","line-height":"18px"});E.css({"float":"right",right:"3px"});f=J}return f};var K=function(J){for(var E="",L=0;L<J.length;L++)E=
0==L?E+J[L].getText():E+(","+J[L].getText());return E},Q=function(J,E,L){var I="";L?(m&&m.showDeletePrompt(!1),I=E+"/"+L):(m&&m.showDeletePrompt(!0),J==Xa.SUBJECT?I=M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"):J==Xa.DASHBOARD?I=M.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u88ab\u5220\u9664"):J==Xa.EXTREPORT&&(I+=M.get("extReportDeleted","\u8be5\u8f7b\u62a5\u8868\u5df2\u88ab\u5220\u9664")));return I}}function La(e,k,f){var b=this,a,c,m;this.setOuterMessageCurtain=
function(H){m=H};this.setIsDashboardPublish=function(H){c=H};this.setRemoteImpl=function(H){a=H};this.getRemoteImpl=function(){return a};this.show=function(H,y){var u=H.data("jqContainer");u||(u=t(H,y),H.data("jqContainer",u));(y=H.attr("showContainer"))&&"1"==y?q(u):(u.show(),b.adjustContainerPosition(u),H.attr("showContainer",1),$(document.body).on("mousedown",x),$(document.body).on("mousewheel",B))};this.hide=function(){for(var H=e.find(".sa-qing-publish-manager-editcontent-selector"),y=0;y<H.length;y++){var u=
$(H[y]);q(u)}};var B=function(){for(var H=e.find(".sa-qing-publish-manager-editcontent-selector"),y=0;y<H.length;y++){var u=$(H[y]);q(u)}},q=function(H){H.hide();H.data("jqEditBtn").attr("showContainer",0);$(document.body).off("mousedown",x);$(document.body).off("mousewheel",B)},x=function(H){for(var y=e.find(".sa-qing-publish-manager-editcontent-selector"),u=0;u<y.length;u++){var v=$(y[u]),r=v.data("jqEditBtn");v.is(":visible")&&(Ba.isDescendent(H.target,v[0])||Ba.isDescendent(H.target,r[0]))||q(v)}};
this.adjustContainerPosition=function(H){var y=H.data("jqEditBtn");var u=y.position().left;var v=parseInt(y.css("marginLeft"));isNaN(v)||(u+=v);var r=y.position().top;v=parseInt(y.css("marginTop"));isNaN(v)||(r+=v);for(var C=$(y.parent());!C.is(e);)u+=C.position().left,u+=C.scrollLeft(),v=parseInt(C.css("marginLeft")),isNaN(v)||(u+=v),r+=C.position().top,v=parseInt(C.css("marginTop")),isNaN(v)||(r+=v),C=$(C.parent());u=u+y.width()-H.width()+5;r+=y.height();C=H.height();r+C>=e.height()&&(r=r-y.height()-
C);H.css({left:u+"px",top:r+"px"})};var t=function(H,y){var u=k.length,v=26*u,r=$("<div class='sa-qing-publish-manager-editcontent-selector'>");r.css({position:"absolute",height:v+"px",width:"110px"});r.data("jqEditBtn",H);for(H=0;H<u;H++){v=k[H];var C=$("<div class='sa-qing-publish-manager-editcontent-selector-item'>");C.css({top:26*H+"px",height:"26px","line-height":"26px"});C.attr("title",v);C.attr("operateIdx",H);C.text(v);C.on("click",function(W){q(r);$(W.currentTarget).attr("title")==M.get("editPublishContentItem",
"\u7f16\u8f91\u53d1\u5e03\u65b9\u6848")&&c&&y.getCarryData()?m.showPrompt(M.get("dsbPublishedCannotEditScheme",'\u5f53\u524d\u53d1\u5e03\u8bb0\u5f55\u5df2\u5f00\u542f"\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e"\uff0c\u65e0\u6cd5\u7f16\u8f91\u53d1\u5e03\u65b9\u6848\u3002')):(W=$(W.currentTarget).attr("operateIdx"),f[W](y))});C.appendTo(r)}r.appendTo(e);return r}}function Ka(e,k,f){eb.call(this);var b=this,a,c,m,B,q,x,t,H=k,y=!1,u,v,r,C="BORDER";this.getPublishModel=function(){return e};this.setHideCardTypePic=
function(E){r=E};this.setSelected=function(E){y=E};this.setPublishManager=function(E){u=E};this.getJqUi=function(){if(!a){var E=$("<div class='sa-publish-item'>");E.on("mouseenter",W);E.on("mouseleave",P);E.on("click",T);var L=$("<div class='sa-publish-item-head'>");if(e.isPreset()){var I=$("<div>");I.text(M.get("preset","\u9884\u7f6e"));I.addClass("sa-qing-publish-manager-card-name-preset-tag");I.appendTo(L)}"dashboard"==e.getPublishSourceType()?(I=$("<div>"),ba.background(I,"dashboard"),I.addClass("sa-qing-publish-manager-card-pic-type"),
I.appendTo(L)):"subject"!=r&&(I=$("<div>"),ba.background(I,"squareData"),I.addClass("sa-qing-publish-manager-card-pic-type"),I.appendTo(L));c=$("<div class='sa-publish-item-head-name sa-qing-publish-fontfamily'>");c.appendTo(L);q=$("<div class='sa-publish-item-head-op-container'>");q.appendTo(L);L.appendTo(E);x=$("<img class='sa-publish-item-img'>");H||(H=ka.getIconUrl("publish","icon_chart_building.png"));x.attr("src",H);x.appendTo(E);B=$("<div class='sa-publish-item-desc-container'>");m=$("<div class='sa-publish-item-desc-text sa-qing-publish-fontfamily'>");
m.appendTo(B);B.appendTo(E);P();a=E}b.updateUi();return a};this.updateUi=function(){c&&(c.text(e.getName()),c.attr("title",e.getName()));x&&x.attr("src",e.getShowImagePath());if(m){var E=e.getCardDesc();E&&0!=E.length||(E=M.get("noDescFornow","\u6682\u65e0\u63cf\u8ff0"));var L=M.get("descriptionColons","\u63cf\u8ff0\uff1a")+E,I=e.getPublishSourceType(),U=e.getPublishSourceName();E=$("<div>");var l=$("<span>"),A=$("<span>");A.text(M.get("publishSourceColons","\u53d1\u5e03\u6765\u6e90\uff1a"));A.appendTo(E);
U?l.text(e.getPublishSourceGroupName()+"/"+U):(U=jb.createWarning(),Ba.layoutCtrl(U,0,8),U.appendTo(E),I==Xa.SUBJECT?l.text(M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664")):I==Xa.DASHBOARD?l.text(M.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u88ab\u5220\u9664")):I==Xa.EXTREPORT&&l.text(M.get("extReportDeleted","\u8be5\u62a5\u8868\u5df2\u88ab\u5220\u9664")));l.appendTo(E);m.text(L);u&&(l=M.get("permissionColons","\u6388\u6743\uff1a"),e.isPreset()?(L=l,I=
e.getRoles(),l=e.getUsers(),I=0==I.length&&0==l.length?M.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=I.length&&0!=l.length?M.get("roleAndUserNames","\u89d2\u8272\uff1a#1\uff0c\u7528\u6237\uff1a#2").replace("#1",K(I)).replace("#2",K(l)):0!=I.length?M.get("roleNames","\u89d2\u8272\uff1a#1").replace("#1",K(I)):M.get("userNames","\u7528\u6237\uff1a#1").replace("#1",K(l)),l=L+I):(L=l,I=e.getRoles(),l=e.getUsers(),I=0==I.length&&0==l.length?M.get("permissionNoRoleAndUserText",
"\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=I.length&&0!=l.length?M.get("permissionRolesAndUsersText","\u89d2\u8272#1\u4e2a\uff0c\u7528\u6237#2\u4e2a").replace("#1",I.length).replace("#2",l.length):0!=I.length?M.get("permissionRolesText","\u89d2\u8272#1\u4e2a").replace("#1",I.length):M.get("permissionUsersText","\u7528\u6237#1\u4e2a").replace("#1",l.length),l=L+I),L=M.get("isCarryDataColons","\u662f\u5426\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e\uff1a")+(e.getCarryData()?M.get("yes",
"\u4e0d\u518d\u66f4\u65b0\u6570\u636e"):M.get("no","\u66f4\u65b0\u6570\u636e")),I=$("<div>"),I.text(l),l=$("<div>"),l.text(L),m.append(E),m.append(I),m.append(l))}};this.refreshImage=function(E){E&&x.attr("src",E)};var W=function(){B.show();e.isPreset()||q.find(".sa-publish-item-head-op-item").show()},P=function(){B.hide();e.isPreset()||q.find(".sa-publish-item-head-op-item").hide();Q&&Q.hide()},T=function(E){if(C==Ka.MUTI_SELECTED_STYLE_SELECTBTN)v&&(E=!v.isSelected(),v.setSelected(E,!0));else if(C==
Ka.SINGLE_SELECTED_STYLE_SELECTBTN)v&&(E=!v.isChecked(),v.setChecked(E,!0));else{var L=a.parent().children(".publish-card-selected");0<L.length&&L.removeClass("publish-card-selected");$(E.currentTarget).addClass("publish-card-selected")}},K=function(E){for(var L="",I=0;I<E.length;I++)L=0==I?L+E[I].getText():L+(","+E[I].getText());return L};this.addOperate=function(E,L,I){t=$("<span>");t.addClass("sa-publish-item-head-op-item sa-publish-item-head-op-layout");t.attr("title",L);ba.background(t,E);t.on("click",
function(U){P();I()});t.hide();t.appendTo(q)};this.getSelector=function(){return v};var Q;this.addOperates=function(E,L,I,U){var l=U.length;1==l?b.addOperate(E,I[0],U[0]):1<l&&(t=$("<span>"),t.addClass("sa-publish-item-head-op-item sa-publish-item-head-op-layout"),t.attr("title",L),ba.background(t,E),t.hide(),t.appendTo(q),Q=new La(a,I,U),Q.setOuterMessageCurtain(f),"dashboard"==e.getPublishSourceType()&&Q.setIsDashboardPublish(!0),t.on("click",function(A){Q.show($(A.currentTarget),e)}))};this.addSelectButton=
function(E,L){C=L;C==Ka.SINGLE_SELECTED_STYLE_SELECTBTN?J(q,E):(v=new Za,v.setSelected(y,!1),v.forbidClick(),v.addSelectedListener(function(I,U){E(b,I,U)}),L=v.getJqUi(),L.addClass("sa-publish-item-head-op-layout"),L.appendTo(q))};var J=function(E,L){var I=new hb;I.setChecked(y);v=I;I.setUserObject(e);I.addCheckedListener(function(U,l){L(b,U,l)});I=I.getJqUi();I.css({"margin-left":"20px","margin-top":"38px"});I.appendTo(E)}}function Za(){var e=this,k,f,b=!1,a=[],c=!1;this.addSelectedListener=function(x){a.push(x)};
this.getJqUi=function(){k||(k=$("<div>"),k.css({width:"14px",height:"14px","border-radius":"10px",cursor:"pointer"}),f=$("<div>"),f.addClass("sa-qing-card-selector-tab-head-icon"),ba.background(f,"icon_select_small"),f.appendTo(k),f.hide(),q(),!c&&k.on("click",B));return k};this.forbidClick=function(){c=!0;k&&k.off("click")};this.allowClick=function(){c=!1;k&&(k.off("click"),k.on("click",B))};this.setSelected=function(x,t){x!==b&&(b=x,q(),m(t))};this.isSelected=function(){return b};var m=function(x){for(var t=
0;t<a.length;t++)(0,a[t])(e,x)},B=function(x){b=!b;q();m(!0)},q=function(){b&&(f&&f.show(),k&&k.css({border:"none"}));b||(k&&k.css({border:"1px solid #666","background-color":"#fff","box-sizing":"border-box"}),f&&f.hide())}}function aa(e){eb.call(this);var k,f,b,a=this,c;this.getPublishModel=function(){return e};this.setSelected=function(q){f=q};this.isSelected=function(){return f};this.setSingleSelected=function(q){c=q};this.getJqUi=function(){k||(k=$("<div>"));return k};this.getSelector=function(){return b};
this.addSelectButton=function(q){c?B(k,q):m(k,q)};var m=function(q,x){var t=new cb;t.setChecked(f);b=t;t.setUserObject(e);t.addCheckedListener(function(H,y){x(a,H,y)});t=t.getJqUi();t.appendTo(q);t.css("height","0px");t.find(".sa-ctrl-checkbox-box").css({top:"8px"});t.find(".sa-ctrl-checkbox-text").css("height","0px")},B=function(q,x){var t=new hb;t.setChecked(f);b=t;t.setUserObject(e);t.addCheckedListener(function(H,y){x(a,H,y)});t=t.getJqUi();t.appendTo(q);t.find(".sa-ctrl-common-foreground_enabled").css("height",
"0px")}}"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.publish&&(com.kingdee.bos.qing.publish={});"undefined"==typeof com.kingdee.bos.qing.publish.common&&(com.kingdee.bos.qing.publish.common={});var Wa=com.kingdee.bos.qing.publish.common;Wa.AbstractDropDownContentSelector=va;Wa.ListItemSelector=
function(){va.call(this);var e=this,k=this.protectedMethod,f,b=[],a,c=[];this.setListItem=function(t){b=t;f&&m()};this.getListItem=function(){return b};this.setSelectedByItemValue=function(t){for(var H,y=0;y<b.length;y++)b[y].getValue()==t&&(H=b[y]);H&&e.setSelectedValue(H)};this.setSelectedValue=function(t){a=t;k.updateText(a?a.getText():"");f&&m()};this.getSelectedValue=function(){return a};this.addSelectedChangedListener=function(t){c.push(t)};var m=function(){f.setItemModels(b);f.setSelecteds(a?
[a]:[])},B=function(){f||(f=new db,f.setCustomItemPainter(q),m(),f.addSelectedChangedListener(function(t,H,y){t=a;y=0<y.length?y[0]:null;k.doDropdown();a=y;k.updateText(a?a.getText():"");for(H=0;H<c.length;H++)(0,c[H])(e,t,y)}))},q=function(t,H){t.addClass("sa-qing-publish-dropdown-selector-list-item");t.text(H.getText());t.attr("title",H.getText())};this.getDropDownContent=function(t){f||B();return f.getJqUi()};var x=200;this.setMaxHeight=function(t){x=t};this.getPopupHeight=function(){return null==
b||0==b.length?22:Math.min(30*b.length+2,x+2)}};Wa.MenuPanel=function(){var e=this,k,f,b,a;this.setOuterMessageCurtain=function(D){a=D};var c=!0,m,B,q,x=!1,t=!1,H,y,u,v,r,C,W,P;this.getJqUi=function(){b||(b=$("<div>"),f=$("<div>"),c&&Q(f),k=$("<div>"),k.addClass("sa-qing-publish-manager-dir-editor-container"),x&&k.css("top","0px"),e.updateUI(),f.appendTo(b),k.appendTo(b));return b};this.setIsCardSelector=function(D,G){x=D};this.setEditable=function(D){c=D};this.setModel=function(D){u=D};this.setEmptyMenudHint=
function(D){H=D};this.setDefaultItemValue=function(D){y=D};this.getLastSelectedItem=function(){return T};this.setLastSelectedItem=function(D){T=D};this.setSelectedItemListener=function(D){v=D};this.setLoadItemListener=function(D){r=D};this.setAddItemListener=function(D){C=D};this.setUpdateItemListener=function(D){P=D};this.setDeleteItemListener=function(D){W=D};var T;this.getSelectedModel=function(){return T?T.getModel():null};var K=function(){if(H){var D=$("<div class='sa-qing-publish-manager-dir-empty'>"),
G=$("<span>");G.text(H);G.appendTo(D);D.appendTo(k)}},Q=function(D){var G=$("<div>");G.addClass("sa-qing-publish-manager-dir-item-newDir");var R=$("<span>");R.addClass("sa-qing-publish-manager-newDir-item-name");R.text(M.get("Dir","\u76ee\u5f55"));R.appendTo(G);m=$("<div>");m.addClass("sa-qing-publish-manager-newDir-item-add");ba.background(m,"add");m.on("mouseover",function(Y){ba.background(m,"add_on")});m.on("mouseout",function(Y){ba.background(m,"add")});m.on("click",function(){var Y=new za(null,
!0),ca=Y.getJqUi();Y.setFinishEditCallback(l);ca.appendTo(k);Y.edit()});m.attr("title",M.get("newDir","\u65b0\u589e\u76ee\u5f55"));m.appendTo(G);B=$("<div>");B.addClass("sa-qing-publish-manager-dir-operator-edit");B.on("click",function(){T.edit();T.setFinishEditCallback(A)});ba.background(B,"btn_edit");B.on("mouseover",function(Y){ba.background(B,"btn_edit_on")});B.on("mouseout",function(Y){ba.background(B,"btn_edit")});B.attr("title",M.get("editDir","\u7f16\u8f91\u76ee\u5f55"));B.appendTo(G);q=$("<div>");
q.addClass("sa-qing-publish-manager-dir-operator-del");q.on("click",function(){var Y=e.getSelectedModel();if(Y){var ca=new ea;ca.setOptionType(ea.OPTION_OK_CANCEL);var fa=M.get("confirmToDelDir","\u786e\u5b9a\u5220\u9664\u8be5\u76ee\u5f55\uff1f");ca.setMessage(fa);ca.setClosingChecker(function(ra){ra==ea.RETURN_OK&&W(Y.getValue(),function(){var X=T.getJqUi();if(T){var pa=X.next();pa&&0!=pa.length||(pa=X.prev());X.remove();pa&&pa.prev()&&0!=pa.prev().length&&pa.click()}else X.remove();z(Y)});return!0});
ca.showDialog()}else oMenuItemPanel.getJqUi().remove()});ba.background(q,"btn_delete");q.on("mouseover",function(Y){ba.background(q,"btn_delete_on")});q.on("mouseout",function(Y){ba.background(q,"btn_delete")});q.attr("title",M.get("deleteDir","\u5220\u9664\u76ee\u5f55"));q.appendTo(G);G.appendTo(D)};this.updateUI=function(){t=!1;k.empty();if(u)if(0<u.length){for(var D,G=J(),R,Y=0;Y<u.length;Y++){var ca=u[Y],fa=new za(ca,!0),ra=fa.getJqUi();fa.setItemClickListener(U);c&&y!=ca.getValue()&&fa.setFinishEditCallback(A);
0==Y&&(R=fa);if(!x||ca.getIsShow())fa.setSelected(Y==G),ra.appendTo(k),Y==G&&(D=ra)}!D&&R.setSelected(!0);x&&L();E(D)}else c||K();else r(function(X){u=X;e.updateUI()})};var J=function(){var D=x?1:0;T&&(y=T.getModel().getValue());for(var G=0;G<u.length;G++){var R=u[G];if(!y&&x&&0<G)if(R.getIsShow())break;else D+=1;if(y&&(y==R.getText()||y==R.getValue())){D=G;break}}return D},E=function(D){if(k&&D){var G=k.prop("clientHeight"),R=k.prop("scrollTop"),Y=R+G,ca=D.prop("offsetTop");D=ca+D.prop("offsetHeight");
ca<R?k.prop("scrollTop",ca-10):D>Y&&k.prop("scrollTop",D-G+10)}},L=function(){for(var D=k.find(".sa-qing-publish-manager-dir-item-name"),G=1;G<D.length;G++)$(D[G]).css("margin-left","30px");D=k.find(".sa-qing-publish-manager-menuPanel-preset-tag");for(G=0;G<D.length;G++)$(D[G]).css({"margin-left":"30px","margin-right":"-25px"})};this.updateSearchUI=function(D,G){t=!0;k.empty();if(D)if(0<D.length){for(var R,Y=!1,ca=0;ca<D.length;ca++){var fa=D[ca];if(!x||fa.getIsShow()){var ra=new za(fa,!0);0==ca&&
(R=ra);var X="("+G[fa.getValue()]+")",pa=ra.getJqUi();I(pa,X,G[fa.getValue()]);ra.setItemClickListener(U);var sa=!T.getModel().isPreset()&&fa.isPreset()?c?0:1:D.indexOf(T.getModel());ca==sa&&(ra.setSelected(!0),Y=!0);pa.attr("title",fa.getText()+" "+X);pa.find(".sa-qing-publish-manager-dir-item-name").attr("title",fa.getText()+" "+X);pa.appendTo(k)}}Y||R.setSelected(!0);x&&L()}else c||K()};this.updateSelectorSearchUI=function(D,G){t=!0;k.empty();if(0<D.length){for(var R,Y=!1,ca=0;ca<D.length;ca++){var fa=
D[ca];if(!x||fa.getIsShow()){var ra=new za(fa,!0);0===ca&&(R=ra);if(fa.isPreset()||"allCard"==fa.getValue())var X="("+G[fa.getValue()]+")",pa=G[fa.getValue()];else X="("+G[fa.getText()]+")",pa=G[fa.getText()];var sa=ra.getJqUi();I(sa,X,pa);ra.setItemClickListener(U);fa=T?T.getModel().isPreset()!=fa.isPreset()?1:D.indexOf(T.getModel()):1;ca==fa&&(ra.setSelected(!0),Y=!0);sa.appendTo(k)}}Y||R.setSelected(!0);x&&L()}else c||K()};var I=function(D,G,R){var Y=$("<div class='sa-qing-publish-manager-Card-Lapp-Search-Number'>");
Y.text(G);Y.title=G;Y.appendTo(D);0<R&&(R=$("<div class='sa-qing-publish-manager-Card-Lapp-Search-Number-with-color'>"),R.text(G),R.appendTo(D),Y.hide(),R.show())},U=function(D){if(T!=D){T&&T.setSelected(!1);if(t){if(T){var G=T.getJqUi(),R=G.find(".sa-qing-publish-manager-Card-Lapp-Search-Number");0<parseInt(R.text().substring(1,R.text().length-1))&&(G.find(".sa-qing-publish-manager-Card-Lapp-Search-Number").hide(),G.find(".sa-qing-publish-manager-Card-Lapp-Search-Number-with-color").show())}G=D.getJqUi();
G.find(".sa-qing-publish-manager-Card-Lapp-Search-Number").show();G.find(".sa-qing-publish-manager-Card-Lapp-Search-Number-with-color").hide()}T=D;G=T.getModel();D=D.getModel();c&&(D.isPreset()?(m.hide(),B.hide(),q.hide()):(m.show(),B.show(),q.show()));v(G)}},l=function(D,G,R){G?50<G.length?a.showPrompt(M.get("publishNameTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),2E3):C(G,D.getJqUi().index(),function(Y){u.push(Y);D.setModel(Y);D.setFinishEditCallback(A);D.setItemClickListener(U);
R()}):D.getJqUi().remove()},A=function(D,G,R){if(G)if(50<G.length)a.showPrompt(M.get("publishNameTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),2E3);else{var Y=D.getModel(),ca=function(fa){Y.setValue(fa);Y.setText(G);D.setModel(Y);R()};Y.getText()!=G?P(Y.getValue(),G,ca):R()}else a.showPrompt(M.get("dirNameNotEmpty","\u76ee\u5f55\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u3002"),2E3)},z=function(D){for(var G=0;G<u.length;G++)D.getValue()==u[G].getValue()&&u.splice(G,1),0==u.length&&
r(function(R){u=R;e.updateUI()})}};Wa.ListPublishContentPanel=function(){function e(N,w){KTDefaultCellRender.call(this,N);var V=this,p=this.paintCellUI;this.paintCellUI=function(oa,ia){var la=V.getCurrentRow(),Sa=V.getCurrentColIdx(),Da=la.getUserObject();if(V.getCurrentRowIdx()<Ha.getHeadRowCount()||0!=Sa&&1!=Sa&&2!=Sa&&3!=Sa&&4!=Sa)p(oa,ia);else if(0==Sa){ia=$("<div class='sa-publish-item-list-head'>");Da.isPreset()&&(la=$("<div>"),la.text(M.get("preset","\u9884\u7f6e")),la.addClass("sa-qing-publish-manager-name-preset-tag"),
la.appendTo(ia));switch(x){case F.APPMENU:"dashboard"==Da.getPublishSourceType()?O(ia,Da.isPreset()):"extreport"==Da.getPublishSourceType()?Ia(ia,Da.isPreset()):ma(ia,Da.isPreset());break;case F.CENTER:"dashboard"==Da.getPublishSourceType()?O(ia,Da.isPreset()):"extreport"==Da.getPublishSourceType()?Ia(ia,Da.isPreset()):ma(ia,Da.isPreset());break;case F.LAPP:"3"==Da.getViewType()?O(ia,Da.isPreset()):"2"==Da.getViewType()?Z(ia,Da.isPreset()):"1"==Da.getViewType()&&ma(ia,Da.isPreset());break;case F.CARD:"dashboard"==
Da.getPublishSourceType()?O(ia,Da.isPreset()):Z(ia,Da.isPreset())}la=$("<div class='sa-publish-item-list-head-name'>");la.text(Da.getName());la.attr("title",Da.getName());la.appendTo(ia);ia.appendTo(oa)}else if(1==Sa)x==F.LAPP?(Sa=Da.getPublishSourceName(),ia=ra(Da.getViewType(),Sa,Da)):(Sa=Da.getPublishSourceGroupName(),ia=fa(Da.getPublishSourceType(),Sa,Da.getPublishSourceName())),la=$("<span>"),la.text(ia),la.attr("title",ia),la.css("line-height","28px"),la.css("padding-right","8px"),Sa?la.css("padding-left",
"8px"):(la.css("padding-left","17px"),Sa=jb.createWarning(),Ba.layoutCtrl(Sa,0,8),Sa.attr("title",ia),Sa.appendTo(oa)),$(oa).css("text-overflow","ellipsis"),la.appendTo(oa);else if(2==Sa)ia=$("<div>"),la="",Da.isPreset()?(la=pa(Da.getRoles(),Da.getUsers()),ia.attr("title",la)):la=X(Da.getRoles(),Da.getUsers()),ia.text(la),ia.css("line-height","28px"),ia.css("padding-left","8px"),ia.css("padding-right","8px"),ia.css("overflow","hidden"),ia.css("text-overflow","ellipsis"),ia.appendTo(oa);else if(3==
Sa)ia=$("<div>"),la=Da.getCreateFormatTime(),ia.text(la),ia.attr("title",la),ia.css("line-height","28px"),ia.css("padding-left","8px"),ia.css("padding-right","8px"),ia.css("overflow","hidden"),ia.css("text-overflow","ellipsis"),ia.appendTo(oa);else if(4==Sa&&!Da.isPreset()){x==F.LAPP?(ia=[g,n],la=[M.get("editPublishInfoItem","\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f"),M.get("editPublishContentItem","\u7f16\u8f91\u53d1\u5e03\u65b9\u6848")]):Da.getPublishSourceType()==Xa.EXTREPORT?(ia=[d],la=[M.get("editPublishInfoItem",
"\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f")]):(ia=[d,h],la=[M.get("editPublishInfoItem","\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f"),M.get("editPublishContentItem","\u7f16\u8f91\u53d1\u5e03\u65b9\u6848")]);var lb=new La(f,la,ia);lb.setOuterMessageCurtain(w);(x==F.APPMENU||x==F.CENTER||x==F.CARD)&&"dashboard"==Da.getPublishSourceType()||x==F.LAPP&&"3"==Da.getViewType()?lb.setIsDashboardPublish(!0):lb.setIsDashboardPublish(!1);var mb=$("<span>");mb.addClass("sa-qing-publish-manager-op-edit-workButton");mb.attr("title",
M.get("edit","\u7f16\u8f91"));ba.background(mb,"btn_edit");mb.on("mouseover",function(kb){ba.background(mb,"btn_edit_on")});mb.on("mouseout",function(kb){ba.background(mb,"btn_edit")});mb.appendTo(oa);mb.on("click",function(){lb.setRemoteImpl(D);lb.show(mb,Da);var kb=f.find(".sa-qing-publish-manager-editcontent-selector"),qb=mb.offset().left-87;kb.offset({left:qb})});var nb=$("<span>");nb.addClass("sa-qing-publish-manager-op-delete-workButton");nb.attr("title",M.get("del","\u5220\u9664"));ba.background(nb,
"btn_delete");nb.on("mouseover",function(kb){ba.background(nb,"btn_delete_on")});nb.on("mouseout",function(kb){ba.background(nb,"btn_delete")});nb.on("click",function(){var kb=ea.createFeedbackDialog();kb.setOptionType(ea.OPTION_OK_CANCEL);kb.setMsgImageType(ea.MSG_DELETE);kb.setMessage(M.get("confirmToDelPublish","\u5220\u9664\u8be5\u8bb0\u5f55\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u8bb0\u5f55\u5417\uff1f"));kb.setClosingChecker(function(qb){qb==ea.RETURN_OK&&U(Da,
function(){for(var pb=0;pb<r.length;pb++){var rb=r[pb];if(rb.getId()==Da.getId()){r.splice(pb,1);v=pb;break}}A&&0<A.length&&(pb=A.indexOf(rb),-1<pb&&A.splice(pb,1));ca();J&&J();v=0});return!0});kb.showDialog()});nb.appendTo(oa)}};var d=function(oa){var ia=oa.getPath();I(oa,function(la){if(ia==la.getPath())oa.fromJsonObject(la.toJsonObject());else{for(var Sa=0;Sa<r.length;Sa++){var Da=r[Sa];Da.getId()==la.getId()&&(r.splice(Sa,1),A&&0<A.length&&(Da=A.indexOf(Da),A[Da]=la))}z&&z();w.showSuccess(M.get("updateSuccess",
"\u4fee\u6539\u6210\u529f\u3002"))}ca();J&&J()})},g=function(oa){var ia=oa.getParentId();I(oa,function(la,Sa){if(ia==la.getParentId())oa.setName(la.getName()),oa.setCardDesc(la.getCardDesc()),oa.setBottomAnnotation(la.getBottomAnnotation()),oa.setViewType(la.getViewType()),oa.setDisplayStyle(la.getDisplayStyle()),K[oa.getPublishId()].setRoles(Sa.getRoles()),oa.setRoles(Sa.getRoles()),K[oa.getPublishId()].setUsers(Sa.getUsers()),oa.setUsers(Sa.getUsers()),oa.setLandscape(la.isLandscape()),oa.setLargeThumbnail(la.getLargeThumbnail()),
ca();else{K[oa.getPublishId()].setRoles(Sa.getRoles());K[oa.getPublishId()].setUsers(Sa.getUsers());for(Sa=0;Sa<r.length;Sa++)if(r[Sa].getParentId()==oa.getParentId()){r.splice(Sa,1);break}A&&0<A.length&&(Sa=A.indexOf(oa),A[Sa]=la);ca();J&&J()}J&&J()})},h=function(oa){l(oa,function(ia){L&&L(oa,function(la){oa.setUpdateTime(la)})})},n=function(oa){l(oa,function(ia){L&&L(oa)},fb.MOBILE)},O=function(oa,ia){var la=$("<div>");ba.background(la,"dashboard");la.addClass("sa-qing-publish-manager-card-list-type");
ia&&la.css("margin-left","5px");la.appendTo(oa)},Z=function(oa,ia){var la=$("<div>");ba.background(la,"squareData");la.addClass("sa-qing-publish-manager-card-list-type");ia&&la.css("margin-left","5px");la.appendTo(oa)},ma=function(oa,ia){var la=$("<div>");ba.background(la,"dataAnalysis");la.addClass("sa-qing-publish-manager-card-list-type");ia&&la.css("margin-left","5px");la.appendTo(oa)},Ia=function(oa,ia){var la=$("<div>");ba.background(la,"extreportData");la.addClass("sa-qing-publish-manager-card-list-type");
ia&&la.css("margin-left","5px");la.appendTo(oa)}}function k(){KTableSelectionRender.call(this);var N=$("<div>");this.show=function(V,p,d,g,h){Ba.layoutCtrl(N,p,d,g-p,h-d);w();N.css("z-index",0);V.append(N)};this.remove=function(){N.remove()};this.current=function(){w()};this.letOthersOld=function(V){};var w=function(V){N.addClass("sa-common-table-selection");if(V=c.getSelectionModel().getSelected())if(V=V.getRowIdx(),V=c.getRow(V).getUserObject(),x==F.CARD){var p=E(V.getImagePath());P.setProfile(V,
p)}else x==F.LAPP?(p=E(V.getLargeThumbnail(),V.getViewType()),P.setProfile(V,p)):P.setProfile(V,null)}}var f,b,a,c,m,B,q,x=F.CARD,t=this,H,y,u,v=0,r,C,W,P,T,K,Q,J,E,L,I,U,l,A,z,D;this.setRemoteImpl=function(N){D=N};this.getRemoteImpl=function(){return D};this.getJqUi=function(){if(!f){f=$("<div>");f.addClass("sa-qing-publish-manager-content-container");b=$("<div>");b.addClass("sa-qing-publish-manager-content-emptytip");b.appendTo(f);c=Ha.createTable();Ha.setupSingleRowSelection(c);c.setSelectionRender(k);
W=c.getSelectionModel();var N=new Ga;N.setSyncSearchingUI(R);c.setDraggableAdjusting(!0,3,0,N);c.setColumnFitVisibleWidth(!0);N=new e(c,Q);N.setOutsideVisible(!1);c.setCellRender(N);c.setSyncUIWhenModelChanged(!0);m=$(c.getUI());m.addClass("sa-qing-publish-manager-content-table");m.children().css("overflow-x","hidden");m.css({"min-width":"317px"});m.appendTo(f);T=Y();T.appendTo(f);T.hide();a=$("<div>");a.addClass("sa-qing-publish-init-tips");x==F.APPMENU&&(ba.background(a,"icon_open_tips_background"),
b.text(B?B:""));a.appendTo(f);a.show()}return f};this.setOuterMessageCurtain=function(N){Q=N};this.setSearchStatus=function(N){y=N};this.setCardImgUrlCreator=function(N){E=N};this.updateSearchContentUI=function(N){H=N;if(y){N=f.find(".sa-publish-item-list-head");for(var w in r){var V=void 0,p=N[w],d=r[w].getName();if(p&&d&&H){var g=H.toUpperCase(),h=d.toUpperCase(),n=h.split(g),O=g.length,Z=$("<div>");Z.addClass("sa-publish-item-list-head-name");for(V in n){var ma=h.indexOf(n[V]),Ia=d.substr(0,n[V].length);
ma+=n[V].length;var oa=h.length-ma;h=h.substr(ma,oa);d=d.substr(ma,oa);ma=$("<span>");ma.text(Ia);ma.appendTo(Z);if(V!==n.length-1&&1<n.length){oa=h.indexOf(g);Ia=d.substr(oa,O);oa+=O;var ia=h.length-oa;h=h.substr(oa,ia);d=d.substr(oa,ia);oa=$("<span>");oa.text(Ia);oa.css("color","#FF0000");oa.appendTo(ma)}$(p).children(".sa-publish-item-list-head-name").remove()}Z.appendTo($(p));$(p).attr("title",Z.text())}}}};this.relayoutViews=function(){c&&(Ha.refresh(c),c.relayoutViews());G(u)};this.setEditPublishListener=
function(N){I=N};this.setTabType=function(N){x=N};this.setDeletePublishListener=function(N){U=N};this.setEditPublishContentListenter=function(N){l=N};this.setLoadAppMenuContentListener=function(N){z=N};this.setLappMapIdCardModelDetail=function(N){K=N};this.setTipsText=function(N){B=N;b&&(b.text(B),a.show(),b.show(),m.hide())};this.setIsPreset=function(N){q=N};this.getIsPreset=function(){return q};this.setAllPublishModels=function(N){A=N};var G=function(N){var w=f.outerWidth();(u=N)?(c.setColumnFitVisibleWidth(!0),
m&&m.css("width",w-269+"px")):(c.setColumnFitVisibleWidth(!0),m&&m.css("width",w+"px"));Ha.refresh(c);R()};this.setReSearchListener=function(N){J=N};var R=function(){if(W&&W.hasSelected()){var N=W.getSelected();W.removeAllSelecteds();N&&W.addSelected(N);N=N.getRowIdx()-Ha.getHeadRowCount();c.scrollCellVisible(N,0,!1)}t.updateSearchContentUI(H,y)};this.setAutoSelectedModel=function(N){C=N};this.setListPublishModel=function(N,w){r=N;q=w;ca(w)};var Y=function(){var N=$("<div>"),w=$("<div>");ba.background(w,
"icon-side-open");w.addClass("sa-qing-publish-manager-card-detail-message-open");w.appendTo(N);var V=$("<div>");ba.background(V,"icon-side-close");V.addClass("sa-qing-publish-manager-card-detail-message-close");V.hide();V.appendTo(N);var p=$("<div class='sa-qing-publish-detail-message-panel'>");p.css({"background-color":"#fff","z-index":"999"});P=new Oa;P.setTabType(x);P.getJqUi().appendTo(p);p.appendTo(N);p.hide();w.on("click",function(){p.show();w.hide();V.show();G(!0)});V.on("click",function(){p.hide();
w.show();V.hide();G(!1)});return N},ca=function(N){ba.background(a,"no-data");a.removeClass("sa-qing-publish-init-tips");a.addClass("sa-qing-publish-no-data-tips");if(null==r||0==r.length)y?b.text(M.get("emptySearchTips","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):b.text(M.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55")),a.show(),b.show(),m.hide(),T.hide();else{a.hide();b.hide();m.show();T.show();K&&P.setLappMapIdCardModelDetail(K);Ha.clear(c);W.removeAllSelecteds();
c.setScrollerVisible("auto","auto");c.addColumns(N?4:5);c.getColumn(0).setWidth(150);c.getColumn(1).setWidth(130);c.getColumn(2).setWidth(150);c.getColumn(3).setWidth(157);var w=Ha.createHeadRow(c);w.getCell(0).setValue(M.get("publishName","\u53d1\u5e03\u540d\u79f0"));w.getCell(1).setValue(M.get("publishSource","\u53d1\u5e03\u6765\u6e90"));w.getCell(2).setValue(M.get("permission","\u6388\u6743"));w.getCell(3).setValue(M.get("publishTime","\u53d1\u5e03\u65f6\u95f4"));N||(c.getColumn(4).setWidth(60),
w.getCell(4).setValue(M.get("operate","\u64cd\u4f5c")));N=!1;w=0;for(var V=r.length;w<V;w++){var p=r[w],d=Ha.createRow(c,!1);d.setUserObject(p);d.setHeight(30);var g=new KTBorderStyle;g.setBottomBorderWidth(1);g.setBottomBorderPen("solid");g.setBottomBorderColor("#E5E5E5");d.setBorder(g);if(C&&p.getId()==C.getId()){N=!0;var h=w}}Ha.refresh(c);N?h=W.createRowTarget(h+Ha.getHeadRowCount()):(v==r.length&&(v=r.length-1),h=W.createRowTarget(Ha.getHeadRowCount()+v));W.addSelected(h)}},fa=function(N,w,V){var p=
"";V?p=w+"/"+V:N==Xa.SUBJECT?p=M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"):N==Xa.DASHBOARD?p=M.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u88ab\u5220\u9664"):N==Xa.EXTREPORT&&(p+=M.get("extReportDeleted","\u8be5\u8f7b\u62a5\u8868\u5df2\u88ab\u5220\u9664"));return p},ra=function(N,w,V){var p={1:"subject",2:"subject",3:"dashboard"},d={1:M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"),2:M.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664"),
3:M.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u5220\u9664")};w?(N=p[N],K[V.getPublishId()]&&(N=K[V.getPublishId()].getPublishSourceGroupName()),w=N+"/"+w):w=d[N];return w},X=function(N,w){return 0==N.length&&0==w.length?M.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=N.length&&0!=w.length?M.get("permissionRolesAndUsersText","\u89d2\u8272#1\u4e2a\uff0c\u7528\u6237#2\u4e2a").replace("#1",N.length).replace("#2",w.length):0!=N.length?M.get("permissionRolesText",
"\u89d2\u8272#1\u4e2a").replace("#1",N.length):M.get("permissionUsersText","\u7528\u6237#1\u4e2a").replace("#1",w.length)},pa=function(N,w){return 0==N.length&&0==w.length?M.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=N.length&&0!=w.length?M.get("roleAndUserNames","\u89d2\u8272\uff1a#1\uff0c\u7528\u6237\uff1a#2").replace("#1",sa(N)).replace("#2",sa(w)):0!=N.length?M.get("roleNames","\u89d2\u8272\uff1a#1").replace("#1",sa(N)):M.get("userNames","\u7528\u6237\uff1a#1").replace("#1",
sa(w))},sa=function(N){for(var w="",V=0;V<N.length;V++)w=0==V?w+N[V].getText():w+(","+N[V].getText());return w}};Wa.MyCustomExpendor=Ga;Wa.MultiOperationContainer=La;Wa.TreeListMenuPanel=function(){var e,k=!0,f=!1,b=4,a,c,m,B,q,x,t,H=this,y,u,v,r,C,W,P=!1,T={},K;this.getJqUi=function(){y||(y=$("<div>"),y.addClass("sa-qing-publish-manager-dir-container-analysiscenter"),H.initDirOperatorUi());return y};this.setMaxDirLevel=function(p){b=p};this.initDirOperatorUi=function(){y.empty();if(k){var p=$("<div>");
p.addClass("sa-qing-publish-manager-dir");var d=$("<div>");d.addClass("sa-qing-publish-manager-dir-operator");d.text(M.get("Dir","\u76ee\u5f55"));d.appendTo(p);u=$("<div>");u.appendTo(p);var g=$("<div>");g.addClass("sa-qing-publish-manager-dir-operator-del");g.on("click",Y);ba.background(g,"btn_delete");g.on("mouseover",function(Z){ba.background(g,"btn_delete_on")});g.on("mouseout",function(Z){ba.background(g,"btn_delete")});g.attr("title",M.get("deleteDir","\u5220\u9664\u76ee\u5f55"));g.appendTo(u);
var h=$("<div>");h.addClass("sa-qing-publish-manager-dir-operator-edit");h.on("click",w);ba.background(h,"btn_edit");h.on("mouseover",function(Z){ba.background(h,"btn_edit_on")});h.on("mouseout",function(Z){ba.background(h,"btn_edit")});h.attr("title",M.get("editDir","\u7f16\u8f91\u76ee\u5f55"));h.appendTo(u);var n=$("<div>");n.addClass("sa-qing-publish-manager-dir-operator-add-next");n.on("click",X);ba.background(n,"btn_add_sub");n.on("mouseover",function(Z){ba.background(n,"btn_add_sub_on")});n.on("mouseout",
function(Z){ba.background(n,"btn_add_sub")});n.attr("title",M.get("addChildDir","\u65b0\u589e\u5b50\u7ea7"));n.appendTo(u);var O=$("<div>");O.addClass("sa-qing-publish-manager-dir-operator-add-current");O.on("click",fa);ba.background(O,"btn_add_current");O.on("mouseover",function(Z){ba.background(O,"btn_add_current_on")});O.on("mouseout",function(Z){ba.background(O,"btn_add_current")});O.attr("title",M.get("addSameLevelDir","\u65b0\u589e\u540c\u7ea7"));O.appendTo(u);p.appendTo(y)}Q();p=a.getJqUi();
d=p.find(".sa-ctrl-list-owner");k&&Ba.layoutCtrlWithLRTB(d,0,0,null,34,0,null);p.appendTo(y);a.scrollSelectedToVisible()};this.updateTreeSearchUI=function(p,d){c=p;T=d;for(d=0;d<p.length;d++)p[d].setIsHidden(!1),p[d].setIsOpenDir(!0);J(p)};this.setSearchStatus=function(p){P=p};this.setAutoSelectedData=function(p){K=p};var Q=function(){a=new db;var p=[],d=[];if(c&&0<c.length){if(!f)for(var g=0;g<c.length;g++)1<c[g].getSubNodeLevel()?(c[g].setIsHidden(!0),c[g].setIsOpenDir(!1)):1==c[g].getSubNodeLevel()&&
c[g].setIsOpenDir(!1);f=!0;g=!1;if(C&&C!=c[0].getRelationId())for(var h in c){var n=c[h];if(C==n.getRelationId()){d.push(n);g=!0;var O=n.getSubNodeLevel();n.getCenterId1()&&p.push(n.getCenterId1());n.getCenterId2()&&p.push(n.getCenterId2());n.getCenterId3()&&p.push(n.getCenterId3());break}}!g&&d.push(c[0])}else t(J);if(K){g=[];for(h in c)"-1"!=p.indexOf(c[h].getId())&&(g.push(c[h]),c[h].setIsHidden(!1),O!=c[h].getSubNodeLevel()&&c[h].setIsOpenDir(!0));for(h in c)for(var Z in g)g[Z].getId()==c[h].getParentId()&&
g[Z].getSubNodeLevel()!=O&&c[h].setIsHidden(!1)}a.setBorderVisible(!1);a.scrollSelectedToVisible();a.setCustomItemPainter(E);a.addSelectedChangedListener(A);a.setUserObject(c);a.setItemModels(c);a.setSelecteds(d)};this.loadTreeListNodeModelExposer=function(p){J(p)};var J=function(p){c=p;H.initDirOperatorUi()},E=function(p,d){p.addClass("sa-qing-publish-menu-lists-dir");var g=$("<div>"),h=d.getName();d.getId()==Ea.QING_CENTER_ID&&"\u6211\u7684\u8f7b\u5206\u6790"==h&&(h=M.get("myQingCenter",h));g.text(h);
g.addClass("sa-qing-publish-menu-lists-dir-text");g.css("margin-left",14*d.getSubNodeLevel()+"px");p.attr("title",h);h=$("<div>");h.addClass("sa-qing-publish-menu-lists-dir-opt-icon");h.css("margin-left",14*d.getSubNodeLevel()+"px");h.data("oItemModel",d);d.getIsHidden()?p.hide():(p.show(),h.on("mousedown",function(Z){Z.stopPropagation();var ma=$(Z.currentTarget).data("oItemModel");if(ma&&ma.getId()){ma.getChildren()&&0<ma.getChildren().length?(Z=ma.getIsOpenDir(),ma.setIsOpenDir(!Z)):ma.setIsOpenDir(!0);
G(ma,!1);l(a.getUserObject());for(var Ia=y.find(".sa-ctrl-list-item"),oa=0;oa<Ia.length;oa++){Z=Ia.eq(oa);var ia=Z.data("model");var la=ma;ia=ia==la?!0:ia&&la&&ia instanceof Aa&&la instanceof Aa&&ia.getCenterId1()==la.getCenterId1()&&ia.getCenterId2()==la.getCenterId2()&&ia.getCenterId3()==la.getCenterId3()&&ia.getCenterId4()==la.getCenterId4()?!0:!1;if(ia){ma=y.find(".sa-ctrl-list-owner");Ia=ma.prop("clientHeight");oa=ma.prop("scrollTop");ia=oa+Ia;la=Z.prop("offsetTop");Z=la+Z.prop("offsetHeight");
la<oa?ma.prop("scrollTop",la-10):Z>ia&&ma.prop("scrollTop",Z-Ia+10);break}}}Z=a.getJqUi().find(".sa-qing-publish-menu-lists-dir-opt-icon-selected");L(W.getIsOpenDir(),Z,!0)}));k||d.getIsShow()||p.hide();d.getIsOpenDir()&&0<d.getChildren().length?L(!0,h,void 0):L(!1,h,void 0);if(0<d.getChildren().length){var n=d.getChildren();if(k)p.append(h);else for(var O=0;O<n.length;O++)if(n[O].getIsShow()){p.append(h);break}}p.append(g);n=$("<div>");d.getIsPreset()&&(n=$("<div>"),n.text(M.get("preset","\u9884\u7f6e")),
n.addClass("sa-qing-publish-menu-lists-dir-preset"),n.css("margin-left",14*d.getSubNodeLevel()+24+"px"),"Preset"==n.text()?g.css("margin-left",14*d.getSubNodeLevel()+45+"px"):g.css("margin-left",14*d.getSubNodeLevel()+33+"px"),p.append(n));d==a.getSelecteds()[0]?(p.addClass("sa-publish-menu-lists-item-selected"),p.addClass("sa-ctrl-list-item_selected_enabled"),h.addClass("sa-qing-publish-menu-lists-dir-opt-icon-selected"),d.getIsPreset()&&n.addClass("sa-qing-publish-menu-lists-dir-preset-selected")):
(p.on("mouseenter",function(Z){a.getSelecteds()}),p.on("mouseleave",function(Z){a.getSelecteds()}));P&&(h="("+T[d.getRelationId()]+")",p.attr("title",d.getName()+" "+h),U(p,h,T[d.getRelationId()]))},L=function(p,d,g){if(p)p=I("div",1,3,7,1),p.style.borderBottom="1px solid black",g&&(p.style.borderBottom="1px solid white"),$(p).appendTo(d);else{p=I("div",1,4,7,1);var h=I("div",4,1,0,7);p.style.borderTop="1px solid black";h.style.borderLeft="1px solid black";g&&(p.style.borderTop="1px solid white",
h.style.borderLeft="1px solid white");$(p).appendTo(d);$(h).appendTo(d)}},I=function(p,d,g,h,n){p=document.createElement(p);p.style.overflow="hidden";p.style.position="absolute";p.style.left=d+"px";p.style.top=g+"px";p.style.width=(0>h?0:h)+"px";p.style.height=(0>n?0:n)+"px";return p},U=function(p,d,g){var h=$("<div class='sa-qing-publish-manager-Center-Search-Number'>");h.text(d);h.title=d;h.appendTo(p);0<g&&(g=$("<div class='sa-qing-publish-manager-Center-Search-Number-with-Color'>"),g.text(d),
g.appendTo(p),h.hide(),g.show())},l=function(p){var d=y.find(".sa-ctrl-list-owner");d.empty();for(var g=$(document.createDocumentFragment()),h=E,n=0;n<p.length;n++){var O=$("<div>");O.addClass("sa-ctrl-list-item");O.addClass("sa-ctrl-list-item_enabled");O.addClass("sa-ctrl-list-item-defaultlayout");var Z=p[n];O.data("model",Z);h(O,Z);g.append(O)}d.append(g)},A=function(p,d,g){if(p=g[0]){W=p;C=g=p.getRelationId();m(g,p);g=a;var h=d[0];if(d=g.getJqUi().find(".sa-publish-menu-lists-item-selected")){d.removeClass("sa-publish-menu-lists-item-selected");
var n=d.find(".sa-qing-publish-menu-lists-dir-opt-icon-selected");h&&L(h.getIsOpenDir(),n,!1);n&&0<n.length&&(n.removeClass("sa-qing-publish-menu-lists-dir-opt-icon-selected"),n.css("color","rgb(138, 158, 191)"));(h=d.find(".sa-qing-publish-menu-lists-dir-preset-selected"))&&0<h.length&&h.removeClass("sa-qing-publish-menu-lists-dir-preset-selected");P&&(h=d.find(".sa-qing-publish-manager-Center-Search-Number"),0<parseInt(h.text().substring(1,h.text().length-1))&&(d.find(".sa-qing-publish-manager-Center-Search-Number-with-Color").show(),
d.find(".sa-qing-publish-manager-Center-Search-Number").hide()))}if(g=g.getItemUiByModel(p))d=g.find(".sa-qing-publish-menu-lists-dir-opt-icon"),g.addClass("sa-ctrl-list-item_selected_enabled"),g.addClass("sa-publish-menu-lists-item-selected"),L(p.getIsOpenDir(),d,!0),d.addClass("sa-qing-publish-menu-lists-dir-opt-icon-selected"),d.css("color","white"),p.getChildren()&&0>=p.getChildren().length&&L(!0,d,!0),p.getIsPreset()&&(d=g.find(".sa-qing-publish-menu-lists-dir-preset"))&&d.addClass("sa-qing-publish-menu-lists-dir-preset-selected"),
P&&(g.find(".sa-qing-publish-manager-Center-Search-Number-with-Color").hide(),g.find(".sa-qing-publish-manager-Center-Search-Number").show());p.getIsPreset()?u&&u.hide():u&&u.show()}},z=function(p,d){var g=null;p?g=p:0<a.getJqUi().find(".sa-publish-menu-lists-item-selected").length&&d&&(g=d);return g},D=function(p,d){-1==p.indexOf(d)&&p.push(d);d.getParentNode()&&D(p,d.getParentNode());return p},G=function(p,d){p.setIsHidden(d);if(p=p instanceof Aa&&p.getChildren())for(d=0;d<p.length;d++)p[d].getParentNode().getIsOpenDir()&&
!p[d].getParentNode().getIsHidden()?G(p[d],!p[d].getIsHidden()):G(p[d],!0)},R=function(p,d){p.push(d);if((d=d.getChildren())&&0<d.length)for(var g=0;g<d.length;g++)d[g].getChildren()&&0<d[g].getChildren().length?R(p,d[g]):p.push(d[g]);return p},Y=function(){var p=z(a.getSelecteds()[0],void 0);if(p){var d=new ea;d.setOptionType(ea.OPTION_OK_CANCEL);var g=M.get("confirmToDelDir","\u786e\u5b9a\u5220\u9664\u8be5\u76ee\u5f55\uff1f");d.setMessage(g);d.setClosingChecker(function(h){if(h==ea.RETURN_OK){h=
[];h=R(h,p);for(var n=[],O=0;O<h.length;O++)n.push(h[O].getRelationId());q(n,ca)}return!0});d.showDialog()}else v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)},ca=function(p){if(p){p=z(a.getSelecteds()[0],void 0);var d=[];R(d,p);for(var g in d){var h=pa(d[g],c);-1<h&&c.splice(h,1)}a.setItemModels(c);a.setSelecteds([]);g=[];D(g,p);for(d=1;d<g.length;d++)if((h=g[d].getChildren())&&0<h.length){var n=pa(p,h);-1<n?h.splice(n,1):(n=pa(g[d-1],h),
-1<n&&h.splice(n,1,g[d-1]))}a.setUserObject(c);l(c)}},fa=function(){var p=z(a.getSelecteds()[0],void 0);if(p){var d=ra(p,"ADD_CURRENT"),g=a.getItemUiByModel(a.getUserObject()[d]);g&&0<g.length?(e=new Pa,h=e.getJqUi(),h.show(),e.setEnabled(!0),h.addClass("sa-qing-publish-manager-dir-editing"),h.children().css("position","relative"),h.children().css("padding-left",30*(p.getSubNodeLevel()-1)+"px"),h.insertAfter(g),e.requestFocus(),e.addBlurListener(function(){var n=e.getText();n&&(n=n.trim(),e.getJqUi().attr("title",
n));e.getJqUi().remove();N(n)&&B("ADD_CURRENT",p,n,sa,d)}),h.on("keydown",function(n){if(13==(n.keyCode||n.which||n.charCode)){if(n=e.getText())n=n.trim(),e.getJqUi().attr("title",n);e.getJqUi().remove();N(n)&&B("ADD_CURRENT",p,n,sa,d)}})):v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)}else if(0<c.length)v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3);else{e=new Pa;var h=e.getJqUi();
h.show();e.setEnabled(!0);h.addClass("sa-qing-publish-manager-dir-editing");h.children().css("position","relative");h.appendTo(y);e.requestFocus();e.addBlurListener(function(){var n=e.getText();n&&(n=n.trim(),e.getJqUi().attr("title",n));e.getJqUi().remove();if(N(n)){var O=new Aa;B("ADD_CURRENT",O,n,sa,null)}});h.on("keydown",function(n){if(13==(n.keyCode||n.which||n.charCode)){if(n=e.getText())n=n.trim(),e.getJqUi().attr("title",n);e.getJqUi().remove();if(N(n)){var O=new Aa;B("ADD_CURRENT",O,n,sa,
null)}}})}},ra=function(p,d){var g=c.length-1;if("ADD_CURRENT"==d)return p.getParentNode()&&(d=pa(p.getParentNode(),c),g=[],g=R(g,p.getParentNode()),g=parseInt(d)+g.length-1),g;if("ADD_SUB"==d)return p.getChildren()&&0<p.getChildren().length?(d=pa(p,c),g=[],g=R(g,p),g=parseInt(d)+g.length-1):d=pa(p,c)},X=function(){var p=z(a.getSelecteds()[0],void 0);if(p){var d=ra(p,"ADD_SUB"),g=a.getItemUiByModel(a.getUserObject()[d]);if(g&&0<g.length)if(p.getSubNodeLevel()>=b-1)v.showPrompt(M.get("theMaxDirenctoryLevel",
"\u6700\u591a\u53ef\u652f\u63014\u7ea7\u76ee\u5f55\uff0c\u5f53\u524d\u76ee\u5f55\u4e3a\u7b2c4\u7ea7\u76ee\u5f55\uff0c\u65e0\u6cd5\u65b0\u589e\u4e0b\u7ea7\u76ee\u5f55\u3002"),2E3);else{e=new Pa;var h=e.getJqUi();h.show();e.setEnabled(!0);h.addClass("sa-qing-publish-manager-dir-editing");h.children().css("position","relative");h.children().css("padding-left",30*(p.getSubNodeLevel()-1)+"px");h.insertAfter(g);e.requestFocus();e.addBlurListener(function(){var n=e.getText();n&&(n=n.trim(),e.getJqUi().attr("title",
n));e.getJqUi().remove();N(n)&&B("ADD_SUB",p,n,sa,d)});h.on("keydown",function(n){if(13==(n.keyCode||n.which||n.charCode)){if(n=e.getText())n=n.trim(),e.getJqUi().attr("title",n);e.getJqUi().remove();N(n)&&B("ADD_SUB",p,n,sa,d)}})}else v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)}else v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)},pa=function(p,d){if(p){var g=d.indexOf(p);if(0>g)for(var h in d)if(d[h].getRelationId()==
p.getRelationId()&&d[h].getId()==p.getId()&&d[h].getParentId()==p.getParentId()&&d[h].getName()==p.getName()){g=h;break}return g}v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)},sa=function(p,d,g,h){if(p&&p.relationId&&p.id){var n=new Aa;n.setName(p.name);n.setId(p.id);n.setParentId(p.parentId);n.setRelationId(p.relationId);n.setIsPreset(p.isPreset);n.setCenterId1(p.levelId1);n.setCenterId2(p.levelId2);n.setCenterId3(p.levelId3);n.setCenterId4(p.levelId4);
if(null==d)c.push(n),a.setSelecteds([n]);else if("ADD_CURRENT"==h&&n.getParentId()==g.getParentId())n.setParentNode(g.getParentNode()),g.getParentNode()?(g.getParentNode().getChildren().push(n),c.splice(d+1,0,n)):c.push(n);else{n.setParentNode(g);g.getChildren().push(n);c.splice(d+1,0,n);g.setIsOpenDir(!0);for(var O in g.getChildren())g.getChildren()[O].setIsHidden(!1)}a.setItemModels(c);a.setUserObject(c);l(c)}},N=function(p,d){return p&&p!=d?50<p.length?(v.showPrompt(M.get("publishNameTooLong",
"\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"),2E3),!1):!0:!1},w=function(){var p=z(a.getSelecteds()[0],void 0);if(p){var d=a.getItemUiByModel(p);if(d&&0<d.length){e=new Pa;var g=e.getJqUi();g.show();e.setEnabled(!0);g.addClass("sa-qing-publish-menu-lists-dir-text-edit");g.css("left",14*(p.getSubNodeLevel()+1)+14+"px");var h=d.find(".sa-qing-publish-menu-lists-dir-text");h&&h.hide();g.appendTo(d);d=p.getName();p.getId()==Ea.QING_CENTER_ID&&"\u6211\u7684\u8f7b\u5206\u6790"==d&&(d=
M.get("myQingCenter",d));e.setText(d);e.requestFocus();e.addBlurListener(function(){var n=e.getText();n&&(n=n.trim(),e.getJqUi().attr("title",n));g.remove();N(n,p.getName())?x(p,n,V):h.show()});g.on("keydown",function(n){if(13==(n.keyCode||n.which||n.charCode)){if(n=e.getText())n=n.trim(),e.getJqUi().attr("title",n);g.remove();N(n,p.getName())?x(p,n,V):h.show()}})}else v.showPrompt(M.get("selectedOneDirectory","\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)}else v.showPrompt(M.get("selectedOneDirectory",
"\u8bf7\u5148\u9009\u4e2d\u5177\u4f53\u76ee\u5f55\u3002"),2E3)},V=function(p,d){if(p){var g=e.getText(),h=pa(d,c);d.setName(g);g=d.getSubNodeLevel()+1;1==g?d.setCenterId1(p):2==g?d.setCenterId2(p):3==g?d.setCenterId3(p):4==g&&d.setCenterId4(p);d.setId(p);c.splice(h,1,d);a.setItemModels(c);a.setUserObject(c);p=[];R(p,d);h=d.getId();if(1==g)for(g=1;g<p.length;g++){var n=p[g].getParentNode();n.getRelationId()==d.getRelationId()&&p[g].setParentId(h);p[g].setCenterId1(h)}else if(2==g)for(g=1;g<p.length;g++)n=
p[g].getParentNode(),n.getRelationId()==d.getRelationId()&&p[g].setParentId(h),p[g].setCenterId2(h);else if(3==g)for(g=1;g<p.length;g++)n=p[g].getParentNode(),n.getRelationId()==d.getRelationId()&&p[g].setParentId(h),p[g].setCenterId3(h)}l(c)};this.setOuterMessageCurtain=function(p){v=p};this.setManagerDir=function(p){k=p};this.setEmptyMenudHint=function(p){r=p};this.getEmptyMenudHint=function(){return r};this.setDefaultItemValue=function(p){C=p};this.getDefaultItemValue=function(){return C};this.setTreeSelectorModel=
function(p){c=p};this.getTreeSelectorModel=function(){return c};this.setAddDirNameListener=function(p){B=p};this.setDeleteDirNameListener=function(p){q=p};this.setUpdateDirNameListener=function(p){x=p};this.setLoadDirNameListener=function(p){t=p};this.setSelectedDirNameListener=function(p){m=p}};Wa.TreeItemSelector=function(){va.call(this);var e=this,k=this.protectedMethod,f,b=[],a;this.getDropDownContent=function(u){e.initTreeSelector();return f.getJqUi()};this.setSelectedTreePath=function(u){a=
u;k.updateText(a?a.getText():"")};this.getSelectedTreePath=function(){return a};this.initTreeSelector=function(){if(b){f=new Ja;f.setRootVisible(!1);f.setNodePainter(t);var u=f,v=u.setRoot,r=b,C=new Aa;C.setParentId(" ");C.setName("\u65b0\u589e\u76ee\u5f55");C.setId(" ");C=c(C);B(C,r);v.call(u,C);f.hookLoadingHandler(x);f.addSelectingListener(H);f.getRoot().setExpanded(!0);f.getRoot().setSelectable(!1);f.setLineHeight(30);Ba.layoutCtrl(f.getJqUi(),0,1,"100%",118);f.getJqUi().css("border","1px solid rgba(138, 153, 170, 0.4)");
f.getJqUi().css("background","white");f.getJqUi().appendTo($(document.body))}else return null};this.setArrFolderNode=function(u){b=u};this.getArrFolderNode=function(){return b};var c=function(u){var v=new Ja.BranchNode;v.setUserObject(u);return v},m=function(u){var v=new Ja.LeafNode;v.setUserObject(u);return v},B=function(u,v){if(v&&0<v.length)for(var r=0;r<v.length;r++){var C=v[r];0<C.getChildren().length?q(u,C):u.addChild(m(C))}},q=function(u,v){var r=0<v.getChildren().length?c(v):m(v);u.addChild(r);
u=v.getChildren();if(0!=u.length)for(v=0;v<u.length;v++)u[v].getChildren()?q(r,u[v]):r.addChild(m(u[v]))},x=function(u,v){setTimeout(function(){B(u);v()},500)},t=function(u,v){u.css("padding-left","4px");u.css("padding-right","4px");u.text(v.getUserObject().getName())},H=function(u,v){for(var r=v.getTreePath(),C=u="",W=1;W<r.length;W++){1<W&&(u+="/",C+="/");var P=r[W];u+=P.getUserObject().getName();C+=P.getUserObject().getId()}v=v.getUserObject().getRelationId();r=new Ta;r.setValue(v);r.setText(u);
a=r;k.updateText(a?a.getText():"");k.doDropdown()},y=200;this.setMaxHeight=function(u){y=u};this.getPopupHeight=function(){return null==b||0==b.length?22:Math.min(30*b.length+2,y+2)}};Wa.SchedulePushDialog=function(){ya.call(this);var e=this,k=this.protectedMethod,f=this.showDialog,b;this.setConfirmListener=function(a){b=a};this.showDialog=function(a,c){k.setTitle(M.get("pushConfirm","\u63a8\u9001\u786e\u8ba4"));e.setSize(320,200);k.setSelectable(!0);k.setContentPaneCreator(function(){var m=M.get("confirmPushImmediately",
"\u5373\u5c06\u63a8\u9001\u201c#1\u201d\u81f3#2\uff0c\u786e\u5b9a\u63a8\u9001\u5417\uff1f").replace("#1",a).replace("#2",c),B=$("<div>"),q=$("<div>");q.addClass("delete-record-text");q.text(m);q.appendTo(B);return B});k.setClosingAction(function(m){m&&b&&b()});f()}};Wa.SchedulePushingDialog=function(){ya.call(this);var e=this,k=this.protectedMethod,f=this.showDialog,b,a,c,m,B,q=ka.getIconUrl("common","htmlLoad/sway.gif");this.setTitle=function(t){B=t};this.setText=function(t){m=t;c&&c.text(m)};this.setConfirmListener=
function(t){b=t};this.setClosedListener=function(t){a=t};this.destroy=function(){k.destroy()};this.showDialog=function(){k.setTitle(B?B:M.get("pushing","\u63a8\u9001\u4e2d"));e.setSize(480,320);k.setSelectable(!0);k.setContentPaneCreator(function(){var t=$("<div>"),H=$("<img>");H.addClass("progress-background");H.prop("src",q);c=$("<div>");c.addClass("pushing-tips");c.text(m);H.appendTo(t);c.appendTo(t);return t});k.setClosingAction(function(t){t?b&&b():a&&a()});k.setFooterPaneCreator(x);f()};var x=
function(t){var H=new com.kingdee.bos.qing.ui.component.Button(M.get("tryCancelPush","\u5c1d\u8bd5\u53d6\u6d88\u63a8\u9001"));H.setHighlight(!0);Ba.layoutCtrlWithLRTB(H.getJqUi(),"50%",0,100,null,13,28);H.getJqUi().addClass("dialog-footer-close");H.getJqUi().appendTo(t);H.addActionListener(function(y){a&&a();e.destroy()})}};Wa.SortWidget=na;Wa.SortField=ja;Wa.CardDetailMessagePanel=Oa;Wa.SelectorListPublishContentPanel=function(){function e(z){KTDefaultCellRender.call(this,z);var D=this,G=this.paintCellUI;
this.paintCellUI=function(Y,ca){var fa=D.getCurrentRow(),ra=D.getCurrentColIdx();if(fa=fa.getUserObject())var X=fa.getPublishModel();(new ib).setFormatString("yyyy-MM-dd HH:mm:ss");D.getCurrentRowIdx()<Ha.getHeadRowCount()||1!=ra&&2!=ra&&3!=ra&&4!=ra&&0!=ra?G(Y,ca):1==ra?(ca=$("<div class='sa-publish-item-list-head'>"),X.isPreset()&&(ra=$("<div>"),ra.text(M.get("preset","\u9884\u7f6e")),ra.addClass("sa-qing-publish-manager-name-preset-tag"),ra.appendTo(ca)),"dashboard"==X.getPublishSourceType()?(ra=
X.isPreset(),fa=$("<div>"),ba.background(fa,"dashboard"),fa.addClass("sa-qing-publish-manager-card-list-type"),ra&&fa.css("margin-left","5px"),fa.appendTo(ca)):x||(ra=X.isPreset(),fa=$("<div>"),ba.background(fa,"squareData"),fa.addClass("sa-qing-publish-manager-card-list-type"),ra&&fa.css("margin-left","5px"),fa.appendTo(ca)),ra=$("<div class='sa-publish-item-list-head-name'>"),ra.text(X.getName()),ra.attr("title",X.getName()),ra.appendTo(ca),ca.appendTo(Y)):2==ra?(X=(X=X.getCardDesc())?X:M.get("noDescription",
"\u6682\u65e0\u63cf\u8ff0"),ca=$("<div>"),ca.text(X),ca.attr("title",X),ca.css("line-height","28px"),ca.css("padding-left","8px"),ca.css("padding-right","8px"),ca.appendTo(Y)):3==ra?(ca=$("<div>"),X=H?X.getPathText():X.isPreset()?M.get("systemPreset","\u7cfb\u7edf\u9884\u7f6e"):X.getCreatorName(),ca.text(X),ca.attr("title",X),ca.css("line-height","28px"),ca.css("padding-left","8px"),ca.css("padding-right","8px"),ca.appendTo(Y)):4==ra?(ca=$("<div>"),X=X.getCreateTime(),ca.text(X),ca.attr("title",X),
ca.css("margin-top","7px"),ca.css("padding-left","8px"),ca.css("padding-right","8px"),ca.appendTo(Y)):0==ra&&(K[fa.getPublishModel().getId()]?(fa.setSelected(!0),y=fa):fa.setSelected(!1),fa.addSelectButton(R),x&&E.addElement(fa.getSelector()),fa.getJqUi().appendTo(Y))};var R=function(Y,ca,fa){var ra=ca.isChecked(),X=Y.getPublishModel();if(fa||x)ra?(x&&(K={},y&&(u=y.getSelector(),y.getPublishModel().getId()!=X.getId()&&(y.setSelected(!1),u.setChecked(!1))),y=Y,u=ca),K[X.getId()]=X):(x&&(u=y=null),
delete K[X.getId()]),T(X,ra)}}function k(){KTableSelectionRender.call(this);var z=$("<div>");this.show=function(G,R,Y,ca,fa){Ba.layoutCtrl(z,R,Y,ca-R,fa-Y);D();z.css("z-index",0);G.append(z)};this.remove=function(){z.remove()};this.current=function(){D()};this.letOthersOld=function(G){};var D=function(G){z.addClass("sa-common-table-selection");if(G=c.getSelectionModel().getSelected()){G=G.getRowIdx();G=c.getRow(G).getUserObject().getPublishModel();var R=P(G.getImagePath());J.setProfile(G,R)}}}var f,
b,a,c,m,B,q,x=!1,t,H=!0,y,u,v,r=this,C,W,P,T,K={},Q,J,E,L;this.getJqUi=function(){if(!f){f=$("<div>");f.addClass("sa-qing-publish-manager-content-container");a=$("<div>");a.appendTo(f);b=$("<div>");b.addClass("sa-qing-publish-manager-content-emptytip");b.appendTo(f);c=Ha.createTable();var z=new Ga;z.setSyncSearchingUI(l);c.setDraggableAdjusting(!0,3,0,z);c.setColumnFitVisibleWidth(!0);z=new e(c);z.setOutsideVisible(!1);c.setCellRender(z);c.setSyncUIWhenModelChanged(!0);Ha.setupSingleRowSelection(c);
c.setSelectionRender(k);q=c.getSelectionModel();m=$(c.getUI());m.addClass("sa-qing-publish-manager-content-table");m.children().css("overflow-x","hidden");m.appendTo(f);Q=U();Q.appendTo(f);Q.hide()}return f};this.setSearchStatus=function(z){W=z};this.setCardImgUrlCreator=function(z){P=z};this.getSelectedPublishCardItem=function(){return K};this.setSelectedPublishCardItem=function(z){K=z};this.getSelectedPublishModels=function(){var z=[],D;for(D in K)z.push(K[D]);return z};this.setListSelectedModel=
function(z){};this.setSingleSelected=function(z){x=z};this.setIsDashBoardSelector=function(z){};this.relayoutViews=function(){c&&(Ha.refresh(c),c.relayoutViews());if(q&&q.hasSelected()){var z=q.getSelected();q.removeAllSelecteds();z&&q.addSelected(z);z=z.getRowIdx()-Ha.getHeadRowCount();c.scrollCellVisible(z,0,!1)}z=f.outerWidth();v?(c.setColumnFitVisibleWidth(!1),m&&m.css("width",z-269+"px")):(c.setColumnFitVisibleWidth(!0),m&&m.css("width",z+"px"));Ha.refresh(c);l()};this.setEditPublishListener=
function(z){};this.setDeletePublishListener=function(z){};this.setTipsText=function(z){B=z;b&&(b.text(B),b.show(),m.hide())};this.setSelectedChangeListener=function(z){T=z};var I=function(z){var D=f.outerWidth();(v=z)?(c.setColumnFitVisibleWidth(!1),m&&m.css("width",D-269+"px")):(c.setColumnFitVisibleWidth(!0),m&&m.css("width",D+"px"));Ha.refresh(c);l()},U=function(){var z=$("<div>"),D=$("<div>");ba.background(D,"icon-side-open");D.addClass("sa-qing-publish-manager-card-detail-message-open");D.appendTo(z);
var G=$("<div>");ba.background(G,"icon-side-close");G.addClass("sa-qing-publish-manager-card-detail-message-close");G.hide();G.appendTo(z);var R=$("<div class='sa-qing-publish-detail-message-panel'>");J=new Oa;J.setTabType(F.CARD);J.setIsCardSelector(!0);J.getJqUi().appendTo(R);R.appendTo(z);R.hide();D.on("click",function(){R.show();D.hide();G.show();I(!0)});G.on("click",function(){R.hide();D.show();G.hide();I(!1)});return z};this.setListPublishModel=function(z,D,G){t=z;H=D;L=G;q.removeAllSelecteds();
a.addClass("sa-qing-publish-no-data-tips");ba.background(a,"no-data");if(null==t||0==t.length)W?b.text(M.get("emptySearchTips","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):b.text(M.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55")),a.show(),b.show(),m.hide(),Q.hide();else{a.hide();b.hide();m.show();Q.show();Ha.clear(c);c.setScrollerVisible("auto","auto");c.addColumns(5);c.getColumn(1).setWidth(100);c.getColumn(2).setWidth(110);c.getColumn(3).setWidth(110);c.getColumn(4).setWidth(107);
c.getColumn(0).setWidth(14);z=Ha.createHeadRow(c);z.getCell(1).setValue(M.get("publishName","\u53d1\u5e03\u540d\u79f0"));z.getCell(2).setValue(M.get("description","\u63cf\u8ff0"));H?z.getCell(3).setValue(M.get("Dir","\u76ee\u5f55")):z.getCell(3).setValue(M.get("publishPerson","\u53d1\u5e03\u4eba"));z.getCell(4).setValue(M.get("publishTime","\u53d1\u5e03\u65f6\u95f4"));E=new Ua;for(z=0;z<t.length;z++)G=new aa(t[z]),G.setSingleSelected(x),x&&L&&0==z&&(K={},K[t[z].getId()]=t[z]),D=Ha.createRow(c,!1),
D.setUserObject(G),D.setHeight(30),G=new KTBorderStyle,G.setBottomBorderWidth(1),G.setBottomBorderPen("solid"),G.setBottomBorderColor("#E5E5E5"),D.setBorder(G);Ha.refresh(c);A()}};this.updateSelectorSearchContentUI=function(z){C=z;if(W){var D=f.find(".sa-publish-item-list-head"),G;for(G in t){var R=void 0,Y=D[G],ca=t[G].getName();if(Y&&ca&&z){var fa=z.toUpperCase(),ra=ca.toUpperCase(),X=ra.split(fa),pa=fa.length,sa=$("<div>");sa.addClass("sa-publish-item-list-head-name");for(R in X){var N=ra.indexOf(X[R]),
w=ca.substr(0,X[R].length);N+=X[R].length;var V=ra.length-N;ra=ra.substr(N,V);ca=ca.substr(N,V);N=$("<span>");N.text(w);N.appendTo(sa);if(R!==X.length-1&&1<X.length){V=ra.indexOf(fa);w=ca.substr(V,pa);V+=pa;var p=ra.length-V;ra=ra.substr(V,p);ca=ca.substr(V,p);V=$("<span>");V.text(w);V.css("color","#FF0000");V.appendTo(N)}$(Y).children(".sa-publish-item-list-head-name").remove()}sa.appendTo(Y);$(Y).attr("title",sa.text())}}}};var l=function(){A();r.updateSelectorSearchContentUI(C,W)},A=function(){if(q&&
q.hasSelected()){var z=q.getSelected();q.removeAllSelecteds();z&&q.addSelected(z);z=z.getRowIdx()-Ha.getHeadRowCount();c.scrollCellVisible(z,0,!1)}else z=q.createRowTarget(Ha.getHeadRowCount()),q.addSelected(z)}};Wa.FilterModelType=function(){var e,k,f,b;this.setSearchType=function(c){k=c};this.setSelectedChangedListener=function(c){f=c};this.setSelected=function(c){b.setSelected(c)};this.getJqUi=function(){e||(e=a());return e};var a=function(){b=new ua;b.setItemModels(k);b.setSelected(k[0]);b.addSelectedChangedListener(f);
b.setCustomPainter(function(B,q,x){q.text(x.getTypeName());q.attr("title",x.getTypeName())});var c=b.getJqUi(),m="en"==Qa.getUrlParamValue("language")?"107px":"77px";c.css({"float":"left",left:"15px",height:"27px",position:"relative",width:m,"margin-right":"25px",top:"6px"});return c}};Wa.PublishManagerSortPanel=function(){var e,k=[],f,b,a=function(){f=$("<div>");var c=new ja;c.setDescName(M.get("publishTime","\u53d1\u5e03\u65f6\u95f4"));c.setGroupName("SortField");c.setPropertyName("createTime");
var m=new ja;m.setDescName(M.get("publishName","\u540d\u79f0"));m.setGroupName("SortField");m.setPropertyName("name");k.push(c);k.push(m);e=new na;e.setArrSortField(k);e.setFunSortModel(b);var B=e.getSortMenuModel();c=M.get("sort","\u6392\u5e8f");m=new Ra;m.setSelectedModel(c);m.setDropdownCreator(function(q,x,t,H){x=new ha;x.setModel(B);x.setHideListener(function(){H()});x=x.getJqUi();q.append(x);return[x.prop("offsetWidth"),x.prop("offsetHeight")]});c=m.getJqUi();Ba.layoutCtrlWithLRTB(c,null,20,
53);Ba.layoutCtrlMiddleAlign(c,24);c.appendTo(f);c.css({"margin-top":"-11px",top:"19px"});return f};this.getJqUi=function(){f||(f=a());return f};this.setSortModel=function(c){b=c};this.sort=function(){e.sort()}};Wa.PublishViewSwitchPanel=function(){var e,k;this.getJqUi=function(){e||(e=f());return e};this.setClickListener=function(b){k=b};var f=function(){e=$("<div>");var b=$("<span>");b.addClass("sa-qing-publish-manager-dir-operator-right-titleBar-card2pic");ba.background(b,"card2pic");b.attr("title",
M.get("cardView","\u5361\u7247\u89c6\u56fe"));b.css("right","40px");b.appendTo(e);var a=$("<span>");a.addClass("sa-qing-publish-manager-dir-operator-right-titleBar-card2list");ba.background(a,"card2listN");a.attr("title",M.get("listView","\u5217\u8868\u89c6\u56fe"));a.css("right","-6px");a.appendTo(e);b.on("click",function(){ba.background(b,"card2pic");ba.background(a,"card2listN");k(!0)});a.on("click",function(){ba.background(b,"card2picN");ba.background(a,"card2list");k(!1)});return e}};Wa.PublishCardItem=
Ka;Wa.PublishSearchPanel=function(){var e,k,f;this.getInputContent=function(){return f.getText()};this.getJqUi=function(){if(!e){var b=$("<div>");f=new Ma;f.setPlaceholder(M.get("searchContent","\u641c\u7d22\u53d1\u5e03\u540d\u79f0"));f.setSearchListenerDelay(1E3);f.setShowSearchIcon(!0);f.addSearchListener(k);var a=f.getJqUi();a.addClass("sa-qing-publish-manager-searchBox");a.appendTo(b);e=b}return e};this.setSearchListener=function(b){k=b}};Wa.CardFilterType=Fa;var Qa,ab,db,ea,Pa,M,Na,Ba,Ja,Ha,
Xa,Ea,Aa,Ta,ya,ha,Ca,cb,hb,ua,Ma,eb,Ra,jb,ib,fb,ka,Ua;(function(){var e=com.kingdee.bos.qing;Qa=e.Seer;e=com.kingdee.bos.qing.ui.component;ab=e.Icons;db=e.List;ea=e.MessageDialog;Pa=e.TextField;Ja=e.Tree;ya=e.AbstractModalDialog;ha=e.Menu;Ca=e.MenuModel;cb=e.CheckBox;hb=e.RadioButton;ua=e.ComboBox;Ma=e.SearchBox;Ra=e.DropdownSelector;Ua=e.RadioButtonGroup;e=com.kingdee.bos.qing.framework.common;M=e.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.publish);Na=e.AbstractIcons;e=com.kingdee.bos.qing.common;
Ba=e.DomUtil;ib=e.DateFormater;e=com.kingdee.bos.qing.common.ui;Ha=e.TableUtil;jb=e.CommonIconUtil;e=com.kingdee.bos.qing.publish.model;Xa=e.PublishSourceType;fb=e.PublishTargetType;Ea=e.PublishModel;Aa=e.FolderNode;e=com.kingdee.bos.qing.publish.common;eb=e.AbstractPublishItem;e=com.kingdee.bos.qing;ka=e.CodeLoader;e=com.kingdee.bos.qing.biz.common;Ta=e.ValueTextPair})();var ba=new function(){Na.call(this);var e=this.protectedMethod;this.protectedInit=function(b,a){b=com.kingdee.bos.qing.publish.common.ComboIcon;
if(!b)throw Error("com.kingdee.bos.qing.publish.common.ComboIcon not found.");b.define(a,"icon_f7.svg");f(0,0,"icon_f7");b.define(a,"public-iconandimage");a.setGap(1);a.setStartPosition(1,51);a.setIconSize(18,18);f(0,0,"icon_select");f(0,1,"publish_manager");f(1,2,"btn_delete_on");f(0,2,"btn_delete");f(1,3,"btn_edit_on");f(0,3,"btn_edit");f(0,4,"btn_add_sub");f(1,4,"btn_add_sub_on");f(0,5,"btn_add_current");f(1,5,"btn_add_current_on");f(0,7,"icon_dir_close");f(0,8,"icon_dir_open");f(1,7,"icon_dir_close_on");
f(1,8,"icon_dir_open_on");f(0,6,"icon_lapp_setting");f(1,10,"card2list");f(0,10,"card2listN");f(1,9,"card2pic");f(0,9,"card2picN");a.setStartPosition(0,170);a.setIconSize(12,12);f(0,0,"icon_select_small");a.setStartPosition(1,1);a.setIconSize(16,16);f(0,0,"icon_search");f(0,1,"icon_search_hover");a.setStartPosition(1,111);a.setIconSize(40,38);f(0,0,"icon_preset");a.setStartPosition(115,1);a.setIconSize(16,16);f(0,0,"refresh");b.define(a,"no-data.png");a.setStartPosition(0,0);a.setGap(0);a.setIconSize(220,
220);f(0,0,"no-data");b.define(a,"icon_open_tips_background.png");a.setStartPosition(0,0);a.setGap(0);a.setIconSize(264,192);f(0,0,"icon_open_tips_background");b.define(a,"tm");a.setGap(1);a.setStartPosition(1,1);a.setIconSize(16,16);k(0,14,"extreportData");b.define(a,"icon_help.png");f(0,0,"icon_help");b.define(a,"icon_help.png");f(0,1,"icon_help_white");b.define(a,"tm-publish");a.setGap(0);a.setStartPosition(0,0);a.setIconSize(17,14);f(0,0,"icon-side-close");a.setStartPosition(33,0);a.setIconSize(17,
14);f(0,0,"icon-side-open");a.setStartPosition(55,0);a.setIconSize(16,16);f(0,0,"dataAnalysis");a.setStartPosition(77,0);a.setIconSize(16,16);f(0,0,"dashboard");a.setStartPosition(102,0);a.setIconSize(16,16);f(0,0,"squareData");a.setStartPosition(126,0);a.setIconSize(15,16);f(0,0,"del");a.setStartPosition(199,0);a.setIconSize(15,16);f(0,0,"del_on");a.setStartPosition(150,0);a.setIconSize(16,16);f(0,0,"edit");a.setStartPosition(175,0);a.setIconSize(16,16);f(0,0,"edit_on");a.setStartPosition(221,0);
a.setIconSize(16,16);f(0,0,"add");a.setStartPosition(244,0);a.setIconSize(16,16);f(0,0,"add_on");a.setStartPosition(295,0);a.setIconSize(18,18);f(0,0,"btn_delete");a.setStartPosition(269,0);a.setIconSize(18,18);f(0,0,"btn_delete_on");b.define(a,"schema-manage-sprite.png");a.setStartPosition(1,21);a.setGap(1);a.setIconSize(16,16);f(0,0,"icon_undefault");f(1,0,"icon_default");f(0,1,"icon_edit");f(1,1,"icon_edit_hover");b.define(a,"public-no-data");f(0,0,"public-no-data");b.define(a,"common");a.setStartPosition(1,
1);a.setGap(1);a.setIconSize(16,16);k(0,6,"tree-collapsed");k(0,7,"tree-expanded");b.define(a,"msg");a.setStartPosition(1,1);a.setGap(1);a.setIconSize(100,80);f(1,2,"msg-warning");f(1,1,"msg-operatorTips");f(2,0,"msg-jurisdiction")};var k=function(b,a,c){f(b,a,c+"_hover");f(b+1,a,c)},f=function(b,a,c){e.registIcon(b,a,c)}};Wa.MyIcons=ba;var $a=new function(){var e;this.getCardFilterType=function(){e||(e=[new Fa(M.get("myPublish","\u6211\u7684\u53d1\u5e03"),!1),new Fa(M.get("presetPublish","\u9884\u7f6e\u53d1\u5e03"),
!0)]);return e}};Wa.PresetSearchTypeUtil=$a;na.SORT_TYPE_DESC=1;na.SORT_TYPE_ASC=2;var F={APPMENU:1,CENTER:2,LAPP:3,CARD:4};Ka.SELECTED_STYLE_BORDER="BORDER";Ka.MUTI_SELECTED_STYLE_SELECTBTN="BUTTON";Ka.SINGLE_SELECTED_STYLE_SELECTBTN="SINGLE_BUTTON"})();(function(){function ja(e){ea.call(this,e,Ca.APPMENU);var k=this,f=this.protectedMethod,b,a,c,m,B,q,x,t={},H,y,u,v,r,C,W,P,T,K,Q,J,E=!1,L;L||(Za.setRootPath("."),Za.setCallback(function(){L=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),Za.loadJs("biz-common/qing-biz-common.js"),Za.loadSkinCss("biz-common","biz-common"),Za.loadSkinJs("biz-common","skin"),Za.loadI18n("biz-common","biz-common"));var I,U=[new fb(aa.get("allType","\u5168\u90e8\u7c7b\u578b"),3),new fb(aa.get("moduleLonger",
"\u6570\u636e\u5206\u6790"),0),new fb(aa.get("dashboard","\u4eea\u8868\u677f"),1),new fb(aa.get("qReport","\u62a5\u8868"),2)],l=3,A;this.getTitle=function(){return aa.get("appMenu","\u5e94\u7528\u83dc\u5355")};this.getJqUi=function(){if(!b){var h=$("<div>");R().appendTo(h);a=$("<div>");a.addClass("sa-qing-publish-manager");var n=$("<div>");n.css("border-right","1px solid #E5E5E5");La.layoutCtrlWithLRTB(n,5,null,222,0,0,null);A=k.getAutoSelectedData();var O=new na(a);O.setTreeItemSelectedListener(p);
O.setLoadItemListener(w);A&&O.setAutoSelectedData(A);m=O;m.getJqUi().appendTo(n);O=$("<div>");La.layoutCtrlWithLRTB(O,229,0,null,0,0,null);var Z=new M;Z.setOuterMessageCurtain(f.getOuterMessageCurtain());Z.setDeletePublishListener(g);Z.setEditPublishListener(d);Z.setTabType(1);Z.setTipsText(aa.get("appMenuClickTips","\u8bf7\u70b9\u51fb\u5de6\u4fa7\u83dc\u5355\u8fdb\u884c\u67e5\u770b"));Z.setEditPublishContentListenter(k.getPublishContentEditEntrance());Z.setLoadAppMenuContentListener(w);Z.setReSearchListener(sa);
Z.setRemoteImpl(e);c=Z;Z=c.getJqUi();I=z();I.appendTo(O);I.hide();Z.appendTo(O);n.appendTo(a);O.appendTo(a);a.appendTo(h);a.find(".sa-qing-publish-manager-content-container").css("top","32px");La.layoutCtrlWithLRTB(a,0,0,null,41,0,null);b=h}return b};this.relayoutViews=function(){c&&c.relayoutViews()};var z=function(){L.setJumpToPageListener(function(h,n,O){var Z=f.createFacade(function(ma){if(void 0===ma.infos||null===ma.infos||0===ma.infos.length)I.hide(),O?O(ma.totalRow):L.refreshPagination(),
c.setSearchStatus(!1),c.setListPublishModel(null,E);else{var Ia=ma.infos;Q=[];for(var oa=0;oa<Ia.length;oa++){var ia=new cb;ia.fromJsonObject(Ia[oa]);Q.push(ia)}I.show();O?O(ma.totalRow):L.refreshPagination();c.setSearchStatus(!0);c.setListPublishModel(Q,E);c.updateSearchContentUI(q)}},function(){return!1});Z.setShowBlocking(!0);Z.loadAllPublishInfosByPagination(E,W,P,T,K,h,n,q,u,r,C)});L.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);return L.getJqUi()},D=function(){var h=f.createFacade(function(n){if(void 0===
n.infos||null===n.infos||0===n.infos.length)I.hide(),L.resetPaginationAndJumpToFirstPage(n.totalRow),c.setSearchStatus(B),c.setListPublishModel(null,E);else{L.resetPaginationAndJumpToFirstPage(n.totalRow);n=n.infos;Q=[];for(var O=0;O<n.length;O++){var Z=new cb;Z.fromJsonObject(n[O]);Q.push(Z)}I.show();c.setSearchStatus(B);c.setListPublishModel(Q,E);c.updateSearchContentUI(q)}},function(){return!1});h.setShowBlocking(!0);h.loadAllPublishInfosByPagination(E,W,P,T,K,1,L.getPageSize(),q,u,r,C)},G=function(){var h=
f.createFacade(function(n){for(var O=0;O<x.length;O++){var Z=N(x[O]);Z&&(t[Z]=[])}for(var ma in t)n[ma]||(n[ma]=0);m.setSearchStatus(B);m.setDefaultItemValue(y);m.updateTreeSearchUI(x,n)},function(){return!1});h.setShowBlocking(!0);h.loadHitNumberOfAllPath(E,q,u)},R=function(){var h=$("<div class='sa-qing-publish-titlebar'>");J=ca(F.getCardFilterType(),Y).getJqUi();J.appendTo(h);J.hide();f.createFacade(function(n){1!=n.isCurrentUserInQingAdminRole&&1!=n.isPresetManagePermission||J.show()}).checkPresetPermission();
ca(U,fa).getJqUi().appendTo(h);H=ra();H.getJqUi().appendTo(h);v=X();v.getJqUi().appendTo(h);return h},Y=function(h,n,O){E=O.getTypeId();sa()},ca=function(h,n){var O=new ib;O.setSearchType(h);O.setSelectedChangedListener(n);return O},fa=function(h,n,O){l=O.getTypeId();3==l?u=void 0:1==l?u="dashboard":0==l?u="moduleLonger":2==l&&(u="extreport");sa()},ra=function(){var h=new ka;h.setSearchListener(sa);return h},X=function(){var h=new Na;h.setSortModel(pa);return h},pa=function(h,n){r=h.getPropertyName();
C=n==jb.SORT_TYPE_ASC?"ASC":"DESC";sa()},sa=function(){q=H.getInputContent().trim();0<q.length?(B=!0,q=q.toUpperCase(),G()):(B=!1,m.setSearchStatus(B),m.setDefaultItemValue(y),m.rollBackSearchStatus())},N=function(h){var n=h.getCloudId();h.getAppId()&&(n+=h.getAppId(),h.getAppMenuId()&&(n+=h.getAppMenuId(),h.getAppMenuId2()&&(n+=h.getAppMenuId2())));return n},w=function(){var h=f.createFacade(function(n){var O=new za;O.fromJsonObject(n);n=O.getChildren();x=[];for(O=0;O<n.length;O++)V(x,n[O]);m.setTreeNodeList(x)},
function(n,O){return 2313E3<n&&2313999>=n?(f.getOuterMessageCurtain().showPrompt(O,2E3),!0):!1});h.setShowBlocking(!0);h.getAppMenuTree()},V=function(h,n){h.push(n);if(n instanceof za&&(n=n.getChildren()))for(var O=0;O<n.length;O++)V(h,n[O])},p=function(h){W=h.getCloudId();P=h.getAppId();T=h.getAppMenuId();K=h.getAppMenuId2();null==A&&c&&c.setAutoSelectedModel(null);y=h;N(h);D()},d=function(h,n){var O=k.getPublishContext();h=ab.createPublishToEditDialog(e,O,h);h.addSuccessCallback(n);h.setOuterMessageCurtain(f.getOuterMessageCurtain());
h.setEditPublishInfo(!0);h.showDialog()},g=function(h,n){h=h.getId();var O=f.createFacade(function(Z){n();f.getOuterMessageCurtain().showSuccess(aa.get("deleteSuccessCurtain","\u5220\u9664\u6210\u529f\u3002"))},function(Z,ma){f.getOuterMessageCurtain().showPrompt(ma,2E3);return!0});O.setShowBlocking(!1);O.deletePublishInfo(Ca.APPMENU,h)}}function na(e){function k(U){KTDefaultCellRender.call(this,U);var l=this;this.paintCellUI=function(D,G){var R=l.getCell(),Y=R.getValue();R=A(Y,R);G?(D=$(G),R.appendTo(D)):
(D=$(D),R.appendTo(D))};var A=function(D,G){var R=D.getDisplayName(),Y=$("<div>");Y.addClass("sa-qing-publish-menu-item");var ca=$("<span>"),fa=hb.createWarning();La.layoutCtrl(fa,0,12);R==va.CLOUD_HAS_BEEN_DELETED?(R=aa.get("cloudHasBeenDeleted","\u8be5\u670d\u52a1\u4e91\u5df2\u88ab\u5220\u9664"),ca.css({"margin-left":"10px"}),Y.append(fa)):R==va.APP_HAS_BEEN_DELETED?(R=aa.get("appHasBeenDeleted","\u8be5\u5e94\u7528\u5df2\u88ab\u5220\u9664"),ca.css({"margin-left":"10px"}),Y.append(fa)):R==va.APP_MENU_HAS_BEEN_DELETED&&
(R=aa.get("appMenuHasBeenDeleted","\u8be5\u5e94\u7528\u83dc\u5355\u5df2\u88ab\u5220\u9664"),ca.css({"margin-left":"10px"}),Y.append(fa));Y.attr("title",R);fa.attr("title",R);ca.text(R);0<D.getSubNodeLevel()&&(Y.css("cursor","pointer"),G.getUserObject()&&Y.addClass("sa-qing-publish-menu-item-selected"),Y.on("mousedown",function(ra){J(D,Y,G)}),H&&L(H,D,Y,G),q&&I(q,D,Y,G));Y.append(ca);x&&0<D.getSubNodeLevel()&&(fa="("+t[E(D)]+")",Y.attr("title",R+" "+fa),z(ca,Y,fa,t[E(D)]));La.layoutCtrlWithLRTB(Y,
0,0,null,0,0,null);return Y},z=function(D,G,R,Y){var ca=$("<div class='sa-qing-publish-manager-App-menu-Search-Number'>");ca.text(R);ca.title=R;ca.appendTo(D);0<Y&&(Y=$("<div class='sa-qing-publish-manager-App-menu-Search-Number-with-color'>"),Y.text(R),Y.appendTo(D),ca.hide(),Y.show(),"sa-qing-publish-menu-item sa-qing-publish-menu-item-selected"==G[0].className&&(ca.show(),Y.hide()))}}var f,b,a,c,m,B,q,x=!1,t={},H,y,u=!1,v;this.setAutoSelectedData=function(U){(B=U)&&B.path&&(q=JSON.parse(B.path))};
this.setDefaultItemValue=function(U){H=U};this.setTreeItemSelectedListener=function(U){f=U};this.setLoadItemListener=function(U){m=U};this.setTreeNodeList=function(U){c=U;b&&K()};this.getJqUi=function(){if(!b){var U=$("<div>");a=r();a.text(aa.get("loading","\u52a0\u8f7d\u4e2d"));a.appendTo(U);C();b=U}return b};var r=function(){a||(a=$("<div>"),a.addClass("sa-qing-publish-manager-content-emptytip"));return a},C=function(){c||m(function(U){c=U;K()})},W,P,T=function(U){P=W=null;W=new KTable;P=$(W.getUI());
P.children().css("overflow-x","hidden");W.setCellRender(new k(W));W.setSyncUIWhenModelChanged(!1);W.addColumn().setWidth(225);var l=new KTStyle;l.setVerticalAlign("middle");W.setStyle(l);l=W;for(var A=0;A<U.length;A++){var z=U[A],D=l.addRow();D.setHeight(32);var G=D.getCell(0);G.setValue(z);var R=z.getSubNodeLevel();R=new KTCellTreeModel(R);u||(0<R.getLevel()?(R.setExpanded(!1),1<R.getLevel()&&D.setHide(!0)):R.setExpanded(!0));x&&(u=!0,R.setExpanded(!0));G.setTreeModel(R);if(H){G=H;var Y=z,ca=R,fa=
D;G.getCloudId()?G.getCloudId()==Y.getCloudId()&&(ca.setExpanded(!0),fa.setHide(!1)):G.getAppId()?G.getAppId()==Y.getAppId()&&(ca.setExpanded(!0),fa.setHide(!1)):G.getAppMenuId()?G.getAppMenuId()==Y.getAppMenuId()&&(ca.setExpanded(!0),fa.setHide(!1)):G.getAppMenuId2()&&G.getAppMenuId2()==Y.getAppMenuId2()&&(ca.setExpanded(!0),fa.setHide(!1))}q&&(G=q,G.cloudId?G.cloudId==z.getCloudId()&&(R.setExpanded(!0),D.setHide(!1),v=D):G.appId?G.appId==z.getAppId()&&(R.setExpanded(!0),D.setHide(!1),v=D):G.appMenuId?
G.appMenuId==z.getAppMenuId()&&(R.setExpanded(!0),D.setHide(!1),v=D):G.appMenuId2&&G.appMenuId2==z.getAppMenuId2()&&(R.setExpanded(!0),D.setHide(!1),v=D))}W.updateUI();return P};this.rollBackSearchStatus=function(){b.find(".sa-qing-publish-manager-App-menu-Search-Number").remove();b.find(".sa-qing-publish-manager-App-menu-Search-Number-with-color").remove();for(var U=b.find(".sa-qing-publish-menu-item"),l=0;l<U.length;l++)$(U[l]).attr("title",U[l].textContent);H&&f&&f(H)};var K=function(){if(c&&0<
c.length)b.empty(),T(c).appendTo(b);else{e.empty();e.css({"margin-top":"32px"});a=r();a.text(aa.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55"));a.appendTo(e);var U=$("<div>");Ba.background(U,"no-data");U.addClass("sa-qing-publish-no-data-tips");U.appendTo(e)}};this.setSearchStatus=function(U){x=U};this.updateTreeSearchUI=function(U,l){t=l;b.empty();U&&0<U.length?T(U).appendTo(b):(a=r(),a.text(aa.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55")),a.appendTo(b))};var Q,J=function(U,
l,A){if(Q!=A){b.find(".sa-qing-publish-menu-item-selected").removeClass("sa-qing-publish-menu-item-selected");l.addClass("sa-qing-publish-menu-item-selected");if(x){if(y){var z=y.find(".sa-qing-publish-manager-App-menu-Search-Number");0<parseInt(z.text().substring(1,z.text().length-1))&&(y.find(".sa-qing-publish-manager-App-menu-Search-Number").hide(),y.find(".sa-qing-publish-manager-App-menu-Search-Number-with-color").show())}l.find(".sa-qing-publish-manager-App-menu-Search-Number").show();l.find(".sa-qing-publish-manager-App-menu-Search-Number-with-color").hide()}Q&&
Q.setUserObject(!1);A.setUserObject(!0);Q=A;H=U;y=l;f&&f(U)}};this.scrollSelectedToVisible=function(){v&&W.scrollCellVisible(W.getRowIndex(v),0,!1)};var E=function(U){var l=U.getCloudId();U.getAppId()&&(l+=U.getAppId(),U.getAppMenuId()&&(l+=U.getAppMenuId(),U.getAppMenuId2()&&(l+=U.getAppMenuId2())));return l},L=function(U,l,A,z){U.getAppMenuId2()?U.getAppMenuId2()==l.getAppMenuId2()&&J(l,A,z):U.getAppMenuId()?U.getAppMenuId()!=l.getAppMenuId()||l.getAppMenuId2()||J(l,A,z):U.getAppId()&&(U.getAppId()!=
l.getAppId()||l.getAppMenuId()||J(l,A,z))},I=function(U,l,A,z){U.appMenuId2?U.appMenuId2==l.getAppMenuId2()&&J(l,A,z):U.appMenuId?U.appMenuId!=l.getAppMenuId()||l.getAppMenuId2()||J(l,A,z):U.appId&&(U.appId!=l.getAppId()||l.getAppMenuId()||J(l,A,z))}}function va(){var e,k,f,b,a,c,m,B;this.setIsShow=function(q){B=q};this.getIsShow=function(){return B};this.setCloudId=function(q){e=q};this.getCloudId=function(){return e};this.setAppId=function(q){k=q};this.getAppId=function(){return k};this.setAppMenuId=
function(q){f=q};this.getAppMenuId=function(){return f};this.setAppMenuId2=function(q){c=q};this.getAppMenuId2=function(){return c};this.setDisplayName=function(q){b=q};this.getDisplayName=function(){return b};this.setParentNode=function(q){a=q};this.getParentNode=function(){return a};this.setPublishModels=function(q){m=q};this.getPublishModels=function(){return m};this.getSubNodeLevel=function(){for(var q=-1,x=a;x;)q++,x=x.getParentNode();return q}}function za(){va.call(this);var e=this,k=[];this.setChildren=
function(f){k=f};this.getChildren=function(){return k};this.toJsonObject=function(){var f={};f.children=k;return f};this.fromJsonObject=function(f){e.setDisplayName(f.displayName);e.setCloudId(f.cloudId);f.appId&&e.setAppId(f.appId);f.appMenuId&&e.setAppMenuId(f.appMenuId);f.appMenuId2&&e.setAppMenuId2(f.appMenuId2);if(f=f.children)for(var b=0;b<f.length;b++){var a=f[b];if(a.type){var c=new Fa;c.fromJsonObject(a);c.setParentNode(e);k.push(c)}else c=new za,c.fromJsonObject(a),c.setParentNode(e),k.push(c)}}}
function Fa(){va.call(this);var e=this,k;this.setType=function(f){k=f};this.getType=function(){return k};this.fromJsonObject=function(f){e.setType(f.type);e.setDisplayName(f.displayName);e.setCloudId(f.cloudId);f.appId&&e.setAppId(f.appId);f.appMenuId&&e.setAppMenuId(f.appMenuId);f.appMenuId2&&e.setAppMenuId2(f.appMenuId2)}}function Ga(){Qa.call(this);var e=this,k,f;this.protectedClickEvent=function(){b()};this.setSelectedValue=function(a){k=a;e.updateUI()};this.getSelectedValue=function(){return k};
this.getDisplayText=function(){var a=aa.get("selectPublishPath","\u8bf7\u9009\u62e9\u53d1\u5e03\u8def\u5f84");k&&(a=k.getText(),a=a.replace(va.CLOUD_HAS_BEEN_DELETED,aa.get("cloudHasBeenDeleted","\u8be5\u670d\u52a1\u4e91\u5df2\u88ab\u5220\u9664")),a=a.replace(va.APP_HAS_BEEN_DELETED,aa.get("appHasBeenDeleted","\u8be5\u5e94\u7528\u5df2\u88ab\u5220\u9664")),a=a.replace(va.APP_MENU_HAS_BEEN_DELETED,aa.get("appMenuHasBeenDeleted","\u8be5\u5e94\u7528\u83dc\u5355\u5df2\u88ab\u5220\u9664")));return a};var b=
function(){var a=ua;a.setCallBack(function(c){if(c&&c.content){var m=c.content;f=m.cloudName+"/"+m.appName+"/";m.appMenuId&&(f+=m.appMenuName+"/");m.appMenuId2&&(f+=m.appMenuName2+"/");f&&f.endsWith("/")&&(f=f.substring(0,f.length-1));c=new ha;var B=c.setValue,q={};q.cloudId=m.cloudId;q.cloudNumber=m.cloudNumber;q.appId=m.appId;q.appNumber=m.appNumber;m.appMenuId&&(q.appMenuId=m.appMenuId,q.appMenuNumber=m.appMenuNumber);m.appMenuId2&&(q.appMenuId2=m.appMenuId2,q.appMenuNumber2=m.appMenuNumber2);
m=JSON.stringify(q);B.call(c,m);c.setText(f);k=c;e.updateUI()}});a.openAppMenuForm()}}"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.publish&&(com.kingdee.bos.qing.publish={});"undefined"==typeof com.kingdee.bos.qing.publish.env&&(com.kingdee.bos.qing.publish.env={});var Oa=com.kingdee.bos.qing.publish.env;
Oa.PublishAppMenuFolderNode=za;Oa.PublishAppMenuLeafNode=Fa;Oa.AbstractPublishAppMenuNode=va;var La,Ka,Za,aa,Wa,Qa,ab,db,ea,Pa,M,Na,Ba,Ja,Ha,Xa,Ea,Aa,Ta,ya,ha,Ca,cb,hb,ua,Ma,eb,Ra,jb,ib,fb,ka,Ua,ba,$a,F;(function(){var e=com.kingdee.bos.qing.common;La=e.DomUtil;Ka=e.Util;e=com.kingdee.bos.qing;Za=e.CodeLoader;e=com.kingdee.bos.qing.common.ui;hb=e.CommonIconUtil;e=com.kingdee.bos.qing.framework.common;aa=e.MultilanguageManager.createPackageAccessor(com.kingdee.bos.qing.publish);e=com.kingdee.bos.qing.publish.common;
Wa=e.PublishFacade;ab=e.PublishFactory;db=e.AbstractPublishToPanel;ea=e.AbstractPublishManagerPanel;Pa=e.SinglePublishManagerDialog;M=e.ListPublishContentPanel;Ba=e.MyIcons;jb=e.SortWidget;Na=e.PublishManagerSortPanel;ib=e.FilterModelType;ka=e.PublishSearchPanel;fb=e.CardFilterType;Aa=e.AnalysisSchemeDialogSelector;Ta=e.DisplayPublishedRecordName;$a=e.PublishAdvancePanelFactory;ba=e.PublishAdvanceViewType;F=e.PresetSearchTypeUtil;e=com.kingdee.bos.qing.integration;ua=e.OpenAppMenuForm;e=com.kingdee.bos.qing.publish.model;
Ca=e.PublishTargetType;cb=e.PublishModel;Ua=e.PublishSourceType;Ja=e.OperType;e=com.kingdee.bos.qing.ui.component;Ma=e.Label;eb=e.TextField;Ra=e.SwitchButton;ya=e.List;e=com.kingdee.bos.qing.schemamanage.model;Ea=e.SchemaAttrModel;e=com.kingdee.bos.qing.biz.common;Qa=e.AbstractDialogSelector;Ha=e.RoleDialogSelector;Xa=e.UserDialogSelector;ha=e.ValueTextPair})();Za.setRootPath(".");Za.loadJs("biz-common/qing-biz-common.js");Za.loadSkinCss("biz-common","biz-common");Za.loadSkinJs("biz-common","skin");
Za.loadI18n("biz-common","biz-common");ab.addPublishFacade(Ca.APPMENU,function(e,k,f,b){Wa.call(this,e,k,f,b);var a=this.protectedMethod;this.getAppMenuTree=function(){a.remote("getAppMenuTree",{publishTargetType:Ca.APPMENU})};this.loadPublishInfos=function(c,m,B,q){a.remote("loadPublishInfos",{publishTargetType:Ca.APPMENU,cloudId:c,appId:m,appMenuId:B,appMenuId2:q})};this.loadAllPublishInfos=function(c){a.remote("loadAllPublishInfos",{publishTargetType:Ca.APPMENU,isPresetPublish:c})};this.loadAllPublishInfosByPagination=
function(c,m,B,q,x,t,H,y,u,v,r){a.remote("loadAllPublishInfosByPagination",{publishTargetType:Ca.APPMENU,isPresetPublish:c,cloudId:m,appId:B,appMenuId:q,appMenuId2:x,targetPage:t,pageSize:H,searchText:y,currentType:u,sortField:v,sortOrder:r})};this.loadHitNumberOfAllPath=function(c,m,B){a.remote("loadHitNumberOfAllPath",{publishTargetType:Ca.APPMENU,isPresetPublish:c,searchText:m,currentType:B})};this.checkPresetPermission=function(){a.remote("checkPresetPermission",{publishTargetType:Ca.APPMENU})}});
ab.addPublishToPanel(Ca.APPMENU,function(e,k){db.call(this,e,k);var f=this,b=this.protectedMethod,a,c,m,B,q,x=!1,t,H,y,u,v,r,C=new ya,W,P;this.getHeight=function(l){var A=null==a?c.getCurrentSourceType()==Ua.DASHBOARD||c.getCurrentSourceType()==Ua.EXTREPORT:a.getPublishSourceType()==Ua.DASHBOARD||a.getPublishSourceType()==Ua.EXTREPORT;return A?l?320:340:l?360:380};this.setPublishModel=function(l){a=l.copy()};this.isEditPublish=function(){return null!=a};this.setPublishContext=function(l){c=l};this.getPublishContext=
function(){return c};var T=function(){var l=45;f.isEditPublish()&&(l=0);m=$("<div>");B=$("<div>");B.addClass("publish-manage-left");var A=new Ma;A.setRequired(!0);A.setText(aa.get("publishName","\u53d1\u5e03\u540d\u79f0"));var z=A.getJqUi();t=new eb;var D=$("<div>");t.addEditedListener(function(N){clearTimeout(W);W=setTimeout(function(){var w=t.getText();if(""!=w){var V=new Ta(k,e);null!=a?V.setPublishModel(a):V.setPublishContext(c);V.getPublishedRecordNameByInputText(w,k,function(p){D.empty();p=
p[t.getText()];if(null!=p){C.setCustomItemPainter(function(n,O){n.on("mousedown",function(Z){t.setText(O);D.remove();Z.stopPropagation()});n.text(O);n.attr("title",O)});C.setItemModels(p);C.setSelecteds([p[0]]);p=C.getJqUi();var d=G.width(),g=G.css("left"),h=G.position().top+G.height();La.layoutCtrl(D,g,h,d,122);D.css("z-index","9999");p.css({width:d+"px",height:"122px"});p.find(".sa-ctrl-list-owner").css("height","100px");d=$("<div>");d.addClass("history-publish-name");d.text(aa.get("HistoryPublishName",
"\u5386\u53f2\u53d1\u5e03\u540d\u79f0"));d.css({right:"13px",top:"100px"});p.appendTo(D);d.appendTo(D);D.appendTo(B)}else D.remove()})}else D.remove()},1E3)});t.addBlurListener(function(){D.remove()});var G=t.getJqUi();A=0;La.layoutCtrl(z,8,A,64,23);null==a?La.layoutCtrl(G,75+l,A,250,23):La.layoutCtrl(G,111+l,A,215,23);z.appendTo(B);G.appendTo(B);z=new Ma;var R=z.getJqUi();z.setRequired(!0);z.setText(aa.get("publishPath","\u53d1\u5e03\u8def\u5f84"));H=new Ga;var Y=H.getJqUi();A+=43;La.layoutCtrl(R,
8,A,64,23);null==a?La.layoutCtrl(Y,75+l,A,250,23):La.layoutCtrl(Y,111+l,A,215,23);R.appendTo(B);Y.appendTo(B);if(null==a){var ca=E();La.layoutCtrl(Y,75+l,A,220,23);La.layoutCtrl(ca,305+l,A+3,20,23);ca.appendTo(B)}z=new Ma;R=z.getJqUi();z.setText(aa.get("permission","\u6388\u6743"));y=new Ha;var fa=y.getJqUi();u=new Xa;var ra=u.getJqUi();A+=43;La.layoutCtrl(R,8,A,64,23);null==a?(La.layoutCtrl(fa,75+l,A,250,23),La.layoutCtrl(ra,75+l,A+44,250,23)):(La.layoutCtrl(fa,111+l,A,215,23),La.layoutCtrl(ra,111+
l,A+44,215,23));R.appendTo(B);fa.appendTo(B);ra.appendTo(B);var X=null==a?c.supportPublishMoreSchemaScene(k):!("dashboard"==a.getPublishSourceType()||"extreport"==a.getPublishSourceType());if(X){z=new Ma;R=z.getJqUi();z.setText(aa.get("analysisScheme","\u540c\u65f6\u9009\u62e9\u66f4\u591a\u65b9\u6848"));R.attr("title",aa.get("analysisScheme","\u540c\u65f6\u9009\u62e9\u66f4\u591a\u65b9\u6848"));r=new Aa(e,k);r.setPublishContext(c);r.setPublishModel(a);r.setSuccessCallBack(function(N){for(var w=[],
V=0;V<N.length;V++){var p=new Ea;p.fromJsonObject(N[V]);w.push(p)}a.setSchemaAttrSelected(w);L()});null!=a&&r.getAllSchemaAttrByFid();var pa=r.getJqUi();A+=43;R.appendTo(B);pa.appendTo(B);La.layoutCtrl(R,8,A+44,100,23);null==a?La.layoutCtrl(pa,75+l,A+44,250,23):La.layoutCtrl(pa,111+l,A+44,215,23)}A+=87;null==a&&c.supportPublishWithCarryData()&&(R=new Ma,z=R.getJqUi(),R.setText(aa.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),z.attr("title",aa.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),
v=new Ra,c.getHasDirectModeTable()?(v.setOn(!1),v.setEnabled(!1)):c.isHaveToCarryData()?(v.setOn(!0),v.setEnabled(!1)):v.setOn(!1),R=v.getJqUi(),La.layoutCtrl(z,8,A-2,100,23),La.layoutCtrl(R,75+l,A,31,19),z.appendTo(B),R.appendTo(B),A+=31);B.appendTo(m);z=function(N,w){null==a?(La.layoutCtrl(G,75+l,w,N,23),w+=43,La.layoutCtrl(Y,75+l,w,N,23)):(La.layoutCtrl(G,111+l,w,N,23),w+=43,La.layoutCtrl(Y,111+l,w,N,23));null==a&&(La.layoutCtrl(Y,75+l,w,N-30,23),La.layoutCtrl(ca,N+55+l,w+3,20,23));w+=43;null==
a?(La.layoutCtrl(fa,75+l,w,N,23),La.layoutCtrl(ra,75+l,w+44,N,23),w+=87,X&&La.layoutCtrl(pa,75+l,w,N,23)):(La.layoutCtrl(fa,111+l,w,N,23),La.layoutCtrl(ra,111+l,w+44,N,23),w+=87,X&&La.layoutCtrl(pa,111+l,w,N,23));null==a&&c.supportPublishWithCarryData()&&(w+=31);X?q&&q.css({top:w+44+"px"}):q&&q.css({top:w+"px"})};R=ba.LONGER_VIEW;if(J())R=ba.DSB_VIEW;else{var sa=a?a.getPublishSourceType()==Ua.EXTREPORT:c.getCurrentSourceType()==Ua.EXTREPORT;sa&&(R=ba.QING_RPT_VIEW)}P||(P=$a.createPublishAdvancePanel(R,
c,a),P.setRefreshWidth(z),P.setInitSuccessCallBackHandler(K),P.setOuterMessageCurtain(b.getOuterMessageCurtain()),P.setPublishTargetType(k),P.setRemoteImpl(e),P.loadPublishOperModel());q=$("<div>");q.addClass("sa-qing-publish-advance-set-btn");q.text(aa.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" >>");q.css({top:A+"px",right:f.isEditPublish()?"0px":"10px"});q.appendTo(B);!r&&L()},K=function(l,A){l.appendTo(m);L();a&&a.getNoOperValueMap()&&0!=(a.getNoOperValueMap()[Ja.LONGER]|a.getNoOperValueMap()[Ja.SQUARE]|
a.getNoOperValueMap()[Ja.SQUARE_LONGER]|a.getNoOperValueMap()[Ja.QING_RPT])&&(x=!0,Q(l,x,A));q.on("click",function(){x=!x;Q(l,x,A)})},Q=function(l,A,z){var D=$(document.body),G=D.prop("clientWidth");D=D.prop("clientHeight");P.showOrHide(l,A);l=f.getFunResize();var R=J();A?(z&&null==a?(z(195,0),q&&q.css({right:"60px"})):(z(175,0),q&&q.css({right:"38px"})),B.css({width:"50%"}),q.text(aa.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" <<"),A=330+f.getWidth(f.isEditPublish()),f.isEditPublish()||(A+=
50),z=R?120:0,l&&l((G-A)/2,parseInt((D-f.getHeight(f.isEditPublish()))/2),A,f.getHeight(f.isEditPublish())+z)):(z&&z(f.isEditPublish()?215:250,0),B.css({width:"100%"}),q.css({right:f.isEditPublish()?"0px":"10px"}),q.text(aa.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" >>"),A=f.getWidth(f.isEditPublish()),l&&l((G-A)/2,parseInt((D-f.getHeight(f.isEditPublish()))/2),A,f.getHeight(f.isEditPublish())))},J=function(){return a?a.getPublishSourceType()==Ua.DASHBOARD:c.getCurrentSourceType()==Ua.DASHBOARD};
this.getJqUi=function(){m||T();return m};var E=function(){var l=$("<span>");l.attr("title",aa.get("publishManage","\u53d1\u5e03\u7ba1\u7406"));Ba.background(l,"publish_manager");l.on("click",function(){var A=new ja(f.getRemoteImpl());A.setPublishContext(c);A.setPublishContentEditEntrance(f.getPublishContentEditEntrance());(new Pa(A)).showDialog()});return l},L=function(){if(a){t.setText(a.getName());var l=new ha;l.setValue(a.getPath());l.setText(a.getPathText());H.setSelectedValue(l);y.setSelectedValue(a.getRoles());
u.setSelectedValue(a.getUsers());r&&r.setSelectedValue(a.getSchemaAttrSelected())}};this.getModelFromUI=function(){new cb;if(null==a){var l=new cb;l.setPublishSourceType(c.getCurrentSourceType());l.setPublishTargetType(f.getPublishTargetType());l.setTagId(c.getBizTag());l.setLastBiztag(c.getDashBoardAnalysis()?c.getSchemaTag():c.getBizTag());l.setSchemeId("currentAnalysisState")}else l=a,l.setSchemeId(a.getSchemeId());l.setName($.trim(t.getText()));var A=H.getSelectedValue();l.setPath(A.getValue());
l.setPathText(A.getText());l.setAnalysis(!0);y&&l.setRoles(y.getSelectedValue());u&&l.setUsers(u.getSelectedValue());v&&(A=v.isOn(),l.setCarryData(A));P&&(l.setCarryUsers(P.getCarryDataUsers()),l.setNoOperValueMap(P.getNoOperValueMap()));return l};this.getJsonModel=function(){return c.getCurrentContentModel()};this.getAnalysisSchemaArray=function(){return c.getChoiceAnalysisSchema()};this.checkUIInput=function(l,A,z){var D=t.getText();if(null==D||0==$.trim(D).length)return aa.get("publishNameNotEmptyTip",
"\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0\u3002");if(50<D.length)return aa.get("publishNameTooLongTip","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(H.getSelectedValue())A&&a&&(a.getPublishSourceType()==Ua.SUBJECT||a.getPublishSourceType()==Ua.BILL)?I(z,l):l(!0);else return aa.get("publishPathNotEmptyTip","\u8bf7\u8f93\u5165\u53d1\u5e03\u8def\u5f84\u3002")};var I=function(l,A){ab.createPublishFacade(k,e,function(z){1==z?l(aa.get("publishNotExist","\u60a8\u5728\u5176\u4ed6\u9875\u9762\u5220\u9664\u4e86\u8be5\u53d1\u5e03\u8bb0\u5f55\u3002")):
(z=a&&a.getSchemaModelSelected())&&0<z.length?U(z,l,A):A(!0)}).checkPublishInfoIsExist(a.getId())},U=function(l,A,z){for(var D=ab.createPublishFacade(k,e,function(Y){1==Y?A(aa.get("deleteAllSchemaTip","\u60a8\u5728\u591a\u4e2a\u9875\u9762\u7f16\u8f91\u8be5\u53d1\u5e03\u8bb0\u5f55\u65f6\uff0c\u5220\u9664\u4e86\u6240\u6709\u7684\u5206\u6790\u65b9\u6848\uff0c\u8bf7\u91cd\u65b0\u6dfb\u52a0\u3002")):z(!0)}),G=[],R=0;R<l.length;R++)G.push(l[R].toJsonObject());D.checkBeforeEditAndPublishInfo(a.getId(),a.getPublishSourceType(),
G)}});ab.addPublishManagePanel(Ca.APPMENU,ja);va.CLOUD_HAS_BEEN_DELETED="CLOUD_HAS_BEEN_DELETED";va.APP_HAS_BEEN_DELETED="APP_HAS_BEEN_DELETED";va.APP_MENU_HAS_BEEN_DELETED="APP_MENU_HAS_BEEN_DELETED";Oa.CardSelectMessager=new function(){var e=Ka.decodeParamFromUrl(location.search,"pageId"),k=Ka.decodeParamFromUrl(location.search,"clientID");this.sendSelectCardId=function(f,b){f={cardId:f,cardName:b};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(e,"",[k,"sendCardInfo",JSON.stringify(f)])};
this.sendCancelCardId=function(f){f={cardId:f};top.window.invokeCustomEvent&&top.window.invokeCustomEvent(e,"",[k,"cancelSendCardInfo",JSON.stringify(f)])}}})();(function(){function ja(ka){Qa.call(this,ka,za.CENTER);var Ua=this,ba=this.protectedMethod,$a,F,e,k,f,b=[],a=[],c=[],m,B,q,x,t,H,y,u,v,r,C,W,P,T;T||(na.setRootPath("."),na.setCallback(function(){T=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),na.loadJs("biz-common/qing-biz-common.js"),na.loadSkinCss("biz-common","biz-common"),na.loadSkinJs("biz-common","skin"),na.loadI18n("biz-common","biz-common"));var K,Q=[new Ha(Ca.get("allType","\u5168\u90e8\u7c7b\u578b"),3),new Ha(Ca.get("moduleLonger",
"\u6570\u636e\u5206\u6790"),0),new Ha(Ca.get("dashboard","\u4eea\u8868\u677f"),1),new Ha(Ca.get("qReport","\u62a5\u8868"),2)],J=3;this.getTitle=function(){return Ca.get("qingAnalysisCenter","\u6570\u636e\u5de5\u4f5c\u53f0\u9605\u89c8\u5939")};this.getJqUi=function(){$a||($a=E());return $a};this.relayoutViews=function(){k&&k.resize();e&&e.relayoutViews()};var E=function(){var d=$("<div>");$a=d;l().appendTo(d);var g=$("<div>");g.addClass("sa-qing-publish-manager");Y(g);var h=$("<div>");B=Ua.getAutoSelectedData();
F=ca();F.getJqUi().appendTo(h);k.setFirstChild(Ka.createChildWrapper(h),function(){F&&F.getJqUi().css({width:k.getNonemptyFirstWide()+"px"});e&&e.relayoutViews()});var n=$("<div>");ha.layoutCtrlWithLRTB(n,0,10,"100%",0,0,null);e=fa();h=e.getJqUi();K=L();K.appendTo(n);h.appendTo(n);k.setSecondChild(Ka.createChildWrapper(n),function(){var O=$a.outerWidth();n&&n.getJqUi().css({width:O-k.getNonemptyFirstWide()+"px"});e&&e.relayoutViews()});g.find(".sa-qing-publish-manager-content-container").css("left",
"-4px");g.find(".sa-qing-publish-manager-content-container").css("top","32px");g.appendTo(d);ha.layoutCtrlWithLRTB(g,0,0,null,40,0,null);return d},L=function(){T.setJumpToPageListener(function(d,g,h){var n=ba.createFacade(function(O){if(void 0===O.infos||null===O.infos||0===O.infos.length)K.hide(),h?h(O.totalRow):T.refreshPagination(),e.setSearchStatus(!1),e.setListPublishModel(null,y.getIsPreset());else{var Z=O.infos;q=[];for(var ma=0;ma<Z.length;ma++){var Ia=new Ga;Ia.fromJsonObject(Z[ma]);q.push(Ia)}K.show();
h?h(O.totalRow):T.refreshPagination();e.setSearchStatus(!0);e.setListPublishModel(q,y.getIsPreset());e.updateSearchContentUI(t)}},function(){return!1});n.setShowBlocking(!0);n.loadAllPublishInfosByPagination(y.getIsPreset(),W,d,g,t,u,r,C)});T.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);return T.getJqUi()},I=function(){var d=ba.createFacade(function(g){if(void 0===g.infos||null===g.infos||0===g.infos.length)T.resetPaginationAndJumpToFirstPage(g.totalRow),K.hide(),e.setSearchStatus(x),
e.setListPublishModel(null,y.getIsPreset());else{K.show();T.resetPaginationAndJumpToFirstPage(g.totalRow);g=g.infos;q=[];for(var h=0;h<g.length;h++){var n=new Ga;n.fromJsonObject(g[h]);q.push(n)}e.setSearchStatus(x);e.setListPublishModel(q,y.getIsPreset());e.updateSearchContentUI(t)}},function(){return!1});d.setShowBlocking(!0);d.loadAllPublishInfosByPagination(y.getIsPreset(),W,1,T.getPageSize(),t,u,r,C)},U=function(){var d=ba.createFacade(function(g){f.forEach(function(h){h=h.getRelationId();g[h]||
(g[h]=0)});F.setSearchStatus(x);F.updateTreeSearchUI(f,g)},function(){return!1});d.setShowBlocking(!0);d.loadHitNumberOfAllPath(P,t,u)},l=function(){var d=$("<div class='sa-qing-publish-titlebar'>");m=D(fb.getCardFilterType(),z).getJqUi();m.appendTo(d);m.hide();D(Q,A).getJqUi().appendTo(d);var g=new Ba;g.setSearchListener(R);H=g;H.getJqUi().appendTo(d);g=new Na;g.setSortModel(G);v=g;v.getJqUi().appendTo(d);return d},A=function(d,g,h){J=h.getTypeId();switch(J){case 3:u=void 0;break;case 1:u="dashboard";
break;case 0:u="moduleLonger";break;case 2:u="extreport"}R()},z=function(d,g,h){P=d=h.getTypeId();g=F.getDefaultItemValue();d?(c[0]=g,F.setDefaultItemValue(c[1]),f=b):(c[1]=g,F.setDefaultItemValue(c[0]),f=a);R()},D=function(d,g){var h=new Ja;h.setSearchType(d);h.setSelectedChangedListener(g);return h},G=function(d,g){r=d.getPropertyName();C=g==ib.SORT_TYPE_ASC?"ASC":"DESC";R()},R=function(){t=H.getInputContent().trim();0<t.length?(x=!0,t=t.toUpperCase(),U()):(x=!1,F.setSearchStatus(x),F.setTreeSelectorModel(f),
F.initDirOperatorUi())},Y=function(d){k=new Ka;k.setHorizontalSplit(!0);k.setEnabled(!0);k.setSplitLineWide(10);k.setResizeMode(Ka.RESIZE_MODE_FIRST_FIXED);k.setFirstSize(180,180,278);k.setSecondSize(620,0,-1);k.getJqUi().addClass("sa-qing-publish-manager");d.append(k.getJqUi())},ca=function(){var d=new Pa;d.setOuterMessageCurtain(ba.getOuterMessageCurtain());d.setDefaultItemValue(B&&B.path?B.path:Ga.QING_CENTER_ID);d.setAutoSelectedData(B);d.setUpdateDirNameListener(V);d.setAddDirNameListener(w);
d.setDeleteDirNameListener(p);d.setLoadDirNameListener(sa);d.setSelectedDirNameListener(ra);d.setTreeSelectorModel(f);return d},fa=function(){var d=new db;d.setOuterMessageCurtain(ba.getOuterMessageCurtain());d.setDeletePublishListener(pa);d.setEditPublishListener(X);d.setTabType(2);d.setEditPublishContentListenter(Ua.getPublishContentEditEntrance());d.setReSearchListener(R);d.setRemoteImpl(ka);return d},ra=function(d,g){W=d;y=g;null==B&&e&&e.setAutoSelectedModel(null);I()},X=function(d,g){var h=
Ua.getPublishContext();d=Za.createPublishToEditDialog(ka,h,d);d.addSuccessCallback(g);d.setOuterMessageCurtain(ba.getOuterMessageCurtain());d.setEditPublishInfo(!0);d.showDialog()},pa=function(d,g){d=d.getId();var h=ba.createFacade(function(n){g();ba.getOuterMessageCurtain().showSuccess(Ca.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(n,O){ba.getOuterMessageCurtain().showPrompt(O,2E3);return!0});h.setShowBlocking(!1);h.deletePublishInfo(za.CENTER,d)},sa=function(d){if(f)d(f);else{var g=
ba.createFacade(function(h){for(var n=[],O=0;O<h.length;O++){var Z=new ea;Z.fromJsonObject(h[O]);n.push(Z)}h=[];for(O=0;O<n.length;O++)N(h,n[O]);f=h;for(n=0;n<f.length;n++)f[n].getIsPreset()?b.push(f[n]):a.push(f[n]);0<b.length&&m.show();f=a;d(f)},function(h,n){ba.getOuterMessageCurtain().showPrompt(n,2E3);return!0});g.setShowBlocking(!0);g.loadCenterGroup()}},N=function(d,g){-1==d.indexOf(g)&&d.push(g);if(g=g.getChildren())for(var h=0;h<g.length;h++)g[h]instanceof ea?N(d,g[h]):-1==d.indexOf(g[h])&&
d.push(g[h])},w=function(d,g,h,n,O){var Z=g.getCenterId1(),ma=g.getCenterId2(),Ia=g.getCenterId3(),oa=g.getCenterId4();ba.createFacade(function(ia){n(ia,O,g,d);R()},function(ia,la){2311402==ia?ba.getOuterMessageCurtain().showPrompt(Ca.get("duplicateName","\u76ee\u5f55\u540d\u79f0\u91cd\u590d\u3002"),2E3):ba.getOuterMessageCurtain().showPrompt(la,2E3);n();return!0}).saveCenterGroup(d,Z,ma,Ia,oa,h)},V=function(d,g,h){var n=d.getSubNodeLevel()+1,O=d.getCenterId1(),Z=d.getCenterId2(),ma=d.getCenterId3(),
Ia=d.getCenterId4();ba.createFacade(function(oa){h(oa,d)},function(oa,ia){2311402==oa?ba.getOuterMessageCurtain().showPrompt(Ca.get("duplicateName","\u76ee\u5f55\u540d\u79f0\u91cd\u590d\u3002"),2E3):ba.getOuterMessageCurtain().showPrompt(ia,2E3);h();return!0}).updateCenterGroup(n,O,Z,ma,Ia,g)},p=function(d,g){ba.createFacade(function(h){g(h);ba.getOuterMessageCurtain().showSuccess(Ca.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(h,n){2311401==h?ba.getOuterMessageCurtain().showPrompt(Ca.get("deleteNotEmpty",
"\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u53d1\u5e03\u8bb0\u5f55\u3002"),2E3):ba.getOuterMessageCurtain().showPrompt(n,2E3);return!0}).deleteCenterGroup(d)};this.setTreeSelectorModel=function(d){for(var g=0;g<d.length;g++)d[g].getIsPreset()?b.push(d[g]):a.push(d[g]);f=a};this.getTreeSelectorModel=function(){return b.concat(a)}}"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.publish&&(com.kingdee.bos.qing.publish={});var na,va=com.kingdee.bos.qing.publish,za,Fa,Ga,Oa,La,Ka,Za,aa,Wa,Qa,ab,db,ea,Pa,M,Na,Ba,Ja,Ha,Xa,Ea,Aa,Ta,ya,ha,Ca,cb,hb,ua,Ma,eb,Ra,jb,ib,fb;(function(){var ka=com.kingdee.bos.qing;na=ka.CodeLoader;ka=com.kingdee.bos.qing.common;ha=ka.DomUtil;ka=com.kingdee.bos.qing.framework.common;Ca=ka.MultilanguageManager.createPackageAccessor(va);ka=com.kingdee.bos.qing.publish.common;Za=ka.PublishFactory;
aa=ka.PublishFacade;Wa=ka.AbstractPublishToPanel;Qa=ka.AbstractPublishManagerPanel;ab=ka.SinglePublishManagerDialog;db=ka.ListPublishContentPanel;Pa=ka.TreeListMenuPanel;M=ka.TreeItemSelector;ib=ka.SortWidget;Na=ka.PublishManagerSortPanel;Ba=ka.PublishSearchPanel;Ja=ka.FilterModelType;Ha=ka.CardFilterType;Ma=ka.AnalysisSchemeDialogSelector;Ra=ka.DisplayPublishedRecordName;Xa=ka.PublishAdvanceViewType;Ea=ka.PublishAdvancePanelFactory;La=ka.MyIcons;fb=ka.PresetSearchTypeUtil;ka=com.kingdee.bos.qing.publish.model;
za=ka.PublishTargetType;Ga=ka.PublishModel;ea=ka.FolderNode;Aa=ka.PublishSourceType;Oa=ka.OperType;ka=com.kingdee.bos.qing.biz.common;Ta=ka.RoleDialogSelector;ya=ka.UserDialogSelector;Fa=ka.ValueTextPair;ka=com.kingdee.bos.qing.ui.component;cb=ka.Label;hb=ka.TextField;ua=ka.SwitchButton;Ka=ka.SplitPane;jb=ka.List;ka=com.kingdee.bos.qing.schemamanage.model;eb=ka.SchemaAttrModel})();na.setRootPath(".");na.loadJs("biz-common/qing-biz-common.js");na.loadSkinCss("biz-common","biz-common");na.loadSkinJs("biz-common",
"skin");na.loadI18n("biz-common","biz-common");Za.addPublishFacade(za.CENTER,function(ka,Ua,ba,$a){aa.call(this,ka,Ua,ba,$a);var F=this.protectedMethod;this.loadCenterGroup=function(){F.remote("loadCenterGroup",{publishTargetType:za.CENTER})};this.saveCenterGroup=function(e,k,f,b,a,c){F.remote("saveCenterGroup",{publishTargetType:za.CENTER,addType:e,centerId1:k,centerId2:f,centerId3:b,centerId4:a,name:c})};this.updateCenterGroup=function(e,k,f,b,a,c){F.remote("updateCenterGroup",{publishTargetType:za.CENTER,
iLevel:e,name:c,centerId1:k,centerId2:f,centerId3:b,centerId4:a})};this.deleteCenterGroup=function(e){e={publishTargetType:za.CENTER,arrDeleteRelationId:JSON.stringify(e)};F.remote("deleteCenterGroup",e)};this.loadPublishInfos=function(e,k){F.remote("loadPublishInfos",{publishTargetType:za.CENTER,path:e,isPreset:k})};this.loadAllPublishInfos=function(e){F.remote("loadAllPublishInfos",{publishTargetType:za.CENTER,isPresetPublish:e})};this.loadAllPublishInfosByPagination=function(e,k,f,b,a,c,m,B){F.remote("loadAllPublishInfosByPagination",
{publishTargetType:za.CENTER,isPresetPublish:e,path:k,targetPage:f,pageSize:b,searchText:a,currentType:c,sortField:m,sortOrder:B})};this.loadHitNumberOfAllPath=function(e,k,f){F.remote("loadHitNumberOfAllPath",{publishTargetType:za.CENTER,isPresetPublish:e,searchText:k,currentType:f})}});Za.addPublishToPanel(za.CENTER,function(ka,Ua){Wa.call(this,ka,Ua);var ba=this,$a=this.protectedMethod,F,e,k,f,b,a,c=!1,m,B,q,x,t,H,y,u=new jb,v,r;this.getHeight=function(l){var A=null==F?e.getCurrentSourceType()==
Aa.DASHBOARD||e.getCurrentSourceType()==Aa.EXTREPORT:F.getPublishSourceType()==Aa.DASHBOARD||F.getPublishSourceType()==Aa.EXTREPORT;return A?l?320:340:l?360:380};this.setUpdateType=function(l){H=l};this.getUpdateType=function(){return H};this.setPublishModel=function(l){F=l.copy()};this.isEditPublish=function(){return null!=F};this.setPublishContext=function(l){e=l};this.getPublishContext=function(){return e};this.setTreeSelectorModel=function(l){k=l};var C=function(){var l=45;ba.isEditPublish()&&
(l=0);f=$("<div>");b=$("<div>");b.addClass("publish-manage-left");var A=new cb,z=A.getJqUi();A.setRequired(!0);A.setText(Ca.get("publishName","\u53d1\u5e03\u540d\u79f0"));m=new hb;var D=$("<div>");m.addEditedListener(function(N){clearTimeout(v);v=setTimeout(function(){var w=m.getText();if(""!=w){var V=new Ra(Ua,ka);null!=F?V.setPublishModel(F):V.setPublishContext(e);V.getPublishedRecordNameByInputText(w,Ua,function(p){D.empty();p=p[m.getText()];if(null!=p){u.setCustomItemPainter(function(n,O){n.on("mousedown",
function(Z){m.setText(O);D.remove();Z.stopPropagation()});n.text(O);n.attr("title",O)});u.setItemModels(p);u.setSelecteds([p[0]]);p=u.getJqUi();var d=G.width(),g=G.css("left"),h=G.position().top+G.height();ha.layoutCtrl(D,g,h,d,122);D.css("z-index","9999");p.css({width:d+"px",height:"122px"});p.find(".sa-ctrl-list-owner").css("height","100px");d=$("<div>");d.addClass("history-publish-name");d.text(Ca.get("HistoryPublishName","\u5386\u53f2\u53d1\u5e03\u540d\u79f0"));d.css({right:"13px",top:"100px"});
p.appendTo(D);d.appendTo(D);D.appendTo(b)}else D.remove()})}else D.remove()},1E3)});m.addBlurListener(function(){D.remove()});var G=m.getJqUi();A=0;ha.layoutCtrl(z,8,A,64,23);null==F?ha.layoutCtrl(G,75+l,A,250,23):ha.layoutCtrl(G,111+l,A,215,23);z.appendTo(b);G.appendTo(b);z=new cb;var R=z.getJqUi();z.setRequired(!0);z.setText(Ca.get("publishPath","\u53d1\u5e03\u8def\u5f84"));B=K();var Y=B.getJqUi();A+=43;ha.layoutCtrl(R,8,A,64,23);null==F?ha.layoutCtrl(Y,75+l,A,250,23):ha.layoutCtrl(Y,111+l,A,215,
23);R.appendTo(b);Y.appendTo(b);if(null==F){var ca=T();ha.layoutCtrl(Y,75+l,A,220,23);ha.layoutCtrl(ca,305+l,A+3,20,23);ca.appendTo(b)}z=new cb;R=z.getJqUi();z.setText(Ca.get("permission","\u6388\u6743"));q=new Ta($a.createFacade);var fa=q.getJqUi();x=new ya($a.createFacade);var ra=x.getJqUi();A+=43;ha.layoutCtrl(R,8,A,64,23);null==F?(ha.layoutCtrl(fa,75+l,A,250,23),ha.layoutCtrl(ra,75+l,A+44,250,23)):(ha.layoutCtrl(fa,111+l,A,215,23),ha.layoutCtrl(ra,111+l,A+44,215,23));R.appendTo(b);fa.appendTo(b);
ra.appendTo(b);var X=null==F?e.supportPublishMoreSchemaScene(Ua):!("dashboard"==F.getPublishSourceType()||"extreport"==F.getPublishSourceType());if(X){z=new cb;R=z.getJqUi();z.setText(Ca.get("analysisScheme","\u540c\u65f6\u9009\u62e9\u66f4\u591a\u65b9\u6848"));R.attr("title",Ca.get("analysisScheme","\u540c\u65f6\u9009\u62e9\u66f4\u591a\u65b9\u6848"));t=new Ma(ka,Ua);t.setPublishContext(e);t.setPublishModel(F);t.setSuccessCallBack(function(N){for(var w=[],V=0;V<N.length;V++){var p=new eb;p.fromJsonObject(N[V]);
w.push(p)}F.setSchemaAttrSelected(w);L()});null!=F&&t.getAllSchemaAttrByFid();var pa=t.getJqUi();A+=43;R.appendTo(b);pa.appendTo(b);ha.layoutCtrl(R,8,A+44,100,23);null==F?ha.layoutCtrl(pa,75+l,A+44,250,23):ha.layoutCtrl(pa,111+l,A+44,215,23)}A+=87;null==F&&e.supportPublishWithCarryData()&&(R=new cb,z=R.getJqUi(),R.setText(Ca.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),z.attr("title",Ca.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),y=new ua,e.getHasDirectModeTable()?
(y.setOn(!1),y.setEnabled(!1)):e.isHaveToCarryData()?(y.setOn(!0),y.setEnabled(!1)):y.setOn(!1),R=y.getJqUi(),ha.layoutCtrl(z,8,A-2,100,23),ha.layoutCtrl(R,75+l,A,31,19),z.appendTo(b),R.appendTo(b),A+=31);z=function(N,w){null==F?(ha.layoutCtrl(G,75+l,w,N,23),w+=43,ha.layoutCtrl(Y,75+l,w,N,23)):(ha.layoutCtrl(G,111+l,w,N,23),w+=43,ha.layoutCtrl(Y,111+l,w,N,23));null==F&&(ha.layoutCtrl(Y,75+l,w,N-30,23),ha.layoutCtrl(ca,N+55+l,w+3,20,23));w+=43;null==F?(ha.layoutCtrl(fa,75+l,w,N,23),ha.layoutCtrl(ra,
75+l,w+44,N,23),w+=87,X&&ha.layoutCtrl(pa,75+l,w,N,23)):(ha.layoutCtrl(fa,111+l,w,N,23),ha.layoutCtrl(ra,111+l,w+44,N,23),w+=87,X&&ha.layoutCtrl(pa,111+l,w,N,23));null==F&&e.supportPublishWithCarryData()&&(w+=31);X?a&&a.css({top:w+44+"px"}):a&&a.css({top:w+"px"})};R=Xa.LONGER_VIEW;var sa=F?F.getPublishSourceType()==Aa.DASHBOARD:e.getCurrentSourceType()==Aa.DASHBOARD;sa?R=Xa.DSB_VIEW:(sa=F?F.getPublishSourceType()==Aa.EXTREPORT:e.getCurrentSourceType()==Aa.EXTREPORT,sa&&(R=Xa.QING_RPT_VIEW));r||(r=
Ea.createPublishAdvancePanel(R,e,F),r.setRefreshWidth(z),r.setInitSuccessCallBackHandler(W),r.setPublishTargetType(Ua),r.setOuterMessageCurtain($a.getOuterMessageCurtain()),r.setRemoteImpl(ka),r.loadPublishOperModel());a=$("<div>");a.addClass("sa-qing-publish-advance-set-btn");a.text(Ca.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" >>");a.css({top:A+"px",right:ba.isEditPublish()?"0px":"10px"});a.appendTo(b);b.appendTo(f);!t&&L()},W=function(l,A){l.appendTo(f);L();F&&F.getNoOperValueMap()&&0!=
(F.getNoOperValueMap()[Oa.LONGER]|F.getNoOperValueMap()[Oa.SQUARE]|F.getNoOperValueMap()[Oa.SQUARE_LONGER]|F.getNoOperValueMap()[Oa.QING_RPT])&&(c=!0,P(l,c,A));a.on("click",function(){c=!c;P(l,c,A)})},P=function(l,A,z){var D=$(document.body),G=D.prop("clientWidth");D=D.prop("clientHeight");r.showOrHide(l,A);l=ba.getFunResize();var R=e.getCurrentSourceType();ba.isEditPublish()&&(R=F.getPublishSourceType());R=R==Aa.DASHBOARD;A?(z&&null==F?(z(195,0),a&&a.css({right:"60px"})):(z(175,0),a&&a.css({right:"38px"})),
b.css({width:"50%"}),a.text(Ca.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" <<"),A=330+ba.getWidth(ba.isEditPublish()),ba.isEditPublish()||(A+=50),z=R?120:0,l&&l((G-A)/2,parseInt((D-ba.getHeight(ba.isEditPublish()))/2),A,ba.getHeight(ba.isEditPublish())+z)):(z&&z(ba.isEditPublish()?215:250,0),b.css({width:"100%"}),a.css({right:ba.isEditPublish()?"0px":"10px"}),a.text(Ca.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" >>"),A=ba.getWidth(ba.isEditPublish()),l&&l((G-A)/2,parseInt((D-ba.getHeight(ba.isEditPublish()))/
2),A,ba.getHeight(ba.isEditPublish())))};this.getJqUi=function(){f||(C(),Q(B));return f};var T=function(){var l=$("<span>");l.attr("title",Ca.get("publishManage","\u53d1\u5e03\u7ba1\u7406"));La.background(l,"publish_manager");l.on("click",function(){var A=new ja(ba.getRemoteImpl());A.setPublishContext(e);A.setTreeSelectorModel(k);A.setPublishContentEditEntrance(ba.getPublishContentEditEntrance());A=new ab(A);A.setClosedCallback(function(z){k=z.getTreeSelectorModel();B.setArrFolderNode(J());B.setSelectedTreePath(null)});
A.showDialog()});return l},K=function(){var l=new M;l.setPlaceholder(Ca.get("selectPath","\u8bf7\u9009\u62e9\u53d1\u5e03\u8def\u5f84"));l.setMaxHeight(118);l.getJqUi().css("background","white");return l},Q=function(l){if(null==k){var A=$a.createFacade(function(z){for(var D=[],G=0;G<z.length;G++){var R=new ea;R.fromJsonObject(z[G]);D.push(R)}z=[];for(G=0;G<D.length;G++)E(z,D[G]);k=z;l.setArrFolderNode(J())},function(z,D){$a.getOuterMessageCurtain().showPrompt(D,2E3);return!0});A.setShowBlocking(!0);
A.setBlockingJqUi(f);A.loadCenterGroup()}else l.setArrFolderNode(J())},J=function(){for(var l=[],A=0;A<k.length;A++)if(!k[A].getIsPreset()&&!k[A].getParentId()){var z=k[A].getName();k[A].getId()==Ga.QING_CENTER_ID&&"\u6211\u7684\u8f7b\u5206\u6790"==z&&k[A].setName(Ca.get("myQingCenter",z));l.push(k[A])}return l},E=function(l,A){-1==l.indexOf(A)&&l.push(A);if(A=A.getChildren())for(var z=0;z<A.length;z++)A[z]instanceof ea?E(l,A[z]):-1==l.indexOf(A[z])&&l.push(A[z])},L=function(){if(F){m.setText(F.getName());
var l=new Fa;l.setValue(F.getPath());l.setText(F.getPathText());B.setSelectedTreePath(l);q.setSelectedValue(F.getRoles());x.setSelectedValue(F.getUsers());t&&t.setSelectedValue(F.getSchemaAttrSelected())}};this.getModelFromUI=function(){var l=new Ga;null==F?(l.setPublishSourceType(e.getCurrentSourceType()),l.setPublishTargetType(ba.getPublishTargetType()),l.setTagId(e.getBizTag()),l.setLastBiztag(e.getDashBoardAnalysis()?e.getSchemaTag():e.getBizTag()),l.setSchemeId(Ga.CURRENT_SCHEMA_ID)):(l=F,l.setSchemeId(F.getSchemeId()));
l.setName($.trim(m.getText()));var A=B.getSelectedTreePath();l.setPath(A.getValue());l.setPathText(A.getText());l.setAnalysis(!0);q&&l.setRoles(q.getSelectedValue());x&&l.setUsers(x.getSelectedValue());y&&(A=y.isOn(),l.setCarryData(A));r&&(l.setCarryUsers(r.getCarryDataUsers()),l.setNoOperValueMap(r.getNoOperValueMap()));return l};this.getJsonModel=function(){return e.getCurrentContentModel()};this.getAnalysisSchemaArray=function(){return e.getChoiceAnalysisSchema()};this.checkUIInput=function(l,
A,z){var D=m.getText();if(null==D||0==$.trim(D).length)return Ca.get("publishNameNotEmptyTip","\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0\u3002");if(50<D.length)return Ca.get("publishNameTooLongTip","\u53d1\u5e03\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(B.getSelectedTreePath())A&&F&&(F.getPublishSourceType()==Aa.SUBJECT||F.getPublishSourceType()==Aa.BILL)?I(z,l):l(!0);else return Ca.get("publishPathNotEmptyTip","\u8bf7\u8f93\u5165\u53d1\u5e03\u8def\u5f84\u3002")};
var I=function(l,A){Za.createPublishFacade(Ua,ka,function(z){1==z?l(Ca.get("publishNotExist","\u60a8\u5728\u5176\u4ed6\u9875\u9762\u5220\u9664\u4e86\u8be5\u53d1\u5e03\u8bb0\u5f55\u3002")):(z=F&&F.getSchemaModelSelected())&&0<z.length?U(z,l,A):A(!0)}).checkPublishInfoIsExist(F.getId())},U=function(l,A,z){for(var D=Za.createPublishFacade(Ua,ka,function(Y){1==Y?A(Ca.get("deleteAllSchemaTip","\u60a8\u5728\u591a\u4e2a\u9875\u9762\u7f16\u8f91\u8be5\u53d1\u5e03\u8bb0\u5f55\u65f6\uff0c\u5220\u9664\u4e86\u6240\u6709\u7684\u5206\u6790\u65b9\u6848\uff0c\u8bf7\u91cd\u65b0\u6dfb\u52a0\u3002")):
z(!0)}),G=[],R=0;R<l.length;R++)G.push(l[R].toJsonObject());D.checkBeforeEditAndPublishInfo(F.getId(),F.getPublishSourceType(),G)}});Za.addPublishManagePanel(za.CENTER,ja)})();(function(){function ja(q){db.call(this,q,Ga.CARD_REPOSITORY);var x=this,t=this.protectedMethod,H,y,u,v,r,C,W,P=[],T=[],K=[],Q,J,E,L=!1,I=!0,U,l,A,z,D,G,R,Y=[],ca,fa=!1,ra=!1,X=!1,pa=[new k(ua.get("allType","\u5168\u90e8\u7c7b\u578b"),2),new k(ua.get("moduleSquare","\u6570\u636e\u6597\u65b9"),0),new k(ua.get("dashboard","\u4eea\u8868\u677f"),1)],sa=2,N,w;w||(Ta.setRootPath("."),Ta.setCallback(function(){w=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),Ta.loadJs("biz-common/qing-biz-common.js"),
Ta.loadSkinCss("biz-common","biz-common"),Ta.loadSkinJs("biz-common","skin"),Ta.loadI18n("biz-common","biz-common"));var V;this.getTitle=function(){return ua.get("cardRepository","\u5361\u7247\u5e93")};this.getJqUi=function(){if(!H){var wa=$("<div>"),ta=$("<div class='sa-qing-publish-titlebar'>");ca=Ia(a.getCardFilterType(),ia).getJqUi();ca.appendTo(ta);ca.hide();var qa=Ia(pa,oa);qa.getJqUi().css("margin-right","0px");qa.getJqUi().appendTo(ta);qa=$("<div tabIndex=-1 style='outline: none;'>");qa.css({width:"20px",
"float":"left",height:"40px",left:"15px",position:"relative"});qa.appendTo(ta);qa.on("mousedown",O);qa.on("mouseup",O);qa.on("keydown",O);qa.on("keyup",O);qa=new e;qa.setSearchListener(la);R=qa;R.getJqUi().appendTo(ta);qa=new $a;qa.setSortModel(Sa);l=qa;qa=l.getJqUi();qa.appendTo(ta);ya.layoutCtrlWithLRTB(qa,700,60,null,0,0,null);qa=new F;qa.setClickListener(n);qa.getJqUi().appendTo(ta);ta.appendTo(wa);ta=$("<div>");ta.addClass("sa-qing-publish-manager");E=x.getAutoSelectedData();qa=new M;qa.setOuterMessageCurtain(t.getOuterMessageCurtain());
E&&E.path&&qa.setDefaultItemValue(E.path);qa.setSelectedItemListener(Da);qa.setModel(W);qa.setAddItemListener(pb);qa.setUpdateItemListener(rb);qa.setDeleteItemListener(zb);qa.setLoadItemListener(qb);y=qa;y.getJqUi().appendTo(ta);qa=$("<div>");ya.layoutCtrlWithLRTB(qa,220,0,null,0,0,null);var Ya=new va;Ya.setPublishManager(!0);Ya.setOuterMessageCurtain(t.getOuterMessageCurtain());Ya.setCardImgUrlCreator(lb);Ya.setDeletePublishListener(nb);Ya.setEditPublishListener(mb);Ya.setEditPublishContentListenter(x.getPublishContentEditEntrance());
Ya.setReSearchListener(la);u=Ya;v=u.getJqUi();Ya=new Ua;Ya.setOuterMessageCurtain(t.getOuterMessageCurtain());Ya.setDeletePublishListener(kb);Ya.setEditPublishListener(mb);Ya.setCardImgUrlCreator(lb);Ya.setEditPublishContentListenter(x.getPublishContentEditEntrance());Ya.setReSearchListener(la);r=Ya;C=r.getJqUi();C.hide();V=p();V.appendTo(qa);v.appendTo(qa);C.appendTo(qa);qa.appendTo(ta);ta.find(".sa-qing-publish-manager-content-container").css("top","32px");ta.appendTo(wa);ya.layoutCtrlWithLRTB(ta,
0,0,null,40,0,null);H=wa}return H};this.relayoutViews=function(){r&&r.relayoutViews()};var p=function(){w.setJumpToPageListener(function(wa,ta,qa){var Ya=t.createFacade(function(gb){if(void 0===gb.infos||null===gb.infos||0===gb.infos.length)V.hide(),qa?qa(gb.totalRow):w.refreshPagination(),u.setSearchStatus(!1),u.setPublishModels(null,null),u.updateSearchContentUI(U),r.setSearchStatus(!1),r.setListPublishModel(null,G.isPreset());else{var tb=gb.infos;Q=[];for(var wb=0;wb<tb.length;wb++){var Ab=new za;
Ab.fromJsonObject(tb[wb]);Q.push(Ab)}V.show();qa?qa(gb.totalRow):w.refreshPagination();u.setSearchStatus(!0);u.setPublishModels(Q,null);u.updateSearchContentUI(U);r.setSearchStatus(!0);r.setListPublishModel(Q,G.isPreset())}r.updateSearchContentUI(U)},function(){return!1});Ya.setShowBlocking(!0);Ya.loadAllPublishInfosByPagination(G.isPreset(),J,wa,ta,U,N,A,z)});w.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);return w.getJqUi()},d=function(){var wa=t.createFacade(function(ta){if(void 0===
ta.infos||null===ta.infos||0===ta.infos.length)V.hide(),w.resetPaginationAndJumpToFirstPage(ta.totalRow),Q=[];else{V.show();w.resetPaginationAndJumpToFirstPage(ta.totalRow);ta=ta.infos;Q=[];for(var qa=0;qa<ta.length;qa++){var Ya=new za;Ya.fromJsonObject(ta[qa]);Q.push(Ya)}}g()},function(){return!1});wa.setShowBlocking(!0);wa.loadAllPublishInfosByPagination(G.isPreset(),J,1,w.getPageSize(),U,N,A,z)},g=function(){Q&&0<Q.length?(u.setSearchStatus(L),u.setPublishModels(Q,null),u.updateSearchContentUI(U),
r.setSearchStatus(L),r.setListPublishModel(Q,G.isPreset()),r.updateSearchContentUI(U)):(u.setSearchStatus(L),u.setPublishModels(null,null),r.setSearchStatus(L),r.setListPublishModel(null,G.isPreset()))},h=function(){var wa=t.createFacade(function(ta){W.forEach(function(qa){qa=qa.getValue();ta[qa]||(ta[qa]=0)});y.updateSearchUI(W,ta)},function(){return!1});wa.setShowBlocking(!0);wa.loadHitNumberOfAllPath(D,U,N)},n=function(wa){I!=wa&&(wa?(v.show(),C.hide()):(C.show(),v.hide()),I=wa,g())},O=function(wa){var ta=
wa.type;wa=wa.keyCode;ta&&"mousedown"===ta&&(ra=!0);ta&&"mouseup"===ta&&(ra=!1);ta&&wa&&"keydown"===ta&&"17"==wa&&(fa=!0);ta&&wa&&"keyup"===ta&&"17"==wa&&(fa=!1);ta&&wa&&"keydown"===ta&&"16"==wa&&(X=!0);ta&&wa&&"keyup"===ta&&"16"==wa&&(X=!1);fa&&ra&&X&&(Z(),X=ra=fa=!1)},Z=function(){t.createFacade(function(wa){for(var ta=0;ta<wa.length;ta++){var qa=new za;qa.fromJsonObject(wa[ta]);Y.push(qa)}(new na(q,Y,ma)).showDialog()}).loadAllPublishInfos(!1)},ma=function(wa){t.createFacade(function(ta){t.createFacade().getExportedData(ta)},
function(ta,qa){return!1}).exportEmbeddedPublishInfo(wa)},Ia=function(wa,ta){var qa=new ba;qa.setSearchType(wa);qa.setSelectedChangedListener(ta);return qa},oa=function(wa,ta,qa){sa=qa.getTypeId();N=2==sa?void 0:1==sa?"dashboard":"subject";la()},ia=function(wa,ta,qa){D=wa=qa.getTypeId();ta=y.getLastSelectedItem();wa?(K[0]=ta,K[1]&&y.setLastSelectedItem(K[1]),W=P):(K[1]=ta,K[0]&&y.setLastSelectedItem(K[0]),W=T);la()},la=function(){U=R.getInputContent().trim();0<U.length?(L=!0,U=U.toUpperCase(),h()):
(L=!1,y.setModel(W),y.updateUI())},Sa=function(wa,ta){A=wa.getPropertyName();z=ta==ka.SORT_TYPE_ASC?"ASC":"DESC";la()},Da=function(wa){J=wa.getValue();null==E&&u&&u.setAutoSelectedModel(null);G=wa;d()},lb=function(wa){if(!wa)return Ta.getIconUrl("publish","icon_dashboard_building.png");if("publish"==wa.substring(2,9))return wa;var ta=x.getPublishContext().getParamPathPrefix();return t.createFacade().getCardImgUrl(ta,wa)},mb=function(wa,ta){var qa=x.getPublishContext();wa=Wa.createPublishToEditDialog(q,
qa,wa);wa.addSuccessCallback(ta);wa.setOuterMessageCurtain(t.getOuterMessageCurtain());wa.showDialog()},nb=function(wa,ta){var qa=t.createFacade(function(Ya){ta();t.getOuterMessageCurtain().showSuccess(ua.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(Ya,gb){return!1});qa.setShowBlocking(!1);qa.deletePublishInfo(Ga.CARD_REPOSITORY,wa)},kb=function(wa,ta){wa=wa.getId();var qa=t.createFacade(function(Ya){ta();t.getOuterMessageCurtain().showSuccess(ua.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},
function(Ya,gb){return!1});qa.setShowBlocking(!1);qa.deletePublishInfo(Ga.CARD_REPOSITORY,wa)},qb=function(wa){var ta=t.createFacade(function(qa){for(var Ya=[],gb=0;gb<qa.length;gb++){var tb=new Oa;tb.setValue(qa[gb].id);tb.setText(qa[gb].name);tb.setIsPreset(qa[gb].isPreset);Ya.push(tb)}W=Ya;for(qa=0;qa<W.length;qa++)W[qa].isPreset()?P.push(W[qa]):T.push(W[qa]);0<P.length&&ca.show();W=T;wa(W)},function(qa,Ya){return!1});ta.setShowBlocking(!0);ta.loadGroups()},pb=function(wa,ta,qa){t.createFacade(function(Ya){var gb=
new Oa;gb.setValue(Ya.id);gb.setText(Ya.name);qa(gb);la()},function(Ya,gb){return 2312402==Ya?(t.getOuterMessageCurtain().showPrompt(ua.get("duplicateName","\u76ee\u5f55\u540d\u79f0\u91cd\u590d\u3002"),2E3),!0):!1}).saveGroup(wa)},rb=function(wa,ta,qa){t.createFacade(function(Ya){qa(Ya)},function(Ya,gb){return 2312402==Ya?(t.getOuterMessageCurtain().showPrompt(ua.get("duplicateName","\u76ee\u5f55\u540d\u79f0\u91cd\u590d\u3002"),2E3),!0):!1}).updateGroup(wa,ta)},zb=function(wa,ta){t.createFacade(function(qa){ta();
t.getOuterMessageCurtain().showSuccess(ua.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(qa,Ya){return 2312401==qa?(t.getOuterMessageCurtain().showPrompt(ua.get("deleteNotEmpty","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u53d1\u5e03\u8bb0\u5f55\u3002"),2E3),!0):!1}).deleteGroup(wa)};this.setPathSelectorModel=function(wa){for(var ta=0;ta<wa.length;ta++)wa[ta].isPreset()?P.push(wa[ta]):T.push(wa[ta]);W=T};this.getPathSelectorModel=function(){return P.concat(T)}}function na(q,
x,t){function H(){KTDefaultCellRender.call(this,v);var P=this,T=this.paintCellUI;this.paintCellUI=function(K,Q){if(P.getCurrentRowIdx()>=Ca.getHeadRowCount()){var J=P.getCurrentRow(),E=P.getCurrentColIdx(),L=J.getUserObject();J=$(K);var I=$("<div>");0==E?(I=new Xa,K=I.getJqUi(),I.setChecked(!1),I.setUserObject(L),C.push(I),K.css({position:"relative","margin-left":"30%"}),J.append(K)):1==E?(I.text(L.getName()),I.attr("title",L.getName()),I.css({position:"relative","margin-left":"5%"}),J.append(I)):
2==E?(L=L.getPublishSourceGroupName()+"/"+L.getPublishSourceName(),I.text(L),I.attr("title",L),I.css({position:"relative","margin-left":"5%"}),J.append(I)):3==E?(K=new cb,K.setFormatString("yyyy-MM-dd HH:mm:ss"),L=K.format(L.getCreateTime()),I.text(L),I.attr("title",L),I.css({position:"relative","margin-left":"5%"}),J.append(I)):T(K,Q)}else T(K,Q)}}Ja.call(this);var y=this,u=this.protectedMethod,v,r,C=[];(function(){u.setTitle(ua.get("exportWithoutDataForEmbedded","\u5d4c\u5165\u5f0f\u53d1\u5e03\u4fe1\u606f\u5bfc\u51fa"));
y.setSize(520,570);u.getDialogCtrl().setMinSize(520,570);u.setContentPaneCreator(function(){var P=$("<div>");r=new Ha(ua.get("export","\u5bfc\u51fa"));var T=r.getJqUi();T.addClass("sa-qing-publish-hidden-export");r.addActionListener(W);v=new KTable;var K=new H;v.setCellRender(K);v.setSyncUIWhenModelChanged(!1);v.addColumns(4);v.getColumn(0).setWidth(32);v.getColumn(1).setWidth(152);v.getColumn(2).setWidth(152);v.getColumn(3).setWidth(152);K=Ca.createHeadRow(v);K.getCell(0).setValue("");K.getCell(1).setValue(ua.get("publishName",
"\u53d1\u5e03\u540d\u79f0"));K.getCell(2).setValue(ua.get("publishPath","\u53d1\u5e03\u8def\u5f84"));K.getCell(3).setValue(ua.get("publishTime","\u53d1\u5e03\u65f6\u95f4"));K=$(v.getUI());K.css({top:"3%",height:"90%",position:"relative"});K.children().css("overflow-x","hidden");for(var Q=0;Q<x.length;Q++){var J=x[Q],E=J.getPublishSourceType(),L=J.getCarryData();"bill"===E&&!0!==L&&(E=Ca.createRow(v,!1),E.setHeight(23),E.setUserObject(J))}v.updateUI();P.append(T);P.append(K);return P});u.setFooterPaneCreator(function(P){var T=
new Ha(ua.get("close","\u5173\u95ed"));T.setHighlight(!0);var K=T.getJqUi();ya.layoutCtrlWithLRTB(K,275,0,null,15,60,null);K.css({"margin-left":"-50px",width:"40px"});K.appendTo(P);T.addActionListener(function(){u.destroy()})});u.setClosingAction(function(){u.destroy()})})();var W=function(){for(var P=[],T=0;T<C.length;T++)C[T].isChecked()&&P.push(C[T].getUserObject().getId());if(0==P.length)return u.getDialogCtrl().getMessageCurtain().showPrompt(ua.get("atLeastOnePublishInfo","\u8bf7\u81f3\u5c11\u9009\u4e2d\u4e00\u6761\u53d1\u5e03\u4fe1\u606f\u8fdb\u884c\u53d1\u5e03\u3002")),
!1;t(P)}}function va(){var q,x,t,H,y,u,v=!1,r={},C,W,P,T,K,Q,J,E=!1,L,I=!1,U,l,A=!0;this.setOuterMessageCurtain=function(X){H=X};this.setSingleSelected=function(X){v=X};this.setPublishManager=function(X){E=X};this.getSelectedPublishModels=function(){var X=[],pa;for(pa in r)X.push(r[pa]);return X};this.setSelectedChangeListener=function(X){W=X};this.setDeletePublishListener=function(X){P=X};this.setEditPublishListener=function(X){T=X};this.setReSearchListener=function(X){K=X};this.setEditPublishContentListenter=
function(X){Q=X};this.setCardImgUrlCreator=function(X){J=X};this.getJqUi=function(){q||(q=$("<div>"),q.addClass("sa-qing-publish-manager-content-container"),t=$("<div>"),t.appendTo(q),x=$("<div>"),x.addClass("sa-qing-publish-manager-content-emptytip"),x.appendTo(q),L=$("<div>"),E&&L.css("margin-left","10px"),L.appendTo(q));return q};this.setPublishModels=function(X,pa){A=pa;u=X;t.addClass("sa-qing-publish-no-data-tips");Na.background(t,"no-data");if(null==u||0==u.length)I?x.text(ua.get("emptySearchTips",
"\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):x.text(ua.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55")),t.show(),x.show(),L.hide();else{t.hide();x.hide();L.show();L.empty();var sa;l=new B;for(X=0;X<u.length;X++){pa=u[X];var N=J(pa.getImagePath());N=new Za(pa,N,H);v&&(N.setHideCardTypePic("subject"),0==X&&A&&(r={},r[pa.getId()]=pa,W(pa,!0)));pa.getId();N.setPublishManager(E);var w=N.getJqUi();y&&pa.getId()==y.getId()&&(sa=w);P&&fa(N,pa);(T||Q)&&ra(N,pa);if(W){var V=
N;r[pa.getId()]?(G=V,V.setSelected(!0)):V.setSelected(!1);v?V.addSelectButton(Y,Za.SINGLE_SELECTED_STYLE_SELECTBTN):V.addSelectButton(ca,Za.MUTI_SELECTED_STYLE_SELECTBTN)}v&&l.addElement(N.getSelector());w.appendTo(L)}sa&&z(sa)}};this.setAutoSelectedModel=function(X){y=X};this.setTipsText=function(X){C=X;x&&(x.text(C),x.show(),L.hide())};this.setAllPublishModels=function(X){U=X};this.setSelectedPublishCardItem=function(X){r=X};this.getSelectedPublishCardItem=function(){return r};this.setSearchStatus=
function(X){I=X};this.updateSearchContentUI=function(X){if(I){var pa=q.find(".sa-publish-item"),sa;for(sa in u){var N=void 0,w=pa[sa],V=u[sa].getName();if(w&&V&&X){var p=X.toUpperCase(),d=V.toUpperCase(),g=d.split(p),h=p.length,n=$("<div>");n.addClass("sa-publish-item-head-name sa-qing-publish-fontfamily");for(N in g){var O=d.indexOf(g[N]),Z=V.substr(0,g[N].length);O+=g[N].length;var ma=d.length-O;d=d.substr(O,ma);V=V.substr(O,ma);O=$("<span>");O.text(Z);O.appendTo(n);if(N!==g.length-1&&1<g.length){ma=
d.indexOf(p);Z=V.substr(ma,h);ma+=h;var Ia=d.length-ma;d=d.substr(ma,Ia);V=V.substr(ma,Ia);ma=$("<span>");ma.text(Z);ma.css("color","#FF0000");ma.appendTo(O)}$(w).find(".sa-publish-item-head-name.sa-qing-publish-fontfamily").remove()}n.appendTo(w.children[0]);n.attr("title",n.text())}}}};var z=function(X){D("sa-qing-publish-manager-content-container",X);X.parent().children(".publish-card-selected").removeClass("publish-card-selected");X.addClass("publish-card-blink");X.addClass("publish-card-selected");
setTimeout(function(){X.parent().children(".publish-card-blink").removeClass("publish-card-blink")},2E3)},D=function(X,pa){document.querySelector("."+X).scrollTop=pa.prop("offsetTop")},G=null,R=null,Y=function(X,pa,sa){var N=pa.isChecked(),w=X.getPublishModel();if(sa||v)N?(v&&(r={},G&&(R=G.getSelector(),G.getPublishModel().getId()!=w.getId()&&(G.setSelected(!1),R.setChecked(!1))),G=X,R=pa),r[w.getId()]=w):(v&&(R=G=null),delete r[w.getId()]),W(w,N)},ca=function(X,pa,sa){var N=pa.isSelected(),w=X.getPublishModel();
N?(v&&(r={},G&&(R=G.getSelector(),G.getPublishModel().getId()!=w.getId()&&(G.setSelected(!1),R.setSelected(!1))),G=X,R=pa),r[w.getId()]=w):(v&&(R=G=null),delete r[w.getId()]);sa&&W(w,N)},fa=function(X,pa){X.addOperate("btn_delete",ua.get("del","\u5220\u9664"),function(){var sa=fb.createFeedbackDialog();sa.setOptionType(fb.OPTION_OK_CANCEL);sa.setMsgImageType(fb.MSG_DELETE);sa.setMessage(ua.get("confirmToDelPublish","\u5220\u9664\u8be5\u8bb0\u5f55\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u8bb0\u5f55\u5417\uff1f"));
sa.setClosingChecker(function(N){N==fb.RETURN_OK&&P(pa.getId(),function(){X.getJqUi().remove();for(var w=0;w<u.length;w++){var V=u[w];if(V.getId()==pa.getId()){u.splice(w,1);break}}U&&0<U.length&&(w=U.indexOf(V),-1<w&&U.splice(w,1));K&&K()});return!0});sa.showDialog()})},ra=function(X,pa){var sa=[],N=[];if(T){var w=function(){var V=pa.getPath();T(pa,function(p){if(V==p.getPath())pa.fromJsonObject(p.toJsonObject()),X.updateUi();else{X.getJqUi().remove();for(var d=0;d<u.length;d++)u[d].getId()==p.getId()&&
u.splice(d,1)}K&&K();H.showSuccess(ua.get("updateSuccess","\u4fee\u6539\u6210\u529f\u3002"))})};sa.push(w);N.push(ua.get("editPublishInfoItem","\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f"))}Q&&(w=function(){Q(pa,function(V){V&&(pa.setImagePath(V),V=J(V),X.refreshImage(V))})},sa.push(w),N.push(ua.get("editPublishContentItem","\u7f16\u8f91\u53d1\u5e03\u65b9\u6848")));1==N.length&&(N[0]=ua.get("edit","\u7f16\u8f91"));X.addOperates("btn_edit",ua.get("edit","\u7f16\u8f91"),N,sa)}}function za(){Ka.call(this);
var q,x,t,H;this.setImagePath=function(v){q=v};this.getImagePath=function(){return q};this.getShowImagePath=function(){var v=q;return v=v?com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrl(v,"card-thumbnail"):Ta.getIconUrl("publish","icon_dashboard_building.png")};this.setCreatorName=function(v){t=v};this.getCreatorName=function(){return t};this.setCreatorID=function(v){H=v};this.getCreatorID=function(){return H};this.setCardDesc=function(v){x=v};this.getCardDesc=function(){return x};
var y=this.toJsonObject;this.toJsonObject=function(){var v=y();v.imagePath=q;v.cardDesc=x;v.creatorName=t;v.creatorId=H;return v};var u=this.fromJsonObject;this.fromJsonObject=function(v){u(v);q=v.imagePath;x=v.cardDesc;t=v.creatorName;H=v.creatorId}}"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.publish&&
(com.kingdee.bos.qing.publish={});var Fa=com.kingdee.bos.qing.publish;Fa.CardSelector=function(q,x){db.call(this,q,Ga.CARD_REPOSITORY);var t=this,H=this.protectedMethod,y,u=!1,v,r=!0,C,W,P,T=[],K=!1,Q=!0,J=[],E,L=!1,I=!1,U,l,A,z,D,G,R,Y,ca,fa,ra,X=[],pa=[],sa=[],N=!1,w=!1,V,p=[],d=[],g=[],h=[],n=[new k(ua.get("myCard","\u6211\u7684\u5361\u7247"),!1),new k(ua.get("presetCard","\u9884\u7f6e\u5361\u7247"),!0)],O={},Z={},ma,Ia;this.setParamPathPrefix=function(S){E=S};this.setSingleSelected=function(S){K=
S};this.getSelectedPublishModels=function(){return Q?D.getSelectedPublishModels():G.getSelectedPublishModels()};this.showDSBCard=function(S){u=S};var oa=[new k(ua.get("allType","\u5168\u90e8\u7c7b\u578b"),2),new k(ua.get("moduleSquare","\u6570\u636e\u6597\u65b9"),0),new k(ua.get("dashboard","\u4eea\u8868\u677f"),1)],ia=2;this.getJqUi=function(){y||(y=la());return y};var la=function(){var S=$("<div>"),da=Sa();da.appendTo(S);var xa=$("<div>");xa.addClass("sa-qing-publish-manager");D=Ya();R=D.getJqUi();
G=gb();Y=G.getJqUi();Y.hide();var Va=$("<div class='sa-qing-card-selector-tab'>");ya.layoutCtrlWithLRTB(Va,0,null,220,0,0,null);var bb=$("<div class='sa-qing-card-selector-tab-head'>");ya.layoutCtrlWithLRTB(bb,0,0,null,0,null,34);v=C=ta();var vb=C.getJqUi(),ob=$("<span class='sa-qing-card-selector-tab-head-text'>");ob.text(ua.get("ByPublisher","\u6309\u53d1\u5e03\u4eba"));ob.addClass("sa-qing-card-selector-tab-head-selected");ob.on("click",function(){v=C;r=!0;var sb=C.getJqUi();ob.addClass("sa-qing-card-selector-tab-head-selected");
var ub=C.getSelectedModel();sb.show();sb=W.getJqUi();xb.removeClass("sa-qing-card-selector-tab-head-selected");sb.hide();wb(ub);rb()});W=qa();var Fb=W.getJqUi();Fb.hide();W.setEmptyMenudHint(ua.get("noSharedCards","\u6682\u672a\u6536\u5230\u4ed6\u4eba\u53d1\u5e03\u7684\u5361\u7247"));var xb=$("<span class='sa-qing-card-selector-tab-head-text'>");xb.css("left","10px");xb.text(ua.get("ByDirectory","\u6309\u76ee\u5f55"));xb.on("click",function(){v=W;r=!1;var sb=W.getJqUi();xb.addClass("sa-qing-card-selector-tab-head-selected");
sb.show();sb=C.getJqUi();ob.removeClass("sa-qing-card-selector-tab-head-selected");sb.hide();null!=P&&0==T.length?(sb=H.createFacade(function(ub){T=Eb(ub);for(ub=0;ub<T.length;ub++)T[ub].isPreset()?g.push(T[ub]):h.push(T[ub]);g.unshift(h[0]);T=N?g:h;Bb();yb();W.updateUI();rb()},function(ub,Ob){return!1}),sb.setShowBlocking(!0),sb.loadCardGroupByDirectory(u)):(sb=W.getSelectedModel(),Gb(sb),rb())});ob.appendTo(bb);xb.appendTo(bb);var Cb=$("<div class='sa-qing-card-selector-tab-container'>");ya.layoutCtrlWithLRTB(Cb,
0,0,null,35,0,null);vb.appendTo(Cb);Fb.appendTo(Cb);bb.appendTo(Va);Cb.appendTo(Va);Va.appendTo(xa);Va=$("<div>");ya.layoutCtrlWithLRTB(Va,225,0,null,0,0,null);R.appendTo(Va);Y.appendTo(Va);Va.appendTo(xa);xa.appendTo(S);ya.layoutCtrlWithLRTB(xa,0,0,null,40,0,null);K&&(da.css("top","-10px"),ya.layoutCtrlWithLRTB(xa,0,0,null,32,0,null));return S},Sa=function(){var S=$("<div class='sa-qing-publish-titlebar'>");Ia=Da(n,mb);ra=Ia.getJqUi();ra.appendTo(S);ra.hide();u&&Da(oa,lb).getJqUi().appendTo(S);var da=
new e;da.setSearchListener(rb);ca=da;ca.getJqUi().appendTo(S);da=new $a;da.setSortModel(kb);fa=da;da=fa.getJqUi();da.appendTo(S);ya.layoutCtrlWithLRTB(da,500,70,null,0,0,null);da=new F;da.setClickListener(pb);da.getJqUi().appendTo(S);return S},Da=function(S,da){var xa=new ba;xa.setSearchType(S);xa.setSelectedChangedListener(da);return xa},lb=function(S,da,xa){ia=xa.getTypeId();ma=2==ia?void 0:1==ia?"dashboard":"subject";rb()},mb=function(S,da,xa){S=xa.getTypeId();da=C.getLastSelectedItem();xa=W.getLastSelectedItem();
N?(sa[1]=da,sa[3]=xa,sa[0]&&C.setLastSelectedItem(sa[0]),sa[2]&&W.setLastSelectedItem(sa[2]),P=d,T=h,z=pa):(sa[0]=da,sa[2]=xa,sa[1]&&C.setLastSelectedItem(sa[1]),sa[3]&&W.setLastSelectedItem(sa[3]),P=p,T=g,z=X);N=S;Bb();Db();rb()},nb=function(){var S=[];if(I){var da=ca.getInputContent().trim();da=da.toUpperCase();for(var xa in A)-1<A[xa].getName().toUpperCase().indexOf(da)&&S.push(A[xa])}else S=A;Q?(D.setSearchStatus(I),D.setPublishModels(S,w),D.updateSearchContentUI(da)):(G.setSearchStatus(I),G.setListPublishModel(S,
r,w),G.updateSelectorSearchContentUI(da))},kb=function(S,da){if(z&&0<z.length){switch(da){case ka.SORT_TYPE_ASC:S=qb(S.getPropertyName(),!0);z.sort(S);break;case ka.SORT_TYPE_DESC:S=qb(S.getPropertyName(),!1);z.sort(S);break;default:S=qb(S.getPropertyName(),!1),z.sort(S)}Hb()}L&&(Db(),Bb());rb()},qb=function(S,da){return"name"==S?function(xa,Va){xa=xa.toJsonObject();Va=Va.toJsonObject();Va=xa[S].localeCompare(Va[S],"zh-Hans-CN",{sensitivity:"accent"});return da?Va:-Va}:function(xa,Va){xa=xa.toJsonObject();
var bb=Va.toJsonObject();Va=xa[S];xa=bb[S];bb=0;Va>xa?bb=1:xa>Va&&(bb=-1);return da?bb:-bb}},pb=function(S){if(Q!=S){if(S){var da=G.getSelectedPublishCardItem();D.setSelectedPublishCardItem(da);R.show();Y.hide()}else da=D.getSelectedPublishCardItem(),G.setSelectedPublishCardItem(da),Y.show(),R.hide();Q=S;rb()}},rb=function(){if(L){var S=ca.getInputContent().trim();if(0<S.length){I=!0;S=S.toUpperCase();Db();z&&Bb();var da={};yb();if(r){for(var xa=0,Va=0;Va<P.length;Va++){var bb=wa(P[Va]);if("allCard"!=
bb){da[bb]=0;for(var vb=O[bb],ob=0;ob<vb.length;ob++)zb(vb[ob])&&-1<vb[ob].getName().toUpperCase().indexOf(S)&&(da[bb]+=1,xa+=1)}}da.allCard=xa;v.updateSearchUI(P,da)}else{for(Va=xa=0;Va<T.length;Va++)if(bb=wa(T[Va]),"allCard"!=bb)for(da[bb]=0,vb=Z[bb],ob=0;ob<vb.length;ob++)zb(vb[ob])&&-1<vb[ob].getName().toUpperCase().indexOf(S)&&(da[bb]+=1,xa+=1);da.allCard=xa;v.updateSelectorSearchUI(T,da)}}else I=!1,yb(),r?v.setModel(P):v.setModel(T),v.updateUI()}},zb=function(S){var da=!0;switch(ma){case "dashboard":da=
"dashboard"==S.getPublishSourceType();break;case "subject":da="dashboard"!=S.getPublishSourceType()}return da},wa=function(S){return"allCard"==S.getValue()?S=S.getValue():S=r?S.getValue():S.isPreset()?S.getValue():S.getText()},ta=function(){var S=new M;S.setIsCardSelector(!0,!0);S.setOuterMessageCurtain(H.getOuterMessageCurtain());S.setSelectedItemListener(wb);S.setModel(P);S.setEditable(!1);S.setLoadItemListener(Kb);return S},qa=function(){var S=new M;S.setIsCardSelector(!0,!1);S.setOuterMessageCurtain(H.getOuterMessageCurtain());
S.setSelectedItemListener(Gb);S.setModel(T);S.setEditable(!1);S.setLoadItemListener(Lb);return S},Ya=function(){var S=new va;S.setSingleSelected(K);S.setCardImgUrlCreator(Ib);S.setSelectedChangeListener(tb);return S},gb=function(){var S=new Ba;S.setDeletePublishListener(Mb);S.setEditPublishListener(Nb);S.setIsDashBoardSelector(u);S.setSelectedChangeListener(tb);S.setSingleSelected(K);S.setCardImgUrlCreator(Ib);return S},tb=function(S,da){if(!K||da){if(da)x&&x.sendSelectCardId(S.getId(),S.getName()),
-1==J.indexOf(S)&&J.push(S);else{for(da=0;da<J.length;da++)J[da].getId()==S.getId()&&J.splice(da,1);x&&x.sendCancelCardId(S.getId())}G.setListSelectedModel(J)}},wb=function(S){if(v==C){w=V!=S?!0:!1;V=S;L||(L=!0,D.setAllPublishModels(z));U="allCard"==S.getValue()?z:O[S.getValue()];S=[];switch(ia){case 1:for(var da=0;da<U.length;da++)"dashboard"==U[da].getPublishSourceType()&&S.push(U[da]);A=S;break;case 0:for(da=0;da<U.length;da++)"dashboard"!=U[da].getPublishSourceType()&&S.push(U[da]);A=S;break;
case 2:A=U}nb()}},Ab=function(S){var da=H.createFacade(function(xa){for(var Va=0;Va<xa.length;Va++){var bb=new za;bb.fromJsonObject(xa[Va]);if(u||bb.getPublishSourceType()!=La.DASHBOARD)bb.isPreset()?X.push(bb):pa.push(bb)}z=pa;0<X.length&&(ra.show(),0==pa.length&&(z=X,P=p,Ia.setSelected(n[1]),N=!0));Hb();Db();yb();S(P)});da.setShowBlocking(!0);da.loadAllSelectorPublishInfos(u)},yb=function(){if(r){P[0].setIsShow(!0);for(var S=1;S<P.length;S++){P[S].setIsShow(!1);var da=O[P[S].getValue()];da&&P[S].setIsShow(Jb(da))}}else for(T[0].setIsShow(!0),
S=1;S<T.length;S++)T[S].setIsShow(!1),(da=T[S].isPreset()?Z[T[S].getValue()]:Z[T[S].getText()])&&T[S].setIsShow(Jb(da))},Jb=function(S){for(var da=0;da<S.length;da++)if(N){if(-1<X.indexOf(S[da]))return!0}else if(-1<pa.indexOf(S[da]))return!0;return!1},Gb=function(S){w=V!=S?!0:!1;V=S;l=z&&"allCard"==S.getValue()?z:S.isPreset()?Z[S.getValue()]:Z[S.getText()];S=[];switch(ia){case 1:for(var da=0;da<l.length;da++)"dashboard"==l[da].getPublishSourceType()&&S.push(l[da]);A=S;break;case 0:for(da=0;da<l.length;da++)"dashboard"!=
l[da].getPublishSourceType()&&S.push(l[da]);A=S;break;case 2:A=l}nb()},Eb=function(S){for(var da=[],xa=0;xa<S.length;xa++){var Va=new Oa;Va.setValue(S[xa].id);Va.setText(S[xa].name);Va.setIsPreset(S[xa].isPreset);da.push(Va)}return da},Db=function(){for(var S=0;S<P.length;S++)"allCard"!=P[S].getValue()&&(O[P[S].getValue()]=[]);for(S=0;S<z.length;S++){var da=z[S].isPreset()?"100000":z[S].getCreatorID();O[da]&&O[da].push(z[S])}O.allCard=z},Bb=function(){for(var S,da=0;da<T.length;da++)"allCard"!=T[da].getValue()&&
(S=T[da].isPreset()?T[da].getValue():T[da].getText(),Z[S]=[]);for(da=0;da<z.length;da++)S=z[da].isPreset()?z[da].getPath():z[da].getPathText(),Z[S]&&Z[S].push(z[da]);Z.allCard=z},Hb=function(){for(var S=[],da=[],xa=0;xa<z.length;xa++)z[xa].isPreset()?S.push(z[xa]):da.push(z[xa]);z=S.concat(da)},Ib=function(S){if(!S)return Ta.getIconUrl("publish","icon_dashboard_building.png");if("publish"==S.substring(2,9))return S;var da=H.createFacade(),xa=t.getPublishContext(),Va=E;xa&&(Va=xa.getParamPathPrefix());
return da.getCardImgUrl(Va,S)},Nb=function(S,da){var xa=t.getPublishContext();S=Wa.createPublishToEditDialog(q,xa,S);S.addSuccessCallback(da);S.setOuterMessageCurtain(H.getOuterMessageCurtain());S.showDialog()},Mb=function(S,da){S=S.getId();var xa=H.createFacade(function(Va){da();H.getOuterMessageCurtain().showSuccess(ua.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(Va,bb){return!1});xa.setShowBlocking(!1);xa.deletePublishInfo(Ga.CARD_REPOSITORY,S)},Kb=function(S){if(null==P){var da=
H.createFacade(function(xa){P=Eb(xa);for(xa=0;xa<P.length;xa++)for(xa=0;xa<P.length;xa++)P[xa].isPreset()?p.push(P[xa]):d.push(P[xa]);p.unshift(d[0]);P=d;z=null;Ab(S)},function(xa,Va){return!1});da.setShowBlocking(!0);da.loadCardGroupByPerson(u)}else S(P)},Lb=function(S){if(null==T){var da=H.createFacade(function(xa){T=Eb(xa);yb();S(T)},function(xa,Va){return!1});da.setShowBlocking(!0);da.loadCardGroupByDirectory(u)}else S(T)}};Fa.CardModel=za;var Ga,Oa,La,Ka,Za,aa,Wa,Qa,ab,db,ea,Pa,M,Na,Ba,Ja,Ha,
Xa,Ea,Aa,Ta,ya,ha,Ca,cb,hb,ua,Ma,eb,Ra,jb,ib,fb,ka,Ua,ba,$a,F,e,k,f,b,a,c,m,B;(function(){var q=com.kingdee.bos.qing;Ta=q.CodeLoader;q=com.kingdee.bos.qing.common;ya=q.DomUtil;cb=q.DateFormater;hb=q.Util;q=com.kingdee.bos.qing.framework.common;ua=q.MultilanguageManager.createPackageAccessor(Fa);Ma=q.RemoteFramework;q=com.kingdee.bos.qing.publish.common;Wa=q.PublishFactory;Qa=q.PublishFacade;ab=q.AbstractPublishToPanel;db=q.AbstractPublishManagerPanel;ea=q.SinglePublishManagerDialog;Ua=q.ListPublishContentPanel;
Pa=q.ListItemSelector;M=q.MenuPanel;Na=q.MyIcons;ka=q.SortWidget;Ba=q.SelectorListPublishContentPanel;ba=q.FilterModelType;$a=q.PublishManagerSortPanel;F=q.PublishViewSwitchPanel;Za=q.PublishCardItem;e=q.PublishSearchPanel;k=q.CardFilterType;a=q.PresetSearchTypeUtil;f=q.PublishAdvanceViewType;b=q.PublishAdvancePanelFactory;c=q.DisplayPublishedRecordName;q=com.kingdee.bos.qing.publish.model;Ga=q.PublishTargetType;La=q.PublishSourceType;Ka=q.PublishModel;aa=q.OperType;q=com.kingdee.bos.qing.biz.common;
Ea=q.RoleDialogSelector;Aa=q.UserDialogSelector;Oa=q.ValueTextPair;q=com.kingdee.bos.qing.ui.component;eb=q.Label;Ra=q.TextField;jb=q.TextArea;ib=q.SwitchButton;fb=q.MessageDialog;m=q.List;B=q.RadioButtonGroup;Ja=q.AbstractModalDialog;Ha=q.Button;Xa=q.CheckBox;q=com.kingdee.bos.qing.common.ui;ha=q.CommonIconUtil;Ca=q.TableUtil})();Ta.setRootPath(".");Ta.loadJs("biz-common/qing-biz-common.js");Ta.loadSkinCss("biz-common","biz-common");Ta.loadSkinJs("biz-common","skin");Ta.loadI18n("biz-common","biz-common");
Wa.addPublishFacade(Ga.CARD_REPOSITORY,function(q,x,t,H){Qa.call(this,q,x,t,H);var y=this.protectedMethod;this.loadGroups=function(){y.remote("loadGroups",{publishTargetType:Ga.CARD_REPOSITORY})};this.loadCardGroupByDirectory=function(u){y.remote("loadCardGroupByDirectory",{publishTargetType:Ga.CARD_REPOSITORY,showDSBCard:u})};this.loadAllPublishInfos=function(u){y.remote("loadAllPublishInfos",{publishTargetType:Ga.CARD_REPOSITORY,isPresetPublish:u})};this.loadAllPublishInfosByPagination=function(u,
v,r,C,W,P,T,K){y.remote("loadAllPublishInfosByPagination",{publishTargetType:Ga.CARD_REPOSITORY,isPresetPublish:u,path:v,targetPage:r,pageSize:C,searchText:W,currentType:P,sortField:T,sortOrder:K})};this.loadHitNumberOfAllPath=function(u,v,r){y.remote("loadHitNumberOfAllPath",{publishTargetType:Ga.CARD_REPOSITORY,isPresetPublish:u,searchText:v,currentType:r})};this.loadAllSelectorPublishInfos=function(u){y.remote("loadAllSelectorPublishInfos",{publishTargetType:Ga.CARD_REPOSITORY,showDSBCard:u})};
this.loadCardGroupByPerson=function(u){y.remote("loadCardGroupByPerson",{publishTargetType:Ga.CARD_REPOSITORY,showDSBCard:u})};this.saveGroup=function(u){y.remote("saveGroup",{publishTargetType:Ga.CARD_REPOSITORY,name:u})};this.updateGroup=function(u,v){y.remote("updateGroup",{publishTargetType:Ga.CARD_REPOSITORY,id:u,name:v})};this.deleteGroup=function(u){y.remote("deleteGroup",{publishTargetType:Ga.CARD_REPOSITORY,id:u})};this.loadPublishInfos=function(u,v){y.remote("loadPublishInfos",{publishTargetType:Ga.CARD_REPOSITORY,
path:u,isPreset:v})};this.loadOtherShareCardBaseInfo=function(u,v){y.remote("loadOtherShareCardBaseInfo",{publishTargetType:Ga.CARD_REPOSITORY,showDSBCard:u,ownerId:v})};this.getCardImgUrl=function(u,v){return com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrl(v,"card-thumbnail")};this.updateCardThumbnail=function(u,v,r){y.remote("updateCardThumbnail",{publishTargetType:Ga.CARD_REPOSITORY,publishId:u,fromPageClientId:v,subscribeKey:r})};this.exportEmbeddedPublishInfo=function(u){u=
{publishTargetType:Ga.CARD_REPOSITORY,selectedPublishModelIds:JSON.stringify(u)};y.remote("exportEmbeddedPublishInfo",u)};this.getExportedData=function(u){var v=hb.formatDate("yyyyMMdd_HHmmss");Ma.downloadFile("Qing-"+v+".qing-pkg",u)}});Wa.addPublishToPanel(Ga.CARD_REPOSITORY,function(q,x){ab.call(this,q,x);var t=this,H=this.protectedMethod,y,u,v=!1,r,C,W,P,T,K,Q,J,E,L,I,U,l,A=new m,z;this.getHeight=function(w){return D()?w?585:615:457};this.getWidth=function(w){return D()?w?395:445:w?375:425};this.getJqUi=
function(){y||R();return y};this.setPublishModel=function(w){I=w};this.isEditPublish=function(){return null!=I};this.setPublishContext=function(w){L=w};this.getPublishContext=function(){return L};this.setPathSelectorModel=function(w){U=w};var D=function(){var w=!1;if(I&&I.getPublishSourceType()==La.DASHBOARD||L&&L.getCurrentSourceType()==La.DASHBOARD&&!I)w=!0;return w},G=function(w,V){var p=$(document.body),d=p.prop("clientWidth");p=p.prop("clientHeight");l.showOrHide(w,V);var g=t.getFunResize();
V?(ya.layoutCtrl(w,(t.getWidth(t.isEditPublish())+400)/2,0,400,t.getHeight(t.isEditPublish())),u.text(ua.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" <<"),w=400+t.getWidth(t.isEditPublish())+30,V=D()?10:0,g&&g((d-w)/2,parseInt((p-t.getHeight(t.isEditPublish()))/2),w,t.getHeight(t.isEditPublish())+V)):(ya.layoutCtrl(w,t.getWidth(t.isEditPublish()),0,400,t.getHeight(t.isEditPublish())),u.text(ua.get("advanceSetting","\u9ad8\u7ea7\u8bbe\u7f6e")+" >>"),w=t.getWidth(t.isEditPublish()),g&&g((d-w)/
2,parseInt((p-t.getHeight(t.isEditPublish()))/2),w,t.getHeight(t.isEditPublish())))},R=function(){var w=D(),V=t.isEditPublish(),p=V?0:45,d=w?270:250;y=$("<div>");var g=new eb,h=g.getJqUi();g.setRequired(!0);g.setText(ua.get("publishName","\u53d1\u5e03\u540d\u79f0"));h.attr("title",ua.get("publishName","\u53d1\u5e03\u540d\u79f0"));r=new Ra;var n=$("<div>");r.addEditedListener(function(ia){clearTimeout(z);z=setTimeout(function(){var la=r.getText();if(""!=la){var Sa=new c(x,q);null!=I?Sa.setPublishModel(I):
Sa.setPublishContext(L);Sa.getPublishedRecordNameByInputText(la,x,function(Da){n.empty();Da=Da[r.getText()];if(null!=Da){A.setCustomItemPainter(function(kb,qb){kb.on("mousedown",function(pb){r.setText(qb);n.remove();pb.stopPropagation()});kb.text(qb);kb.attr("title",qb)});A.setItemModels(Da);A.setSelecteds([Da[0]]);Da=A.getJqUi();var lb=O.width(),mb=O.css("left"),nb=O.position().top+O.height();ya.layoutCtrl(n,mb,nb,lb,122);n.css("z-index","9999");Da.css({width:lb+"px",height:"122px"});Da.find(".sa-ctrl-list-owner").css("height",
"100px");lb=$("<div>");lb.addClass("history-publish-name");lb.text(ua.get("HistoryPublishName","\u5386\u53f2\u53d1\u5e03\u540d\u79f0"));lb.css({right:"13px",top:"100px"});Da.appendTo(n);lb.appendTo(n);n.appendTo(y)}else n.remove()})}else n.remove()},1E3)});r.addBlurListener(function(){n.remove()});var O=r.getJqUi();g=0;ya.layoutCtrl(h,8,g,64,23);ya.layoutCtrl(O,75+p,g,d,23);h.appendTo(y);O.appendTo(y);var Z=new eb;h=Z.getJqUi();Z.setRequired(!0);Z.setText(ua.get("publishPath","\u53d1\u5e03\u8def\u5f84"));
h.attr("title",ua.get("publishPath","\u53d1\u5e03\u8def\u5f84"));C=ra();Z=C.getJqUi();g+=43;ya.layoutCtrl(h,8,g,64,23);ya.layoutCtrl(Z,75+p,g,d,23);h.appendTo(y);Z.appendTo(y);V||(h=fa(),ya.layoutCtrl(Z,75+p,g,d-23,23),ya.layoutCtrl(h,d+56+p,g+3,20,23),h.appendTo(y));Z=new eb;h=Z.getJqUi();Z.setText(ua.get("permission","\u6388\u6743"));h.attr("title",ua.get("permission","\u6388\u6743"));W=new Ea(H.createFacade);Z=W.getJqUi();P=new Aa(H.createFacade);var ma=P.getJqUi();g+=43;ya.layoutCtrl(h,8,g,64,
23);ya.layoutCtrl(Z,75+p,g,d,23);ya.layoutCtrl(ma,75+p,g+44,d,23);h.appendTo(y);Z.appendTo(y);ma.appendTo(y);Z=new eb;h=Z.getJqUi();Z.setText(ua.get("description","\u63cf\u8ff0"));h.attr("title",ua.get("description","\u63cf\u8ff0"));T=new jb;Z=T.getJqUi();g+=87;ya.layoutCtrl(h,8,g,64,46);ma=46+(V&&!w?50:V&&w?25:0);ya.layoutCtrl(Z,75+p,g,d+2,ma);h.appendTo(y);Z.appendTo(y);g+=ma+20;if(w){w=new eb;w.setText(ua.get("thumbnail","\u7f29\u7565\u56fe"));w=w.getJqUi();ya.layoutCtrl(w,8,g,64,23);w.appendTo(y);
I&&I.getImagePath()&&(J=com.kingdee.bos.qing.framework.common.RemoteFramework.getLoadImgUrl(I.getImagePath(),"card-thumbnail"));E=new com.kingdee.bos.qing.imagelib.choose.ui.ChooseThumbnailPane;var Ia=g+3;E.setDsbThumbnailDeleteCallBack(function(ia,la,Sa){E.getThumbnailUrlModel().getImageFileName()===ia&&(ia=ha.createWarning(),ia.addClass("dm-entity-list-item-notexist"),ia.attr("title",ua.get("imgHasBeenDeleted","\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e")),
ya.layoutCtrl(ia,55+p,Ia),ia.appendTo(y))});E.setRemoveImgNotExistIconCallBack(function(){y.find(".dsb").remove()});w=E.init(J);ya.layoutCtrl(w,75+p,g+3,d,154);w.appendTo(y);g+=174}V||(w=new eb,d=w.getJqUi(),w.setText(ua.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),d.attr("title",ua.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),Q=new ib,L.getHasDirectModeTable()?(Q.setOn(!1),Q.setEnabled(!1)):L.isHaveToCarryData()?(Q.setOn(!0),Q.setEnabled(!1)):Q.setOn(!1),
w=Q.getJqUi(),ya.layoutCtrl(d,8,g-2,110,23),ya.layoutCtrl(w,120,g,31,19),L.supportPublishWithCarryData()&&(d.appendTo(y),w.appendTo(y)),g+=43);if(!V){V=!1;try{var oa=com.kingdee.bos.qing.integration.CardHomepageAddHelper;oa&&oa.addCardToHomepage&&(V=!0)}catch(ia){console&&console.warn("unsupport add card to Homepage",ia)}V&&(V=new eb,oa=V.getJqUi(),V.setText(ua.get("addToHomepage","\u6dfb\u52a0\u5230\u5f53\u524d\u7528\u6237\u9996\u9875")),K=new ib,K.setOn(!0),V=K.getJqUi(),ya.layoutCtrl(oa,8,g-12,
110,23),ya.layoutCtrl(V,120,g-10,31,19),oa.appendTo(y),V.appendTo(y),g+=21)}oa=f.SQUARE_VIEW;D()?oa=f.DSB_VIEW:(V=I?I.getPublishSourceType()==La.EXTREPORT:L.getCurrentSourceType()==La.EXTREPORT,V&&(oa=f.QING_RPT_VIEW));l||(l=b.createPublishAdvancePanel(oa,L,I),l.setInitSuccessCallBackHandler(Y),l.setPublishTargetType(x),l.setOuterMessageCurtain(H.getOuterMessageCurtain()),l.setRemoteImpl(q),l.loadPublishOperModel());u=$("<div>");u.addClass("sa-qing-publish-advance-set-btn");u.text(ua.get("advanceSetting",
"\u9ad8\u7ea7\u8bbe\u7f6e")+" >>");ya.layoutCtrl(u,t.getWidth(t.isEditPublish())-200,g,150,23);u.appendTo(y);pa()},Y=function(w){w.appendTo(y);ya.layoutCtrl(w,t.getWidth(t.isEditPublish()),0,400,t.getHeight(t.isEditPublish()));I&&I.getNoOperValueMap()&&0!=(I.getNoOperValueMap()[aa.LONGER]|I.getNoOperValueMap()[aa.SQUARE]|I.getNoOperValueMap()[aa.SQUARE_LONGER]|I.getNoOperValueMap()[aa.QING_RPT])&&(v=!0,G(w,v));u.on("click",function(){v=!v;G(w,v)});pa()};this.getNewPublishSuccessCallback=function(){return ca};
var ca=function(w,V){if(K&&K.isOn())try{com.kingdee.bos.qing.integration.CardHomepageAddHelper.addCardToHomepage(w.getId(),w.getName())}catch(p){console&&console.error("Add card to Homepage failed",p)}V.showSuccess(ua.get("publishSuccess","\u53d1\u5e03\u6210\u529f\u3002"))},fa=function(){var w=$("<span>");w.attr("title",ua.get("publishManage","\u53d1\u5e03\u7ba1\u7406"));Na.background(w,"publish_manager");w.on("click",function(){var V=new ja(t.getRemoteImpl());V.setPublishContext(L);V.setPathSelectorModel(U);
V.setPublishContentEditEntrance(t.getPublishContentEditEntrance());V=new ea(V);V.setClosedCallback(function(p){U=p.getPathSelectorModel();C.setListItem(sa());if(p=C.getSelectedValue()){for(var d=null,g=0;g<U.length;g++){var h=U[g];if(h.getValue()==p.getValue()){d=h;break}}C.setSelectedValue(d)}});V.showDialog()});return w},ra=function(){var w=new Pa;w.setPlaceholder(ua.get("selectPublishPath","\u8bf7\u9009\u62e9\u53d1\u5e03\u8def\u5f84"));w.setMaxHeight(118);X(w);return w},X=function(w){if(null==
U){var V=H.createFacade(function(p){for(var d=[],g=0;g<p.length;g++){var h=new Oa;h.setValue(p[g].id);h.setText(p[g].name);h.setIsPreset(p[g].isPreset);d.push(h)}U=d;w.setListItem(sa())},function(p,d){return!1});V.setBlockingJqUi(y);V.setShowBlocking(!0);V.loadGroups()}else w.setListItem(sa())},pa=function(){if(I){r.setText(I.getName());var w=new Oa;w.setValue(I.getPath());w.setText(I.getPathText());C.setSelectedValue(w);W.setSelectedValue(I.getRoles());P.setSelectedValue(I.getUsers());T.setText(I.getCardDesc())}},
sa=function(){for(var w=[],V=0;V<U.length;V++)U[V].isPreset()||w.push(U[V]);return w};this.getJsonModel=function(){return L.getCurrentContentModel()};this.getAnalysisSchemaArray=function(){return L.getChoiceAnalysisSchema()};this.getModelFromUI=function(){var w=new za;if(null==I){w.setPublishSourceType(L.getCurrentSourceType());w.setPublishTargetType(t.getPublishTargetType());w.setTagId(L.getBizTag());if(E){var V=E.getDashboardThumbnailUrl();w.setImagePath(V)}w.setSchemeId(Ka.CURRENT_SCHEMA_ID)}else w=
I,E&&E.isImageChange()&&(V=E.getDashboardThumbnailUrl(),w.setImagePath(V)),w.setSchemeId(I.getSchemeId());w.setName($.trim(r.getText()));V=C.getSelectedValue();w.setPath(V.getValue());w.setPathText(V.getText());w.setAnalysis(!0);W&&w.setRoles(W.getSelectedValue());P&&w.setUsers(P.getSelectedValue());Q&&(V=Q.isOn(),w.setCarryData(V));w.setCardDesc(T.getText());l&&(w.setCarryUsers(l.getCarryDataUsers()),w.setNoOperValueMap(l.getNoOperValueMap()));return w};var N=function(w){if(E){var V=E.getDashboardThumbnailUrl(),
p=new com.kingdee.bos.qing.imagelib.model.ThumbnailUrlModel;V=p.getImagePathFromJson(V);p.checkHasImage(V,w)}else w(!1)};this.checkUIInput=function(w){var V=r.getText();if(null==V||0==$.trim(V).length)return ua.get("publishNameNotEmptyTip","\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0\u3002");if(50<V.length&&50<T.getText().length)return ua.get("nameAndDescriptionCanNotExceedLimit50Tip","\u53d1\u5e03\u540d\u79f0\u3001\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(50<
V.length)return ua.get("publishNameTooLongTip","\u53d1\u5e03\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(C.getSelectedValue()){if(50<T.getText().length)return ua.get("descriptionCanNotExceedLimit50Tip","\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");D()?N(function(p){p?w(!0):(H.getOuterMessageCurtain().showPrompt(ua.get("imgHasBeenDeleted","\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")),
w(!1))}):w(!0)}else return ua.get("publishPathNotEmptyTip","\u8bf7\u8f93\u5165\u53d1\u5e03\u8def\u5f84\u3002");return null}});Wa.addPublishManagePanel(Ga.CARD_REPOSITORY,ja)})();
//qingVersionTag: 20250415