var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(na,ka,pa){na instanceof String&&(na=String(na));for(var Da=na.length,Ea=0;Ea<Da;Ea++){var Ta=na[Ea];if(ka.call(pa,Ta,Ea,na))return{i:Ea,v:Ta}}return{i:-1,v:void 0}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(na,ka,pa){if(na==Array.prototype||na==Object.prototype)return na;na[ka]=pa.value;return na};$jscomp.getGlobal=function(na){na=["object"==typeof globalThis&&globalThis,na,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var ka=0;ka<na.length;++ka){var pa=na[ka];if(pa&&pa.Math==Math)return pa}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(na,ka){var pa=$jscomp.propertyToPolyfillSymbol[ka];if(null==pa)return na[ka];pa=na[pa];return void 0!==pa?pa:na[ka]};
$jscomp.polyfill=function(na,ka,pa,Da){ka&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(na,ka,pa,Da):$jscomp.polyfillUnisolated(na,ka,pa,Da))};$jscomp.polyfillUnisolated=function(na,ka,pa,Da){pa=$jscomp.global;na=na.split(".");for(Da=0;Da<na.length-1;Da++){var Ea=na[Da];if(!(Ea in pa))return;pa=pa[Ea]}na=na[na.length-1];Da=pa[na];ka=ka(Da);ka!=Da&&null!=ka&&$jscomp.defineProperty(pa,na,{configurable:!0,writable:!0,value:ka})};
$jscomp.polyfillIsolated=function(na,ka,pa,Da){var Ea=na.split(".");na=1===Ea.length;Da=Ea[0];Da=!na&&Da in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Ta=0;Ta<Ea.length-1;Ta++){var gb=Ea[Ta];if(!(gb in Da))return;Da=Da[gb]}Ea=Ea[Ea.length-1];pa=$jscomp.IS_SYMBOL_NATIVE&&"es6"===pa?Da[Ea]:null;ka=ka(pa);null!=ka&&(na?$jscomp.defineProperty($jscomp.polyfills,Ea,{configurable:!0,writable:!0,value:ka}):ka!==pa&&(void 0===$jscomp.propertyToPolyfillSymbol[Ea]&&(pa=1E9*Math.random()>>>0,
$jscomp.propertyToPolyfillSymbol[Ea]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(Ea):$jscomp.POLYFILL_PREFIX+pa+"$"+Ea),$jscomp.defineProperty(Da,$jscomp.propertyToPolyfillSymbol[Ea],{configurable:!0,writable:!0,value:ka})))};$jscomp.polyfill("Array.prototype.find",function(na){return na?na:function(ka,pa){return $jscomp.findInternal(this,ka,pa).v}},"es6","es3");$jscomp.arrayIteratorImpl=function(na){var ka=0;return function(){return ka<na.length?{done:!1,value:na[ka++]}:{done:!0}}};
$jscomp.arrayIterator=function(na){return{next:$jscomp.arrayIteratorImpl(na)}};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(na){if(na)return na;var ka=function(Ta,gb){this.$jscomp$symbol$id_=Ta;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:gb})};ka.prototype.toString=function(){return this.$jscomp$symbol$id_};var pa="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",Da=0,Ea=function(Ta){if(this instanceof Ea)throw new TypeError("Symbol is not a constructor");return new ka(pa+(Ta||"")+"_"+Da++,Ta)};return Ea},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(na){if(na)return na;na=Symbol("Symbol.iterator");for(var ka="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),pa=0;pa<ka.length;pa++){var Da=$jscomp.global[ka[pa]];"function"===typeof Da&&"function"!=typeof Da.prototype[na]&&$jscomp.defineProperty(Da.prototype,na,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return na},
"es6","es3");$jscomp.iteratorPrototype=function(na){na={next:na};na[Symbol.iterator]=function(){return this};return na};$jscomp.iteratorFromArray=function(na,ka){na instanceof String&&(na+="");var pa=0,Da=!1,Ea={next:function(){if(!Da&&pa<na.length){var Ta=pa++;return{value:ka(Ta,na[Ta]),done:!1}}Da=!0;return{done:!0,value:void 0}}};Ea[Symbol.iterator]=function(){return Ea};return Ea};
$jscomp.polyfill("Array.prototype.keys",function(na){return na?na:function(){return $jscomp.iteratorFromArray(this,function(ka){return ka})}},"es6","es3");
(function(){function na(e){this.call=function(v,g,k,d,a){v=Db.createRemoteUrl(e,g,!0);k.lappUserId=ca?ca.getLappUserId():"";k.lappUserType=ca?ca.getLappUserType():"";k.datacenterUUID=ca?ca.getDatacenterUUID():"";g=Eb.getUrlParamValue("language");k.language=g;g=k.customSettings;delete k.customSettings;jQuery.support.cors=!0;g=g?g:{};g.type="POST";g.dataType="json";g.url=v;hb.isIEBrowser()&&(g.url=v.replace("https:",window.location.protocol));g.data=k;g.success=function(f){d(f)};g.error=function(f,
l,w){a(f.status,l,f)};$.ajax(g)}}function ka(e,v,g,k){Xb.call(this,new na(e),v,g,k);var d=this.protectedMethod;this.uploadBase64Image=function(a){pb.uploadBase64Image(e,v,g,k,a)};this.getOwnDirList=function(a,f){d.remote("getDirListIfEmptyThenCreate",{isQingAdminRole:a,qingAdminRoleUserId:f})};this.isAnalysisNameDuplicate=function(a,f){d.remote("isNameDuplicate",{parentId:a,name:f})};this.saveAnalysis=function(a,f,l,w,E){a={model:JSON.stringify(a.toJsonObject()),eid:f,scene:l,webShare:w,overWrite:E};
d.remote("saveLappAnalysis",a)};this.deleteAnalysis=function(a){d.remote("deleteById",{id:a})};this.getAnalysisList=function(a,f){d.remote("getLappAnalysisList",{directoryId:a,showAll:f})};this.getAnalysisListOnCondition=function(a,f,l,w,E,F,z){d.remote("getLappAnalysisListOnCondition",{directoryId:a,searchText:f,currentType:l,targetPage:w,pageSize:E,sortField:F,sortOrder:z})};this.addSharing=function(a){a={model:JSON.stringify(a.toJsonObject()),webShare:!0};d.remote("add",a)};this.saveGroup=function(a){a=
{model:JSON.stringify(a.toJsonObject())};d.remote("saveLappDirectory",a)};this.deleteGroup=function(a){d.remote("delete",{id:a})};this.deleteByPublishIds=function(a){d.remote("deleteByPublishIds",{publishIds:a})};this.syncDatacenterInfo=function(a,f){a={datacenterInfo:JSON.stringify(a),publishIds:JSON.stringify(f)};d.remote("syncDatacenterInfo",a)};this.getDatacenterInfo=function(a){d.remote("getDatacenterInfo",{datacenterUUID:a})};this.updateDatacenterInfo=function(a){a={datacenterInfo:JSON.stringify(a.toJsonObject())};
d.remote("updateDatacenterInfo",a)};this.getLogicDeletedPublishIds=function(){d.remote("getLogicDeletedPublishIds",{})};this.getAnalysisInfo=function(a,f){d.remote("getAnalysisInfo",{directoryId:a,name:f})};this.batchUpdatePublishInfo=function(a){a={publishInfos:JSON.stringify(a)};d.remote("batchUpdatePublishInfo",a)};this.getAllPublishIds=function(){d.remote("getAllPublishIds",{})};this.isExistedThirdpartyInfo=function(a,f,l){d.remote("isExistedThirdpartyInfo",{appId:a,licenseCode:f,timestamp:l,
qingLoginType:"ENCRYPT_LOGIN"})};this.loadByUserAndPublishIds=function(a,f){a={publishIds:JSON.stringify(a),lappUsers:JSON.stringify(f)};d.remote("loadByUserAndPublishIds",a)};this.handover=function(a,f,l){a={publishIds:JSON.stringify(a),fromLappUsers:JSON.stringify(f),toLappUsers:JSON.stringify(l)};d.remote("handover",a)};this.getAnalysisInfoById=function(a){d.remote("get",{id:a})};this.getAllUserDirList=function(a){d.remote("getAllUserDirList",{needGroup:a})};this.getAnalysisInfosByDirIds=function(a,
f,l,w,E){a={directoryIds:JSON.stringify(a),searchText:f,filterType:l,iTargetPage:w,iPageSize:E};d.remote("getAnalysisInfosByDirIds",a)};this.getPublishCountAggPath=function(a,f){d.remote("getPublishCountAggPath",{searchText:a,filterType:f})};this.getAnalysisInfosByPublishIds=function(a){a={publishIds:JSON.stringify(a)};d.remote("getAnalysisInfosByPublishIds",a)}}function pa(e,v,g,k){Yb.call(this,e,v,g,k);var d=this.protectedMethod;this.getLappContext=function(a){d.remote("getLappContext",{publishTargetType:xa.MOBILE,
appType:a?com.kingdee.bos.qing.lapp.integration.AppType.YZJ:""})};this.getShareContext=function(){d.remote("getShareContext",{publishTargetType:xa.MOBILE})};this.getLappContextsByIds=function(a,f){a={publishTargetType:xa.MOBILE,userIds:JSON.stringify(a),appType:f};d.remote("getLappContextsByIds",a)};this.loadPublishInfo=function(a){d.remote("loadPublishInfo",{publishTargetType:xa.MOBILE,publishId:a})};this.loadPublishInfoByPublishIdArr=function(a){d.remote("loadPublishInfoByPublishIdArr",{publishTargetType:xa.MOBILE,
publishIdArr:a})};this.loadAllPublishInfosByPagination=function(a,f,l){d.remote("loadAllPublishInfosByPagination",{publishTargetType:xa.MOBILE,publishIdArr:a,sortField:f,sortOrder:l})};this.saveThumbnailInfo=function(a,f){a={publishTargetType:xa.MOBILE,thumbnailInfo:JSON.stringify(a.toJsonObject()),overWrite:f};d.remote("saveThumbnailInfo",a)};this.updateThumbnailInfo=function(a,f){a={publishTargetType:xa.MOBILE,publishName:f,thumbnailInfo:JSON.stringify(a.toJsonObject())};d.remote("updateThumbnailInfo",
a)};this.getThumbnailInfo=function(a){d.remote("getThumbnailInfo",{publishTargetType:xa.MOBILE,publishId:a})};this.exportSquareImg=function(a,f,l){a={publishTargetType:xa.MOBILE,modelWrapper:JSON.stringify(a),width:f,height:l};d.remote("exportSquareImg",a)};this.getExportedImgUrl=function(a,f){return ab.getLoadImgUrl(f,"export")};this.saveConfigInfo=function(a,f,l,w,E,F){a={publishTargetType:xa.MOBILE,modelBook:f?JSON.stringify(f):null,configModel:JSON.stringify(a.toJsonObject()),thumbnailModelBook:l?
JSON.stringify(l):null,paramPathPrefix:w,dsbPublishId:E,scene:F};d.remote("saveConfigInfo",a)};this.loadConfigInfo=function(a){d.remote("loadConfigInfo",{publishTargetType:xa.MOBILE,pushTargetType:a})};this.updateConfigInfo=function(a,f){a={publishTargetType:xa.MOBILE,configModel:JSON.stringify(a.toJsonObject()),paramPathPrefix:f};d.remote("updateConfigInfo",a)};this.deleteConfigInfo=function(a,f){d.remote("deleteConfigInfo",{publishTargetType:xa.MOBILE,configId:a,pushTargetType:f})};this.loadAllPushRecord=
function(a,f){d.remote("loadAllPushRecord",{publishTargetType:xa.MOBILE,pushTargetType:f,configId:a})};this.loadPushRecordErrorInfo=function(a,f){d.remote("loadPushRecordErrorInfo",{publishTargetType:xa.MOBILE,pushRecordId:a})};this.deletePushRecord=function(a){a={publishTargetType:xa.MOBILE,arrYzjPushRecordModel:JSON.stringify(a)};d.remote("deletePushRecord",a)};this.doPush=function(a,f,l,w){return d.remote("doPush",{publishTargetType:xa.MOBILE,configId:a,timeStamp:f,paramPathPrefix:l,pushTargetType:w})};
this.getServerTimeStamp=function(){d.remote("getServerTimeStamp",{publishTargetType:xa.MOBILE})};this.getServerTimeStampForDoPush=function(){d.remote("getServerTimeStampForDoPush",{publishTargetType:xa.MOBILE})};this.updateScheduleState=function(a,f,l){d.remote("updateScheduleState",{publishTargetType:xa.MOBILE,openSchedule:a,configId:f,paramPathPrefix:l})};this.getUserIdsByRoleId=function(a){a={publishTargetType:xa.MOBILE,roleId:JSON.stringify(a)};d.remote("getUserIdsByRoleId",a)};this.loadPushContext=
function(){d.remote("loadPushContext",{publishTargetType:xa.MOBILE})};this.updateLappThumbnail=function(a,f,l,w,E){d.remote("updateLappThumbnail",{publishTargetType:xa.MOBILE,lappId:a,schemaId:f,fromPageClientId:l,subscribeKey:w,lappUserType:E})};this.loadPushSchema=function(a,f){d.remote("loadPushSchema",{publishTargetType:xa.MOBILE,configId:a,pushTargetType:f})};this.updatePushSchema=function(a,f,l){a={publishTargetType:xa.MOBILE,configId:a,model:JSON.stringify(l),pushTargetType:f};d.remote("updatePushSchema",
a)};this.loadDatacenterInfo=function(){d.remote("loadDatacenterInfo",{publishTargetType:xa.MOBILE})};this.finishSync=function(a){d.remote("finishSync",{publishTargetType:xa.MOBILE,datacenterUUID:a})};this.cronExpression=function(a){d.remote("cronExpression",{publishTargetType:xa.MOBILE,cron:a})};this.checkSameSource=function(a,f){d.remote("checkSameSource",{publishId:a,sourceId:f,publishTargetType:xa.MOBILE})};this.loadThirdPartyConfig=function(){d.remote("loadThirdPartyConfig",{publishTargetType:xa.MOBILE})};
this.updateThirdPartyConfig=function(a){a={thirdPartyConfig:JSON.stringify(a),publishTargetType:xa.MOBILE};d.remote("updateThirdPartyConfig",a)};this.deleteThirdPartyConfig=function(){d.remote("deleteThirdPartyConfig",{publishTargetType:xa.MOBILE})};this.loadPermissionLappContexts=function(a,f){a={appType:f,publishIds:JSON.stringify(a),publishTargetType:xa.MOBILE};d.remote("loadPermissionLappContexts",a)};this.updateModelTime=function(a,f){a={arrCreateTime:JSON.stringify(a),arrUpdateTime:JSON.stringify(f),
publishTargetType:xa.MOBILE};d.remote("updateModelTime",a)};this.updatePublishLappConfigs=function(a){a={publishLappConfigs:JSON.stringify(a),publishTargetType:xa.MOBILE};d.remote("updatePublishLappConfigs",a)};this.getAllLappContextsByUserIds=function(a){a={publishTargetType:xa.MOBILE,userIds:JSON.stringify(a)};d.remote("getAllLappContextsByUserIds",a)};this.loadPushRecordConfigInfo=function(a){d.remote("loadPushRecordConfigInfo",{publishTargetType:xa.MOBILE,pushTargetType:a})};this.saveLappPushRecordConfig=
function(a,f,l){d.remote("saveLappPushRecordConfig",{publishTargetType:xa.MOBILE,pushTargetType:a,strategy:f,value:l})}}function Da(){var e=this,v,g,k,d,a,f,l,w,E,F,z,r,h,n,m=[],u;this.getEId=function(){return v};this.setEId=function(c){v=c};this.getLappUserId=function(){return g};this.setLappUserId=function(c){g=c};this.getLappUserType=function(){return k};this.setLappUserType=function(c){k=c};this.setUserName=function(c){d=c};this.getUserName=function(){return d};this.getAccountId=function(){return a};
this.setAccountId=function(c){a=c};this.getScene=function(){return f};this.setScene=function(c){f=c};this.setServerHostUrl=function(c){l=c};this.getServerHostUrl=function(){return l};this.setAppId=function(c){w=c};this.getAppId=function(){return w};this.setDatacenterUUID=function(c){E=c};this.getDatacenterUUID=function(){return E};this.setDatacenterEditor=function(c){F=c};this.isDatacenterEditor=function(){return F};this.setQingAdminRole=function(c){z=c};this.getQingAdminRole=function(){return z};
this.setQingAdminRoleUserId=function(c){r=c};this.getQingAdminRoleUserId=function(){return r};this.setConfiguredPublishUrlPrefix=function(c){h=c};this.getConfiguredPublishUrlPrefix=function(){return h};this.setExtraPublishUrlParamMap=function(c){n=c};this.getExtraPublishUrlParamMap=function(){return n};this.appendExtraPublishUrlParam=function(c){if(n)for(var p in n){var q=n[p];q&&(c=hb.appendParamToUrl(c,p,q))}return c};this.setPublishLappConfigs=function(c){m=c};this.getPublishLappConfigs=function(){return m};
this.setPrivate=function(c){u=c};this.isPrivate=function(){return u};this.fromJsonObject=function(c){if(c){c.eid&&e.setEId(c.eid);c.lappUserId&&e.setLappUserId(c.lappUserId);if(null==g||""==$.trim(g))g="";c.lappUserType&&e.setLappUserType(c.lappUserType);c.userName&&e.setUserName(c.userName);c.accountId&&e.setAccountId(c.accountId);c.scene&&e.setScene(c.scene);c.serverHostUrl&&e.setServerHostUrl(c.serverHostUrl);c.appId&&e.setAppId(c.appId);c.datacenterUUID&&e.setDatacenterUUID(c.datacenterUUID);
c.isDatacenterEditor&&e.setDatacenterEditor(c.isDatacenterEditor);c.isQingAdminRole&&e.setQingAdminRole(c.isQingAdminRole);c.qingAdminRoleUserId&&e.setQingAdminRoleUserId(c.qingAdminRoleUserId);c.configuredPublishUrlPrefix&&e.setConfiguredPublishUrlPrefix(c.configuredPublishUrlPrefix);c.extraPublishUrlParamMap&&e.setExtraPublishUrlParamMap(c.extraPublishUrlParamMap);if(c.publishLappConfigs){var p=c.publishLappConfigs;m=[];for(var q=0;q<p.length;q++){var N=new Ea;N.fromJsonObject(p[q]);m.push(N)}}e.setPrivate(c.isPrivate)}}}
function Ea(){var e,v,g,k,d,a,f;this.setId=function(l){e=l};this.getId=function(){return e};this.setAppType=function(l){v=l};this.getAppType=function(){return v};this.setOrderId=function(l){g=l};this.getOrderId=function(){return g};this.setLappUserId=function(l){k=l};this.getLappUserId=function(){return k};this.setLappUserType=function(l){d=l};this.getLappUserType=function(){return d};this.setCorpId=function(l){a=l};this.getCorpId=function(){return a};this.setAppImageFile=function(l){f=l};this.getAppImageFile=
function(){return f};this.fromJsonObject=function(l){e=l.id;v=l.appType;g=l.orderId;k=l.lappUserId;if(null==k||""==$.trim(k))k="";d=l.lappUserType;a=l.corpId;f=l.appImageFile};this.toJsonObject=function(){var l={};l.id=e;l.appType=v;l.orderId=g;l.lappUserId=k;l.lappUserType=d;l.corpId=a;l.appImageFile=f;return l}}function Ta(){var e,v,g;this.setDatacenterUUID=function(k){e=k};this.getDatacenterUUID=function(){return e};this.setAccountName=function(k){v=k};this.getAccountName=function(){return v};
this.setProductType=function(k){g=k};this.getProductType=function(){return g};this.fromJsonObject=function(k){k&&(e=k.datacenterUUID,v=k.accountName,g=k.productType)};this.toJsonObject=function(){var k={};k.datacenterUUID=e;k.accountName=v;k.productType=g;return k}}function gb(e){Zb.call(this,e,xa.MOBILE);var v=this,g=this.protectedMethod,k,d,a,f,l=!1;this.setPublishContext=function(m){k=m};this.getPublishContext=function(){return k};this.getJqUi=function(){d||(d=$("<div>"),l?(v.protectedUpdateUI(!0),
l=!1):w());return d};this.getUserIdsByValueTextPair=function(m){for(var u=[],c=0;c<m.length;c++){var p=m[c].getValue();-1==u.indexOf(p)&&u.push(p)}return u};this.protectedAutoSelectAppType=function(){};var w=function(){E(function(){v.protectedAutoSelectAppType();var m=ca.getLappUserId();v.protectedIsOwnDealLappContext()||null!=m&&""!=$.trim(m)?v.protectedUpdateUI(!0):v.protectedUpdateUI(!1)},function(){v.protectedUpdateUI(!1)})},E=function(m,u){bb.LappIntegration.loadLappContext(e,v.protectedIsOnlyYzj(),
!0,m,function(c,p){g.getOuterMessageCurtain().showPrompt(p,2E3);u&&u()})};this.protectedUpdateUI=function(m){m?(a||(a=v.protectedCreateContainer(),a.appendTo(d)),a.show(),setTimeout(F,2E3)):(a&&a.hide(),n().appendTo(d),ca=null)};this.protectedCreateContainer=function(){throw Error();};this.protectedIsOnlyYzj=function(){throw Error();};this.protectedIsOwnDealLappContext=function(){return!1};var F=function(){if(ca.getLappUserId()){var m=new ka("lappAnalysisMgr",function(u){u&&0<u.length&&z(u)},function(u,
c){return!0});m.setShowBlocking(!1);m.getLogicDeletedPublishIds()}},z=function(m){var u=g.createFacade(function(c){c&&0<c.length&&r(c)},function(c,p){return!0});u.setShowBlocking(!1);u.deletePublishInfos(xa.MOBILE,m)},r=function(m){var u=new ka("lappAnalysisMgr",function(c){},function(c,p){return!0});u.setShowBlocking(!1);u.deleteByPublishIds(m)};this.setHasLappContext=function(m){l=m};var h=function(){for(var m=ca.getPublishLappConfigs(),u=0;u<m.length;u++){var c=m[u];if(ca.getLappUserType()==c.getLappUserType())return c.getAppType()}},
n=function(){var m=$("<div>");m.addClass("sa-qing-publish-manager-content-emptytip");m.css({top:"80px"});var u=b.get("lappUserIdNullTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u540c\u6b65\u7528\u6237\u4fe1\u606f\u3002\u64cd\u4f5c\u65b9\u5f0f\u8bf7\u53c2\u8003"),c=kb.getMobileLightAppUrl(),p=$("<a onclick='javascript:window.open(\""+c+"\");' href='#'>");p.css({cursor:"pointer",color:"var(--color-main, #5582f3)"});ca&&"K3CLOUD"==
ca.getScene()&&h()==ib.DINGDING_OFFLINE&&(u=b.get("lappUserIdNullDDTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u60a8\u5728\u9489\u9489\u79fb\u52a8\u7aef\u7684\u661f\u7a7a\u8f7b\u5e94\u7528\u4e2d\u7ed1\u5b9a\u7528\u6237\u4fe1\u606f\uff0c\u64cd\u4f5c\u65b9\u5f0f\u8bf7\u53c2\u8003"),p=$("<a onclick='javascript:window.open(\""+c+"\");' href='#'>"));m.text(u);p.text(b.get("helpDocument","\u5e2e\u52a9\u6587\u6863"));p.appendTo(m);return m};this.protectedMethod.getPublishContext=
function(){return k};this.protectedMethod.getLappContextsByUserSelector=function(m,u,c){var p=g.createFacade(function(q){var N=new yc;N.fromJsonObject(q);N.isSuccess()?u(N.getAuthorizedUsers(),N.getFailedUserIds(),!1):u(N.getAuthorizedUsers(),N.getFailedUserIds(),!0,function(){var x=N.getFailedUserNames(),J=b.get("authorizedPersion","\u6388\u6743\u6210\u529f\u4eba\u6570\uff1a")+N.getAuthorizedUsers().length;J+="\n"+b.get("authorizationFailures","\u6388\u6743\u5931\u8d25\u4eba\u6570\uff1a")+x.length;
for(var Z=b.get("detailOfFailures","\u83b7\u53d6\u4ee5\u4e0b\u7528\u6237\u79fb\u52a8\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u5148\u540c\u6b65\u79fb\u52a8\u8f7b\u5e94\u7528\u8d26\u53f7\uff1a")+"\r\n",X=0;X<x.length;X++){var ba=x[X];0!=X&&(Z+=b.get("comma","\uff0c"));if(50<X){Z+="...";break}Z+=ba}x=com.kingdee.bos.qing.ui.component.MessageDialog;X=new x;X.setOptionType(x.OPTION_OK);X.setMessage(J);Z&&X.setDetail(Z);X.showDialog()})},function(q,N){g.getOuterMessageCurtain().showPrompt(N,
2E3);c()});p.setShowBlocking(!1);p.getLappContextsByIds(m,h())};this.protectedMethod.cutAndUploadImageToCloud=function(m,u,c,p,q,N,x){if(m){var J=new ka("image",function(Z){u(Z);c(!0,p,q,N);x&&x()},function(Z,X){g.getOuterMessageCurtain().showPrompt(X,2E3);c(!0);return!0});J.setShowBlocking(!1);J.uploadBase64Image(m)}else c(!0,p,q,N),x&&x()};this.protectedMethod.isDsbPublish=function(){return k.getScene()==Va.Scene.Longer||k.getScene()==Va.Scene.Square?!1:!0};this.protectedMethod.getNotDuplicatedUserIds=
function(m,u){for(var c=0;c<u.length;c++){for(var p=!1,q=0;q<m.length;q++)if(u[c]==m[q]){p=!0;break}p||m.push(u[c])}return m};this.protectedMethod.loadPermissionTip=function(m,u){m.addClass("sa-role-permission-tip");m.text("!");m.on("mouseenter",function(c){f?f.show():(f=$("<div>"),f.on("mouseenter",function(){f&&f.show()}),f.on("mouseleave",function(p){f&&f.hide()}),f.addClass("sa-role-permission-tip-text"),c=b.get("onlyCurrentRoleUser","\u5c06\u6388\u6743\u7ed9\u5f53\u524d\u9009\u5b9a\u89d2\u8272\u7684\u6240\u6709\u7528\u6237\uff0c\u5982\u679c\u5f53\u524d\u9009\u5b9a\u89d2\u8272\u7684\u7528\u6237\u540e\u7eed\u53d1\u751f\u589e\u51cf\uff0c\u60a8\u53ef\u4ee5\u5728\u201c\u53d1\u5e03\u7ba1\u7406\u201d\u91cc\u901a\u8fc7\u201c\u4e00\u952e\u540c\u6b65\u6240\u6709\u89d2\u8272\u201d\u529f\u80fd\u540c\u6b65\u7528\u6237\u6743\u9650\u3002"),
f.text(c),u(f))});m.on("mouseleave",function(c){f&&f.hide()})};this.protectedMethod.refreshUi=function(m){a=d=null;l=!0;m&&m()};this.protectedMethod.getCurrentAppType=h;this.protectedMethod.toggleLappContext=function(m){for(var u=ca.getPublishLappConfigs(),c=0;c<u.length;c++){var p=u[c];if(p.getAppType()==m){ca.setLappUserId(p.getLappUserId());ca.setLappUserType(p.getLappUserType());ca.setEId(p.getCorpId());break}}};this.protectedMethod.createLappUserIdNullTips=n;this.protectedMethod.getDisplayStyles=
function(){var m=[new qb(b.get("displayStyleThumbnail","\u7f29\u7565\u56fe"),wa.DISPLAYSTYLE_THUMNAIL)];h()==ib.YZJ&&m.push(new qb(b.get("displayStyleExecute","\u7acb\u5373\u6267\u884c"),wa.DISPLAYSTYLE_EXECUTION));return m};this.protectedMethod.supportLandscape=function(){var m=h();return m==ib.YZJ||m==ib.DINGDING_OFFLINE?!0:!1};this.protectedMethod.refreshLappContext=function(m){E(m)}}function zc(e){gb.call(this,e);var v=this,g=this.protectedMethod,k,d,a,f,l=window.pcyzjShare,w;this.getWidth=function(){return 400};
this.getHeight=function(){return g.isDsbPublish()?300:363};this.isEditPublish=function(){return!1};this.protectedCreateContainer=function(){var h=$("<div>");if(l){var n=0,m=g.getPublishContext(),u=$("<div>").text("*");u.addClass("sa-qing-publish-edit-star");var c=new ya,p=c.getJqUi();c.setText(b.get("publishName","\u53d1\u5e03\u540d\u79f0"));k=new Ya;c=k.getJqUi();C.layoutCtrl(u,0,n+2,5,18);C.layoutCtrl(p,8,n,64,23);C.layoutCtrl(c,120,n,230,23);u.appendTo(h);p.appendTo(h);c.appendTo(h);n+=43;p=new ya;
u=p.getJqUi();p.setText(b.get("description","\u63cf\u8ff0"));d=new lb;p=d.getJqUi();C.layoutCtrl(u,8,n,64,23);g.isDsbPublish()?C.layoutCtrl(p,120,n,230,120):C.layoutCtrl(p,120,n,230,32);u.appendTo(h);p.appendTo(h);n+=52;g.isDsbPublish()||(p=new ya,u=p.getJqUi(),p.setText(b.get("thumbnail","\u7f29\u7565\u56fe")),a=new Fb(m,g.createFacade,g.getOuterMessageCurtain()),a.setSchedulable(!1),p=a.getJqUi(),C.layoutCtrl(u,8,n,64,23),C.layoutCtrl(p,120,n,230,115),u.appendTo(h),p.appendTo(h),n+=131,p=new ya,
u=p.getJqUi(),p.setText(b.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e")),f=new jb,m.getHasDirectModeTable()?(f.setOn(!1),f.setEnabled(!1)):m.isHaveToCarryData()?(f.setOn(!0),f.setEnabled(!1)):f.setOn(!1),p=f.getJqUi(),C.layoutCtrl(u,8,n-2,100,23),C.layoutCtrl(p,120,n,31,19),m.supportPublishWithCarryData()&&(u.appendTo(h),p.appendTo(h)))}else h.addClass("sa-qing-publish-manager-content-emptytip"),h.text(b.get("CLoudHubUnavailable","\u4e91\u4e4b\u5bb6\u672a\u542f\u7528\uff0c\u6682\u65e0\u6cd5\u4f7f\u7528\u8be5\u529f\u80fd"));
return h};this.protectedIsOnlyYzj=function(){return!0};this.getModelFromUI=function(){var h=g.getPublishContext(),n=new mb;n.setPublishSourceType(h.getCurrentSourceType());n.setPublishTargetType(v.getPublishTargetType());n.setTagId(h.getBizTag());n.setName($.trim(k.getText()));n.setPath("lightapp");n.setPathText("lightapp");n.setAnalysis(!0);n.setSchemeId(mb.CURRENT_SCHEMA_ID);f&&n.setCarryData(f.isOn());return n};this.getJsonModel=function(){return g.getPublishContext().getCurrentContentModel()};
this.checkUIInput=function(h){if(null==ca||!ca.getLappUserId())return b.get("lappUserIdNull","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25");if(!l)return b.get("CLoudHubUnavailable","\u4e91\u4e4b\u5bb6\u672a\u542f\u7528\uff0c\u6682\u65e0\u6cd5\u4f7f\u7528\u8be5\u529f\u80fd");var n=k.getText();if(null==n||0==$.trim(n).length)return b.get("publishNameNotEmpty","\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0");if(50<n.length)return b.get("publishNameTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26");
if(50<d.getText().length)return b.get("descriptionCanNotExceedLimit50","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u5b57\u7b26");if(g.isDsbPublish())h(!0);else return n=a.getBase64Img(),g.cutAndUploadImageToCloud(n,function(m){w=m},h),null};var E=function(h,n){var m=ca.getScene();h=r(h);var u=new ka("lappAnalysisMgr",function(c){F(c,n)},function(c,p){g.getOuterMessageCurtain().showPrompt(b.get("saveAnalysisFailed","\u5206\u4eab\u5931\u8d25")+p,2E3);return!0});u.setShowBlocking(!1);u.saveAnalysis(h,ca.getEId(),
m,!0)},F=function(h,n){var m=g.createFacade(function(u){z(h,u.userName,u.userPictureFiled,n)},function(u,c){g.getOuterMessageCurtain().showPrompt(b.get("saveAnalysisFailed","\u5206\u4eab\u5931\u8d25")+c,2E3);return!0});m.setShowBlocking(!1);m.getShareContext()},z=function(h,n,m,u){var c=new Ac;c.setAnalysisId(h);c.setAuthorId(ca.getLappUserId());c.setAuthorName(n);c.setAuthorHeadUrl(m);h=new ka("sharing",function(p){var q=w;q=q?cb+"image/downloadImage?path="+q:g.isDsbPublish()?cb+"qing-lapp/core/resource/icon_chart_dsb.png":
cb+"qing-lapp/core/resource/icon_chart.png";p=cb+"sharing/getShareUrlById.do"+p;var N=new Bc;N.setOpenNewPage(!0);N.setSelectGroup(!0);N.setTitle(k.getText());N.setContent(d.getText());N.setThumbUrl(q);N.setWebpageUrl(p);N.setCallback(function(x){u.showSuccess(b.get("shareSuccess","\u5206\u4eab\u6210\u529f\u3002"))});l.share(N.toJsonObject())},function(p,q){g.getOuterMessageCurtain().showPrompt(b.get("saveAnalysisFailed","\u5206\u4eab\u5931\u8d25")+q,2E3);return!0});h.setShowBlocking(!1);h.addSharing(c);
vb.occur(vb.COMMUNICATE_TYPE,vb.YZJ_COMMUNICATE)};this.getNewPublishSuccessCallback=function(){return E};var r=function(h){var n=g.getPublishContext(),m=ca.getScene(),u=new wa;u.setScene(m);u.setParentId("-1");u.setName(k.getText());u.setCardDesc(d.getText());u.setUploadData(!1);m=n.getLappEntranceUrl();m=bb.LappIntegration.getRealPublishUrl(m,n.getParamPathPrefix(),ca.getConfiguredPublishUrlPrefix());m=hb.appendParamToUrl(m,"accountId",ca.getAccountId());m=hb.appendParamToUrl(m,"publishId",h.getId());
m=ca.appendExtraPublishUrlParam(m);u.setUrl(m);u.setLayoutType(wa.LT_NORMAL);u.setLargeThumbnail(w);u.setSmallThumbnail(w);u.setPublishId(h.getId());g.isDsbPublish()?u.setViewType(wa.VIEW_TYPE_DASHBOARD):n.getScene()==Va.Scene.Square?u.setViewType(wa.VIEW_TYPE_SQUARE):u.setViewType(wa.VIEW_TYPE_LONGER);return u}}function Bc(){var e,v,g,k,d,a,f;this.setOpenNewPage=function(l){e=l};this.getOpenNewPage=function(){return e};this.setSelectGroup=function(l){v=l};this.getSelectGroup=function(){return v};
this.setTitle=function(l){g=l};this.getTitle=function(){return g};this.setContent=function(l){k=l};this.getContent=function(){return k};this.setThumbUrl=function(l){d=l};this.getThumbUrl=function(){return d};this.setWebpageUrl=function(l){a=l};this.getWebpageUrl=function(){return a};this.setCallback=function(l){f=l};this.getCallback=function(){return f};this.toJsonObject=function(){var l={};l.openNewPage=e;l.selectGroup=v;l.title=g;l.content=k;l.thumbUrl=cb+"qing-lapp/core/resource/icon_qing.png";
l.webpageUrl=a;l.callback=f;l.appName="\u8f7b\u5206\u6790";l.param={appId:com.kingdee.bos.qing.lapp.integration.APP_ID,lightAppId:com.kingdee.bos.qing.lapp.integration.APP_ID,customStyle:2,contentUrl:d};return l}}function Fb(e,v,g){var k=this,d,a=!0,f=300,l=150,w=new Gb;w.setSchemaModelBook(e.getCurrentContentModel().schemaContent);var E,F,z=$("<div class='sa-publish-thumbnailcut-texttips'>");this.setThumbnailSize=function(n,m){f=n;l=m};this.getBase64Img=function(){return d};this.getThumbnailInfo=
function(){return w};this.setSchedulable=function(n){a=n};this.getJqUi=function(){if(!E){E=$("<div class='sa-publish-thumbnailcut'>");if(e.getScene()!=Va.Scene.Square||a)E.on("click",k.showThumbnailCutSettingDialog),E.css("cursor","pointer");F=$("<img class='sa-publish-thumbnailcut-img'>");F.attr("src",Ha.getIconUrl("lightapp/common","icon_chart_building.png"));F.appendTo(E);z=$("<div class='sa-publish-thumbnailcut-texttips'>");e.getScene()==Va.Scene.Square?(z.text(b.get("loadingSquareImg","\u6b63\u5728\u521b\u5efa\u7f29\u7565\u56fe...")),
r()):e.getScene()==Va.Scene.Longer&&z.text(b.get("creatThumbnailForAnalysis","\u70b9\u51fb\u8fd9\u91cc\u4e3a\u60a8\u7684\u5206\u6790\u521b\u5efa\u7f29\u7565\u56fe"));z.appendTo(E);if(a||e.getScene()==Va.Scene.Longer){var n=$("<div class='sa-publish-thumbnailcut-plus-icon'>");Ca.background(n,"icon_add_blue");n.appendTo(E)}}return E};var r=function(){var n=v(function(m){F.off("load");F.on("load",function(){var c=new Image;c.onload=function(){var p=document.createElement("canvas");p.width=c.width;p.height=
c.height;p.getContext("2d").drawImage(c,0,0,c.width,c.height);d=p.toDataURL("image/png")};c.src=u});var u=v().getExportedImgUrl(e.getParamPathPrefix(),m);F.attr("src",u);z.hide()});n.setShowBlocking(!1);n.exportSquareImg(h(),f,l)};this.needInitLongerThumbnailImage=function(n){return e.getScene()===Va.Scene.Longer&&a&&n&&!d?!0:!1};this.initLongerThumbnailImage=function(n,m){html2canvas(n[0].contentDocument.body,{width:260,height:130,onrendered:function(u){if(u=u.toDataURL())d=u,m()}})};var h=function(){for(var n=
e.getCurrentContentModel().schemaContent,m,u=n.pages,c=u.length,p=0;p<c;p++)if(u[p].current){m=u[p];break}m||(m=u[0]);u={};u.meta=n.meta;u.model=m.model;u.preferences=m.preferences;return u};this.showThumbnailCutSettingDialog=function(){var n=w.copy();n=new $b(e.getScene(),e.getMobilePreviewUrl(),n);n.setClosedCallback(function(m,u){w=m;u&&(z.hide(),d=u,F.off("load"),F.attr("src",d))});n.setSchedulable(a);n.showDialog()}}function $b(e,v,g){Za.call(this);var k=this,d=this.protectedMethod,a,f,l,w=g,
E,F,z;(function(){d.setTitle(b.get("creatThumbnail","\u751f\u6210\u7f29\u7565\u56fe"));k.setSize(800,570);d.setContentPaneCreator(function(){e==Va.Scene.Longer&&(f=new Cc,f.setThumbnailInfo(w),f.setUrl(v),e==Va.Scene.Square&&f.setThumbnailEditable(!1));l=new ac;l.setScheduleModel(w.getSchedule());if(F&&f)return a=new db,a.setTabLevel(db.SECOND_LEVEL),a.addTab(f,!0),a.addTab(l,!1),a.addTabChangedListener(function(n,m){m instanceof ac&&!f.getIframeLoadStatus()&&(d.getMessageCurtain().showPrompt(b.get("inLoadTip",
"\u6b63\u5728\u751f\u6210\u7f29\u7565\u56fe\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002"),2E3),a.setCurrentTabPane(f))}),a.getJqUi();if(F){var r=$("<div>");k.setSize(800,500);l.getJqUi().appendTo(r);return r}if(f){r=$("<div>");k.setSize(800,500);var h=f.getJqUi();h.find(".sa-publish-thumbnailcut-container").css({top:0});h.appendTo(r);return r}return $("<div>")});d.setClosingChecker(function(r){f?f.getIframeLoadStatus()?(a&&a.setCurrentTabPane(f),f.iframeToCanvas(function(h){E=h;w=f.getThumbnailInfo();
r(!0)})):(d.getMessageCurtain().showPrompt(b.get("inLoadTip","\u6b63\u5728\u751f\u6210\u7f29\u7565\u56fe\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002"),2E3),r(!1)):r(!0)},!0);d.setClosingAction(function(r){r&&(w.setSchedule(l.getScheduleModel()),z&&z(w,E))})})();this.setSchedulable=function(r){F=r};this.setClosedCallback=function(r){z=r}}function Cc(){db.AbstractTabPane.call(this);var e,v,g,k,d,a,f,l,w,E=!0,F;this.getTitle=function(){return b.get("thumbnail","\u7f29\u7565\u56fe")};this.setUrl=function(c){w=
c};this.setThumbnailEditable=function(c){E=c};this.setThumbnailInfo=function(c){F=c};this.getJqUi=function(){if(!e){e=$("<div class='sa-publish-thumbnailcut-setting'>");v=$("<div class='sa-publish-thumbnailcut-container'>");g=$("<div>");E&&g.addClass("sa-publish-thumbnailcut-aperture");E&&g.on("mousedown",n);E&&g.on("mouseenter",r);E&&g.on("mouseleave",h);d=$("<div class='sa-publish-thumbnailcut-shield'>");a=$("<div class='sa-publish-thumbnailcut-shield'>");f=$("<div class='sa-publish-thumbnailcut-shield'>");
l=$("<div class='sa-publish-thumbnailcut-shield'>");d.appendTo(v);a.appendTo(v);f.appendTo(v);l.appendTo(v);h();var c=$("<div>");c.addClass("sa-publish-thumbnailcut-dragchunk");Ca.background(c,"icon_drag");E&&c.appendTo(g);g.appendTo(v);k=$("<iframe class='sa-publish-thumbnailcut-iframe'>");k.attr("src",w);k.appendTo(v);v.appendTo(e);z()}return e};var z=function(){F&&g.css({left:F.getApertureLeft()-2+1,top:F.getApertureTop()-2,width:F.getApertureWidth(),height:F.getApertureHeight()});var c={from:"LAPP_MESSAGE",
layoutType:wa.LT_NORMAL,model:F.getSchemaModelBook()};k.on("load",function(){k[0].contentWindow.postMessage(JSON.stringify(c),w)})},r=function(){d.show();a.show();f.show();l.show();var c=parseInt(g.css("width")),p=parseInt(g.css("height")),q=parseInt(g.css("left")),N=parseInt(g.css("top")),x=parseInt(g.css("border-left-width"));d.css({left:0,top:Math.max(0,N),width:q,bottom:0});a.css({left:0,top:0,height:N,width:q+c+x});f.css({left:q+c+x,top:0,height:N+p+x,right:0});l.css({left:Math.max(0,q),top:N+
p+x,right:0,bottom:0})},h=function(){d.hide();a.hide();f.hide();l.hide()},n=function(c){var p=$(c.target),q=c.clientX,N=c.clientY,x=parseInt(g.css("left")),J=parseInt(g.css("top"));c=$(document.body);if(p.hasClass("sa-publish-thumbnailcut-dragchunk")){var Z=parseInt(g.css("width"));c.on("mousemove",function(X){var ba=X.clientX-q,aa=g.offset().top;X=2*(X.clientY-aa);var M=parseInt(v.width());aa=parseInt(v.height());var G=parseInt(g.css("border-left-width"));M=M-parseInt(g.css("left"))-G;aa=aa-parseInt(g.css("top"))-
G;g.css({width:Math.min(M,2*aa,Math.max(283,Math.min(X,Z+ba)))});ba=parseInt(g.css("width"))/2;g.css({height:ba});r()});c.on("mouseup",m)}else c.on("mousemove",function(X){var ba=X.clientX;X=X.clientY;var aa=parseInt(g.css("border-left-width")),M=parseInt(v.width())-parseInt(g.width())-aa,G=parseInt(v.height())-parseInt(g.height())-aa;g.css({left:Math.min(M,Math.max(-aa,x+(ba-q))),top:Math.min(G,Math.max(-aa,J+(X-N)))});r()}),c.on("mouseup",u)},m=function(c){var p=$(document.body);p.off("mousemove");
p.off("mouseup");p=g.offset().top;var q=g.offset().left,N=c.clientX;c=c.clientY;var x=g.outerWidth(),J=g.outerHeight();(N>q+x||N<q||c<p||c>p+J)&&h()},u=function(c){c=$(document.body);c.off("mousemove");c.off("mouseup")};this.iframeToCanvas=function(c){html2canvas(k[0].contentDocument.body,{onrendered:function(p){var q=parseInt(g.css("top"))+parseInt(g.css("border-left-width")),N=parseInt(g.css("left"))+parseInt(g.css("border-left-width")),x=parseInt(g.css("width")),J=parseInt(g.css("height")),Z=1;
window.devicePixelRatio&&1<window.devicePixelRatio&&(Z=window.devicePixelRatio);p=p.getContext("2d").getImageData(Z*N,Z*q,Z*x,Z*J);q=document.createElement("canvas");com.kingdee.bos.qing.common.CanvasUtil.createContext2d(q,x,J).putImageData(p,0,0);x=q.toDataURL();c(x)}})};this.getThumbnailInfo=function(){var c=new Gb;c.setApertureTop(parseInt(g.css("top"))+parseInt(g.css("border-left-width")));c.setApertureLeft(parseInt(g.css("left"))+parseInt(g.css("border-left-width")));c.setApertureWidth(parseInt(g.css("width")));
c.setApertureHeight(parseInt(g.css("height")));var p=null;try{p=k[0].contentWindow.com.kingdee.bos.qing.lapp.scene.LappLongerUtil.getJsonModelBook()}catch(q){console.log(q)}p||(p=F.getSchemaModelBook());c.setSchemaModelBook(p);if(p=k[0].contentDocument.getElementById("table1MainView"))c.setScrollTop(p.scrollTop),c.setScrollLeft(p.scrollLeft);return c};this.getIframeLoadStatus=function(){if(k){try{return k[0].contentWindow.com.kingdee.bos.qing.lapp.scene.LappLongerUtil.getLoadStatus()}catch(c){console.log(c)}return!1}return!0}}
function ac(){db.AbstractTabPane.call(this);var e,v,g;this.getTitle=function(){return b.get("updateStrategy","\u66f4\u65b0\u7b56\u7565")};this.getJqUi=function(){if(!e){e=$("<div>");g=new bc;g.allowCustomPeriod(!1);g.setUnTimingButtonText(b.get("disposableExtract","\u4e0d\u66f4\u65b0"));g.setTimingButtonText(b.get("timingExtract","\u5b9a\u65f6\u66f4\u65b0"));g.setSchedule(v);var k=g.getJqUi();C.layoutCtrlWithLRTB(k,10,10,null,10,10,null);k.appendTo(e)}return e};this.setScheduleModel=function(k){v=
k;g&&g.setSchedule(v)};this.getScheduleModel=function(){return g?g.getSchedule():null}}function cc(e){function v(t,B){t=t.match(new RegExp("(^|&)"+B+"=([^&]*)(&|$)"));return null!=t?unescape(t[2]):null}dc.call(this,e,xa.CENTER);gb.call(this,e);var g=this,k=this.protectedMethod,d,a,f=[],l,w,E,F,z,r,h,n,m,u,c,p,q,N={},x={},J,Z=!1,X=0,ba,aa,M;M||(Ha.setRootPath("."),Ha.setCallback(function(){M=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),Ha.loadJs("biz-common/qing-biz-common.js"),Ha.loadSkinCss("biz-common",
"biz-common"),Ha.loadSkinJs("biz-common","skin"),Ha.loadI18n("biz-common","biz-common"));var G;this.protectedAutoSelectAppType=function(){(z=g.getAutoSelectedData())&&k.toggleLappContext(z.appType)};this.getTitle=function(){return b.get("lapp","\u79fb\u52a8\u8f7b\u5e94\u7528")};this.relayoutViews=function(){w&&w.relayoutViews()};this.setPathSelectorModel=function(t,B){h=t;Ka=B};this.getPathSelectorModel=function(){return h};this.protectedCreateContainer=function(){var t=$("<div>"),B=$("<div class='sa-qing-publish-titlebar'>"),
A=new ec,I=[new tb(b.get("allType","\u5168\u90e8\u7c7b\u578b"),0),new tb(b.get("moduleSquare","\u6570\u636e\u6597\u65b9"),2),new tb(b.get("moduleLonger","\u6570\u636e\u5206\u6790"),1),new tb(b.get("dashboard","\u4eea\u8868\u677f"),3)];A.setSearchType(I);A.setSelectedChangedListener(O);A.getJqUi().appendTo(B);A=new fc;A.setSearchListener(ha);J=A;J.getJqUi().appendTo(B);A=new gc;A.setSortModel(oa);u=A;A=u.getJqUi();A.appendTo(B);C.layoutCtrlWithLRTB(A,700,60,null,0,0,null);A=new hc;A.setClickListener(ja);
A.getJqUi().appendTo(B);B.appendTo(t);B=$("<div>");B.addClass("sa-qing-publish-manager");La(B);Pa(B);A=ca.getLappUserId();if(null==A||""==$.trim(A))return Z=!0,t=k.createLappUserIdNullTips(),B.find(".sa-qing-publish-lapp-setting").css("top","0px"),B.find(".sa-qing-publish-lapp-logo-header").css("top","-34px"),t.appendTo(B),B;Z=!1;A=new ic;A.setOuterMessageCurtain(k.getOuterMessageCurtain());A.setSelectedItemListener(R);A.setModel(h);A.setAddItemListener(ma);A.setUpdateItemListener(Fa);A.setDeleteItemListener(qa);
A.setLoadItemListener(H);d=A;d.getJqUi().appendTo(B);A=$("<div>");C.layoutCtrlWithLRTB(A,220,0,null,0,0,null);a=Aa(e);l=a.getJqUi();l.appendTo(A);w=y();E=w.getJqUi();E.appendTo(A);E.hide();G=P();G.appendTo(A);A.appendTo(B);B.find(".sa-qing-publish-manager-content-container").css("top","32px");Q();B.appendTo(t);C.layoutCtrlWithLRTB(B,0,0,null,40,0,null);return t};var P=function(){M.setJumpToPageListener(function(t,B,A){(new ka("lappAnalysisMgr",function(I){var Y=[];if(I.infos&&0<I.infos.length){for(var S=
I.infos,fa=0;fa<S.length;fa++){var W=S[fa],L=new wa;L.fromJsonObject(W);L.setPreset(F.isPreset());Y.push(L)}S=[];for(fa=0;fa<Y.length;fa++)if(W=Y[fa].getUrl())W=v(W,"publishId"),S.push(W);Y=new pa(e,function(T){if(void 0===T||null===T||0===T.length)G.hide(),A?A(I.totalRow):M.refreshPagination(),a.setSearchStatus(!1),a.setAnalysisModels(null,x),a.updateSearchContentUI(m),w.setSearchStatus(!1),w.setListPublishModel(null,aa.isPreset());else{r=[];for(var ea=0;ea<T.length;ea++)for(var ta=T[ea].id,Ja=0;Ja<
q.length;Ja++){var Xa=q[Ja].getPublishId();if(ta===Xa){r.push(q[Ja]);break}}G.show();A?A(I.totalRow):M.refreshPagination();a.setSearchStatus(!0);a.setAnalysisModels(r,x);a.updateSearchContentUI(m);w.setSearchStatus(!0);w.setListPublishModel(r,aa.isPreset())}w.updateSearchContentUI(m)},function(){return!1});Y.setShowBlocking(!0);Y.loadAllPublishInfosByPagination(JSON.stringify(S),c,p)}if(void 0===I.infos||null===I.infos||0===I.infos.length)G.hide(),A?A(I.totalRow):M.refreshPagination(),a.setSearchStatus(n),
a.setAnalysisModels(null,x),w.setSearchStatus(n),w.setListPublishModel(null,aa.isPreset())},function(I,Y){return!0})).getAnalysisListOnCondition(F.getId(),m,ba,t,B,c,p)});M.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);return M.getJqUi()},da=function(){(new ka("lappAnalysisMgr",function(t){var B=[];if(t.infos&&0<t.infos.length){for(var A=t.infos,I=0;I<A.length;I++){var Y=A[I],S=new wa;S.fromJsonObject(Y);S.setPreset(F.isPreset());B.push(S)}A=[];for(I=0;I<B.length;I++)if(Y=B[I].getUrl())Y=
v(Y,"publishId"),A.push(Y);B=new pa(e,function(fa){if(void 0===fa||null===fa||0===fa.length)G.hide(),M.resetPaginationAndJumpToFirstPage(t.totalRow),a.setSearchStatus(n),a.setAnalysisModels(null,x),w.setSearchStatus(n),w.setListPublishModel(null,aa.isPreset());else{G.show();M.resetPaginationAndJumpToFirstPage(t.totalRow);r=[];for(var W=0;W<fa.length;W++)for(var L=fa[W].id,T=0;T<q.length;T++){var ea=q[T].getPublishId();if(L===ea){r.push(q[T]);break}}a.setSearchStatus(n);a.setAnalysisModels(r,x);a.updateSearchContentUI(m);
w.setSearchStatus(n);w.setListPublishModel(r,aa.isPreset());w.updateSearchContentUI(m)}},function(){return!1});B.setShowBlocking(!0);B.loadAllPublishInfosByPagination(JSON.stringify(A),c,p)}if(void 0===t.infos||null===t.infos||0===t.infos.length)G.hide(),M.resetPaginationAndJumpToFirstPage(0),a.setSearchStatus(n),a.setAnalysisModels(null,x),w.setSearchStatus(n),w.setListPublishModel(null,aa.isPreset())},function(t,B){return!0})).getAnalysisListOnCondition(F.getId(),m,ba,1,M.getPageSize(),c,p)};this.protectedIsOnlyYzj=
function(){return!1};this.protectedIsOwnDealLappContext=function(){return!0};var ja=function(t){t?(l.show(),E.hide()):(E.show(),l.hide());da()},O=function(t,B,A){X=A.getTypeId();0==X?ba=void 0:1==X?ba=wa.VIEW_TYPE_LONGER:2==X?ba=wa.VIEW_TYPE_SQUARE:3==X&&(ba=wa.VIEW_TYPE_DASHBOARD);ha()},y=function(){var t=new jc;t.setOuterMessageCurtain(k.getOuterMessageCurtain());t.setDeletePublishListener(ia);t.setEditPublishListener(V);t.setEditPublishContentListenter(g.getPublishContentEditEntrance());t.setTabType(3);
t.setReSearchListener(ha);t.setCardImgUrlCreator(function(B,A){var I=Ha.getIconUrl("publish","icon_chart_building.png");B?I=pb.downloadImage(B):"3"==A&&(I=Ha.getIconUrl("publish","icon_dashboard_building.png"));return I});return t},ia=function(t,B){var A=t.getId(),I=new ka("lappAnalysisMgr",function(Y){Y=k.createFacade(function(S){for(S=0;S<q.length;S++)if(q[S].getId()==A){q.splice(S,1);break}a.setAllPublishModels(q);w.setAllPublishModels(q);Ka[t.getParentId()].minus();B();k.getOuterMessageCurtain().showSuccess(b.get("deleteSuccess",
"\u5220\u9664\u6210\u529f\u3002"))},function(S,fa){k.getOuterMessageCurtain().showPrompt(fa,2E3);return!0});Y.setShowBlocking(!1);Y.deletePublishInfo(xa.MOBILE,t.getPublishId())},function(Y,S){k.getOuterMessageCurtain().showPrompt(S,2E3);return!0});I.setShowBlocking(!1);I.deleteAnalysis(t.getId())},ha=function(){m=J.getInputContent().trim();if(0<m.length){n=!0;var t=m=m.toUpperCase();K();for(var B={},A=!0,I=0;I<h.length;I++)for(var Y=h[I].getValue(),S=N[Y],fa=B[Y]=0;fa<S.length;fa++)ba&&(A=S[fa].getViewType()==
ba),A&&-1<S[fa].getName().toUpperCase().indexOf(t)&&(B[Y]+=1);d.updateSearchUI(h,B)}else K(),n=!1,d.setModel(h),d.updateUI()},oa=function(t,B){c=t.getPropertyName();p=B==kc.SORT_TYPE_ASC?"ASC":"DESC";ha()},La=function(t){var B=ca.getPublishLappConfigs();if(!(1>=B.length)){var A=$("<div>");A.addClass("sa-qing-publish-lapp-logo-header");C.layoutCtrlWithLRTB(A,null,72,100,-74,null,32);A.appendTo(t);for(var I=$("<div>"),Y=B[0],S=0;S<B.length;S++){var fa=B[S];if(ca.getLappUserType()==fa.getLappUserType()){Y=
fa;break}}Ma(I,Y);C.layoutCtrlWithLRTB(I,null,22,78,0,null,30);I.appendTo(A);var W=$("<div>");W.addClass("sa-qing-publish-lapp-logo-triangle-down");W.appendTo(A);var L=!1,T,ea=function(ta){C.isDescendent(ta.target,A[0])||C.isDescendent(ta.target,T[0])||(L=!1,W.removeClass("sa-qing-publish-lapp-logo-triangle-up"),W.addClass("sa-qing-publish-lapp-logo-triangle-down"),T&&T.hide())};A.on("click",function(){L?(W.removeClass("sa-qing-publish-lapp-logo-triangle-up"),W.addClass("sa-qing-publish-lapp-logo-triangle-down"),
T&&T.hide(),L=!1,$(document.body).off("mousedown",ea)):(W.removeClass("sa-qing-publish-lapp-logo-triangle-down"),W.addClass("sa-qing-publish-lapp-logo-triangle-up"),T&&T.remove(),T=Wa(t,B),L=!0,$(document.body).on("mousedown",ea))})}},Ga=function(t){k.refreshUi(function(){t&&k.toggleLappContext(t);X=0;h=null;ba=void 0;g.refreshCurrentPanel()})},Ma=function(t,B){if(B.getAppType()==ib.THIRDPARTY){var A=$("<img>");A.appendTo(t);C.layoutCtrl(A,0,0,78,30);t=ab.getLoadImgUrl(B.getAppImageFile(),"image-library");
A.attr("src",t)}else A="icon_"+B.getAppType(),Ca.background(t,A)},Wa=function(t,B){var A=function(S){var fa=$("<div>");Ma(fa,S);fa.on("click",function(){Ga(S.getAppType())});return fa},I=$("<div>");I.addClass("sa-qing-publish-lapp-logo-pane");I.appendTo(t);for(t=0;t<B.length;t++){var Y=A(B[t]);C.layoutCtrl(Y,0,32*t,78,30);Y.css("margin-left","12px");t!=B.length-1&&Y.css("border-bottom","1px solid #ccc");Y.appendTo(I)}Z?C.layoutCtrlWithLRTB(I,null,74,108,-1,null,32*B.length):C.layoutCtrlWithLRTB(I,
null,74,108,-41,null,32*B.length);return I},Pa=function(t){var B=[];ca.getQingAdminRole()&&B.push([b.get("lappManager","\u79fb\u52a8\u8f7b\u5e94\u7528\u7ba1\u7406"),Na,null]);if(ca.getLappUserId()){var A=new Ra;A.setIconType(Ra.ICON_TYPE_QUESTION);A.setTipsSize(230,105);A.setTipsText(b.get("rolesHelpIconTips","\u7531\u4e8e\u53d1\u5e03\u5230\u201c\u79fb\u52a8\u8f7b\u5e94\u7528\u201d\u7684\u53d1\u5e03\u9879\u672c\u8eab\u7684\u7279\u6b8a\u6027\uff0c\u4ec5\u5728\u53d1\u5e03\u5f53\u65f6\u8bb0\u5f55\u4e0b\u7528\u6237\u4fe1\u606f\uff08\u89d2\u8272\u7edf\u4e00\u8f6c\u6362\u6210\u7528\u6237\uff09\u3002\u5f53\u7cfb\u7edf\u4e2d\u89d2\u8272\u6240\u5305\u542b\u7684\u7528\u6237\u53d1\u751f\u53d8\u5316\uff0c\u53ef\u5728\u6b64\u5904\u5237\u65b0\u6388\u6743\u3002"));
B.push([b.get("syncLappRoles","\u4e00\u952e\u540c\u6b65\u6240\u6709\u89d2\u8272"),U,A])}if(0!=B.length){var I,Y=!1,S=$("<div>");S.addClass("sa-qing-publish-lapp-setting");A=$("<div>");Ca.background(A,"icon-setting");A.appendTo(S);var fa=$("<span>");fa.text(b.get("setting","\u8bbe\u7f6e"));fa.appendTo(S);var W=function(L){C.isDescendent(L.target,S[0])||C.isDescendent(L.target,I[0])||(Y=!1,I&&I.hide())};S.on("click",function(){if(Y)I&&I.hide(),Y=!1,$(document.body).off("mousedown",W);else{if(!I){var L=
$("<div>");L.addClass("sa-qing-publish-lapp-setting-selector");L.appendTo(t);for(var T=0;T<B.length;T++){var ea=B[T][2],ta=B[T][0],Ja=B[T][1],Xa=$("<div>");Xa.addClass("sa-qing-publish-lapp-setting-selector-item");Xa.text(ta);Xa.on("click",Ja);Xa.appendTo(L);ea&&(ea=ea.getJqUi(),C.layoutCtrlWithLRTB(ea,null,6,null,6+26*T,null,16),ea.appendTo(L))}Z?C.layoutCtrlWithLRTB(L,null,0,null,-2,null,26*B.length):C.layoutCtrlWithLRTB(L,null,0,null,-42,null,26*B.length);I=L}I&&I.show();Y=!0;$(document.body).on("mousedown",
W)}});C.layoutCtrlWithLRTB(S,null,10,60,-40,null,0);C.layoutCtrlWithLRTB(A,null,40,18,-26,null,18);C.layoutCtrlWithLRTB(fa,null,6,30,-28,null,26);S.appendTo(t)}},Na=function(){var t=!1,B=new Hb(e);B.setFunRefreshLappContext(function(I){k.refreshLappContext(I);t=!0});B.setCloseListener(function(){t&&Ga()});B.setOutMessageCurtain(k.getOuterMessageCurtain());var A=k.getPublishContext();B.setParamPathPrefix(A.getParamPathPrefix());B.showDialog()},U=function(){va(function(t){(new pa(e,function(B){Ba(B.permissionLappContexts,
B.authorizedUserNum,B.failedUserNames,B.roleNames,B.permissionUsers)},function(){return!1})).loadPermissionLappContexts(t,k.getCurrentAppType())})},va=function(t){(new ka("lappAnalysisMgr",function(B){B||(B=[]);t(B)},function(B,A){k.getOuterMessageCurtain().showPrompt(A,2E3);return!0})).getAllPublishIds()},Ba=function(t,B,A,I,Y){(new ka("lappAnalysisMgr",function(S){(new Dc(A,I)).showDialog();S=S.addedPermissionUsers;var fa={},W;for(W in S){for(var L=[],T=S[W],ea=0;ea<T.length;ea++){var ta=T[ea];
Y[ta]&&L.push(Y[ta])}fa[W]=L}JSON.stringify(fa)!=JSON.stringify({})&&(new pa(e)).saveMessage(fa)},function(S,fa){k.getOuterMessageCurtain().showPrompt(fa,2E3);return!0})).batchUpdatePublishInfo(t)},Aa=function(t){t=new Ec(t);t.setMessageCurtain(k.getOuterMessageCurtain());t.setDeleteCallback(D);t.setEditCallback(V);t.setEditPublishContentListenter(g.getPublishContentEditEntrance());t.setReSearchListener(ha);return t},Ka={};this.getDirectoryMap=function(){return Ka};var K=function(){for(var t=0;t<
h.length;t++)N[h[t].getValue()]=[];for(t=0;t<q.length;t++){var B=N[q[t].getParentId()];B&&B.push(q[t])}},H=function(t){if(null==h){var B=new ka("lappDirectoryMgr",function(A){for(var I=[],Y=0;Y<A.length;Y++){var S=new Ib;S.fromJsonObject(A[Y]);Ka[S.getId()]=S;var fa=new wb;fa.setValue(S.getId());fa.setText(S.getName());fa.setIsPreset(S.isPreset());I.push(fa)}h=I;q=null;t(h);Q()},function(A,I){k.getOuterMessageCurtain().showPrompt(I,2E3);return!0});B.setShowBlocking(!1);B.getOwnDirList(ca.getQingAdminRole(),
ca.getQingAdminRoleUserId())}else t(h);z&&"lightapp"==z.path&&z.lappPathName&&d.setDefaultItemValue(z.lappPathName)},Q=function(){h&&0==h.length&&a&&a.setTipsText(b.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55"))},R=function(t){aa=t;a||(a=Aa(e));F=Ka[t.getValue()];null==z&&a.setAutoSelectedData(null);q?(a.setAllPublishModels(q),w.setAllPublishModels(q),f=N[F.getId()],da()):(new ka("lappAnalysisMgr",function(B){la(B)},function(B,A){(void 0).showPrompt(A,2E3);return!0})).getAnalysisList(F.getId(),
!0);z&&ra()},la=function(t){var B=[];if(t&&t.content&&0<t.content.length){t=t.content;for(var A=[],I=[],Y=0;Y<t.length;Y++){var S=t[Y],fa=new wa;fa.fromJsonObject(S);A.push(""+fa.getCreateTime());I.push(""+fa.getUpdateTime());fa.setPreset(F.isPreset());B.push(fa)}(new pa(e,function(W){if(W&&W.arrCreateTime&&W.arrUpdateTime){var L=W.arrCreateTime;W=W.arrUpdateTime;for(var T=0;T<L.length;T++){var ea=B[T];ea.setCreateFormatTime(L[T]);ea.setUpdateFormatTime(W[T])}}q=B;K();sa(q)},function(){return!1})).updateModelTime(A,
I)}else q=B,K(),sa(q)},sa=function(t){for(var B=[],A=0;A<t.length;A++){var I=t[A].getUrl();I&&(I=v(I,"publishId"),B.push(I))}(new pa(e,function(Y){for(var S=0,fa=Y.length;S<fa;S++){var W=new mb;W.fromJsonObject(Y[S]);var L=Y[S].id;x[L]||(x[L]=W)}for(S=0;S<q.length;S++)Y=q[S].getPublishId(),x[Y]&&q[S].setCarryData(x[Y].getCarryData());f=N[F.getId()];w.setLappMapIdCardModelDetail(x);u.sort();a.setAllPublishModels(q);w.setAllPublishModels(q)})).loadPublishInfoByPublishIdArr(JSON.stringify(B));return B},
ra=function(){for(var t=0;t<f.length;t++)if(f[t].getPublishId()==z.id){a.setAutoSelectedData(z);z=null;break}},ma=function(t,B,A){var I=new Ib;I.setName(t);I.setSeq(ua(B));(new ka("lappDirectoryMgr",function(Y){var S=new wb;S.setValue(Y);S.setText(t);I.setId(Y);Ka[Y]=I;A(S);ha()},function(Y,S){k.getOuterMessageCurtain().showPrompt(S,2E3);return!0})).saveGroup(I)},ua=function(t){var B=!1,A;for(A in Ka){var I=Ka[A];t<I.getSeq()&&(t=I.getSeq(),B=!0)}B&&(t+=1);return t},Fa=function(t,B,A){var I=Ka[t];
if(I){var Y=I.getName();I.setName(B);(new ka("lappDirectoryMgr",function(S){A(S)},function(S,fa){I.setName(Y);k.getOuterMessageCurtain().showPrompt(fa,2E3);return!0})).saveGroup(I)}},qa=function(t,B){N[t]&&(0==N[t].length?(new ka("lappDirectoryMgr",function(A){delete Ka[t];delete N[t];B();k.getOuterMessageCurtain().showSuccess(b.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(A,I){k.getOuterMessageCurtain().showPrompt(I,2E3);return!0})).deleteGroup(t):k.getOuterMessageCurtain().showPrompt(b.get("deleteNotEmpty",
"\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u53d1\u5e03\u8bb0\u5f55\u3002"),2E3))},D=function(t,B){var A=t.getId(),I=new ka("lappAnalysisMgr",function(Y){Y=k.createFacade(function(S){S=q.indexOf(t);-1!==S&&q.splice(S,1);for(S=0;S<q.length;S++)if(q[S].getId()==A){q.splice(S,1);break}w.setAllPublishModels(q);a.setAllPublishModels(q);ha();Ka[t.getParentId()].minus();B();k.getOuterMessageCurtain().showSuccess(b.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"))},function(S,fa){k.getOuterMessageCurtain().showPrompt(fa,
2E3);return!0});Y.setShowBlocking(!1);Y.deletePublishInfo(xa.MOBILE,t.getPublishId())},function(Y,S){k.getOuterMessageCurtain().showPrompt(S,2E3);return!0});I.setShowBlocking(!1);I.deleteAnalysis(t.getId())},V=function(t,B){k.createFacade(function(A){var I=new mb;I.fromJsonObject(A);A=new Fc(e);A.setHasLappContext(!0);A.setPublishContext(k.getPublishContext());A.setPathSelectorModel(h);A.setPublishModel(t);A.setDeskPublishModel(I);I=A.getEditPublishSuccessCallback();var Y=b.get("editPublishInfoItem",
"\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f");A=new Gc(Y,A);I&&A.addSuccessCallback(I);A.addSuccessCallback(B);A.setOuterMessageCurtain(k.getOuterMessageCurtain());A.setFunCrateFacade(k.createFacade);A.showDialog()},function(A,I){return 2301001==A?(k.getOuterMessageCurtain().showPrompt(b.get("publishSourcePublishNotExistException","\u539f\u53d1\u5e03\u4fe1\u606f\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002")),!0):!1}).loadPublishInfo(t.getPublishId())}}function Hb(e){Za.call(this);var v=this,g=
this.protectedMethod,k=this.showDialog,d,a,f,l,w,E,F,z;this.setFunRefreshLappContext=function(h){F=h};this.setCloseListener=function(h){z=h};this.setOutMessageCurtain=function(h){a=h};this.setParamPathPrefix=function(h){E=h};this.showDialog=function(){v.setSize(486,480);g.setTitle(b.get("lappManager","\u79fb\u52a8\u8f7b\u5e94\u7528\u7ba1\u7406"));g.setSelectable(!0);g.setContentPaneCreator(r);g.setClosingChecker2(function(h){w.getCurrentTabPane().check(d,h)},function(h){h(!0)},!0);g.setClosingAction(function(h){h&&
w.getCurrentTabPane().commit(a);z&&z()});d=g.getMessageCurtain();k()};var r=function(){var h=$("<div>"),n=[];f=new Hc(e,d);f.setFunRefreshLappContext(F);l=new Ic(e,d,E);l.setFunRefreshLappContext(F);n.push(l);n.push(f);var m=!0;w=new db;w.setTabLevel(db.SECOND_LEVEL);for(var u=0;u<n.length;u++)w.addTab(n[u],m),m=!1;w.addTabChangedListener(function(q,N){for(q=0;q<n.length;q++){var x=n[q];N!=x&&(x=x.getHelpIcon())&&(x=x.getJqUi(),Ca.background(x,"icon_help"))}if(x=N.getHelpIcon())x=x.getJqUi(),Ca.background(x,
"icon_help_white")});u=w.getJqUi();C.layoutCtrl(u,0,0,454,364);u.appendTo(h);m=u.find(".sa-ctrl-tab-second-head");for(u=0;u<m.length;u++){var c=n[u].getHelpIcon();if(c){var p=$(m[u]);p.css("padding-right","26px");c=c.getJqUi();c.css("z-index",2);c.appendTo(p);C.layoutCtrlWithLRTB(c,null,6,16,6,null,16)}}return h}}function Ic(e,v,g){db.AbstractTabPane.call(this);var k,d,a,f,l,w;this.setFunRefreshLappContext=function(p){w=p};this.getJqUi=function(){if(!k){k=$("<div>");l=$("<div>");C.layoutCtrl(l,10,
10,466,23);l.appendTo(k);var p=new ya;p.setText(b.get("defineLappOrderDesc","\u5df2\u914d\u7f6e\u7684\u79fb\u52a8\u529e\u516c\u5e73\u53f0"));p=p.getJqUi();p.css("font-size","14px");p.css("padding-right","26px");C.layoutCtrl(p,0,0,null,23);p.appendTo(l);var q=new Ra;q.setIconType(Ra.ICON_TYPE_QUESTION);q.setTipsSize(230,100);q.setTipsText(b.get("configuredLappTips","\u5f53\u7cfb\u7edf\u914d\u7f6e\u591a\u4e2a\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u65f6\uff0c\u53ef\u901a\u8fc7\u4e0a\u79fb\u6309\u94ae\u5b9a\u4e49\u53d1\u5e03\u5230\u79fb\u52a8\u8f7b\u5e94\u7528\u65f6\uff0c\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u7684\u663e\u793a\u987a\u5e8f\uff0c\u8c03\u6574\u540e\uff0c\u53d1\u5e03\u65f6\u9ed8\u8ba4\u4f7f\u7528\u7b2c\u4e00\u4e2a\u5df2\u540c\u6b65\u7528\u6237\u4fe1\u606f\u7684\u79fb\u52a8\u529e\u516c\u5e73\u53f0"));
q=q.getJqUi();C.layoutCtrlWithLRTB(q,null,6,16,5,null,16);q.appendTo(p);p=ca.getPublishLappConfigs();E(p,k)}return k};this.getTitle=function(){return b.get("defineLappOrder","\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u914d\u7f6e")};this.into=function(){};this.check=function(p,q){q(!0)};this.commit=function(p){for(var q=ca.getPublishLappConfigs(),N=[],x=0;x<q.length;x++)q[x].setOrderId(q.length-x),N.push(q[x].toJsonObject());(new pa(e,function(J){p.showSuccess(b.get("updateSuccess","\u4fee\u6539\u6210\u529f\u3002"))},
function(){return!1})).updatePublishLappConfigs(N)};this.getHelpIcon=function(){if(!a){var p=$("<div>"),q=$("<span>");q.text(b.get("publishConfigHelpIconTips","\u53ef\u5b9a\u4e49\u53d1\u5e03\u5230\u79fb\u52a8\u8f7b\u5e94\u7528\u65f6\uff0c\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u7684\u663e\u793a\u987a\u5e8f\uff0c\u8fd8\u53ef\u6dfb\u52a0\u79fb\u52a8\u529e\u516c\u5e73\u53f0 "));q.appendTo(p);q=$("<a onclick='javascript:window.open(\""+kb.getMobileLightAppUrl()+"\");' href='#'>");q.text(b.get("viewDetails",
"\u67e5\u770b\u5e2e\u52a9\u6587\u6863"));q.css("cursor","pointer");q.css("color","#5582f3");q.appendTo(p);a=new Ra;a.setIconType(Ra.ICON_TYPE_QUESTION);a.setTipsSize(200,70);a.setTipsHtml(p[0])}return a};var E=function(p,q){var N=!1;d=[];for(var x=0;x<p.length;x++){var J=$("<div>");J.css("border-bottom","1px solid #E5E5E5");C.layoutCtrl(J,4,34+48*x,444,48);J.appendTo(q);var Z=p[x],X=$("<div>");X.css("margin-top","9px");var ba=X,aa=Z;if(aa.getAppType()==ib.THIRDPARTY){var M=$("<img>");M.appendTo(ba);
C.layoutCtrl(M,0,0,78,30);ba=ab.getLoadImgUrl(aa.getAppImageFile(),"image-library");M.attr("src",ba)}else M="icon_"+aa.getAppType(),Ca.background(ba,M);C.layoutCtrl(X,5,null,78,30);X.appendTo(J);X=$("<div>");X.appendTo(J);C.layoutCtrlWithLRTB(X,null,0,100,null,0,30);0!=x&&u(Z,p,X,q);Z.getAppType()==ib.THIRDPARTY&&(N=!0,z(Z,X),n(Z,X));d.push(J)}N||F(q,34+48*p.length);0==p.length?(l.hide(),f&&f.css("top","16px")):l.show()},F=function(p,q){f=$("<div>");f.text(b.get("addLapp","\u6dfb\u52a0\u79fb\u52a8\u529e\u516c\u5e73\u53f0"));
f.attr("title",b.get("addLapp","\u6dfb\u52a0\u79fb\u52a8\u529e\u516c\u5e73\u53f0"));f.css("color","#3382F3");f.css("cursor","pointer");f.on("click",function(){m(!0)});C.layoutCtrl(f,10,q+16,200,30);f.appendTo(p)},z=function(p,q){p=$("<div>");p.attr("title",b.get("del","\u5220\u9664"));p.addClass("sa-qing-publish-lapp-setting-config-tool");Ca.background(p,"btn_delete");p.on("click",function(){var N=Oa.createFeedbackDialog();N.setOptionType(Oa.OPTION_OK_CANCEL);N.setMsgImageType(Oa.MSG_DELETE);N.setMessage(b.get("thirdpartyConfigDelTips",
"\u4ec5\u5220\u9664\u8be5\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u5728\u6b64\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u4e0a\u7684\u53d1\u5e03\u8bb0\u5f55\u5c06\u4f1a\u4fdd\u7559\uff0c\u786e\u8ba4\u5220\u9664\u5417\uff1f"));N.setClosingChecker(function(x){x==Oa.RETURN_OK&&r();return!0});N.showDialog()});p.appendTo(q)},r=function(p){(new pa(e,function(q){v.showSuccess(b.get("deleteSuccess","\u5220\u9664\u6210\u529f\u3002"));h()},function(q,N){return!1})).deleteThirdPartyConfig()},
h=function(){w(function(){c();var p=ca.getPublishLappConfigs();E(p,k)})},n=function(p,q){p=$("<div>");p.attr("title",b.get("edit","\u7f16\u8f91"));p.addClass("sa-qing-publish-lapp-setting-config-tool");Ca.background(p,"btn_edit");p.on("click",function(){m(!1)});p.appendTo(q)},m=function(p){var q=new Jc(e);q.setCreateStatus(p);q.setOutMessageCurtain(v);q.setParamPathPrefix(g);q.setUpdateListener(h);q.showDialog()},u=function(p,q,N,x){var J=$("<div>");J.attr("title",b.get("move","\u4e0a\u79fb"));J.addClass("sa-qing-publish-lapp-setting-config-tool");
Ca.background(J,"btn_orderup");J.on("click",function(){c();for(var Z=0;Z<q.length;Z++)if(q[Z]==p){q[Z]=q[Z-1];q[Z-1]=p;E(q,x);break}});J.appendTo(N)},c=function(){for(var p=0;p<d.length;p++)d[p].remove();f&&f.remove()}}function Hc(e,v){db.AbstractTabPane.call(this);var g,k,d,a,f,l,w;this.setFunRefreshLappContext=function(h){w=h};this.getJqUi=function(){g||(g=$("<div>"));if(!ca.getLappUserId())return 0==ca.getPublishLappConfigs().length?v.showPrompt(b.get("lappNull","\u8bf7\u5148\u914d\u7f6e\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u3002")):
v.showPrompt(b.get("lappUserIdNull","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\u3002")),k&&k.hide(),d&&d.hide(),g;ca.getDatacenterUUID()?E():F();return g};this.getTitle=function(){return b.get("modifyDatacenterName","\u4fee\u6539\u6570\u636e\u4e2d\u5fc3\u540d\u79f0")};this.into=function(){};this.check=function(h,n){if(ca.getLappUserId()){var m=a.getText();null==m||0==$.trim(m).length?(h.showPrompt(b.get("datacenterNameCanNotEmpty","\u6570\u636e\u4e2d\u5fc3\u540d\u79f0\u4e0d\u80fd\u4e3a\u7a7a\u3002")),
n(!1)):50<m.length?(h.showPrompt(b.get("datacenterNameToLong","\u6570\u636e\u4e2d\u5fc3\u540d\u79f0\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),n(!1)):n(!0)}else 0==ca.getPublishLappConfigs().length?v.showPrompt(b.get("lappNull","\u8bf7\u5148\u914d\u7f6e\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u3002")):v.showPrompt(b.get("lappUserIdNull","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\u3002")),n(!1)};this.commit=function(h){var n=new ka("lappDatacenter",function(){h.showSuccess(b.get("updateSuccess",
"\u4fee\u6539\u6210\u529f\u3002"))},function(m,u){h.showPrompt(u,2E3);return!0});f.setAccountName(a.getText());n.updateDatacenterInfo(f)};this.getHelpIcon=function(){if(!l){var h=$("<div>"),n=$("<span>");n.text(b.get("datacenterHelpIconTips","\u6307\u5b9a\u5728\u8f7b\u5206\u6790\u79fb\u52a8\u8f7b\u5e94\u7528\u4e2d\u5207\u6362\u6570\u636e\u4e2d\u5fc3\u65f6\u6570\u636e\u4e2d\u5fc3\u7684\u663e\u793a\u540d\u79f0 "));n.appendTo(h);n=$("<a onclick='javascript:window.open(\""+kb.getMobileLightAppUrl()+"\");' href='#'>");
n.text(b.get("viewDetails","\u67e5\u770b\u5e2e\u52a9\u6587\u6863"));n.css("cursor","pointer");n.css("color","#5582f3");n.appendTo(h);l=new Ra;l.setIconType(Ra.ICON_TYPE_QUESTION);l.setTipsSize(180,70);l.setTipsHtml(h[0])}return l};var E=function(){k&&k.hide();if(d)d.show();else{d=$("<div>");var h=new ya;h.setText(b.get("rName","\u540d\u79f0"));h=h.getJqUi();a=new Ya;a.setText("");var n=a.getJqUi();C.layoutCtrl(h,10,20,448,23);C.layoutCtrl(n,8,50,434,23);C.layoutCtrl(d,0,0,"100%","100%");h.appendTo(d);
n.appendTo(d);d.appendTo(g);r(function(m){a.setText(m)})}},F=function(){d&&d.hide();if(k)k.show();else{k=$("<div>");var h=$("<span>");h.text(b.get("datacenterSyncFailed","\u6570\u636e\u4e2d\u5fc3\u672a\u540c\u6b65\u6210\u529f\uff0c"));h.appendTo(k);h=$("<span>");h.text(b.get("clickToSync","\u70b9\u51fb\u624b\u52a8\u540c\u6b65"));h.appendTo(k);h.css("color","#3382F3");h.css("cursor","pointer");h.on("click",z);C.layoutCtrl(k,126,130,250,23);k.appendTo(g)}},z=function(){bb.LappIntegration.syncDatacenterInfo(e,
function(){var h=new Oa;h.setOptionType(Oa.OPTION_OK);h.setMessage(b.get("syncDatacenterSuccess","\u6570\u636e\u4e2d\u5fc3\u540c\u6b65\u6210\u529f"));h.setClosedAction(function(){w(E)});h.showDialog()},function(){var h=new Oa;h.setOptionType(Oa.OPTION_OK);h.setMessage(b.get("syncDatacenterFail","\u6570\u636e\u4e2d\u5fc3\u540c\u6b65\u5931\u8d25\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5"));h.setClosedAction(function(){F()});h.showDialog()})},r=function(h){(new ka("lappDatacenter",function(n){f=new Ta;f.fromJsonObject(n);
h(f.getAccountName())},function(n,m){v.showPrompt(m,2E3);return!0})).getDatacenterInfo(ca.getDatacenterUUID())}}function Jc(e){Za.call(this);var v=this,g=this.protectedMethod,k=this.showDialog,d,a,f,l,w,E,F,z,r,h,n,m,u={USER_NAME:b.get("userName","\u7528\u6237\u540d"),PHONE:b.get("phone","\u624b\u673a\u53f7"),EMAIL:b.get("email","\u7535\u5b50\u90ae\u7bb1")};this.setCreateStatus=function(G){f=G};this.setUpdateListener=function(G){m=G};this.setOutMessageCurtain=function(G){a=G};this.setParamPathPrefix=
function(G){};this.showDialog=function(){v.setSize(454,340);g.setTitle(f?b.get("addLapp","\u6dfb\u52a0\u79fb\u52a8\u529e\u516c\u5e73\u53f0"):b.get("thirdPartyConfig","\u7f16\u8f91\u79fb\u52a8\u529e\u516c\u5e73\u53f0"));g.setSelectable(!0);g.setContentPaneCreator(c);g.setClosingChecker(function(G){var P=E.getText();null==P||0==$.trim(P).length?(d.showPrompt(b.get("appIdEmpty","\u8bf7\u8f93\u5165\u5e94\u7528ID\u3002")),G(!1)):P&&50<P.length?(d.showPrompt(b.get("appIdTooLong","\u5e94\u7528ID\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),
G(!1)):z&&z.getAppImageFile()||n?J(P,G):(d.showPrompt(b.get("appIconEmpty","\u8bf7\u4e0a\u4f20\u5e94\u7528\u56fe\u6807\u3002")),G(!1))},!0);g.setClosingAction(function(G){G&&(n?aa(n,function(P){X(P)}):X())});d=g.getMessageCurtain();k()};var c=function(){var G="en"==Eb.getUrlParamValue("language"),P=$("<div>"),da=p(P),ja=new ya;ja.setText(b.get("appId","\u79fb\u52a8\u529e\u516c\u5e73\u53f0ID"));ja.setRequired(!0);ja=ja.getJqUi();ja.attr("title",b.get("appId","\u79fb\u52a8\u529e\u516c\u5e73\u53f0ID"));
ja.appendTo(P);var O=new Ra;O.setIconType(Ra.ICON_TYPE_QUESTION);O.setTipsSize(180,70);O.setTipsText(b.get("appIdHelpTips","\u8f7b\u5206\u6790\u4ea7\u54c1\u7814\u53d1\u56e2\u961f\u9881\u53d1\u7684\u79fb\u52a8\u529e\u516c\u5e73\u53f0ID\uff0c\u8be6\u60c5\u8bf7\u53c2\u8003\u914d\u7f6e\u6587\u6863"));O=O.getJqUi();O.appendTo(P);E=new Ya;var y=E.getJqUi();y.appendTo(P);var ia=new ya;ia.setRequired(!0);ia.setText(b.get("userIndentity","\u7528\u6237\u6807\u8bc6"));ia=ia.getJqUi();ia.attr("title",b.get("userIndentity",
"\u7528\u6237\u6807\u8bc6"));ia.appendTo(P);var ha=new Ra;ha.setIconType(Ra.ICON_TYPE_QUESTION);ha.setTipsSize(180,70);ha.setTipsText(b.get("userIndentityHelpTips","\u6784\u5efa\u5355\u70b9\u767b\u5f55\u94fe\u63a5\u65f6\u4f7f\u7528\u7684\u7528\u6237\u6807\u8bc6\u7c7b\u578b\uff0c\u8be6\u60c5\u8bf7\u53c2\u8003\u914d\u7f6e\u6587\u6863"));ha=ha.getJqUi();ha.appendTo(P);F=new eb;var oa=F.getJqUi();oa.appendTo(P);var La=new ya;La.setRequired(!0);La.setText(b.get("appIcon","\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u56fe\u6807"));
La=La.getJqUi();La.attr("title",b.get("appIcon","\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u56fe\u6807"));La.appendTo(P);var Ga=new Ra;Ga.setIconType(Ra.ICON_TYPE_QUESTION);Ga.setTipsSize(180,50);Ga.setTipsText(b.get("uploadIconHelpTips","\u5efa\u8bae\u4e0a\u4f20\u957f\u5bbd\u6bd4\u4e3a8:3\u7684\u56fe\u7247"));Ga=Ga.getJqUi();Ga.appendTo(P);var Ma=new lc;Ma.appendInvislbelUiTo(P);Ma=N(Ma);Ma.appendTo(P);var Wa=q();Wa.appendTo(P);C.layoutCtrl(ja,8,10,94,23);C.layoutCtrl(da,0,10,16,16);C.layoutCtrl(O,102,
15,16,16);C.layoutCtrl(y,138,10,284,23);C.layoutCtrl(ia,8,70,62,23);C.layoutCtrl(ha,G?72:66,75,16,16);C.layoutCtrl(oa,138,70,284,23);C.layoutCtrl(La,8,130,104,23);C.layoutCtrl(Ga,114,135,16,16);C.layoutCtrl(Ma,138,130,78,30);C.layoutCtrl(Wa,8,190,400,30);Z(function(Pa){z.getAppId()&&E.setText(z.getAppId());z.getAppUserType()?F.setSelected(u[z.getAppUserType()]):F.setSelected(u[Pa[0]]);for(var Na=F,U=Na.setItemModels,va=[],Ba=0;Ba<Pa.length;Ba++)va.push(u[Pa[Ba]]);U.call(Na,va);z.getAppImageFile()?
(l.show(),l.attr("src",ab.getLoadImgUrl(z.getAppImageFile(),"image-library"))):w.show()});return P},p=function(G){var P=!1,da=!1,ja=!1,O=function(ia){var ha=ia.type;ia=ia.keyCode;ha&&"mousedown"===ha&&(da=!0);ha&&ia&&"keydown"===ha&&"17"==ia&&(P=!0);P&&da&&!ja&&(ja=!0,ha=$("<div>"),ha.text(r),ha.appendTo(G),C.layoutCtrl(ha,6,210,200,23))},y=$("<div tabIndex=-1 style='outline: none;'>");y.on("mousedown",O);y.on("keydown",O);y.addClass("sa-qing-publish-edit-star");y.css("cursor","pointer");y.appendTo(G);
return y},q=function(){var G=$("<a>");G.text(b.get("downloadThirdpartyConfigFile","\u70b9\u51fb\u4e0b\u8f7d  \u8f7b\u5206\u6790\u96c6\u6210\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u914d\u7f6e\u6587\u6863"));G.attr("title",b.get("downloadThirdpartyConfigFile","\u70b9\u51fb\u4e0b\u8f7d  \u8f7b\u5206\u6790\u96c6\u6210\u79fb\u52a8\u529e\u516c\u5e73\u53f0\u914d\u7f6e\u6587\u6863"));G.attr("href","#");G.css("color","#3382F3");G.css("cursor","pointer");G.on("click",function(){window.open(Hb.LAPP_CONFIGURE_FILE_URL+
ca.getScene())});return G},N=function(G){var P=$("<div>");P.addClass("sa-qing_publish-lapp-thirdparty-config");P.attr("title",b.get("uploadImage","\u70b9\u51fb\u4e0a\u4f20\u56fe\u7247"));w=$("<div>");w.addClass("sa-qing_publish-lapp-thirdparty-config-add");C.layoutCtrl(w,30,6,16,16);w.appendTo(P);w.hide();var da=x(P);da.hide();l=$("<img>");C.layoutCtrl(l,0,0,"100%","100%");l.appendTo(P);l.hide();P.on("mouseenter",function(){(z&&z.getAppImageFile()||n)&&da.show()});P.on("mouseleave",function(){(z&&
z.getAppImageFile()||n)&&da.hide()});P.on("mousedown",function(ja){G.selectFile(ba,".jpg, .png, .bmp, .gif",function(O){return 0==O.indexOf("image/")})});return P},x=function(G){var P=$("<div>");P.css("z-index","1");P.css("background","rgba(85, 85, 85, 0.69");C.layoutCtrlWithLRTB(P,0,0,null,0,0,null);P.appendTo(G);G=$("<div>");Ca.background(G,"btn_edit_white");C.layoutCtrl(G,30,6,16,16);G.appendTo(P);return P},J=function(G,P){(new ka("tools",function(da){da?P(!0):(d.showPrompt(b.get("appIdNotFound",
"\u8bf7\u6839\u636e\u914d\u7f6e\u6587\u6863\u8f93\u5165\u6b63\u786e\u7684\u79fb\u52a8\u529e\u516c\u5e73\u53f0ID\u3002")),P(!1))},function(da,ja){g.getMessageCurtain().showPrompt(ja,2E3);return!0})).isExistedThirdpartyInfo(G,r,h)},Z=function(G){(new pa(e,function(P){z=new Kc;z.fromJsonObject(P.thirdPartyConfig);r=P.licenseCode;h=P.timestamp;G(P.appUserTypes)},function(P,da){return!1})).loadThirdPartyConfig()},X=function(G){z.setAppId(E.getText());M();G&&z.setAppImageFile(G);(new pa(e,function(P){a.showSuccess(b.get("successToSaveConfigInfo",
"\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u6210\u529f\u3002"));m&&m()},function(P,da){return"1100021"==P?(a.showPrompt(b.get("resourceLimit","\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002")),!0):"1100022"==P?(a.showPrompt(b.get("fileNotImage","\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u5931\u8d25\uff0c\u8be5\u6587\u4ef6\u7c7b\u578b\u4e0d\u662f\u56fe\u7247\u3002")),!0):!1})).updateThirdPartyConfig(z.toJsonObject())},ba=function(G){var P=G.getFile();P&&
(G.isSizeLargeThan(20971520)?d.showPrompt(b.get("overSize","\u56fe\u7247\u5927\u5c0f\u4e0d\u80fd\u5927\u4e8e20M\u3002")):G.isTypeMatched()?(G=URL.createObjectURL(P),w&&w.hide(),l.show(),l.attr("src",G),n=P):d.showPrompt(b.get("fileNotImage","\u8be5\u6587\u4ef6\u7c7b\u578b\u4e0d\u662f\u56fe\u7247\u3002")))},aa=function(G,P){var da=new Jb;da.setShowBlocking(!0);da.setText(b.get("uploadImage","\u6b63\u5728\u4e0a\u4f20\u56fe\u7247"));da.setRequestPreparer(function(O){O.append("filename",G)});da.setFinishedHandler(function(O,
y,ia){O&&(3099003==y?d.showError(ia):d.showError(b.get("failToUploadImg","\u4e0a\u4f20\u56fe\u7247\u5931\u8d25\u3002")))});da.setSuccessHandler(function(O){P(O.data)});var ja=Kb.getUploadUrl();da.uploadTo(ja)},M=function(){for(var G in u)if(F.getSelected()==u[G]){z.setAppUserType(G);break}}}function Dc(e,v){Za.call(this);var g=this,k=this.protectedMethod,d=this.showDialog;this.showDialog=function(){g.setSize(430,420);k.setTitle(b.get("synchronizationCompleted","\u540c\u6b65\u5b8c\u6210"));k.setSelectable(!0);
k.setContentPaneCreator(a);k.setFooterClosingOnly(!0);k.setClosingChecker2(null,function(f){k.destroy();return!0});k.setClosingAction(function(f){});d()};var a=function(){var f=$("<div>"),l=$("<div>");l.addClass("sa-role-permission-tip");l.css("display","block");l.css("background-color","#33CC99");l.text("\u221a");l.appendTo(f);C.layoutCtrl(l,4,6,16,16);l=$("<div>");l.css("font-size","14px");0==v.length?l.text(b.get("noUpdateLappRoles","\u6ca1\u6709\u5df2\u6388\u6743\u7684\u89d2\u8272\uff0c\u672c\u6b21\u540c\u6b65\u672a\u5bf9\u89d2\u8272\u8fdb\u884c\u66f4\u65b0")):
l.text(b.get("updateLappRolesSucess","\u5df2\u6210\u529f\u66f4\u65b0\u4ee5\u4e0b#1\u4e2a\u89d2\u8272\uff1a").replace("#1",v.length));l.appendTo(f);C.layoutCtrl(l,30,8,350,16);l="";for(var w=0;w<v.length;w++)l+=v[w],w<v.length-1&&(l+="\uff0c");w=$("<div>");w.css("color","#828282");w.css("overflow-y","auto");w.text(l);w.appendTo(f);C.layoutCtrl(w,30,46,350,100);if(e&&0<e.length){l=$("<div>");l.addClass("sa-role-permission-tip");l.css("display","block");l.text("!");l.appendTo(f);C.layoutCtrl(l,4,150,
16,16);l=$("<div>");l.css("font-size","14px");l.text(b.get("getLappUserFail","\u83b7\u53d6\u4ee5\u4e0b#1\u4e2a\u7528\u6237\u7684\u79fb\u52a8\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u5148\u540c\u6b65\u79fb\u52a8\u8f7b\u5e94\u7528\u8d26\u53f7\uff1a").replace("#1",e.length));l.appendTo(f);C.layoutCtrl(l,30,152,350,32);l="";for(w=0;w<e.length;w++)l+=e[w],w<e.length-1&&(l+="\uff0c");w=$("<div>");w.css("color","#828282");w.css("overflow-y","auto");w.text(l);w.appendTo(f);C.layoutCtrl(w,
30,208,350,98)}return f}}function Gc(e,v){Za.call(this);var g=this,k=this.protectedMethod,d=[],a,f;(function(){k.setTitle(e);g.setSize(v.getWidth(),v.getHeight());k.setSelectable(!0);v.setOuterMessageCurtain(k.getMessageCurtain());v.setFuncReSize(k.getDialogCtrl().setBounds);k.setContentPaneCreator(function(){return v.getJqUi()});k.setClosingChecker(function(r){l(r)},!0);k.setClosingAction(function(r){})})();this.setOuterMessageCurtain=function(r){a=r};this.setFunCrateFacade=function(r){f=r};this.addSuccessCallback=
function(r){d.push(r)};var l=function(r){var h=v.checkUIInput(function(n,m){n?E(function(){var u=v.getModelFromUI(),c=function(N){N=ca.getScene();var x=ca.getEId(),J=v.getModelFromUI();(new ka("lappAnalysisMgr",function(Z){w(J,function(){var X=function(){!m&&a.showSuccess(b.get("updateSuccess","\u4fee\u6539\u6210\u529f\u3002"));var ba=v.getDeskModelFromUI();if(d&&0<d.length)for(var aa=0;aa<d.length;aa++){var M=d[aa];M&&M(J,ba)}r(!0)};v.getThumbnailInfo()?f(function(ba){X()},function(ba,aa){k.getMessageCurtain().showPrompt(b.get("updateFailed",
"\u4fee\u6539\u5931\u8d25\u3002")+aa,2E3);return!0}).updateThumbnailInfo(v.getThumbnailInfo(),J.getName()):X()})},function(Z,X){k.getMessageCurtain().showPrompt(b.get("updateFailed","\u4fee\u6539\u5931\u8d25\u3002")+X,2E3);return!0})).saveAnalysis(J,x,N,!0)},p=f(c,function(N,x){2301001==N?c():k.getMessageCurtain().showPrompt(x,2E3);return!0}),q=v.getDeskModelFromUI();q.setFailedUserIds(v.getFailedUserIds());p.updatePublishInfo(xa.MOBILE,q,null,Lb.UPDATE_USER_AND_ROLE,u.getName())}):r(n)});h&&(k.getMessageCurtain().showPrompt(h,
2E3),r(!1))},w=function(r,h){var n=v.getThumbnailChange();v.getThumbnailPath()&&n&&ca.isPrivate()?z(v.getPublishModel().getId(),function(m){v.setThumbnailPath(m);r.setLargeThumbnail(m);h()}):h()},E=function(r){var h=v.getThumbnailChange(),n=v.getThumbnailPath();if(n)if(h){var m=v.getPublishModel().getLargeThumbnail();h=function(c){m=c;m!==n?F(n,function(p){v.setThumbnailPath(p);r()}):(v.setThumbnailPath(v.getPublishModel().getLargeThumbnail()),r())};if(m){var u=m.lastIndexOf(".");u=m.substring(u+
1);m=pb.downloadImage(m);(new com.kingdee.bos.qing.imagelib.choose.ui.ImageBase64Tool).changeToBase64(m,u,h)}else h()}else v.setThumbnailPath(v.getPublishModel().getLargeThumbnail()),r();else v.setThumbnailPath(""),r()},F=function(r,h,n){n=new ka("image",function(m){h(m)},function(m,u){return!1});n.setShowBlocking(!1);n.uploadBase64Image(r)},z=function(r,h){var n=new ka("lappAnalysisMgr",function(m){var u=new wa;u.fromJsonObject(m);h(u.getLargeThumbnail())},function(m,u){return!1});n.setShowBlocking(!1);
n.getAnalysisInfoById(r)}}function Fc(e){gb.call(this,e);var v=this,g=this.protectedMethod,k=!0,d,a,f,l,w,E,F,z,r,h,n,m,u,c,p,q,N,x,J;this.setPublishModel=function(O){h=O};this.getPublishModel=function(){return h};this.setDeskPublishModel=function(O){n=O};this.setPathSelectorModel=function(O){m=O};this.setThumbnailPath=function(O){x=O};this.getThumbnailPath=function(){return x};this.getThumbnailChange=function(){return J};this.getFailedUserIds=function(){return c};this.getWidth=function(){return 385};
this.getHeight=function(){var O=463;X()||(O+=43,n&&n.getThumbnailInfo()&&(O+=43));return O};this.isEditPublish=function(){return!0};var Z=function(){if(k){d.setText(h.getName());w.setText(h.getCardDesc());F.setText(h.getBottomAnnotation());for(var O=null,y=0;y<m.length;y++){var ia=m[y];if(ia.getValue()==h.getParentId()){O=ia;break}}a.setSelected(O);l.setSelectedValue(n.getRoles());f.setSelectedValue(n.getUsers())}X()||(n&&n.getThumbnailInfo()&&n.getThumbnailInfo().getSchedule()&&n.getThumbnailInfo().getSchedule().getPeriod()?
E&&E.setModel(b.get("timingExtract","\u5b9a\u65f6\u66f4\u65b0")):E&&E.setModel(b.get("disposableExtract","\u4e0d\u66f4\u65b0")),h.isLandscape()&&z&&z.setOn(!0))},X=function(){return h.getViewType()==wa.VIEW_TYPE_DASHBOARD};this.protectedCreateContainer=function(){var O=$("<div>"),y=0,ia=new ya,ha=ia.getJqUi();ia.setRequired(!0);var oa=b.get("publishName","\u53d1\u5e03\u540d\u79f0");ia.setText(oa);ia.setTooltips(oa);d=new Ya;var La=$("<div>");d.addEditedListener(function(){var Ga=new Mb;Ga.setPublishModel(h);
Ga.editPublishNameListener(a.getSelected().getValue(),d,!0,!1,32,O,La)});d.addBlurListener(function(){La.remove()});oa=d.getJqUi();C.layoutCtrl(ha,8,y,64,23);C.layoutCtrl(oa,100,y,230,23);ha.appendTo(O);oa.appendTo(O);y+=43;ia=new ya;ha=ia.getJqUi();ia.setRequired(!0);oa=b.get("publishPath","\u53d1\u5e03\u8def\u5f84");ia.setText(oa);ia.setTooltips(oa);a=G();oa=a.getJqUi();C.layoutCtrl(ha,8,y,64,23);C.layoutCtrl(oa,100,y,230,23);ha.appendTo(O);oa.appendTo(O);y+=43;ia=new ya;ha=ia.getJqUi();oa=b.get("permission",
"\u6388\u6743");ia.setText(oa);ia.setTooltips(oa);l=new xb(g.createFacade);oa=l.getJqUi();C.layoutCtrl(ha,8,y,64,23);C.layoutCtrl(oa,100,y,228,23);ha.appendTo(O);oa.appendTo(O);y+=43;l.setSelectedListener(function(Ga){0<Ga.length?p&&p.show():p&&p.hide()});oa=(new ya).getJqUi();f=new yb(g.createFacade);ha=f.getJqUi();C.layoutCtrl(oa,8,y,64,23);C.layoutCtrl(ha,100,y,228,23);oa.appendTo(O);ha.appendTo(O);y+=43;p=$("<div>");g.loadPermissionTip(p,function(Ga){C.layoutCtrl(Ga,136,105,193,82);Ga.appendTo(O)});
C.layoutCtrl(p,330,84,16,16);p.appendTo(O);n&&0<n.getRoles().length&&p&&p.css("display","block");ia=new ya;ha=ia.getJqUi();oa=b.get("description","\u63cf\u8ff0");ia.setText(oa);ia.setTooltips(oa);w=new lb;oa=w.getJqUi();C.layoutCtrl(ha,8,y,64,23);C.layoutCtrl(oa,100,y,230,95);ha.appendTo(O);oa.appendTo(O);y+=108;!X()&&n&&n.getThumbnailInfo()&&(ha=new ya,oa=b.get("thumbnail","\u7f29\u7565\u56fe"),ha.setText(oa),ha.setTooltips(oa),E=new rb,E.addActionListener(M),y+=43);ia=new ya;ha=ia.getJqUi();oa=
b.get("bottomAnnotation","\u5e95\u90e8\u5907\u6ce8");ia.setText(oa);ia.setTooltips(oa);F=new Ya;oa=F.getJqUi();C.layoutCtrl(ha,8,y,64,23);C.layoutCtrl(oa,100,y,230,23);ha.appendTo(O);oa.appendTo(O);y+=43;ha=new ya;oa=b.get("displayStyle","\u5448\u73b0\u65b9\u5f0f");ha.setText(oa);ha.setTooltips(oa);oa=ha.getJqUi();ha=g.getDisplayStyles();r=new eb;r.setItemModels(ha);r.setSelected(h.getDisplayStyle()==wa.DISPLAYSTYLE_THUMNAIL?ha[0]:ha[1]);ha=r.getJqUi();ha.addClass("sa-ctrl-f7selector-text");X()?(h.getLargeThumbnail()&&
(x=h.getFullLargeThumbnail()),q=ba()):q=aa();ia=$("<div>");ia.addClass("sa-ctrl-f7selector");ha.appendTo(ia);q.appendTo(ia);C.layoutCtrl(ia,100,y,230,23);C.layoutCtrl(oa,8,y,64,23);C.layoutCtrl(ha,0,8,210,22);C.layoutCtrl(q,208,8,20,20);oa.appendTo(O);ia.appendTo(O);y+=43;!X()&&g.supportLandscape()&&(ia=new ya,ha=ia.getJqUi(),oa=b.get("landscapeDefault","\u9ed8\u8ba4\u6a2a\u5c4f\u6253\u5f00"),ia.setText(oa),ia.setTooltips(oa),z=new jb,z.setOn(!1),oa=z.getJqUi(),C.layoutCtrl(ha,8,y,80,23),C.layoutCtrl(oa,
100,y,31,19),ha.appendTo(O),oa.appendTo(O));Z();return O};var ba=function(){var O=$("<span>");O.addClass("sa-ctrl-f7selector-btn");O.addClass("sa-ctrl-f7selector-btnedit");O.css("cursor","pointer");O.attr("title",b.get("editThumbnailAndSchedule1","\u7f16\u8f91\u7f29\u7565\u56fe"));Ca.background(O,"btn_edit_on");var y=function(ia,ha,oa){N=ha;oa&&(J=oa,x=ia)};O.on("click",function(){(new com.kingdee.bos.qing.imagelib.choose.ui.ChooseThumbnailDialog(x,N,y)).show()});return O};this.protectedIsOnlyYzj=
function(){return!1};var aa=function(){var O=$("<span>");O.addClass("sa-ctrl-f7selector-btn");O.addClass("sa-ctrl-f7selector-btnedit");O.css("cursor","pointer");O.attr("title",b.get("editSchedule","\u7f16\u8f91\u66f4\u65b0\u7b56\u7565"));Ca.background(O,"btn_edit");O.on("click",function(){M()});return O},M=function(){var O=n.getThumbnailInfo(),y=O.copy();y=new $b(null,null,y);y.setClosedCallback(function(ia,ha){O=ia;O.getSchemaId()&&(k=!1);n.setThumbnailInfo(O);Z()});y.setSchedulable(!0);y.showDialog()};
this.getThumbnailInfo=function(){return n.getThumbnailInfo()};var G=function(){var O=new eb;O.setItemModels(m);O.setSelected(m[0]);O.setCustomPainter(function(y,ia,ha){y=ha.getText();ia.text(y)});return O};this.getModelFromUI=function(){var O=new wa;O.fromJsonObject(h.toJsonObject());X()&&O.setLargeThumbnail(x);O.setAuthorizedUsers(u);O.setName(d.getText());O.setCardDesc(w.getText());O.setBottomAnnotation(F.getText());O.setParentId(a.getSelected().getValue());z&&O.setLandscape(z.isOn());r&&O.setDisplayStyle(r.getSelected().getValue());
return O};this.getDeskModelFromUI=function(){var O=f.getSelectedValue();var y=c;if(y){for(var ia=[],ha=0;ha<O.length;ha++){var oa=O[ha],La=oa.getValue();-1==y.indexOf(La)&&ia.push(oa)}O=ia}n.setUsers(O);n.setRoles(l.getSelectedValue());return n};var P=function(O){return null==O||0==$.trim(O).length},da=function(O){var y=new com.kingdee.bos.qing.imagelib.model.ThumbnailUrlModel,ia=y.getImagePathFromJson(N);y.checkHasImage(ia,O)};this.checkUIInput=function(O){if(null==ca||!ca.getLappUserId())return b.get("lappUserIdNull",
"\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25");var y=d.getText();if(P(y))return b.get("publishNameNotEmpty","\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0");if(50<y.length)return b.get("publishNameTooLong","\u8bf7\u8f93\u5165\u5c11\u4e8e50\u4e2a\u5b57\u7b26\u7684\u53d1\u5e03\u540d\u79f0");if(!a.getSelected())return b.get("publishPathNotEmpty","\u8bf7\u8f93\u5165\u53d1\u5e03\u8def\u5f84");if(50<w.getText().length)return b.get("descriptionCanNotExceedLimit50","\u63cf\u8ff0\u4e0d\u80fd\u8d85\u8fc750\u5b57\u7b26");
if(!P(F.getText())&&50<F.getText().length)return b.get("bottomAnnotationCanNotExceedLimit50","\u5e95\u90e8\u5907\u6ce8\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26");var ia=function(){var ha=function(){},oa=function(Wa){var Pa=v.getUserIdsByValueTextPair(f.getSelectedValue());Pa=g.getNotDuplicatedUserIds(Pa,Wa);g.getLappContextsByUserSelector(Pa,function(Na,U,va,Ba){Ba&&Ba();u=Na;c=U;y!=h.getName()||a.getSelected().getValue()!=h.getParentId()?(Na=new ka("lappAnalysisMgr",function(Aa){!0===Aa?(g.getOuterMessageCurtain().showPrompt(b.get("duplicateName",
"\u201c\u53d1\u5e03\u540d\u79f0\u201d\u5df2\u5b58\u5728\u3002"),2E3),O(!1)):O(!0,va)},function(Aa,Ka){g.getOuterMessageCurtain().showPrompt(Ka,2E3);O(!1);return!0}),Na.setShowBlocking(!1),Na.isAnalysisNameDuplicate(a.getSelected().getValue(),y)):O(!0,va)},function(){O(!1);return!0})};if(0<l.getSelectedValue().length){for(var La=l.getSelectedValue(),Ga=[],Ma=0;Ma<La.length;Ma++)Ga.push(La[Ma].getValue());(new pa(e,oa,ha)).getUserIdsByRoleId(Ga)}else oa([])};da(function(ha){ha?ia():(g.getOuterMessageCurtain().showPrompt(b.get("imgHasBeenDeleted",
"\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")),O(!1))})};this.getEditPublishSuccessCallback=function(){return ja};var ja=function(){}}function Ec(e){var v,g,k,d,a=[],f,l,w,E,F,z,r,h,n,m;this.setAutoSelectedData=function(q){r=q};this.setSearchStatus=function(q){h=q};this.setMessageCurtain=function(q){z=q};this.setDeleteCallback=function(q){l=q};this.setEditCallback=function(q){w=q};this.setThumbnailSettingCallback=
function(q){E=q};this.setEditPublishContentListenter=function(q){F=q};this.setReSearchListener=function(q){n=q};this.getJqUi=function(){v||(v=$("<div>"),v.addClass("sa-qing-publish-manager-content-container"),k=$("<div>"),k.appendTo(v),g=$("<div>"),g.addClass("sa-qing-publish-manager-content-emptytip"),g.appendTo(v),d=$("<div>"),d.css("margin-left","10px"),d.appendTo(v));return v};this.setTipsText=function(q){f=q;g&&d&&(g.text(f),g.show(),d.hide())};this.setAllPublishModels=function(q){m=q};this.setAnalysisModels=
function(q,N){a=q;k.addClass("sa-qing-publish-no-data-tips");Ca.background(k,"no-data");k.css("transform","scaleX(0.85) scaleY(0.85)");if(null==a||0==a.length)h?g.text(b.get("emptySearchTips","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")):g.text(b.get("emptyPublish","\u6682\u65e0\u53d1\u5e03\u8bb0\u5f55")),k.show(),g.show(),d.hide();else if(k.hide(),g.hide(),d.show(),d.empty(),0<a.length){for(q=0;q<a.length;q++){var x=new Lc(a[q],N[a[q].getPublishId()],z);x.setAllPublishModels(m);
x.setDeleteCallback(l);x.setDeletedListener(p);x.setThumbnailSettingCallback(E);x.setEditCallback(w);x.setEditPublishContentListenter(F);x.setReSearchListener(n);x=x.getJqUi();if(r&&a[q].getPublishId()==r.id){var J=x;r=null}x.appendTo(d)}J&&u(J)}};this.updateSearchContentUI=function(q){if(h){var N=v.find(".sa-publish-item"),x;for(x in a){var J=void 0,Z=N[x],X=a[x].getName();if(Z&&X&&q){var ba=q.toUpperCase(),aa=X.toUpperCase(),M=aa.split(ba),G=ba.length,P=$("<div>");P.addClass("sa-publish-item-head-name sa-qing-publish-fontfamily");
for(J in M){var da=aa.indexOf(M[J]),ja=X.substr(0,M[J].length);da+=M[J].length;var O=aa.length-da;aa=aa.substr(da,O);X=X.substr(da,O);da=$("<span>");da.text(ja);da.appendTo(P);if(J!==M.length-1&&1<M.length){O=aa.indexOf(ba);ja=X.substr(O,G);O+=G;var y=aa.length-O;aa=aa.substr(O,y);X=X.substr(O,y);O=$("<span>");O.text(ja);O.css("color","#FF0000");O.appendTo(da)}$(Z.children[0]).children(".sa-publish-item-head-name.sa-qing-publish-fontfamily").remove()}P.appendTo(Z.children[0]);P.attr("title",P.text())}}}};
var u=function(q){c("sa-qing-publish-manager-content-container",q);q.parent().children(".publish-card-selected").removeClass("publish-card-selected");q.addClass("publish-card-blink");q.addClass("publish-card-selected");setTimeout(function(){q.parent().children(".publish-card-blink").removeClass("publish-card-blink")},2E3)},c=function(q,N){document.querySelector("."+q).scrollTop=N.prop("offsetTop")},p=function(q){for(var N=0;N<a.length;N++)if(a[N].getId()==q.getId()){a.splice(N,1);break}}}function Lc(e,
v,g){var k,d,a,f,l,w,E,F,z,r,h,n,m,u,c;this.setDeleteCallback=function(M){F=M};this.setDeletedListener=function(M){h=M};this.setEditCallback=function(M){z=M};this.setAllPublishModels=function(M){c=M};this.setEditPublishContentListenter=function(M){r=M};this.setThumbnailSettingCallback=function(M){n=M};this.getThumbnailSettingCallback=function(){return n};this.getJqUi=function(){if(!k){k=$("<div class='sa-publish-item'>");k.on("mouseenter",X);k.on("mouseleave",ba);k.on("click",aa);var M=$("<div class='sa-publish-item-head'>");
if(e.isPreset()){var G=$("<div>");G.text(b.get("preset","\u9884\u7f6e"));G.addClass("sa-qing-publish-manager-card-name-preset-tag");G.appendTo(M)}e.getViewType()==wa.VIEW_TYPE_DASHBOARD?(G=$("<div>"),Ca.background(G,"dashboard"),G.addClass("sa-qing-publish-manager-card-pic-type"),G.appendTo(M)):e.getViewType()==wa.VIEW_TYPE_SQUARE?(G=$("<div>"),Ca.background(G,"squareData"),G.addClass("sa-qing-publish-manager-card-pic-type"),G.appendTo(M)):e.getViewType()==wa.VIEW_TYPE_LONGER&&(G=$("<div>"),Ca.background(G,
"dataAnalysis"),G.addClass("sa-qing-publish-manager-card-pic-type"),G.appendTo(M));d=$("<div class='sa-publish-item-head-name sa-qing-publish-fontfamily'>");d.appendTo(M);f=$("<div class='sa-publish-item-head-op-container'>");f.appendTo(M);M.appendTo(k);M=Ha.getIconUrl("lightapp/common","icon_chart_building.png");e.getLargeThumbnail()?M=pb.downloadImage(e.getLargeThumbnail()):v&&v.getPublishSourceType()==ub.DASHBOARD&&(M=e.getFullLargeThumbnail());e.isPreset()||(e.getDemo()||e.getScene()!=ca.getScene()?
N():(N(),x()));w=$("<img class='sa-publish-item-img'>");w.attr("src",M);w.appendTo(k);l=$("<div class='sa-publish-item-desc-container'>");a=$("<div class='sa-publish-item-desc-text sa-qing-publish-fontfamily'>");a.appendTo(l);l.appendTo(k);ba()}q();return k};var p,q=function(){a&&a.empty();d&&d.text(e.getName());d&&d.attr("title",e.getName());v&&v.getPublishSourceType()==ub.DASHBOARD&&w.attr("src",e.getFullLargeThumbnail());if(a){var M=b.get("noDescFornow","\u6682\u65e0\u63cf\u8ff0");e.getCardDesc()&&
(M=e.getCardDesc());var G=b.get("descriptionColons","\u63cf\u8ff0\uff1a")+M;M=$("<div>");var P=$("<span>"),da=$("<span>");da.text(b.get("publishSourceColons","\u53d1\u5e03\u6765\u6e90\uff1a"));da.appendTo(M);if(v){var ja=v.getPublishSourceName();e.setPublishSourceName(ja)}ja?P.text(v.getPublishSourceGroupName()+"/"+ja):(ja=$("<span>"),ja.text("!"),ja.addClass("sa-qing-publish-item-source-promt"),ja.appendTo(M),e.getViewType()==wa.VIEW_TYPE_DASHBOARD?P.text(b.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u88ab\u5220\u9664")):
(e.getViewType()==wa.VIEW_TYPE_SQUARE||e.getViewType()==wa.VIEW_TYPE_LONGER)&&P.text(b.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664")));P.appendTo(M);P=b.get("permissionColons","\u6388\u6743\uff1a");v&&(v.isPreset()?(ja=v.getRoles(),da=v.getUsers(),ja=0==ja.length&&0==da.length?b.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=ja.length&&0!=da.length?b.get("roleAndUserNames","\u89d2\u8272\uff1a#1\uff0c\u7528\u6237\uff1a#2").replace("#1",
getRoleOrUserNames(ja)).replace("#2",getRoleOrUserNames(da)):0!=ja.length?b.get("roleNames","\u89d2\u8272\uff1a#1").replace("#1",getRoleOrUserNames(ja)):b.get("userNames","\u7528\u6237\uff1a#1").replace("#1",getRoleOrUserNames(da)),P+=ja):(ja=v.getRoles(),da=v.getUsers(),ja=0==ja.length&&0==da.length?b.get("permissionNoRoleAndUserText","\u672a\u9009\u62e9\u89d2\u8272\u6216\u7528\u6237"):0!=ja.length&&0!=da.length?b.get("permissionRolesAndUsersText","\u89d2\u8272#1\u4e2a\uff0c\u7528\u6237#2\u4e2a").replace("#1",
ja.length).replace("#2",da.length):0!=ja.length?b.get("permissionRolesText","\u89d2\u8272#1\u4e2a").replace("#1",ja.length):b.get("permissionUsersText","\u7528\u6237#1\u4e2a").replace("#1",da.length),P+=ja),e.setRoles(v.getRoles()),e.setUsers(v.getUsers()));ja=b.get("refreshData","\u66f4\u65b0\u6570\u636e");v&&v.getCarryData()&&(ja=b.get("notRefreshData","\u4e0d\u518d\u66f4\u65b0\u6570\u636e"));ja=b.get("isCarryDataColons","\u662f\u5426\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e\uff1a")+ja;da=
$("<div>");da.text(G);G=$("<div>");G.text(P);P=$("<div>");P.text(ja);a.append(da);a.append(M);a.append(G);a.append(P)}};this.setReSearchListener=function(M){u=M};var N=function(){var M=$("<span>");M.addClass("sa-publish-item-head-op-item sa-publish-item-head-op-layout");Ca.background(M,"btn_delete");M.attr("title",b.get("del","\u5220\u9664"));M.on("click",function(G){clearTimeout(p);G.stopPropagation();p=setTimeout(function(){var P=Oa.createFeedbackDialog();P.setOptionType(Oa.OPTION_OK_CANCEL);P.setMsgImageType(Oa.MSG_DELETE);
var da=b.get("confirmToDelPublish","\u5220\u9664\u8be5\u8bb0\u5f55\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u8bb0\u5f55\u5417\uff1f");P.setMessage(da);P.setClosingChecker(function(ja){if(ja==Oa.RETURN_OK){ja=function(){k.remove();h&&h(e)};var O=c.indexOf(e);-1<O&&c.splice(O,1);u&&u();F&&F(e,ja)}return!0});P.showDialog()},300)});M.appendTo(f)},x=function(){E=$("<span>");E.addClass("sa-publish-item-head-op-item sa-publish-item-head-op-layout sa-publish-item-head-edit");
Ca.background(E,"btn_edit");E.attr("title",b.get("edit","\u7f16\u8f91"));if(r){var M=[J,Z],G=[b.get("editPublishInfoItem","\u7f16\u8f91\u53d1\u5e03\u4fe1\u606f"),b.get("editPublishContentItem","\u7f16\u8f91\u53d1\u5e03\u65b9\u6848")];m=new Nb(k,G,M);m.setOuterMessageCurtain(g);"3"==e.getViewType()&&m.setIsDashboardPublish(!0);E.on("click",function(P){m.show($(P.currentTarget),e)})}else E.on("click",function(P){clearTimeout(p);P.stopPropagation();p=setTimeout(J,300)});!e.getDemo()&&E.appendTo(f)},
J=function(M){var G=e.getParentId();z&&z(e,function(P,da){G==P.getParentId()?(e.setName(P.getName()),e.setCardDesc(P.getCardDesc()),e.setBottomAnnotation(P.getBottomAnnotation()),e.setViewType(P.getViewType()),e.setDisplayStyle(P.getDisplayStyle()),v.setRoles(da.getRoles()),v.setUsers(da.getUsers()),e.setLandscape(P.isLandscape()),e.setLargeThumbnail(P.getLargeThumbnail()),q()):(v.setRoles(da.getRoles()),v.setUsers(da.getUsers()),k.remove(),h&&h(e),da=c.indexOf(e),c[da]=P);u&&u()})},Z=function(M){r(M,
function(G){G&&(M.setLargeThumbnail(G),G=pb.downloadImage(G),w.attr("src",G))},xa.MOBILE)},X=function(){l.show();f.find(".sa-publish-item-head-op-item").show()},ba=function(){l.hide();f.find(".sa-publish-item-head-op-item").hide();m&&m.hide()},aa=function(M){var G=k.parent().children(".publish-card-selected");0<G.length&&G.removeClass("publish-card-selected");$(M.currentTarget).addClass("publish-card-selected")}}function Ib(){var e,v,g,k,d,a;this.setId=function(f){e=f};this.getId=function(){return e};
this.setName=function(f){v!=f&&(v=f)};this.getName=function(){return v};this.getCompleteName=function(){return v+(g?" ("+g+")":"")};this.setAnalysesCount=function(f){g!=f&&(g=f)};this.getAnalysesCount=function(){return g?g:0};this.minus=function(){--g};this.setSeq=function(f){k=f};this.getSeq=function(){return k};this.setDeleted=function(f){d=f};this.setPreset=function(f){a=f};this.isPreset=function(){return a};this.fromJsonObject=function(f){e=f.id;v=f.name;g=f.analyticalCount;k=f.seq;a=f.preset};
this.toJsonObject=function(){var f={};f.id=e;f.name=v;f.isDeleted=d;f.seq=k;return f}}function wa(){var e,v,g,k,d,a,f,l,w,E,F,z,r,h,n,m,u,c,p,q,N,x,J,Z,X=!1,ba,aa=!1,M,G,P,da=[],ja=[],O=[];this.getLappUserType=function(){return ca.getLappUserType()};this.getUsers=function(){return O};this.setUsers=function(y){O=y};this.getCarryData=function(){return P};this.setCarryData=function(y){P=y};this.getRoles=function(){return ja};this.setRoles=function(y){ja=y};this.getPublishSourceName=function(){return G};
this.setPublishSourceName=function(y){G=y};this.getCreateTime=function(){return h};this.setCreateTime=function(y){h=y};this.getCreateFormatTime=function(){return n};this.setCreateFormatTime=function(y){n=y};this.getUpdateTime=function(){return m};this.setUpdateTime=function(y){m=y};this.getUpdateFormatTime=function(){return u};this.setUpdateFormatTime=function(y){u=y};this.setId=function(y){e=y};this.getId=function(){return e};this.setCreatorName=function(y){v=y};this.getCreatorName=function(){return h};
this.setParentId=function(y){g=y};this.getParentId=function(){return g};this.setPublishId=function(y){c=y};this.getPublishId=function(){return c};this.setName=function(y){k=y};this.getName=function(){return k};this.setScene=function(y){d=y};this.getScene=function(){return d};this.isFavorite=function(){return a};this.setFavorite=function(y){a=y};this.setShareCreator=function(y){z=y};this.getShareCreator=function(){return z};this.setShareTime=function(y){r=y};this.getShareTime=function(){return r};
this.setCardDesc=function(y){f=y};this.getCardDesc=function(){return f};this.setUrl=function(y){l=y};this.getUrl=function(){return l};this.setSmallThumbnail=function(y){E=y};this.getSmallThumbnail=function(){return E};this.setLargeThumbnail=function(y){F=y};this.getLargeThumbnail=function(){return F};this.getFullLargeThumbnail=function(){var y=this.getLargeThumbnail();return y=y?pb.downloadImage(y):Ha.getIconUrl("lightapp/common","icon_dashboard_building.png")};this.setLayoutType=function(y){w=y};
this.setUploadData=function(y){q=y};this.isUploadData=function(){return q};this.setQsId=function(y){N=y};this.getQsId=function(){return N};this.setSchemaId=function(y){x=y};this.getSchemaId=function(){return x};this.setDemo=function(y){J=y};this.getDemo=function(){return J};this.isDeleted=function(){return Z};this.getViewType=function(){return p};this.setViewType=function(y){p=y};this.setAuthorizedUsers=function(y){da=y};this.getAuthorizedUsers=function(){return da};this.setPreset=function(y){X=y};
this.isPreset=function(){return X};this.setBottomAnnotation=function(y){ba=y};this.getBottomAnnotation=function(){return ba};this.setLandscape=function(y){aa=y};this.isLandscape=function(){return aa};this.setDisplayStyle=function(y){M=y};this.getDisplayStyle=function(y){return M};this.fromJsonObject=function(y){e=y.id;g=y.parentId;k=y.name;d=y.scene;a=y.favorite;f=y.description;l=y.url;F=y.largeThumb;E=y.smallThumb;q=y.withData;N=y.qsId;x=y.schemaId;J=y.demo;z=y.shareCreator;r=y.shareTime;Z=y.isDeleted;
c=y.publishId;p=y.viewType;M=y.displayStyle;ba=y.bottomAnnotation;aa=y.landscape;da=y.authorizedUsers;h=y.createTime;n=y.createFormatTime;m=y.updateTime;u=y.updateFormatTime};this.toJsonObject=function(){var y={};y.id=e;y.creatorName=v;y.parentId=g;y.name=k;y.scene=d;y.favorite=a;y.description=f;y.url=l;y.layoutType=w;y.largeThumb=F;y.smallThumb=E;y.withData=q;y.qsId=N;y.schemaId=x;y.demo=J;y.shareCreator=z;y.shareTime=r;y.publishId=c;y.viewType=p;y.displayStyle=M;y.bottomAnnotation=ba;y.landscape=
aa;y.authorizedUsers=da;y.updateTime=m;y.createTime=h;y.PublishSourceName=G;y.Roles=ja;return y}}function qb(e,v){this.toString=function(){return e};this.getValue=function(){return v}}function Ac(){var e,v,g,k;this.setAnalysisId=function(d){e=d};this.setAuthorId=function(d){v=d};this.setAuthorName=function(d){g=d};this.setAuthorHeadUrl=function(d){k=d};this.toJsonObject=function(){var d={};d.analysisId=e;d.creatorId=v;d.creatorName=g;d.avatar=k;return d}}function yc(){var e,v,g,k,d;this.isSuccess=
function(){return e};this.getAuthorizedUsers=function(){return v};this.getFailedUserNames=function(){return g};this.getFailedUserIds=function(){return k};this.getOthersCount=function(){return d};this.fromJsonObject=function(a){e=a.success;v=a.authorizedUsers;g=a.failedUserNames;k=a.failedUserIds;d=a.othersCount}}function Mc(e,v,g,k,d){Za.call(this);var a=this,f=this.protectedMethod,l=this.showDialog,w,E,F,z;this.showDialog=function(){f.setTitle(e);a.setSize(480,570);f.setSelectable(!0);f.setContentPaneCreator(r);
f.setClosingAction(function(c){});f.setClosingChecker(function(c){n(c)},!0);E=f.getMessageCurtain();l()};var r=function(){z||(z=$("<div>"),h(function(c,p,q){var N=new zb;N.addTabChangedListener(function(x,J){F=J});N.addTab(za.YZJ_ROBOT,Ua.getIconName(za.YZJ_ROBOT),Ua.getPushUIPane(za.YZJ_ROBOT,g,u,E,k,d),!0,!1);c&&N.addTab(za.WXQYH_ROBOT,Ua.getIconName(za.WXQYH_ROBOT),Ua.getPushUIPane(za.WXQYH_ROBOT,g,u,E,k,d),!1,!1);q&&N.addTab(za.DINGDING,Ua.getIconName(za.DINGDING),Ua.getPushUIPane(za.DINGDING,
g,u,E,k,d),!1,!1);p&&N.addTab(za.MISSION_CLOUD_SERVICE_ACCOUNT,Ua.getIconName(za.MISSION_CLOUD_SERVICE_ACCOUNT),Ua.getPushUIPane(za.MISSION_CLOUD_SERVICE_ACCOUNT,g,u,E,k,d),!1,c?!0:!1);c||N.addTab(za.WXQYH_ROBOT,Ua.getIconName(za.WXQYH_ROBOT)+"_off",null,!1,!1,b.get("wxqyhPushDisable","\u5f53\u524d\u73af\u5883\u6682\u672a\u914d\u7f6e\u4f01\u4e1a\u5fae\u4fe1\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u540e\u4f7f\u7528"));q||N.addTab(za.DINGDING,Ua.getIconName(za.DINGDING)+"_off",null,!1,
!1,b.get("dingdingPushDisable","\u5f53\u524d\u73af\u5883\u6682\u672a\u914d\u7f6e\u9489\u9489\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u540e\u4f7f\u7528"));p||N.addTab(za.MISSION_CLOUD_SERVICE_ACCOUNT,Ua.getIconName(za.MISSION_CLOUD_SERVICE_ACCOUNT)+"_off",null,!1,!0,b.get("missionCloudPushDisable","\u5f53\u524d\u73af\u5883\u6682\u672a\u914d\u7f6e\u7f8e\u4fe1\u4e91\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u914d\u7f6e\u540e\u4f7f\u7528"));N.getJqUi().appendTo(z)}));return z},h=function(c){var p=
!1,q=!1,N=!1,x=new u(function(J){J[za.WXQYH_ROBOT]&&!0===J[za.WXQYH_ROBOT]&&(p=!0);J[za.MISSION_CLOUD_SERVICE_ACCOUNT]&&!0===J[za.MISSION_CLOUD_SERVICE_ACCOUNT]&&(q=!0);J[za.DINGDING]&&!0===J[za.DINGDING]&&(N=!0);c(p,q,N)},function(J,Z){N=q=p=!1;c(p,q,N);return!0});x.setShowBlocking(!0);x.loadPushContext()},n=function(c){F.getModel(function(p){if(p){if(!F.checkWarningRuleExist())return f.getMessageCurtain().showPrompt(b.get("saveWarningRuleTips","\u9884\u8b66\u89c4\u5219\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u6216\u5220\u9664\u3002")),
c(!1),!1;m(p,c)}else c(!1)})},m=function(c,p){var q=F.getThumbnailModelBook(),N=g.getCurrentContentModel();(new u(function(x){p(!0);w||(w=new Ob,w.getJqUi().appendTo($(document.body)));w.showSuccess(b.get("successToSaveConfigInfo","\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u6210\u529f\u3002"));x=com.kingdee.bos.qing.behavior.BehaviorManager;x.recordResourceOperation(x.OperationType.QING_PUSH)},function(x,J){p(!1);return 4300101==x?(E.showError(b.get("failToSaveConfig","\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u5931\u8d25\u3002")),
!0):2301013==x?(E.showPrompt(b.get("NoMapCanNotSaveConfig","\u627e\u4e0d\u5230\u5f15\u7528\u7684\u5730\u56fe\u6a21\u677f\uff0c\u65e0\u6cd5\u4fdd\u5b58\u914d\u7f6e\u4fe1\u606f\u3002"),2E3),!0):2301016==x?(E.showPrompt(b.get("publishNoOperAuthException","\u6ca1\u6709\u64cd\u4f5c\u6743\u9650\u3002"),2E3),!0):!1})).saveConfigInfo(c,N,q,g.getParamPathPrefix(),g.getDsbPublishId(),g.getScene())},u=function(c,p,q){return new pa(v,c,p,q)}}function mc(){var e=this,v,g,k,d=!1,a,f,l,w,E,F,z,r,h,n,m,u="",c,p,
q,N,x,J,Z,X=!1,ba,aa,M;M||(Ha.setRootPath("."),Ha.setCallback(function(){M=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),Ha.loadJs("biz-common/qing-biz-common.js"),Ha.loadSkinCss("biz-common","biz-common"),Ha.loadSkinJs("biz-common","skin"),Ha.loadI18n("biz-common","biz-common"));this.setDsbThumbnailDeleteCallBack=function(U){N=U};this.setModel=function(U){c=U;h=c.getName();r=c.getNameRule();z=c.getSchedule();u=c.getThumbnailPath();n=c.getCreateTime();m=c.getCreateFormatTime()};this.getModel=
function(U){e.protectedCheckUIInput()?ia(U):U(null)};this.setPushTargetType=function(U){k=U};this.getPushTargetType=function(){return k};this.setEditMode=function(U){d=U};this.setPublishContext=function(U){g=U};this.setOuterMessageCurtain=function(U){v=U};this.getOuterMessageCurtain=function(){return v};this.setCreateFacadeMethod=function(U){a=U};this.createFacade=function(){return a};this.getThumbnailCutPanel=function(){return F};this.getThumbnailModelBook=function(){return F?F.getThumbnailInfo().getSchemaModelBook():
null};this.setPushSchemaEditEntrance=function(U){p=U};this.getPushSchemaEditEntrance=function(){return p};this.setDesigner=function(U){x=U};this.getDesigner=function(){return x};this.isEmpty=function(U){return null==U||0==$.trim(U).length};this.protectedCheckUIInput=function(){};this.protectedGetModel=function(){return c};this.protectedGetModelFromUI=function(){};this.protectedGetGapHeight=function(){return 26};this.protectedGetJqCustomUI=function(){};this.protectedGetCustomUIHeight=function(){};
this.protectedGetStartY=function(){return 20};this.clear=function(){f&&(z=c=null,h=r="",l.setModel(null),w.setModel(null),E.setText(""))};this.getJqUi=function(){f||P();return f};var G=function(){var U=!1;if(c&&c.getSourceType()==ub.DASHBOARD||g&&g.getCurrentSourceType()==ub.DASHBOARD&&!d)U=!0;return U},P=function(){f=$("<div>");var U=G(),va=!(d&&!U),Ba=new nb(b.get("schedulePushManager","\u5b9a\u65f6\u63a8\u9001\u7ba1\u7406"));Ba.addActionListener(da);var Aa=Ba.getJqUi();Ba=new ya;Ba.setRequired(!0);
Ba.setText(b.get("pushName","\u540d\u79f0"));Ba=Ba.getJqUi();l=new rb;l.addActionListener(ja);var Ka=l.getJqUi(),K=new ya;K.setRequired(!0);K.setText(b.get("pushTime","\u63a8\u9001\u9891\u7387"));K=K.getJqUi();K.attr("title",b.get("pushTime","\u63a8\u9001\u9891\u7387"));w=new rb;w.addActionListener(O);var H=w.getJqUi();if(!G()){var Q=new ya;Q.setText(b.get("warningRule","\u9884\u8b66\u89c4\u5219"));Q=Q.getJqUi();Q.attr("title",b.get("warningRule","\u9884\u8b66\u89c4\u5219"));ba=new rb;ba.addActionListener(oa);
ba.addClearListener(Ga);aa=ba.getJqUi();if(!d){var R=$("<span>");R.addClass("sa-qing-publish-edit-icon");R.attr("title",b.get("warningRuleEdit","\u7f16\u8f91\u9884\u8b66\u89c4\u5219"));Ca.backgroundWithHover(R,"icon-rule-setting");R.on("click",Ma)}}var la=e.protectedGetJqCustomUI(c),sa=e.protectedGetCustomUIHeight(),ra=new ya;ra.setText(b.get("describe","\u63cf\u8ff0"));ra=ra.getJqUi();E=new lb;var ma=E.getJqUi(),ua=e.protectedGetStartY(),Fa=va?50:230;c?(Aa=c.getName(),null!=c.getNameRule()&&(Aa=
Aa+"-\uff08"+b.get("systemDate","\u7cfb\u7edf\u65e5\u671f")+"\uff09"),l.setModel(Aa),z=c.getSchedule(),w.setModel(c.getSchedule().toString()),E.setText(c.getDescText()),ua=0,G()||(J=c.getWarningRuleName(),Pa(c.getWarningRuleName()))):(C.layoutCtrlWithLRTB(Aa,null,2,110,-32,null,23),Aa.appendTo(f),G()||Na());Aa=e.protectedGetGapHeight();var qa=ua;C.layoutCtrl(Ba,27,qa,70,23);C.layoutCtrl(Ka,113,qa,310,23);qa=qa+23+Aa;C.layoutCtrl(la,0,qa,435,sa);qa=qa+sa+Aa;C.layoutCtrl(K,27,qa,70,23);C.layoutCtrl(H,
113,qa,310,23);qa=qa+23+Aa;G()||(C.layoutCtrl(Q,27,qa,70,23),d?C.layoutCtrl(aa,113,qa,310,23):(C.layoutCtrl(aa,113,qa,290,23),C.layoutCtrl(R,405,qa-20,20,16)),qa=qa+23+Aa);C.layoutCtrl(ra,27,qa,70,23);qa+=7;C.layoutCtrl(ma,113,qa,310,Fa);Ba.appendTo(f);Ka.appendTo(f);K.appendTo(f);H.appendTo(f);G()||(Q.appendTo(f),aa.appendTo(f),d||R.appendTo(f));la.appendTo(f);ra.appendTo(f);ma.appendTo(f);va&&(U?(qa=qa+Fa+Aa,U=new ya,U.setText(b.get("thumbnail","\u7f29\u7565\u56fe")),U=U.getJqUi(),C.layoutCtrl(U,
27,qa,70,23),U.appendTo(f),q=new com.kingdee.bos.qing.imagelib.choose.ui.ChooseThumbnailPane,q.setDsbThumbnailDeleteCallBack(function(D,V,t){N&&N(D,V,t);q.getThumbnailUrlModel().getImageFileName()===D&&(D=sb.createWarning(),D.addClass("dm-entity-list-item-notexist"),D.attr("title",b.get("imgHasBeenDeleted","\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e")),C.layoutCtrl(D,93,qa),D.appendTo(f))}),q.setRemoveImgNotExistIconCallBack(function(){f.find(".dm-entity-list-item-notexist").remove()}),
!u||-1<u.indexOf("{")?u=q.getThumbnailUrlModel().getImagePathFromJson(u):c&&c.getThumbnailPath()&&(u=ab.getLoadImgUrl(c.getThumbnailPath(),"card-thumbnail")),U=q.init(u),qa+=8,C.layoutCtrl(U,113,qa,310,150),U.appendTo(f)):(qa=qa+Fa+Aa,U=new ya,U.setText(b.get("thumbnail","\u7f29\u7565\u56fe")),U=U.getJqUi(),F=new Fb(g,a,e.getOuterMessageCurtain()),F.setThumbnailSize(310,150),F.setSchedulable(!1),va=F.getJqUi(),C.layoutCtrl(U,27,qa,70,23),qa+=6,C.layoutCtrl(va,113,qa,310,150),U.appendTo(f),va.appendTo(f)))},
da=function(){(new a(function(U){U=new Nc(a,g,p);U.setClickTimedPushManager(!0);U.showDialog(k)},function(U,va){return"4300101"==U?(v.showError(b.get("failToLoadPushRecord","\u83b7\u53d6\u63a8\u9001\u8bb0\u5f55\u5931\u8d25\u3002")),!0):!1})).loadConfigInfo(k)},ja=function(U,va,Ba){U=new Oc(h,r);U.setClosingListener(function(Aa,Ka){h=Aa;r=null;Ka&&(r=Ka.getValue(),Aa=Aa+"-"+b.get("systemDate","\u7cfb\u7edf\u65e5\u671f"));l.setModel(Aa)});U.showDialog()},O=function(){var U=new Pc(z);U.setCreateFacadeMethod(a);
U.setClosingListener(function(va){z=va;w.setModel(z.toString())});U.showDialog()},y=function(U){if(q){var va=q.getDashboardThumbnailUrl(),Ba=new com.kingdee.bos.qing.imagelib.model.ThumbnailUrlModel;va=Ba.getImagePathFromJson(va);Ba.checkHasImage(va,U)}else U(!1)},ia=function(U){var va=E.getText();e.isEmpty(h)?(v.showPrompt(b.get("pushNameCanNotEmpty","\u8bf7\u8f93\u5165\u63a8\u9001\u540d\u79f0\u3002")),U(null)):e.isEmpty(z)?(v.showPrompt(b.get("pushTimeCanNotEmpty","\u8bf7\u8f93\u5165\u63a8\u9001\u65f6\u95f4\u3002")),
U(null)):100<$.trim(va).length?(v.showPrompt(b.get("descToLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7100\u4e2a\u5b57\u7b26\u3002")),U(null)):G()?y(function(Ba){Ba?U(ha()):(v.showPrompt(b.get("imgHasBeenDeleted","\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")),U(null))}):U(ha())},ha=function(){var U=e.protectedGetModelFromUI();U.setPushTargetType(k);U.setName($.trim(h));U.setCreateTime(n);U.setCreateFormatTime(m);r&&
U.setNameRule(r);U.setSchedule(z);U.setDescText($.trim(E.getText()));U.setWarningRuleName(J);U.setWarningRuleStatus(!0);if(c){if(U.setId(c.getId()),U.setTagId(c.getTagId()),U.setSourceType(c.getSourceType()),U.setOpenSchedule(c.getOpenSchedule()),U.setHasPermission(c.isHasPermission()),U.setSourceName(c.getSourceName()),U.setSchemaType(c.getSchemaType()),U.setThumbnailPath(c.getThumbnailPath()),q&&q.isImageChange()){var va=q.getDashboardThumbnailUrl();U.setThumbnailPath(va)}}else F&&(va=F.getThumbnailInfo(),
U.setApeLeft(va.getApertureLeft()),U.setApeTop(va.getApertureTop()),U.setScoLeft(va.getScrollLeft()),U.setScoTop(va.getScrollTop()),U.setApeWidth(va.getApertureWidth()),U.setApeHeight(va.getApertureHeight())),U.setTagId(g.getBizTag()),U.setSourceType(g.getCurrentSourceType()),U.setOpenSchedule(!0),q&&(va=q.getDashboardThumbnailUrl(),U.setThumbnailPath(va));return U},oa=function(U){d||null==x?(new com.kingdee.bos.qing.core.ui.WarningRuleSelector).showDialog(Z,J,La,function(va){X=e.checkWarningRuleExist();
Na()}):x.getConductor().popupWarningRuleSelector(J,La,function(va){X=e.checkWarningRuleExist();Na()})},La=function(U){J=U},Ga=function(U){J=null;Na()},Ma=function(U){null!=x&&x.getConductor().popupWarningRuleEditor(function(va){va&&(g.getCurrentContentModel().schemaContent=x.getJsonModelBook(),X=e.checkWarningRuleExist(),Na())})};this.checkWarningRuleExist=function(){return null==J||null!=x&&x.getConductor().checkWarningRuleExist(J)||null!=Z&&com.kingdee.bos.qing.core.ui.WarningRuleSelector.checkWarningRuleExist(Z,
J)?!0:!1};var Wa=function(U){var va=new a(function(Ka){U(Ka.model)}),Ba=c.getId(),Aa=c.getPushTargetType();va.loadPushSchema(Ba,Aa)},Pa=function(){Wa(function(U){var va=com.kingdee.bos.qing.CodeLoader;va.setCallback(function(){Z=com.kingdee.bos.qing.ModelHelper.fromJson(U);X=e.checkWarningRuleExist();Na()});va.setRootPath(".");va.loadJs("core/qing-scene.js")})},Na=function(){aa.css("color","#666666");var U=aa.find(".warning-rule-item-notexist");U&&U.remove();U=aa.find(".sa-ctrl-f7selector-text");
U.css("margin-left","0px");null==J&&(ba.setModel(b.get("warningRuleTips","\u8bf7\u9009\u62e9\u9884\u8b66\u89c4\u5219")),aa.css("color","#b2b2b2"),aa.attr("title",b.get("warningRuleTips","\u8bf7\u9009\u62e9\u9884\u8b66\u89c4\u5219")));null!=J&&X&&(ba.setModel(b.get("selectedWarningRule","\u5df2\u9009\u62e9\u9884\u8b66\u89c4\u5219")+J),aa.attr("title",""));if(null!=J&&!X){ba.setModel(b.get("TheWarningRuleNotExist","\u9884\u8b66\u89c4\u5219#1\u4e0d\u5b58\u5728").replace("#1",J));aa.attr("title","");
var va=sb.createWarning();va.addClass("warning-rule-item-notexist");va.attr("title",b.get("warningRuleNotExist","\u9884\u8b66\u89c4\u5219\u4e0d\u5b58\u5728"));aa.append(va);U.css("margin-left","16px")}J?ba.setClearable(!0):ba.setClearable(!1)}}function Pb(){zb.AbstractTabPane.call(this);mc.call(this);var e=this,v,g;this.into=function(){e.clear();g&&g.setModel("")};this.protectedGetModelFromUI=function(){var d=$.trim(g.getModel()),a=new Qb;a.setWebhook(d);return a};this.protectedGetJqCustomUI=function(){if(!v){v=
$("<div>");var d=new ya;d.setRequired(!0);d.setText("Webhook");var a=new Ra;a.setIconType(Ra.ICON_TYPE_QUESTION);a.setTipsSize(240,62);var f=kb.getMobileTimedPushUrl();f=$("<a onclick='javascript:window.open(\""+f+"\");' href='#'>");f.css({cursor:"pointer",color:"var(--color-main, #5582f3)"});f.text(b.get("helpDocument","\u5e2e\u52a9\u6587\u6863"));a.setTipsHtml(b.get("whatsWebhook","\u7fa4\u7ba1\u7406\u5458\u6dfb\u52a0\u7fa4\u7ec4\u673a\u5668\u4eba\u540e\uff0c\u5373\u53ef\u67e5\u770b\u7fa4\u7ec4\u673a\u5668\u4eba\u7684Webhook\u5730\u5740\u3002\u64cd\u4f5c\u65b9\u5f0f\u8bf7\u53c2\u8003")+
f.prop("outerHTML"));a=a.getJqUi();g=new rb;g.addActionListener(k);d=d.getJqUi();f=g.getJqUi();var l=e.protectedGetModel();l&&(g.setModel(l.getWebhook()),g.getJqUi().attr("title",g.getModel()));C.layoutCtrl(d,27,0,64,23);C.layoutCtrl(a,92,3,16,16);C.layoutCtrl(f,113,0,310,23);d.appendTo(v);a.appendTo(v);f.appendTo(v)}return v};this.protectedGetCustomUIHeight=function(){return 23};this.protectedGetStartY=function(){return 20};this.getEditWebhook=function(){return g};this.protectedGetGapHeight=function(){return 18};
this.protectedCheckUIInput=function(){var d=g.getModel();return e.isEmpty(d)?(e.getOuterMessageCurtain().showPrompt(b.get("webhookCanNotEmpty","\u8bf7\u8f93\u5165\u7fa4\u7ec4\u673a\u5668\u4ebaWebhook\u5730\u5740\u3002")),!1):!0};var k=function(){var d=new Qc(g.getModel());d.setPushTargetType(e.getPushTargetType());d.setClosingListener(function(a){g.setModel(a);g.getJqUi().attr("title",a)});d.showDialog()}}function Rc(e,v){Za.call(this);var g=this,k=this.protectedMethod,d=this.showDialog,a,f,l,w,E;
this.setModel=function(z){w=z};this.setFinishedEditListener=function(z){l=z};this.setDsbThumbnailDeleteCallBack=function(z){E=z};this.showDialog=function(){k.setTitle(b.get("editSchedulePush","\u7f16\u8f91\u5b9a\u65f6\u63a8\u9001"));g.setSize(480,560);k.setSelectable(!0);k.setContentPaneCreator(F);k.setClosingAction(function(z){});k.setClosingChecker(function(z){f.getModel(function(r){if(null==r)z(!1);else{if(!f.checkWarningRuleExist())return k.getMessageCurtain().showPrompt(b.get("saveWarningRuleTips",
"\u9884\u8b66\u89c4\u5219\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u6216\u5220\u9664\u3002")),z(!1),!1;z(!0);l&&l(r)}})},!0);a=k.getMessageCurtain();d()};var F=function(){var z=w.getPushTargetType();f=Ua.getPushUIPane(z,v,e,a);f.setEditMode(!0);f.setPushTargetType(z);f.setModel(w);f.setDsbThumbnailDeleteCallBack(function(r,h,n){E&&E(r,h,n)});return f.getJqUi()}}function Oc(e,v){Za.call(this);var g=this,k=this.protectedMethod,d=this.showDialog,a,f,l,w,E,F,z=[b.get("nameFixed","\u56fa\u5b9a\u540d\u79f0"),
b.get("nameDate","\u540d\u79f0+\u7cfb\u7edf\u65e5\u671f")];this.setClosingListener=function(h){F=h};this.showDialog=function(){g.setSize(480,340);k.setTitle(b.get("pushName","\u540d\u79f0"));k.setSelectable(!0);k.setContentPaneCreator(r);k.setClosingChecker(function(h,n){h=f.getText();return null==h||0==$.trim(h).length?(a.showPrompt(b.get("pushNameCanNotEmpty","\u8bf7\u8f93\u5165\u63a8\u9001\u540d\u79f0\u3002")),!1):50<h.length?(a.showPrompt(b.get("pushNameToLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),
!1):!0});k.setClosingAction(function(h){h&&F&&F(f.getText(),w.getSelected())});a=k.getMessageCurtain();d()};var r=function(){var h=$("<div>"),n=new ya;n.setText(b.get("nameRule","\u89c4\u5219"));n=n.getJqUi();l=new eb;l.setSelected(z[0]);l.setItemModels(z);l.addSelectedChangedListener(function(N,x,J){J==z[0]?(E&&E.hide(),w.setSelected(null)):(E&&E.show(),w.setSelected(Ab.getArrDateFormat()[0]))});var m=l.getJqUi(),u=new ya;u.setRequired(!0);u.setText(b.get("pushName","\u540d\u79f0"));u=u.getJqUi();
f=new Ya;f.setText(e);var c=f.getJqUi();E=$("<div>");var p=new ya;p.setText(b.get("dateFormat","\u65e5\u671f\u683c\u5f0f"));p=p.getJqUi();p.appendTo(E);w=new eb;w.setItemModels(Ab.getArrDateFormat());var q=w.getJqUi();q.appendTo(E);C.layoutCtrl(n,30,10,70,23);C.layoutCtrl(m,115,10,300,23);C.layoutCtrl(u,30,69,70,23);C.layoutCtrl(c,115,69,300,23);C.layoutCtrl(E,0,128,448,23);C.layoutCtrl(p,30,0,70,23);C.layoutCtrl(q,115,0,300,23);n.appendTo(h);m.appendTo(h);u.appendTo(h);c.appendTo(h);E.appendTo(h);
v?(l.setSelected(z[1]),w.setSelected(Ab.searchDateFormatObj(v))):E.hide();return h}}function Qc(e){Za.call(this);var v=this,g=this.protectedMethod,k=this.showDialog,d,a,f,l;this.setClosingListener=function(r){f=r};this.setPushTargetType=function(r){l=r};this.showDialog=function(){v.setSize(480,340);g.setTitle("Webhook");g.setSelectable(!0);g.setContentPaneCreator(w);g.setClosingChecker(function(){var r=F(d.getText());if(null==r||0==$.trim(r).length)return a.showPrompt(b.get("webhookCanNotEmpty","\u8bf7\u8f93\u5165\u7fa4\u7ec4\u673a\u5668\u4ebaWebhook\u5730\u5740\u3002")),
!1;r=r.split(";");if(5<r.length)return a.showPrompt(b.get("webhookTooMuch","Webhook\u5730\u5740\u4e0d\u53ef\u8d85\u8fc75\u4e2a\u3002")),!1;for(var h=0;h<r.length;h++){var n=r[h];if(255<n.length)return a.showPrompt(b.get("webhookToLong","Webhook\u5730\u5740\u8fc7\u957f\uff0c\u8bf7\u68c0\u67e5\u5730\u5740\u662f\u5426\u6b63\u786e")),!1;if(!z(n))return a.showPrompt(b.get("webhookWrongFormat","Webhook\u5730\u5740\u683c\u5f0f\u9519\u8bef")),!1}return!0});g.setClosingAction(function(r){r&&f&&f(F(d.getText()))});
a=g.getMessageCurtain();k()};var w=function(){var r=$("<div>"),h=$("<div>");C.layoutCtrl(h,0,0,448,null);h.css("color","gray");var n=b.get("enterWebhook","\u8bf7\u8f93\u5165\u7fa4\u7ec4\u673a\u5668\u4ebaWebhook\u5730\u5740\uff0c\u591a\u4e2a\u5730\u5740\u53ef\u7528\u82f1\u6587\u5206\u53f7\u5206\u9694\uff0c\u6700\u591a\u53ef\u8f93\u51655\u4e2a");h.text(n);h.attr("title",n);h.appendTo(r);d=new lb;h=d.getJqUi();h.addClass("lapp-webhook-textarea-real");d.setText(E(e));d.addEditedListener(function(){d.setText(E(d.getText()))});
C.layoutCtrl(h,0,40,448,180);h.appendTo(r);return r},E=function(r){r&&-1<r.indexOf(";")&&(r=r.replace(/;(?!\n|$)/g,";\n"));return r},F=function(r){r=$.trim(r);return r=r.replace(/\n/g,"").replace(/(^;|;$)/g,"")},z=function(r){var h=/(http|https):\/\/([\w.]+\/?)\S*/;return l==za.YZJ_ROBOT&&h.test(r)&&-1!=r.indexOf("/gateway/robot/webhook/send?yzjtype=0&yzjtoken=")&&(h=r.indexOf("/gateway/robot/webhook/send?yzjtype=0&yzjtoken="),-1==r.indexOf("/gateway/robot/webhook/send?yzjtype=0&yzjtoken=",h+1))||
l==za.WXQYH_ROBOT&&(h=r.indexOf("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key="),0==h&&-1==r.indexOf("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=",h+1))||l==za.DINGDING&&(h=r.indexOf("https://oapi.dingtalk.com/robot/send?access_token="),0==h&&-1==r.indexOf("https://oapi.dingtalk.com/robot/send?access_token=",h+1))?!0:!1}}function Pc(e){Za.call(this);var v=this,g=this.protectedMethod,k=this.showDialog,d,a,f,l;this.setClosingListener=function(F){l=F};this.setCreateFacadeMethod=function(F){f=
F};this.showDialog=function(){v.setSize(480,340);g.setTitle(b.get("pushTime","\u63a8\u9001\u65f6\u95f4"));g.setSelectable(!0);g.setContentPaneCreator(w);g.setClosingChecker(function(){var F=a.getSchedule();if("Custom"==F.getPeriod()){var z=F.getCron();if("undefined"==typeof z||""==z)return d.showPrompt(b.get("cronErrorMessage","\u8bf7\u8f93\u5165\u8868\u8fbe\u5f0f\u3002")),!1;if(!F.getCronFlag())return d.showPrompt(b.get("cornInCheckOrError","cron\u8868\u8fbe\u5f0f\u6709\u8bef\u6216cron\u8868\u8fbe\u5f0f\u6b63\u5728\u89e3\u6790\u6821\u9a8c\u3002")),
!1}return!0});g.setClosingAction(function(F){F&&l&&l(a.getSchedule())});d=g.getMessageCurtain();k()};var w=function(){a=new com.kingdee.bos.qing.schedule.ScheduleSelector;a.isOnlyPeriod(!0);a.setCronAnalysisFacade(E);var F=a.getJqUi();F.css("left","120px");F.css("top","30px");e&&a.setSchedule(e.copy());return F},E=function(F,z,r){z=new f(z,r);z.setShowBlocking(!0);z.cronExpression(F)}}function Nc(e,v,g){Za.call(this);var k=this,d=this.protectedMethod,a=this.showDialog,f,l,w;this.showDialog=function(E){d.setTitle(b.get("schedulePushManage",
"\u5b9a\u65f6\u63a8\u9001\u7ba1\u7406"));k.setSize(850,570);d.setSelectable(!0);d.getDialogCtrl().setMinSize(850,570);d.getDialogCtrl().setFullScreenEnabled();d.getDialogCtrl().setResizeEnabled();d.getDialogCtrl().addResizeListener(function(){l&&l.relayoutViews()});f=d.getMessageCurtain();d.setContentPaneCreator(function(){l=new nc(E,f,e,v,g);l.setClickTimedPushManager(w);return l.getJqUi()});d.setFooterClosingOnly(!0);d.setClosingChecker2(null,function(F){d.destroy();return!0});d.setClosingAction(function(F){});
a()};this.setClickTimedPushManager=function(E){w=E}}function nc(e,v,g,k,d){function a(D){KTDefaultCellRender.call(this,D);var V=this,t=this.paintCellUI;this.paintCellUI=function(I,Y){var S=V.getCurrentRowIdx(),fa=V.getCurrentRow(),W=V.getCurrentColIdx(),L=$(I),T=fa.getUserObject();if(1==S){t(I,Y);var ea=$(I).find("span");ea.css({"padding-right":"12px","padding-left":"2px"});if(!/Trident|MSIE/.test(window.navigator.userAgent)&&(c&&1!=W&&2!=W&&4!=W&&6!=W&&c.addSortingTips($(I),N[W]),!c&&3==W&&!q)){q=
new f;da=[];for(ea=0;ea<G.length;ea++)da.push(G[ea].toJsonObject());q.setArrJson(da);q.setFunSortchangeListener(function(Ia,Sa){Sa?c.setShowSortingModel(q.getShowSortingModel()):(Sa=new l,Sa.setField("PushCreateTime"),Sa.setOrder(l.ORDER_DESC));Ia=[];for(var Rb=0;Rb<G.length;Rb++)Ia.push(G[Rb].toJsonObject());q.setArrJson(Ia);q.sortArrJson(Ia,Sa,function(Bb){Ma(Bb);ua()},function(Bb){return"fileSize"==Bb?"sFileSizeNoFormat":Bb})});q.addPushCreateTimeSortingTips($(I),N[W])}}if(V.getCurrentRowIdx()<
Qa.getHeadRowCount()||2==W||5==W)t(I,Y),ea=$(I).find("span"),ea.css({"padding-right":"12px","padding-left":"5px"});else if(1==W)t(I,Y),ea=$(I).find("span"),ea.css({"padding-right":"12px","padding-left":"2px"}),ea.attr("title",fa.getCell(1).getValue());else if(0==W)t(I,Y),ea=$(I).find("span"),ea.css({"padding-right":"8px","padding-left":"6px",left:"8px"}),ea.attr("title",fa.getCell(0).getValue()),ea.addClass("sa-publish-item-list-head"),Aa(T.getSourceName())?"subject"==T.getSourceType()?(I=sb.createWarning(),
I.attr("title",b.get("subjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u5220\u9664")),C.layoutCtrl(I,0,8),L.append(I)):"dashboard"==T.getSourceType()&&(I=sb.createWarning(),I.attr("title",b.get("dashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u5220\u9664")),C.layoutCtrl(I,0,8),L.append(I)):T.getWarningRuleStatus()||(I=sb.createWarning(),I.attr("title",b.get("warningRuleInvalidTips","\u9884\u8b66\u89c4\u5219\u4e0d\u5b58\u5728")),C.layoutCtrl(I,0,8),L.append(I));else if(3==W){L=T.getCreateFormatTime();
var ta=$("<span>");ta.text(L);ta.attr("title",L);ta.css("line-height","28px");ta.css("padding-left","6px");ta.css("padding-right","8px");ta.appendTo(I)}else if(4==W){var Ja=new jb;Ja.setOn(T.getOpenSchedule()&&T.getWarningRuleStatus()&&T.getSourceName());var Xa=Ja.isOn();Ja.addStateChangeListener(function(Ia,Sa){Sa&&(Ia=Ia.isOn(),T.setOpenSchedule(Ia),Ka(Ja,Ia,Xa,T))});Ja.setEnabled(!1);L=$("<div>");L.css({opacity:"0","z-index":"100"});C.layoutCtrl(L,5,5,100,23);T.isHasPermission()?(Ja.setEnabled(!0),
Aa(T.getSourceName())?(Ja.setEnabled(!1),"subject"==T.getSourceType()?ta=b.get("ButtonMessageAfterSubjectDeleted","\u8be5\u4e1a\u52a1\u4e3b\u9898\u5df2\u88ab\u5220\u9664\uff0c\u65e0\u6cd5\u542f\u52a8\u63a8\u9001\u914d\u7f6e"):"dashboard"==T.getSourceType()&&(ta=b.get("ButtonMessageAfterDashboardDeleted","\u8be5\u4eea\u8868\u677f\u5df2\u88ab\u5220\u9664\uff0c\u65e0\u6cd5\u542f\u52a8\u63a8\u9001\u914d\u7f6e")),L.attr("title",ta),L.appendTo(I)):T.getWarningRuleStatus()||(Ja.setEnabled(!1),ta=b.get("ButtonMessageAfterWarningRuleInvalidTips",
"\u9884\u8b66\u89c4\u5219\u4e0d\u5b58\u5728,\u65e0\u6cd5\u542f\u52a8\u63a8\u9001\u914d\u7f6e"),L.attr("title",ta),L.appendTo(I))):(ta=b.get("sourceIsPublishNoPermissionOrNotFound","\u539f\u53d1\u5e03\u4e0d\u5b58\u5728\u6216\u672a\u6388\u6743"),L.attr("title",ta),L.appendTo(I));L=Ja.getJqUi();L.addClass("push-schedule-state-btn");C.layoutCtrl(L,26,16,31,19);L.appendTo(I)}else if(6==W){L=new nb(b.get("scheduleDetails","\u63a8\u9001\u660e\u7ec6"));L.addActionListener(function(){K(T,D,S,5)});L=L.getJqUi();
L.addClass("push-record-detail");L.appendTo(I);L=[A,B];ta=[b.get("editPushInfoItem","\u7f16\u8f91\u63a8\u9001\u4fe1\u606f"),b.get("editPushContentItem","\u7f16\u8f91\u63a8\u9001\u65b9\u6848")];var ob=new Nb($(E.getUI()),ta,L);L=new nb(b.get("editPushConfig","\u7f16\u8f91"));var fb=L.getJqUi();fb.addClass("edit-push-config");L.addActionListener(function(){ob.show(fb,fa);var Ia=w.find(".sa-qing-publish-manager-editcontent-selector"),Sa=fb.offset().left-82;Ia.offset({left:Sa})});fb.appendTo(I);L=new nb(b.get("DeletePushConfig",
"\u5220\u9664"));L.addActionListener(function(){var Ia=Oa.createFeedbackDialog();Ia.setOptionType(Oa.OPTION_OK_CANCEL);Ia.setMsgImageType(Oa.MSG_DELETE);Ia.setMessage(b.get("confirmDeleteTheConfig","\u5220\u9664\u8be5\u8bb0\u5f55\u540e\u5c06\u540c\u65f6\u6e05\u7a7a\u8be5\u8bb0\u5f55\u4e0b\u751f\u6210\u7684\u6240\u6709\u63a8\u9001\u660e\u7ec6\u6570\u636e\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u8bb0\u5f55\u5417\uff1f"));Ia.setClosingChecker(function(Sa){Sa==Oa.RETURN_OK&&Q(T,D,S);return!0});Ia.showDialog()});
L=L.getJqUi();L.addClass("delete-push-config-and-pushrecord");L.appendTo(I);L=new nb(b.get("pushImmediately","\u7acb\u5373\u63a8\u9001"));ta=T.isHasPermission()&&!Aa(T.getSourceName())&&T.getWarningRuleStatus();L.setEnabled(ta);L.addActionListener(function(){var Ia=new com.kingdee.bos.qing.publish.common.SchedulePushDialog;Ia.setConfirmListener(function(){R(T)});Ia.showDialog(T.getName(),b.get("mobileApplicationGroup","\u79fb\u52a8\u5e94\u7528\u7fa4\u7ec4"))});L=L.getJqUi();L.addClass("push-immediately");
L.appendTo(I)}};var B=function(I){Z(I.getUserObject())},A=function(I){var Y=new Rc(J,x);Y.setModel(I.getUserObject());Y.setFinishedEditListener(function(S){H(S,I,D)});Y.setDsbThumbnailDeleteCallBack(function(S,fa,W){if(G)for(var L in G){var T=G[L].getThumbnailPath();if(T&&-1<T.indexOf("{")){var ea=new com.kingdee.bos.qing.imagelib.model.ThumbnailUrlModel;ea.getImagePathFromJson(T);ea.getImageFileName()===S&&(T=new com.kingdee.bos.qing.imagelib.model.PathModel,T.setNameSpace("$user$"),T.setGroupName(fa),
T.setName(W),ea.setImageFullPathModel(T),ea.setImageFileName(""),T=ea.getJsonImagePath(),G[L].setThumbnailPath(T))}}});Y.showDialog()}}function f(){var D,V,t,B;this.setShowSortingModel=function(W){V=W};this.getShowSortingModel=function(){return V};this.setFunSortchangeListener=function(W){t=W};this.setArrJson=function(W){B=W};this.showSortingTips=function(W,L){var T=W.find(".resourceinfo-detaillist-sort-box");0==T.length&&(T=new l,T.setField(L),T.setOrder(null),T=fa(W,T),W.append(T));T.addClass("resourceinfo-detaillist-sort-box_clickable")};
this.hideSortingTips=function(W){W=W.find(".resourceinfo-detaillist-sort-box");W.removeClass("resourceinfo-detaillist-sort-box_clickable");I(W)};this.addSortingTips=function(W,L){V&&null!=V.getOrder()&&V.getField()==L&&(L=fa(W,V),W.append(L))};this.addPushCreateTimeSortingTips=function(W,L){var T=new l;T.setField(L);T.setOrder(l.ORDER_DESC);L=fa(W,T);W.append(L)};this.sortArrJson=function(W,L,T,ea){switch(L.getOrder()){case l.ORDER_ASC:var ta=!0;break;case l.ORDER_DESC:ta=!1;break;default:ta=!1}L=
L.getField();ea&&(L=ea(L));W=[].concat(W);W.sort(A(L,ta));ea=[];for(var Ja=[],Xa=[],ob=[],fb=[],Ia=0;Ia<W.length;Ia++){var Sa=W[Ia][L];Sa||0===Sa?/^\d+?.*$/.test(Sa)?(Ja=Ja||[],Ja.push(W[Ia])):/^[a-zA-Z]+?.*$/.test(Sa)?(Xa=Xa||[],Xa.push(W[Ia])):/^[\u4e00-\u9fa5]+?.*$/.test(Sa)?(ob=ob||[],ob.push(W[Ia])):(fb=fb||[],fb.push(W[Ia])):(ea=ea||[],ea.push(W[Ia]))}W=ta?[].concat(Ja||[]).concat(Xa||[]).concat(ob||[]).concat(fb||[]).concat(ea||[]):[].concat(ea||[]).concat(fb||[]).concat(ob||[]).concat(Xa||
[]).concat(Ja||[]);T&&T(W)};var A=function(W,L){return function(T,ea){if("pushName"==W){var ta=T.lappSchedulePushConfigModel.name;var Ja=ea.lappSchedulePushConfigModel.name}else"PushCreateTime"==W?(ta=T.lappSchedulePushConfigModel.createTime,Ja=ea.lappSchedulePushConfigModel.createTime):"sFileSizeNoFormat"==W&&(ta=T.lappSchedulePushConfigModel.sFileSizeNoFormat,Ja=ea.lappSchedulePushConfigModel.sFileSizeNoFormat);T=ta-Ja;isNaN(T)&&(T=String(ta).localeCompare(String(Ja),"zh-CN",{sensitivity:"accent"}));
return L?T:-T}},I=function(W){var L=W.data("sortable-data");L&&null==L.getOrder()&&W.remove()},Y=function(W,L){var T=f.BOX_LEN-2,ea=$("<div>");Ca.background(ea,"icon_sortable-v");ea.attr("title",b.get("sort","\u6392\u5e8f"));ea.addClass("resourceinfo-detaillist-sort-box");ea.css("left",W);ea.css("top",L);ea.css("width",T);ea.css("height",T);return ea},S=function(W){var L=W.data("sortable-data");L.getOrder()==l.ORDER_ASC?Ca.background(W,"icon_sort-asc-esc"):L.getOrder()==l.ORDER_DESC?Ca.background(W,
"icon_sort-asc-desc"):L.getOrder()||Ca.background(W,"icon_sortable-v")},fa=function(W,L){var T=W.width();W=W.height();T=Y(T-f.BOX_LEN-1,W-f.BOX_LEN-1);T.data("sortable-data",L);S(T);T.on("click",function(ea){ea=$(ea.currentTarget);var ta=ea.data("sortable-data");"PushCreateTime"==ta.getField()?ta.getOrder()==l.ORDER_ASC?ta.setOrder(l.ORDER_DESC):ta.getOrder()==l.ORDER_DESC?ta.setOrder(l.ORDER_ASC):ta.getOrder()||ta.setOrder(l.ORDER_ASC):ta.getOrder()==l.ORDER_ASC?ta.setOrder(l.ORDER_DESC):ta.getOrder()==
l.ORDER_DESC?ta.setOrder(null):ta.getOrder()||ta.setOrder(l.ORDER_ASC);ea.data("sortable-data",ta);S(ea);I(ea);D&&D[0]!=ea[0]&&D&&D.remove();D=ea;V=ta;t&&t(B,D?D.data("sortable-data"):null)});return T}}function l(){var D,V;this.getOrder=function(){return D};this.setOrder=function(t){D=t};this.getField=function(){return V};this.setField=function(t){V=t}}db.AbstractTabPane.call(this);var w,E,F,z,r,h,n,m;m||(Ha.setRootPath("."),Ha.setCallback(function(){m=new com.kingdee.bos.qing.biz.common.SimplePaginationBar}),
Ha.loadJs("biz-common/qing-biz-common.js"),Ha.loadSkinCss("biz-common","biz-common"),Ha.loadSkinJs("biz-common","skin"),Ha.loadI18n("biz-common","biz-common"));var u,c,p,q,N="pushName pushFrom pushTime PushCreateTime scheduleEnable fileSize operation".split(" "),x=k,J=g,Z=d,X=["yzj-push-manage-fileSize","Wx-push-manage-fileSize","Mxy-push-manage-fileSize","dingding-push-manage-filSize"],ba=[b.get("yzj","\u4e91\u4e4b\u5bb6"),b.get("enterPriseWx","\u4f01\u4e1a\u5fae\u4fe1"),b.get("mxy","\u7f8e\u4fe1\u4e91"),
b.get("dingding","\u9489\u9489")],aa,M,G=[],P=[],da=[],ja;this.setClickTimedPushManager=function(D){ja=D};this.setAutoSelectedData=function(D){aa=D};this.getJqUi=function(){null==w&&O();return w};this.getTitle=function(){switch(e){case za.YZJ_ROBOT:return b.get("cloudHub","\u4e91\u4e4b\u5bb6");case za.WXQYH_ROBOT:return b.get("enterpriseWeChat","\u4f01\u4e1a\u5fae\u4fe1");case za.MISSION_CLOUD_SERVICE_ACCOUNT:return b.get("missionCloud","\u7f8e\u4fe1\u4e91");case za.DINGDING:return b.get("dingding",
"\u9489\u9489");default:throw Error("unknown type");}};this.relayoutViews=function(){E&&"none"==z.css("display")&&(Qa.refresh(E),E.relayoutViews());if(M&&M.hasSelected()){var D=M.getSelected();M.removeAllSelecteds();D&&M.addSelected(D)}D=w.find(".sa-publish-item-list-head");for(var V in P)Fa(D[V],P[V].getName(),n)};var O=function(){w=$("<div>");w.addClass("sa-qing-publish-manager");ja&&w.css("top","3px");r=ma();h=r.getJqUi();h.css("z-index","999");C.layoutCtrl(h,-15,-3,171,25);u=y();u.css("margin-top",
"36px");u.css("border-top","1px solid #ccc");z=$("<div>");z.addClass("sa-qing-publish-manager-content-emptytip");z.appendTo(w);var D=function(V){Ma(V);if(0==G.length)U();else{m.resetPaginationAndJumpToFirstPage(G.length);for(var t=V=0;t<G.length;t++){var B=G[t].getFileSize();V+=Wa(B)}t=new Sb;t.setMarkClassName(X[e]);t.setTotalFileSize(Pa(V));t.setPushDetailSettingDisplayPrev(oa);t.paintPushDetailSetting().appendTo(w);h.appendTo(w);u.appendTo(w);F=Na();F.appendTo(w);z.hide();P=G.slice(0,20);Ba(P)}};
e==za.MISSION_CLOUD_SERVICE_ACCOUNT||e==za.YZJ_ROBOT||e==za.WXQYH_ROBOT||e==za.DINGDING?(new J(D,function(){z.hide();return!1})).loadConfigInfo(e):U()},y=function(){m.setJumpToPageListener(function(D,V,t){var B=G.length;0<B&&B<=D*V&&(P=G.slice((D-1)*V,B));0<B&&B>D*V&&(P=G.slice((D-1)*V,D*V));t?t(B):m.refreshPagination();Ba(P)});m.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);return m.getJqUi()},ia=function(D){m.resetPaginationAndJumpToFirstPage(D.length);P=D.slice(0,m.getPageSize());
m.setJumpToPageListener(function(V,t,B){var A=D.length;0<A&&A<=V*t&&(P=D.slice((V-1)*t,A));0<A&&A>V*t&&(P=D.slice((V-1)*t,V*t));B?B(A):m.refreshPagination();Ba(P)})},ha=function(D){for(var V,t,B=t=0;B<D.length;B++)V=D[B],V=V.getFileSize(),t+=Wa(V);$("."+X[e]).text(Pa(t))},oa=function(){(new J(function(D){if(D){var V=new oc;V.fromJsonObject(D)}D=new pc;D.setPushRecordConfig(V);D.setContentPane(w);D.setPushDetailSettingAfter(La);D.showDialog()},function(){return!1})).loadPushRecordConfigInfo(e)},La=
function(D,V){var t=new J(function(B){B&&Ga(!0)},function(){v.showError(ba[e]+b.get("pushStorageSetError","\u7684\u63a8\u9001\u660e\u7ec6\u8bbe\u7f6e\u5931\u8d25\u3002"));return!1});t.setBlockingPrompt(b.get("savePushDetailConfigInfo","\u6b63\u5728\u4fdd\u5b58\u63a8\u9001\u660e\u7ec6\u8bbe\u7f6e"));t.saveLappPushRecordConfig(e,D,V)},Ga=function(D){var V=new J(function(t){null==t||0==t.length?U():(Ma(t),ua());D&&v.showSuccess(b.get("pushDetailSetSuccess","\u63a8\u9001\u660e\u7ec6\u8bbe\u7f6e\u4fdd\u5b58\u6210\u529f\u3002"))},
function(){z.hide();return!1});V.setShowBlocking(!1);V.loadConfigInfo(e)},Ma=function(D){G=[];if(e==za.YZJ_ROBOT||e==za.WXQYH_ROBOT||e==za.DINGDING)for(var V=0;V<D.length;V++){var t=new Qb;t.fromJsonObject(D[V]);G.push(t)}else if(e==za.MISSION_CLOUD_SERVICE_ACCOUNT)for(V=0;V<D.length;V++)t=new $a,t.fromJsonObject(D[V]),G.push(t)},Wa=function(D){var V=Math.floor(100*parseFloat(D.substring(0,D.length-2)));return"MB"==D.substring(D.length-2,D.length)?1024*V:V},Pa=function(D){D/=100;return 1024>D?0==
D?D+"KB":D.toFixed(2)+"KB":(1*D/1024).toFixed(2)+"MB"},Na=function(){E=Qa.createTable();Qa.setupSingleRowSelection(E);M=E.getSelectionModel();Qa.bindTableListenerForCtrl(E);E.setDraggableAdjusting(!0,2,0,new com.kingdee.bos.qing.publish.common.MyCustomExpendor);E.setColumnFitVisibleWidth(!0);var D=new a(E);D.setOutsideVisible(!1);E.setCellRender(D);E.setSyncUIWhenModelChanged(!0);E.addColumns(7);E.getColumn(0).setWidth(130);E.getColumn(1).setWidth(155);E.getColumn(2).setWidth(65);E.getColumn(3).setWidth(138);
E.getColumn(4).setWidth(63);E.getColumn(5).setWidth(80);E.getColumn(6).setWidth(212);D=Qa.createHeadRow(E);D.getCell(0).setValue(b.get("pushName","\u540d\u79f0"));D.getCell(1).setValue(b.get("pushFrom","\u6765\u6e90"));D.getCell(2).setValue(b.get("pushTime","\u63a8\u9001\u9891\u7387"));D.getCell(3).setValue(b.get("PushCreateTime","\u521b\u5efa\u65f6\u95f4"));D.getCell(4).setValue(b.get("scheduleEnable","\u542f\u7528\u72b6\u6001"));D.getCell(5).setValue(b.get("fileSize","\u6587\u4ef6\u5927\u5c0f"));
D.getCell(6).setValue(b.get("operation","\u64cd\u4f5c"));/Trident|MSIE/.test(window.navigator.userAgent)||E.setCellAcrossListener(function(V,t,B){w&&w.find(".resourceinfo-detaillist-table-op").remove();var A=V&&0<V.length?V[0]:null;if(p!=A&&(p&&(c.hideSortingTips($(p)),p=null),1==t&&1!=B&&2!=B&&4!=B&&6!=B)){if(!c){c=new f;da=[];for(t=0;t<G.length;t++)da.push(G[t].toJsonObject());c.setArrJson(da);c.setFunSortchangeListener(function(I,Y){Y||(Y=new l,Y.setField("PushCreateTime"),Y.setOrder(l.ORDER_DESC));
I=[];for(var S=0;S<G.length;S++)I.push(G[S].toJsonObject());c.setArrJson(I);c.sortArrJson(I,Y,function(fa){Ma(fa);ua()},function(fa){return"fileSize"==fa?"sFileSizeNoFormat":fa})})}c.showSortingTips(V,N[B]);p=A}});D=$(E.getUI());D.css("margin-top","67px");D.addClass("sa-qing-publish-manager-content-container");D.children("div:first-child").css("overflow-y","overlay");return D},U=function(){w.empty();z.detach();z=$("<div>");var D=$("<div>");D.addClass("no-data-image");Ca.background(D,"no-data");D.appendTo(z);
D=$("<div>");D.addClass("no-push-config-data");D.text(b.get("noData","\u6682\u65e0\u76f8\u5173\u6570\u636e"));D.appendTo(z);z.appendTo(w);z.show()},va=function(){z.detach();z=$("<div>");var D=$("<div>");D.addClass("no-data-image");Ca.background(D,"no-data");D.appendTo(z);D=$("<div>");D.addClass("no-search-push-config-data");D.text(b.get("noSearchData","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c"));D.appendTo(z);z.appendTo(w);z.show()},Ba=function(D){Qa.clearWithoutHead(E);
M.removeAllSelecteds();var V=!1;if(D){for(var t=0;t<D.length;t++){var B=D[t],A=b.get(B.getSourceType(),"\u4e1a\u52a1\u4e3b\u9898"),I=Qa.createRow(E,!1),Y=new KTBorderStyle;Y.setBottomBorderWidth(1);Y.setBottomBorderPen("solid");Y.setBottomBorderColor("#E5E5E5");I.setBorder(Y);I.setUserObject(B);Y=B.getName();null!=B.getNameRule()&&(Y=Y+"-\uff08"+b.get("systemDate","\u7cfb\u7edf\u65e5\u671f")+"\uff09");I.getCell(0).setValue(Y);A=Aa(B.getSourceName())?b.get("sourceHadBeDelete","\u8be5#\u5df2\u88ab\u5220\u9664").replace("#",
A):B.getSourceGroupName()+"/"+B.getSourceName();I.getCell(1).setValue(A);I.getCell(2).setValue(B.getSchedule().toString());I.getCell(5).setValue(B.getFileSize());if(aa&&B.getId()==aa.id){V=!0;var S=t}}aa=null}Qa.refresh(E);V&&(S+=Qa.getHeadRowCount(),V=M.createRowTarget(S),M.addSelected(V),E.scrollCellVisible(S,0,!1));S=w.find(".sa-publish-item-list-head");for(t in D)Fa(S[t],D[t].getName(),n)},Aa=function(D){return null==D||0==D.length},Ka=function(D,V,t,B){B=B.getId();(new J(function(A){},function(A,
I){D.setOn(t);return"4300101"==A?(v.showError(b.get("failToChangScheduleState","\u4fee\u6539\u72b6\u6001\u5931\u8d25\u3002")),!0):!1})).updateScheduleState(V,B,x.getParamPathPrefix())},K=function(D,V,t,B){(new J(function(A){var I=new Sc(V,t,B);I.setPushTargetType(e);I.setFacade(J);I.showDialog(A)},function(A,I){return"4300101"==A?(v.showError(b.get("failToGetPushRecord","\u83b7\u53d6\u63a8\u9001\u4fe1\u606f\u5931\u8d25\u3002")),!0):!1})).loadAllPushRecord(D.getId(),e)},H=function(D,V,t){(new J(function(B){v.showSuccess(b.get("successToEditConfig",
"\u7f16\u8f91\u63a8\u9001\u4fe1\u606f\u6210\u529f\u3002"));Ga()},function(B,A){return"4300101"==B?(v.showError(b.get("failToEditConfig","\u7f16\u8f91\u63a8\u9001\u4fe1\u606f\u5931\u8d25\u3002")),!0):!1})).updateConfigInfo(D,x.getParamPathPrefix())},Q=function(D,V,t){var B=D.getId();(new J(function(A){var I=V.getRow(t).getCell(5).getValue();A=$("."+X[e]).text();I=Wa(I);A=Wa(A);A=Pa(A-I);$("."+X[e]).text(A);Ga();v.showSuccess(b.get("successToDeletePushConfig","\u5220\u9664\u63a8\u9001\u914d\u7f6e\u4fe1\u606f\u6210\u529f\u3002"))},
function(A,I){return"4300101"==A?(v.showError(b.get("failToDeletePushConfig","\u5220\u9664\u63a8\u9001\u914d\u7f6e\u4fe1\u606f\u5931\u8d25\u3002")),!0):!1})).deleteConfigInfo(B,D.getPushTargetType())},R=function(D){var V=new J(function(t){var B="ExtractData"+t,A=new qc;la(A,B);var I=D.getId(),Y=new J(function(S){sa(A,B);A.destroy();Ga();v.showSuccess(b.get("pushImmediatelySuccess","\u63a8\u9001\u6210\u529f\u3002"))},function(S,fa,W){sa(A,B);A.destroy();if(-1==S)return!0;if("4300110"==S)return v.showPrompt(b.get("networkError",
"\u7f51\u7edc\u8fde\u63a5\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7f51\u7edc\u3002")),!0;if("1001013"==S)return v.showPrompt(b.get("sendMessageError","\u673a\u5668\u4eba\u53d1\u9001\u6d88\u606f\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u673a\u5668\u4ebawebhook\u5730\u5740\u662f\u5426\u6b63\u786e\u3002")),!0;if("2301013"==S)return v.showPrompt(b.get("2301013","\u627e\u4e0d\u5230\u5f15\u7528\u7684\u5730\u56fe\u6a21\u677f\uff0c\u65e0\u6cd5\u63a8\u9001\u3002"),2E3),!0;if(21000008==S)return v.showPrompt(b.get("21000008",
"\u5f53\u524d\u7cfb\u7edf\u6ca1\u6709\u3010\u8f7b\u5efa\u6a21\u3011\u6a21\u5757\u7684\u4f7f\u7528\u8bb8\u53ef\uff0c\u8bf7\u4e0e\u7cfb\u7edf\u7ba1\u7406\u5458\u8054\u7cfb\u3002"),2E3),!0;if(2101019==S)return v.showPrompt(b.get("noModelerPermission","\u5c1a\u672a\u83b7\u5f97\u6570\u636e\u8868\u6a21\u578b\u7684\u6570\u636e\u6743\u9650\u3002"),2E3),!0;if(2101006==S){fa=com.kingdee.bos.qing.ui.component.MessageDialog;var L=new fa;L.setOptionType(fa.OPTION_OK);L.setMessage(b.get(S.toString(),"\u5c1a\u672a\u83b7\u5f97\u5b9e\u4f53\u6570\u636e\u8868\u7684\u67e5\u770b\u6743\u9650"));
W&&L.setDetail(W);L.showDialog();return!0}return"2101018"==S?(L=b.get("pushError","\u63a8\u9001\u5931\u8d25")+"\uff0c"+b.get("entityNotSupportQingAnalysis","\u4e1a\u52a1\u5b9e\u4f53\u672a\u5f00\u542f\u201c\u652f\u6301\u8f7b\u5206\u6790\u201d\u8bbe\u7f6e\u9879\uff0c\u8bf7\u5728\u5f00\u53d1\u5e73\u53f0\u7684\u5bf9\u5e94\u8868\u5355\u4e2d\u8fdb\u884c\u8bbe\u7f6e   "),S=kb.getSupportQingAnalysisUrl(),Tb(L,fa,S),!0):"4300114"==S?(L=b.get("errorMsg","\u9519\u8bef\u4fe1\u606f\uff1a")+b.get("errorWebhook",
"\u90e8\u5206Webhook\u5b9a\u65f6\u63a8\u9001\u5931\u8d25"),qa(L,S,W),!0):"4300115"==S?(L=b.get("errorMsg","\u9519\u8bef\u4fe1\u606f\uff1a")+b.get("allWebhookFailure","\u5168\u90e8Webhook\u5b9a\u65f6\u63a8\u9001\u5931\u8d25"),qa(L,S,W),!0):!1});Y.setCancelable(!0);Y.setShowBlocking(!1);t=Y.doPush(I,t,x.getParamPathPrefix(),D.getPushTargetType());A.setClosedListener(t);A.showDialog()},function(t,B){var A;2101001==t?A=b.get("publishSourceSubjectNotExist","\u539f\u4e1a\u52a1\u4e3b\u9898\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"):
2106001==t?A=b.get("publishSourceDashboardNotExist","\u539f\u4eea\u8868\u677f\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"):2101010==t||2301010==t?A=b.get("themeFileSizeLimit","\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"):2100001==t&&(A=b.get("qingStorageNoSpace","\u78c1\u76d8\u7a7a\u95f4\u4e0d\u8db3\uff0c\u8bf7\u8054\u7cfb\u8fd0\u7ef4\u4eba\u5458\u6dfb\u52a0\u78c1\u76d8\u3002"));return A?(v.showError(A),!0):!1});V.setShowBlocking(!1);V.getServerTimeStampForDoPush()},la=function(D,
V){ab.subscribeChannel(V,function(t){ra(D,t)})},sa=function(D,V){ab.unsubscribeChannel(V,function(t){ra(D,t)})},ra=function(D,V){if("pushing"==V)D.setText(b.get("pushing","\u63a8\u9001\u4e2d"));else{var t=com.kingdee.bos.qing.CodeLoader;t.setRootPath(".");t.setCallback(function(){var B=JSON.parse(V),A=new com.kingdee.bos.qing.prepare.model.ProgressModel;A.fromJsonObject(B);A.isFinshed()||D.setText(A.toText())});t.loadJs("prepare/publish-prepare.js");t.loadI18n("prepare","prepare")}},ma=function(){var D=
new rc;D.setSearchListener(ua);return D},ua=function(){n=r.getInputContent().trim();var D=[];if(c&&c.getShowSortingModel()){da=[];for(var V=0;V<G.length;V++)da.push(G[V].toJsonObject());c.setArrJson(da);c.sortArrJson(da,c.getShowSortingModel(),function(t){Ma(t)},function(t){return"fileSize"==t?"sFileSizeNoFormat":t})}if(0<n.length){n=n.toUpperCase();for(V in G)-1<G[V].getName().toUpperCase().indexOf(n)&&D.push(G[V]);0<D.length?(z.hide(),u.show(),F.show(),ha(D),ia(D),Ba(P)):(m.resetPaginationAndJumpToFirstPage(0),
u.hide(),va(),F.hide(),m.setJumpToPageListener(function(t,B,A){A?A(0):m.refreshPagination()}),$("."+X[e]).text(Pa(0)))}else z.hide(),u.show(),F.show(),ha(G),ia(G),Ba(P)},Fa=function(D,V,t){if(D&&V&&t){t=t.toUpperCase();var B=V.toUpperCase(),A=B.split(t),I=t.length,Y=$("<span>");Y.addClass("sa-publish-item-list-head-name");for(var S in A){var fa=B.indexOf(A[S]),W=V.substr(0,A[S].length);fa+=A[S].length;var L=B.length-fa;B=B.substr(fa,L);V=V.substr(fa,L);fa=$("<span>");fa.text(W);fa.appendTo(Y);if(S!==
A.length-1&&1<A.length){L=B.indexOf(t);W=V.substr(L,I);L+=I;var T=B.length-L;B=B.substr(L,T);V=V.substr(L,T);L=$("<span>");L.text(W);L.css("color","#FF0000");L.appendTo(fa)}$(D).children(".sa-publish-item-list-head-name").remove()}$(D).text("");Y.appendTo($(D));$(D).attr("title",Y.text())}};f.BOX_LEN=15;var qa=function(D,V,t){var B=com.kingdee.bos.qing.ui.component.MessageDialog,A=new B;D=D+"\n"+b.get("errorCode","\u9519\u8bef\u7801\uff1a")+V;A.setOptionType(B.OPTION_OK);A.setMessage(D);t&&A.setDetail(t);
A.showDialog()};l.ORDER_DESC="DESC";l.ORDER_ASC="ASC"}function Sc(e,v,g){function k(x){KTDefaultCellRender.call(this,x);var J=this,Z=this.paintCellUI,X;this.setFacade=function(ba){X=ba};this.paintCellUI=function(ba,aa){var M=J.getCurrentRowIdx(),G=J.getCurrentRow(),P=J.getCurrentColIdx();if(M<Qa.getHeadRowCount()||1==P||3==P)Z(ba,aa),1==M&&0==P&&(M=$("<div>"),M.addClass("total-checkbox-ctrl"),aa=new Ub,M.data("checkBoxModel",aa),G=aa.getJqUi(),M.append(G),M.on("click",c),M.appendTo(ba)),$(ba).find("span").css({"padding-right":"8px",
"padding-left":"6px"});else if(0==P){var da=G.getUserObject();P=$("<div>");P.addClass("push-detail-name-left");aa=new Ub;G=aa.getJqUi();P.data("checkBoxModel",aa);P.data("yzjPushRecordModel",da);P.data("tableModel",x);P.attr("rowIndex",M);P.on("click",u);P.append(G);M=$("<div>");M.addClass("push-detail-name-right");M.text(da.getName());P.appendTo(ba);M.appendTo(ba)}else if(2==P){da=G.getUserObject();M=da.getErrorCode();aa=da.getErrorMessage();null!=aa?4300114==M?(P="#ff831f",G=b.get("someFailure",
"\u90e8\u5206\u5931\u8d25")):4300112==M?(P="#ff831f",G=b.get("unPush","\u672a\u63a8\u9001")):(P="red",G=b.get("pushFailure","\u5931\u8d25")):(P="green",G=b.get("pushSuccess","\u6210\u529f"));var ja=$("<div style='border: solid 1px;text-align:center;height: 16px'>");ja.text(G);ja.css("color",P);ja.css("width","60px");ja.css("position","absolute");ja.css("top","0");ja.css("bottom","0");ja.css("margin","auto");ja.appendTo(ba);if(4300112==M)M=$("<div style='text-align:left;width:75px;height: 16px'>"),
M.text(b.get("warningRuleUnMatched","\u4e0d\u6ee1\u8db3\u9884\u8b66\u89c4\u5219")),M.css("position","absolute"),M.css("top","0"),M.css("bottom","0"),M.css("left","70px"),M.css("margin","auto"),M.appendTo(ba);else if(aa||0!=M)M=new nb(b.get("errorDetail","\u8be6\u60c5")),M.addActionListener(function(){da.getErrorStack()?m(da):(new X(function(O){da.fromErrorInfoJsonObject(O);m(da)},function(O,y){m(da);return!0})).loadPushRecordErrorInfo(da.getId())}),M=M.getJqUi(),M.addClass("lapp-push-failure-detail"),
M.appendTo(ba)}}}Za.call(this);var d=this,a=this.protectedMethod,f=this.showDialog,l,w,E,F,z=["yzj-push-manage-fileSize","Wx-push-manage-fileSize","Mxy-push-manage-fileSize","dingding-push-manage-filSize"];this.setPushTargetType=function(x){F=x};this.setFacade=function(x){E=x};this.showDialog=function(x){a.setTitle(b.get("scheduleDetails","\u63a8\u9001\u660e\u7ec6"));d.setSize(800,570);a.setSelectable(!0);a.setFooterClosingOnly(!0);a.setClosingChecker2(null,function(J){a.destroy();return!0});a.setContentPaneCreator(function(){return r(x)});
a.setClosingAction(function(J){});l=a.getMessageCurtain();f();w&&Qa.refresh(w)};var r=function(x){if(0==x.length)var J=h();else{J=$("<div>");w=Qa.createTable();var Z=new k(w);Z.setFacade(E);Z.setOutsideVisible(!1);w.setCellRender(Z);w.setSyncUIWhenModelChanged(!0);w.addColumns(4);w.getColumn(0).setWidth(200);w.getColumn(1).setWidth(200);w.getColumn(2).setWidth(200);w.getColumn(3).setWidth(150);Z=Qa.createHeadRow(w);Z.getCell(0).setValue(b.get("pushName","\u540d\u79f0"));Z.getCell(1).setValue(b.get("pushTime",
"\u63a8\u9001\u65f6\u95f4"));Z.getCell(2).setValue(b.get("pushState","\u63a8\u9001\u72b6\u6001"));Z.getCell(3).setValue(b.get("fileSize","\u6587\u4ef6\u5927\u5c0f"));for(var X=Z=0;X<x.length;X++){var ba=new Vb;ba.fromJsonObject(x[X]);ba=ba.getFileSize();Z+=q(ba)}X=new Sb;X.setTotalRowNum(x.length);X.setContentPane(J);X.setTotalPushRecordFileSize(N(Z));X.setBatchHandleEvent(function(aa){for(var M,G=[],P=[],da=0,ja=0;ja<aa.length;ja++){var O=aa[ja];!M&&(M=O.tableModel);G.push(O.rowIndex);O=O.pushRecordModel;
P.push(O.toJsonObject());O=O.getFileSize();da+=q(O)}aa=$(".push-record-total-value").text();aa=p(da,aa,!1);$(".push-record-total-value").text(aa);(new E(function(){l.showSuccess(b.get("successToDeletePushRecord","\u5220\u9664\u63a8\u9001\u8bb0\u5f55\u6210\u529f\u3002"));for(var y=0,ia=0;ia<G.length;ia++)M.removeRow(G[ia]-y),y++;M.updateUI(!0);y=da;ia=e.getRow(v);var ha=ia.getCell(g).getValue();ha=p(y,ha,!1);ia.getCell(g).setValue(ha);ia=$("."+z[F]).text();y=p(y,ia,!1);$("."+z[F]).text(y)},function(y,
ia){return"4300101"==y?(l.showError(b.get("failToDeletePushRecord","\u5220\u9664\u63a8\u9001\u8bb0\u5f55\u5931\u8d25\u3002")),!0):"4300104"==y?(l.showError(b.get("failToDeleteAnalysis","\u7f51\u7edc\u8fde\u63a5\u5f02\u5e38\uff0c\u5220\u9664\u5206\u6790\u5931\u8d25\u3002")),!0):"5001"==y?(l.showError(ia),!0):!1})).deletePushRecord(P)});X.paintBatchDelUI().appendTo(J);n(x);x=$(w.getUI());C.layoutCtrlWithLRTB(x,0,0,null,65,0,null);x.appendTo(J)}return J},h=function(){var x=$("<div>"),J=$("<div>");J.addClass("no-data-image");
Ca.background(J,"no-data");J.appendTo(x);J=$("<div>");J.addClass("no-push-config-data");J.text(b.get("noData","\u6682\u65e0\u8bb0\u5f55"));J.appendTo(x);return x},n=function(x){Qa.clearWithoutHead(w);if(x)for(var J=0;J<x.length;J++){var Z=new Vb;Z.fromJsonObject(x[J]);var X=Qa.createRow(w);X.setUserObject(Z);X.getCell(0).setValue(Z.getName());X.getCell(1).setValue(Z.getPushFormatTime());X.getCell(3).setValue(Z.getFileSize())}Qa.refresh(w)},m=function(x){var J=x.getErrorStack(),Z=x.getErrorCode(),
X=x.getErrorMessage(),ba=b.get(Z.toString(),X);x=b.get("errorMsg","\u9519\u8bef\u4fe1\u606f\uff1a");x=X&&4300114==Z?x+b.get("errorWebhook","\u90e8\u5206Webhook\u5b9a\u65f6\u63a8\u9001\u5931\u8d25"):X&&4300115==Z?x+b.get("allWebhookFailure","\u5168\u90e8Webhook\u5b9a\u65f6\u63a8\u9001\u5931\u8d25"):X&&2101006!=Z&&2101018!=Z?x+X:x+b.get(Z.toString(),ba);if(2101006==Z)(ba=J.match(/(\(|\uff08)([^(\)|\uff09)]+)(\)|\uff09)/))&&ba[2]&&(J=ba[2]),J=b.get("noAuthorityForTheseEntities","\u5c1a\u672a\u83b7\u5f97\u4ee5\u4e0b\u5b9e\u4f53\u6570\u636e\u8868\u7684\u67e5\u770b\u6743\u9650\uff1a")+
"\r  "+J.replace(/,/g,b.get("semicolon","\uff1b")+"\r  ");else if("2101018"==Z){if(ba=/(?:\u3010\s)(.+)(?=\s\u3011)/.exec(J)){J=ba[1];var aa=b.get("notSupportQingAnalysis","\u4ee5\u4e0b\u4e1a\u52a1\u5b9e\u4f53\u5c1a\u672a\u5f00\u542f\u201c\u652f\u6301\u8f7b\u5206\u6790\u201d\u8bbe\u7f6e\u9879\uff1a")+"\r  "+J.replace(/,/g,b.get("semicolon","\uff1b")+"\r  ")}x=b.get("entityNotSupportQingAnalysis","\u4e1a\u52a1\u5b9e\u4f53\u672a\u5f00\u542f\u201c\u652f\u6301\u8f7b\u5206\u6790\u201d\u8bbe\u7f6e\u9879\uff0c\u8bf7\u5728\u5f00\u53d1\u5e73\u53f0\u7684\u5bf9\u5e94\u8868\u5355\u4e2d\u8fdb\u884c\u8bbe\u7f6e   ");
J=kb.getSupportQingAnalysisUrl();aa?Tb(x,aa,J):Tb(x,X,J);return}x=x+"\n"+b.get("errorCode","\u9519\u8bef\u7801\uff1a")+Z;X=com.kingdee.bos.qing.ui.component.MessageDialog;aa=new X;aa.setOptionType(X.OPTION_OK);aa.setMessage(x);J&&aa.setDetail(J);aa.showDialog()},u=function(x){var J=$(x.currentTarget).data("checkBoxModel").isChecked();x=$(".total-checkbox-ctrl");x=$(x).data("checkBoxModel");if(J){a:{J=$(".push-detail-name-left");for(var Z=0;Z<J.length;Z++)if(!$(J[Z]).data("checkBoxModel").isChecked()){J=
!1;break a}J=!0}x.setChecked(J)}else x.setChecked(J)},c=function(x){x=$(x.currentTarget).data("checkBoxModel").isChecked();for(var J=$(".push-detail-name-left"),Z=0;Z<J.length;Z++)$(J[Z]).data("checkBoxModel").setChecked(x)},p=function(x,J,Z){J=q(J);return N(Z?J+x:J-x)},q=function(x){var J=Math.floor(100*parseFloat(x.substring(0,x.length-2)));return"MB"==x.substring(x.length-2,x.length)?1024*J:J},N=function(x){x/=100;return 1024>x?0==x?x+"KB":x.toFixed(2)+"KB":(1*x/1024).toFixed(2)+"MB"}}function zb(){var e=
this,v,g=$("<div>"),k=$("<div>"),d,a,f=[];this.getJqUi=function(){v||(v=$("<div>"),g.addClass("sa-qing-publish-tab-container"),k.addClass("sa-qing-publish-tabpane-container"),g.appendTo(v),k.appendTo(v));return v};this.addTab=function(F,z,r,h,n,m){if(l(F)){var u=$("<span>");u.addClass("sa-qing-publish-tab");Ca.background(u,z);u.appendTo(g);n||(F=$("<span>"),F.addClass("sa-qing-publish-tab-border"),F.appendTo(g));null==r?u.attr("title",m):(u.on("click",function(c){E(u,r)}),h&&E(u,r))}};this.getCurrentTabPane=
function(){return a};this.addTabChangedListener=function(F){f.push(F)};var l=function(F){for(var z=Object.keys(za),r=0;r<z.length;r++)if(za[z[r]]==F)return!0;return!1},w=function(F){for(var z=0;z<f.length;z++)(0,f[z])(e,F)},E=function(F,z){a=z;d||(d=$("<span>"),d.addClass("sa-qing-publish-tab_selected"),d.appendTo(g));var r=d,h=r.css;a:{for(var n=g.children(".sa-qing-publish-tab"),m=0;m<n.length;m++)if(n[m]==F[0]){F=m;break a}F=-1}h.call(r,"left",87*F+13+"px");r=z.getJqUi();h=k.children();F=!1;for(n=
0;n<h.length;n++)h[n]==r[0]?(F=!0,$(h[n]).css("display","block"),z.into(),w(z)):$(h[n]).css("display","none");F||(C.layoutCtrlWithLRTB(r,0,0,null,0,0,null),r.appendTo(k),z.into(),w(z))}}function Kc(){var e,v,g,k;this.setId=function(d){e=d};this.getId=function(){return e};this.setAppId=function(d){v=d};this.getAppId=function(){return v};this.setAppUserType=function(d){g=d};this.getAppUserType=function(){return g};this.setAppImageFile=function(d){k=d};this.getAppImageFile=function(){return k};this.fromJsonObject=
function(d){d&&(e=d.id,v=d.appId,g=d.appUserType,k=d.appImageFile)};this.toJsonObject=function(){var d={};d.id=e;d.appId=v;d.appUserType=g;d.appImageFile=k;return d}}function Mb(){var e=new sc,v=new Ob,g,k;this.setPublishContext=function(d){g=d};this.setPublishModel=function(d){k=d};this.editPublishNameListener=function(d,a,f,l,w,E,F){var z=new ka("lappAnalysisMgr",function(r){r=r.content;var h=[],n=a.getText();if(""!=n){for(var m=0;m<r.length;m++){var u=r[m].name,c=r[m].viewType;if(f)c=c==k.getViewType();
else{var p=g&&g.getScene();c=l?c==wa.VIEW_TYPE_DASHBOARD:"Longer"==p&&c==wa.VIEW_TYPE_LONGER||"Square"==p&&c==wa.VIEW_TYPE_SQUARE}c&&-1<u.indexOf(n.trim())&&h.push(u)}0<h.length?(e.setCustomItemPainter(function(q,N){q.on("mousedown",function(x){a.setText(N);F.remove();x.stopPropagation()});q.text(N);q.attr("title",N)}),e.setItemModels(h),e.setSelecteds([h[0]]),r=e.getJqUi(),m=a.getJqUi(),h=m.width(),n=m.css("left"),m=m.position().top+m.height(),C.layoutCtrl(r,n,m,h,122),r.css("z-index","9999"),r.find(".sa-ctrl-list-owner").css("height",
"100px"),h=$("<div>"),h.addClass("history-publish-name"),h.text(b.get("HistoryPublishName","\u5386\u53f2\u53d1\u5e03\u540d\u79f0")),h.css({right:w+"px",top:m+100+"px"}),r.appendTo(F),h.appendTo(F),F.appendTo(E)):F.remove()}else F.remove()},function(r,h){v.showPrompt(h,2E3);return!0});z.setShowBlocking(!1);z.getAnalysisList(d,!1)}}"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.timedpush&&(com.kingdee.bos.qing.timedpush={});var bb=com.kingdee.bos.qing.timedpush;bb.LappSchedulePush=function(){this.createDialog=function(e,v,g,k,d){(new Mc(e,v,g,k,d)).showDialog()}};bb.LappPushManagePanel=nc;bb.Analysis=wa;var Eb,Ha,Va,Cb,Yb,tc,dc,Lb,Zb,jb,ic,Ca,vb,Nb,xa,za,wb,mb,Qb,$a,Vb,Ab,Gb,C,hb,Kb,Xb,b,eb,ya,Ya,lb,Za,db,Oa,yb,xb,rb,nb,Qa,lc,Ob,Wb,uc,Ra,vc,sb,bc,ub,wc,ib,Db,qc,ab,Jb,kc,jc,gc,hc,fc,rc,ec,tb,kb,xc,sc,Sb,Ub,
pc,oc;(function(){var e=com.kingdee.bos.qing;Eb=e.Seer;Ha=e.CodeLoader;e=com.kingdee.bos.qing.publish.common;Va=e.PublishContext;Cb=e.PublishFactory;Yb=e.PublishFacade;tc=e.SinglePublishManagerDialog;Lb=e.PublishToDialog;Zb=e.AbstractPublishToPanel;dc=e.AbstractPublishManagerPanel;ic=e.MenuPanel;vb=e.UserOperationReporter;Nb=e.MultiOperationContainer;qc=e.SchedulePushingDialog;kc=e.SortWidget;jc=e.ListPublishContentPanel;gc=e.PublishManagerSortPanel;hc=e.PublishViewSwitchPanel;fc=e.PublishSearchPanel;
ec=e.FilterModelType;tb=e.CardFilterType;e=com.kingdee.bos.qing.timedpush.common;Ca=e.MyIcons;pc=e.PushDetailSettingDialog;Sb=e.PushRecordDetailSetting;rc=e.PubshSearchPanel;e=com.kingdee.bos.qing.publish.model;xa=e.PublishTargetType;za=e.PushTargetType;mb=e.PublishModel;ub=e.PublishSourceType;Gb=e.ThumbnailInfo;e=com.kingdee.bos.qing.timedpush.model;Qb=e.ChatRobotSchedulePushConfigModel;Vb=e.PushRecordModel;Ab=e.EmailNameRule;$a=e.MissionCloudPushConfigModel;oc=e.LappPushRecordConfig;e=com.kingdee.bos.qing.common;
C=e.DomUtil;hb=e.Util;e=com.kingdee.bos.qing.framework.common;Kb=e.RemoteFrameworkRegister;Xb=e.AbstractFacade;b=e.MultilanguageManager.createPackageAccessor(bb);ab=e.RemoteFramework;Jb=e.FileUploader;kb=e.OfficialArticleUtil;xc=e.Resource;xc.bindLoader(Ha);e=com.kingdee.bos.qing.ui.component;eb=e.ComboBox;ya=e.Label;Ya=e.TextField;lb=e.TextArea;Za=e.AbstractModalDialog;db=e.TabContainer;Oa=e.MessageDialog;jb=e.SwitchButton;rb=e.F7Selector;nb=e.WorkButton;Ob=e.MessageCurtain;Wb=e.RadioButton;uc=e.RadioButtonGroup;
Ra=e.HelpIcon;vc=e.Dialog;sc=e.List;Ub=e.CheckBox;e=com.kingdee.bos.qing.biz.common;yb=e.UserDialogSelector;xb=e.RoleDialogSelector;wb=e.ValueTextPair;e=com.kingdee.bos.qing.schedule;bc=e.ScheduleSelector;e=com.kingdee.bos.qing.common.ui;Qa=e.TableUtil;lc=e.LocalFileSelector;sb=e.CommonIconUtil;e=com.kingdee.bos.qing.lapp.integration;wc=e.EnvUtil;ib=e.AppType;Db=e.RemoteFrameworkUtil})();Ha.setRootPath(".");Ha.loadJs("biz-common/qing-biz-common.js");Ha.loadSkinCss("biz-common","biz-common");Ha.loadSkinJs("biz-common",
"skin");Ha.loadI18n("biz-common","biz-common");var ca,cb=com.kingdee.bos.qing.lapp.integration.SERVER_HOST_URL,Tb=function(e,v,g){var k=new Oa;k.setOptionType(Oa.OPTION_OK);k.setMessage(e);v&&k.setDetail(v);g&&k.setCustomPainter(function(d,a){var f=$("<div class='sa-ctrl-msgdlg-text'>");f.css("bottom",20);f.text(a);a=$("<a onclick='javascript:window.open(\""+g+"\");' href='#'>");a.css({cursor:"pointer",color:"#5582f3"});a.text(b.get("viewDocument","\u67e5\u770b\u5e2e\u52a9\u6587\u6863"));f.append(a);
d.append(f)});k.showDialog()},pb=new function(){this.uploadBase64Image=function(g,k,d,a,f){ca.isPrivate()?v(g,k,d,a,f):e(g,k,d,a,f)};var e=function(g,k,d,a,f){if(hb.isIEBrowser()&&window.XDomainRequest)g=new XDomainRequest,g.timeout=1E4,a=cb+"image/uploadImage",a=a.replace("https:",window.location.protocol),g.open("POST",a),g.send(f),g.onload=function(w){w=JSON.parse(w.target.responseText);k(w.data.path)},g.onerror=function(){d&&d(500,"fail to upload thumbnail")};else{g=new FormData;g.append("picture[]",
f);var l=new XMLHttpRequest;l.onreadystatechange=function(){if(4==l.readyState)if(200==l.status)try{var w=JSON.parse(l.responseText);"number"==typeof w.errorCode&&3099003==w.errorCode?d&&d(w.errorMessage):k(w.data.path)}catch(E){d&&d(200,"parse error")}else d&&d(l.status,"fail to upload thumbnail")};l.open("POST",cb+"image/uploadImage",!0);l.send(g)}},v=function(g,k,d,a,f){g=atob(f.split(",")[1]);a=[];for(f=0;f<g.length;f++)a.push(g.charCodeAt(f));g=new Blob([new Uint8Array(a)],{type:"image/png"});
var l=new File([g],new Date+".png");g=new Jb;g.setShowBlocking(!1);g.setRequestPreparer(function(w){w.append("filename",l)});g.setFinishedHandler(function(w,E,F){w&&(3099003==E?d&&d(E,F):d&&d(500,"fail to upload thumbnail"))});g.setSuccessHandler(function(w){k(w.data)});a=Kb.getUploadUrl();g.uploadTo(a)};this.downloadImage=function(g){return ca.isPrivate()?ab.getLoadImgUrl(g,"lapp-thumbnail"):cb+"image/downloadImage?path="+g}};Cb.addPublishFacade(xa.MOBILE,pa);bb.PublishToYunzhijiaDialogFactory=new function(){this.createDialog=
function(e,v,g){v=new zc(v);v.setPublishContext(g);g=v.getNewPublishSuccessCallback();e=new Lb(e,v);g&&e.addSuccessCallback(g);return e}};Cb.addPublishToPanel(xa.MOBILE,function(e,v){gb.call(this,e);var g=this,k=this.protectedMethod,d,a,f,l,w,E,F,z,r,h,n,m,u,c,p,q,N,x,J,Z,X,ba=new wa,aa,M=!1,G;this.getWidth=function(){return k.isDsbPublish()?410:800};this.getHeight=function(){return 570};var P=function(K){var H=$("<div>");H.addClass("sa-qing-publish-lapp-preview-container");C.layoutCtrlWithLRTB(H,
31,0,265,null,null,450);H.appendTo(K);K=$("<div>");K.addClass("sa-qing-publish-lapp-preview-head-bar");C.layoutCtrlWithLRTB(K,0,0,null,null,null,28);var Q=$("<span>");Q.addClass("sa-qing-publish-lapp-preview-head-triangle");Q.appendTo(K);Q=$("<span>");Q.text(b.get("mobilePreview","\u79fb\u52a8\u9884\u89c8"));Q.addClass("sa-qing-publish-lapp-preview-head-title");Q.appendTo(K);K.appendTo(H);a=$("<iframe>");a.addClass("sa-qing-publish-lapp-preview-iframe");a.appendTo(H);var R=k.getPublishContext(),la=
{from:"LAPP_MESSAGE",layoutType:wa.LT_NORMAL,model:R.getCurrentContentModel().schemaContent,isDraggable:!1};a.attr("src",R.getMobilePreviewUrl());a.on("load",function(sa){a[0].contentWindow.postMessage(JSON.stringify(la),R.getMobilePreviewUrl())});a.appendTo(H);return H},da=function(K){var H=4,Q=43;1<ca.getPublishLappConfigs().length&&(H=40,Q=42);var R=$("<div>");C.layoutCtrlWithLRTB(R,386,31,null,H,0,null);R.appendTo(K);K=0;var la=2*Q-2,sa=2*Q+30,ra=k.getPublishContext();if(ra.getScene()==Va.Scene.Longer){H=
new ya;H.setRequired(!0);H.setText(b.get("layoutType","\u5c55\u793a\u6a21\u5f0f"));H=H.getJqUi();f=new eb;var ma=[new qb(b.get("standard","\u6807\u51c6"),wa.LT_NORMAL),new qb(b.get("fitWidth","\u9002\u5e94\u5bbd\u5ea6"),wa.LT_WIDTH),new qb(b.get("fitHeight","\u9002\u5e94\u9ad8\u5ea6"),wa.LT_HEIGHT),new qb(b.get("fitScreen","\u9002\u5e94\u5c4f\u5e55"),wa.LT_ALL)];f.setItemModels(ma);f.setSelected(ma[0]);f.addSelectedChangedListener(ja);la=f.getJqUi();C.layoutCtrl(H,8,K,64,23);C.layoutCtrl(la,120,K,
230,23);H.appendTo(R);la.appendTo(R);Q-=4;K+=Q;la=3*Q-2;sa=3*Q+30}ma=new ya;var ua=ma.getJqUi();ma.setRequired(!0);H=b.get("publishName","\u53d1\u5e03\u540d\u79f0");ma.setText(H);ma.setTooltips(H);l=new Ya;var Fa=$("<div>");l.addEditedListener(function(){var D=new Mb;D.setPublishContext(ra);D.editPublishNameListener(w.getSelected().getValue(),l,!1,!1,12,R,Fa)});l.addBlurListener(function(){Fa.remove()});H=l.getJqUi();C.layoutCtrl(ua,8,K,64,23);C.layoutCtrl(H,120,K,230,23);ua.appendTo(R);H.appendTo(R);
K+=Q;ma=new ya;ua=ma.getJqUi();ma.setRequired(!0);H=b.get("publishPath","\u53d1\u5e03\u8def\u5f84");ma.setText(H);ma.setTooltips(H);w=La();H=w.getJqUi();ma=O();C.layoutCtrl(ua,8,K,64,23);C.layoutCtrl(H,120,K,210,23);C.layoutCtrl(ma,331,K+3,20,23);ua.appendTo(R);H.appendTo(R);ma.appendTo(R);K+=Q;ma=new ya;ua=ma.getJqUi();H=b.get("permission","\u6388\u6743");ma.setText(H);ma.setTooltips(H);F=new xb(k.createFacade);F.setSelectedListener(function(D){0<D.length?p&&p.show():p&&p.hide()});H=F.getJqUi();
C.layoutCtrl(ua,8,K,64,23);C.layoutCtrl(H,120,K,228,23);ua.appendTo(R);H.appendTo(R);K+=Q;p=$("<div>");k.loadPermissionTip(p,function(D){C.layoutCtrl(D,169,sa-11,193,82);D.appendTo(R)});p.css("top",la);p.appendTo(R);E=new yb(k.createFacade);H=E.getJqUi();C.layoutCtrl(H,120,K-2,228,23);H.appendTo(R);K+=Q;ua=new ya;la=ua.getJqUi();H=b.get("description","\u63cf\u8ff0");ua.setText(H);ua.setTooltips(H);z=new lb;H=z.getJqUi();C.layoutCtrl(la,8,K,70,23);C.layoutCtrl(H,120,K,230,50);la.appendTo(R);H.appendTo(R);
K+=Q+27;la=new ya;H=b.get("thumbnail","\u7f29\u7565\u56fe");la.setText(H);la.setTooltips(H);r=new Fb(ra,k.createFacade,k.getOuterMessageCurtain());la=ra.getHasDirectModeTable();ua=ra.isHaveToCarryData();r.setSchedulable(!la&&!ua);r.getJqUi();var qa=new ya;ma=qa.getJqUi();H=b.get("bottomAnnotation","\u5e95\u90e8\u5907\u6ce8");qa.setText(H);qa.setTooltips(H);h=new Ya;H=h.getJqUi();C.layoutCtrl(ma,8,K,64,23);C.layoutCtrl(H,120,K,230,23);ma.appendTo(R);H.appendTo(R);K+=Q;ma=new ya;H=b.get("displayStyle",
"\u5448\u73b0\u65b9\u5f0f");ma.setText(H);ma.setTooltips(H);H=ma.getJqUi();u=new eb;ma=k.getDisplayStyles();u.setItemModels(ma);u.setSelected(ma[0]);ma=u.getJqUi();ma.addClass("sa-ctrl-f7selector-text");x=y(ra);qa=$("<div>");qa.addClass("sa-ctrl-f7selector");ma.appendTo(qa);x.appendTo(qa);C.layoutCtrl(qa,120,K,230,23);C.layoutCtrl(H,8,K,64,23);C.layoutCtrl(ma,0,8,210,22);C.layoutCtrl(x,331,K+8,20,20);H.appendTo(R);qa.appendTo(R);ra.getScene()!=Va.Scene.Dashbard&&x.appendTo(R);K+=Q;qa=new ya;ma=qa.getJqUi();
H=b.get("carryData","\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e");qa.setText(H);qa.setTooltips(H);n=new jb;la?(n.setOn(!1),n.setEnabled(!1)):ua?(n.setOn(!0),n.setEnabled(!1)):n.setOn(!1);la=n.getJqUi();C.layoutCtrl(ma,8,K,100,23);C.layoutCtrl(la,120,K,31,19);K+=Q;Q=new ya;X=Q.getJqUi();H=b.get("landscapeDefault","\u9ed8\u8ba4\u6a2a\u5c4f\u6253\u5f00");Q.setText(H);Q.setTooltips(H);m=new jb;m.setOn(!1);Z=m.getJqUi();C.layoutCtrl(X,8,K,100,23);C.layoutCtrl(Z,120,K,31,19);X.appendTo(R);Z.appendTo(R);
Ga();ra.supportPublishWithCarryData()&&(ma.appendTo(R),la.appendTo(R));return R},ja=function(K,H,Q){K={from:"LAPP_MESSAGE",layoutType:Q.getValue()};a[0].contentWindow.postMessage(JSON.stringify(K),window.location.href)},O=function(){var K=$("<span>");K.css("cursor","pointer");K.attr("title",b.get("publishManage","\u53d1\u5e03\u7ba1\u7406"));Ca.background(K,"publish_manager");K.on("click",function(){var H=new cc(g.getRemoteImpl());H.setHasLappContext(!0);H.setPathSelectorModel(d,Ma);H.setPublishContentEditEntrance(g.getPublishContentEditEntrance());
H=new tc(H);H.setClosedCallback(function(Q){d=Q.getPathSelectorModel();Ma=Q.getDirectoryMap();w.setItemModels(d);if(Q=w.getSelected()){for(var R=null,la=0;la<d.length;la++){var sa=d[la];if(sa.getValue()==Q.getValue()){R=sa;break}}w.setSelected(R)}});H.showDialog()});return K},y=function(K){var H=$("<div>");H.addClass("sa-ctrl-f7selector-btn");H.addClass("sa-ctrl-f7selector-btnedit");H.css("cursor","pointer");K.getScene()==Va.Scene.Longer?H.attr("title",b.get("editThumbnailAndSchedule","\u7f16\u8f91\u7f29\u7565\u56fe\u548c\u66f4\u65b0\u7b56\u7565")):
H.attr("title",b.get("editSchedule","\u7f16\u8f91\u66f4\u65b0\u7b56\u7565"));Ca.background(H,"btn_edit");H.on("click",function(){r.showThumbnailCutSettingDialog()});return H},ia=function(K){var H=ca.getPublishLappConfigs(),Q,R=$("<div>");R.addClass("sa-ctrl-common-unselectable");C.layoutCtrl(R,0,0,86*H.length+(H.length-1),34);var la=$("<div>");la.css("border-bottom","1px solid rgb(229, 229, 229)");R.appendTo(la);la.appendTo(K);var sa=$("<div>");sa.addClass("sa-qing-publish-lapp-logo-triangle-left");
sa.appendTo(la);sa.on("click",function(){R.css("left",0);A()});var ra=$("<div>");ra.addClass("sa-qing-publish-lapp-logo-triangle-right");ra.appendTo(la);ra.on("click",function(){R.css("left",la.width()-R.width());A()});var ma,ua,Fa,qa,D,V,t,B=[],A=function(){V||(V=$("<div>"),V.css("background","white"),V.css("z-index","1"),V.appendTo(R));t||(t=$("<div>"),t.css("background","white"),t.css("z-index","1"),t.appendTo(R));var L=-R.position().left,T=R.width()+R.position().left-la.width();0<L?sa.show():
sa.hide();0<T?ra.show():ra.hide();0<L&&(L+=12);C.layoutCtrl(V,0,0,L,34);C.layoutCtrlWithLRTB(t,null,0,T,0,0,34)},I=function(L){if(Fa&&!D)for(var T=0;T<B.length;T++){var ea=B[T];if(C.isDescendent(L.target,ea[0])){L=ea.data("publishLappConfig");Q&&Q.remove();for(T=0;T<H.length;T++)if(H[T]==L){W.css("left",13+87*T+"px");k.toggleLappContext(L.getAppType());if(!ca.getLappUserId()){q&&q.hide();N&&N.hide();Q=k.createLappUserIdNullTips();Q.appendTo(K);break}q&&q.show();N&&N.show();d=null;Pa(w);ea=k.getDisplayStyles();
u.setItemModels(ea);u.setSelected(ea[0]);Ga()}break}}D=Fa=!1};R.on("mousedown",function(L){Fa=!0;D=!1;ma=L.screenX;ua=R.position().left;qa=(new Date).getTime()});R.on("mousemove",function(L){if(Fa){L=ua+L.screenX-ma;var T=la.width(),ea=R.width();L<T-ea&&(L=T-ea);0<L&&(L=0);R.css("left",L);A();100<(new Date).getTime()-qa&&(D=!0)}});R.on("mouseup",I);R.on("mouseleave",I);I=function(L){var T=$("<span>");T.addClass("sa-qing-publish-tab");T.data("publishLappConfig",L);B.push(T);if(L.getAppType()==ib.THIRDPARTY){var ea=
$("<img>");ea.appendTo(T);C.layoutCtrl(ea,0,0,"100%","100%");L=ab.getLoadImgUrl(L.getAppImageFile(),"image-library");ea.attr("src",L)}else ea="icon_"+L.getAppType(),Ca.background(T,ea);T.appendTo(R)};for(var Y=0;Y<H.length;Y++){var S=H[Y];I(S);if(Y<H.length-1){var fa=$("<span>");fa.addClass("sa-qing-publish-tab-border");fa.appendTo(R)}if(ca.getLappUserType()==S.getLappUserType()){var W=$("<span>");W.addClass("sa-qing-publish-tab_selected");W.css("top","32px");W.appendTo(R);W.css("left",13+87*Y+"px")}}setTimeout(A,
100);return la};this.protectedCreateContainer=function(){var K=$("<div>");C.layoutCtrlWithLRTB(K,0,0,null,0,0,null);if(k.isDsbPublish()){if(1<ca.getPublishLappConfigs().length){var H=ia(K);C.layoutCtrlWithLRTB(H,0,31,null,-5,null,33)}q=ha(K)}else N=P(K),1<ca.getPublishLappConfigs().length&&(H=ia(K),C.layoutCtrlWithLRTB(H,384,31,null,-5,null,33)),q=da(K);return K};this.protectedIsOnlyYzj=function(){return!1};var ha=function(K){var H=$("<div>");H.appendTo(K);K=0;1<ca.getPublishLappConfigs().length&&
(K=40);var Q=new ya,R=Q.getJqUi();Q.setRequired(!0);Q.setText(b.get("publishName","\u53d1\u5e03\u540d\u79f0"));l=new Ya;var la=$("<div>");l.addEditedListener(function(){(new Mb).editPublishNameListener(w.getSelected().getValue(),l,!1,!0,42,H,la)});l.addBlurListener(function(){la.remove()});Q=l.getJqUi();C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,90,K,255,23);R.appendTo(H);Q.appendTo(H);K+=43;Q=new ya;R=Q.getJqUi();Q.setRequired(!0);Q.setText(b.get("publishPath","\u53d1\u5e03\u8def\u5f84"));w=La();Q=
w.getJqUi();var sa=O();C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,90,K,235,23);C.layoutCtrl(sa,326,K+3,20,23);R.appendTo(H);Q.appendTo(H);sa.appendTo(H);K+=43;Q=new ya;R=Q.getJqUi();Q.setText(b.get("permission","\u6388\u6743"));F=new xb(k.createFacade);F.setSelectedListener(function(ra){0<ra.length?p&&p.show():p&&p.hide()});Q=F.getJqUi();C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,90,K,253,23);R.appendTo(H);Q.appendTo(H);K+=43;p=$("<div>");k.loadPermissionTip(p,function(ra){C.layoutCtrl(ra,151,105,193,
82);ra.appendTo(H)});p.css("left","345px");p.css("top",84);p.appendTo(H);E=new yb(k.createFacade);R=E.getJqUi();C.layoutCtrl(R,90,K-2,253,23);R.appendTo(H);K+=43;Q=new ya;R=Q.getJqUi();Q.setText(b.get("description","\u63cf\u8ff0"));z=new lb;Q=z.getJqUi();C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,90,K,255,95);R.appendTo(H);Q.appendTo(H);K+=115;Q=new ya;R=Q.getJqUi();Q.setText(b.get("bottomAnnotation","\u5e95\u90e8\u5907\u6ce8"));h=new Ya;Q=h.getJqUi();C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,90,K,255,
23);R.appendTo(H);Q.appendTo(H);K+=43;R=new ya;R.setText(b.get("displayStyle","\u5448\u73b0\u65b9\u5f0f"));R=R.getJqUi();u=new eb;Q=k.getDisplayStyles();u.setItemModels(Q);u.setSelected(Q[0]);Q=u.getJqUi();Q.addClass("sa-ctrl-f7selector-text");x=oa();sa=$("<div>");sa.addClass("sa-ctrl-f7selector");Q.appendTo(sa);x.appendTo(sa);C.layoutCtrl(sa,90,K,255,23);C.layoutCtrl(R,8,K,64,23);C.layoutCtrl(Q,0,8,228,22);C.layoutCtrl(x,235,8,18,20);R.appendTo(H);sa.appendTo(H);K+=43;Q=new ya;R=Q.getJqUi();Q.setText(b.get("carryData",
"\u4ee5\u540e\u4e0d\u518d\u66f4\u65b0\u6570\u636e"));n=new jb;sa=k.getPublishContext();Q=sa.getHasDirectModeTable();sa=sa.isHaveToCarryData();Q?(n.setOn(!1),n.setEnabled(!1)):sa?(n.setOn(!0),n.setEnabled(!1)):n.setOn(!1);Q=n.getJqUi();C.layoutCtrl(R,8,K,100,23);C.layoutCtrl(Q,120,K,31,19);R.appendTo(H);Q.appendTo(H);return H},oa=function(){var K=$("<div>");K.addClass("sa-ctrl-f7selector-btn");K.addClass("sa-ctrl-f7selector-btnedit");K.css("cursor","pointer");K.attr("title",b.get("editThumbnailBtn",
"\u7f16\u8f91\u7f29\u7565\u56fe"));Ca.background(K,"btn_edit");var H=function(Q,R,la){J=R;la&&(c=Q)};K.on("click",function(){(new com.kingdee.bos.qing.imagelib.choose.ui.ChooseThumbnailDialog(c,J,H)).show()});return K},La=function(){var K=new eb;Pa(K);return K},Ga=function(){k.supportLandscape()?(X&&X.show(),Z&&Z.show()):(X&&X.hide(),Z&&Z.hide())},Ma={},Wa=function(K){for(var H=[],Q=0;Q<K.length;Q++){var R=new Ib;R.fromJsonObject(K[Q]);Ma[R.getId()]=R;var la=new wb;la.setValue(R.getId());la.setText(R.getName());
H.push(la)}return H},Pa=function(K){if(null==d){var H=new ka("lappDirectoryMgr",function(Q){d=Wa(Q);K.setItemModels(d);K.setSelected(d[0]);K.setCustomPainter(function(R,la,sa){sa?(R=sa.getText(),la.text(R)):0<d.length&&K.setSelected(d[0])})},function(Q,R){k.getOuterMessageCurtain().showPrompt(R,2E3);return!0});H.setShowBlocking(!1);H.getOwnDirList()}else K.setItemModels(d),K.setSelected(d[0])};this.isEditPublish=function(){return!1};this.getModelFromUI=function(){var K=k.getPublishContext(),H=new mb;
H.setPublishSourceType(K.getCurrentSourceType());H.setPublishTargetType(g.getPublishTargetType());H.setTagId(K.getBizTag());H.setName($.trim(l.getText()));H.setPath("lightapp");H.setPathText("lightapp");H.setAnalysis(!0);H.setSchemeId(mb.CURRENT_SCHEMA_ID);if(E){K=E.getSelectedValue();var Q=aa;if(Q){for(var R=[],la=0;la<K.length;la++){var sa=K[la],ra=sa.getValue();-1==Q.indexOf(ra)&&R.push(sa)}K=R}H.setUsers(K)}F&&H.setRoles(F.getSelectedValue());H.setId(G);n&&H.setCarryData(n.isOn());aa&&H.setFailedUserIds(aa);
return H};this.getJsonModel=function(){return k.getPublishContext().getCurrentContentModel()};var Na=function(K){return null==K||0==$.trim(K).length},U=function(K){var H=new com.kingdee.bos.qing.imagelib.model.ThumbnailUrlModel,Q=H.getImagePathFromJson(J);H.checkHasImage(Q,K)};this.checkUIInput=function(K){if(null==ca||!ca.getLappUserId())return b.get("lappUserIdNull","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\u3002");var H=l.getText();if(Na(H))return b.get("publishNameNotEmptyTip",
"\u8bf7\u8f93\u5165\u53d1\u5e03\u540d\u79f0\u3002");if(50<H.length&&50<z.getText().length&&!Na(h.getText())&&50<h.getText().length)return b.get("NameAndDesAndAnnoCanNotExceedLimit50Tip","\u53d1\u5e03\u540d\u79f0\u3001\u63cf\u8ff0\u957f\u5ea6\u548c\u5e95\u90e8\u5907\u6ce8\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(50<H.length&&50<z.getText().length)return b.get("NameAndDesCanNotExceedLimit50Tip","\u53d1\u5e03\u540d\u79f0\u3001\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");
if(50<H.length&&!Na(h.getText())&&50<h.getText().length)return b.get("NameAndAnnoCanNotExceedLimit50Tip","\u53d1\u5e03\u540d\u79f0\u3001\u5e95\u90e8\u5907\u6ce8\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(50<z.getText().length&&!Na(h.getText())&&50<h.getText().length)return b.get("DesAndAnnoCanNotExceedLimit50Tip","\u63cf\u8ff0\u957f\u5ea6\u3001\u5e95\u90e8\u5907\u6ce8\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(50<H.length)return b.get("publishNameTooLongTip",
"\u53d1\u5e03\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(w.getSelected()){if(50<z.getText().length)return b.get("descriptionCanNotExceedLimit50Tip","\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");if(!Na(h.getText())&&50<h.getText().length)return b.get("bottomAnnotationCanNotExceedLimit50Tip","\u5e95\u90e8\u5907\u6ce8\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002");var Q=function(){var R=k.getPublishContext().getBizTag(),
la=function(Fa,qa){},sa=function(Fa){var qa=new ka("lappAnalysisMgr",function(D){if(D){var V=new wa;V.fromJsonObject(D);G=V.getPublishId();D=new pa(e,function(t){var B=t.permissionId;t.sameSource?va(K,Fa,B):(G=null,k.getOuterMessageCurtain().showPrompt(b.get("duplicateName","\u53d1\u5e03\u8def\u5f84\u4e0b\u5df2\u5b58\u5728\u76f8\u540c\u7684\u53d1\u5e03\u540d\u79f0\u3002"),2E3),K(!1))},function(){return!1});D.setShowBlocking(!0);D.checkSameSource(G,R)}else Aa(K,Fa,!1,!1)},function(D,V){k.getOuterMessageCurtain().showPrompt(V,
2E3);K(!1);return!0});qa.setShowBlocking(!1);qa.getAnalysisInfo(w.getSelected().getValue(),H)};if(0<F.getSelectedValue().length){for(var ra=F.getSelectedValue(),ma=[],ua=0;ua<ra.length;ua++)ma.push(ra[ua].getValue());(new pa(e,sa,la)).getUserIdsByRoleId(ma)}else sa([])};U(function(R){R?Q():(k.getOuterMessageCurtain().showPrompt(b.get("imgHasBeenDeleted","\u201c\u7f29\u7565\u56fe\u201d\u5f15\u7528\u7684\u56fe\u7247\u5df2\u88ab\u5220\u9664\uff0c\u8bf7\u91cd\u65b0\u8bbe\u7f6e\u3002")),K(!1))})}else return b.get("publishPathNotEmptyTip",
"\u8bf7\u8f93\u5165\u53d1\u5e03\u8def\u5f84\u3002");return null};var va=function(K,H,Q){var R=k.getPublishContext().getCurrentSourceType(),la=b.get(R,R);R=$(document.body);var sa=$("<div class='sa-ctrl-common-modallayer'>");sa.appendTo(R);var ra=new vc(sa),ma=b.get("operateConfirm","\u64cd\u4f5c\u786e\u8ba4");ra.setTitle(ma);ma=R.prop("clientWidth");var ua=R.prop("clientHeight");ra.setBounds(ma-300>>1,ua-200>>1,300,200);ra.setToolbarVisible(!1);ma=$("<div>");ua=b.get("publishSameSourceNameDuplicate",
"\u8be5#1\u5df2\u53d1\u5e03\u8fc7\u540c\u540d\u83dc\u5355\uff0c\u786e\u5b9a\u8981\u8986\u76d6\u5417\uff1f").replace("#1",la);la=$("<span>");la.text(ua);la.attr("title",ua);var Fa=b.get("isAddOldPermission","\u540c\u65f6\u6388\u6743\u7ed9\u539f\u83dc\u5355\u5df2\u6388\u6743\u7684\u7528\u6237\u548c\u89d2\u8272");ua=(new ya(Fa)).getJqUi();ua.attr("title",Fa);var qa=new jb;Fa=qa.getJqUi();C.layoutCtrl(la,5,10,270,23);C.layoutCtrl(ua,5,45,210,23);C.layoutCtrlWithLRTB(Fa,215,null,31,47,null,19);la.appendTo(ma);
ua.appendTo(ma);Fa.appendTo(ma);ra.setContent(ma);ra.addClosingListener(function(D,V){V?(M=!0,qa.isOn()&&(H=H.concat(Q)),Aa(K,H,!0,qa.isOn())):(G=null,K(!1));D.destroy();sa.remove();return!0});ra.showFooterPane();ra.show();sa.appendTo(R)},Ba=function(){if(a){try{return a[0].contentWindow.com.kingdee.bos.qing.lapp.scene.LappLongerUtil.getLoadStatus()}catch(K){console.log(K)}return!1}return!0},Aa=function(K,H,Q,R){var la=g.getUserIdsByValueTextPair(E.getSelectedValue());la=k.getNotDuplicatedUserIds(la,
H);var sa=function(ra,ma){ba.setAuthorizedUsers(ra);k.isDsbPublish()?(ra=c)?k.cutAndUploadImageToCloud(ra,function(ua){c=ua},K,!1,Q,R,ma):(K(!0,!1,Q,R),ma&&ma()):(ra=function(){var ua=r.getBase64Img();k.cutAndUploadImageToCloud(ua,function(Fa){c=Fa},K,!1,Q,R,ma)},r.needInitLongerThumbnailImage(a)?Ba()?r.initLongerThumbnailImage(a,ra):(k.getOuterMessageCurtain().showPrompt(b.get("inLoadTip","\u6b63\u5728\u751f\u6210\u7f29\u7565\u56fe\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5\u3002"),2E3),K(!1)):ra())};0<
la.length?k.getLappContextsByUserSelector(la,function(ra,ma,ua,Fa){aa=ma;sa(ra,Fa)},function(){K(!1);return!0}):sa([])},Ka=function(K){var H=k.getPublishContext(),Q=ca.getScene();ba.setScene(Q);ba.setParentId(w.getSelected().getValue());ba.setCreatorName(ca.getUserName());ba.setName(l.getText());ba.setCardDesc(z.getText());ba.setUploadData(!1);Q=H.getLappEntranceUrl();Q=bb.LappIntegration.getRealPublishUrl(Q,H.getParamPathPrefix(),ca.getConfiguredPublishUrlPrefix());Q=hb.appendParamToUrl(Q,"accountId",
ca.getAccountId());Q=hb.appendParamToUrl(Q,"publishId",K.getId());Q=ca.appendExtraPublishUrlParam(Q);if(k.isDsbPublish()){var R=H.getCurrentContentModel(),la=new com.kingdee.bos.qing.dsb.model.DashboardModel;la.fromJsonObject(R);la.getPage().isMobileDesired()&&u.getSelected().getValue()==wa.DISPLAYSTYLE_EXECUTION&&(R=la.getPage().getHeight(),Q=hb.appendParamToUrl(Q,"height",R))}ba.setUrl(Q);ba.setLayoutType(f?f.getSelected().getValue():wa.LT_NORMAL);ba.setLargeThumbnail(c);ba.setSmallThumbnail(c);
ba.setPublishId(K.getId());ba.setBottomAnnotation(h.getText());m&&ba.setLandscape(m.isOn());u&&ba.setDisplayStyle(u.getSelected().getValue());k.isDsbPublish()?ba.setViewType(wa.VIEW_TYPE_DASHBOARD):H.getScene()==Va.Scene.Square?ba.setViewType(wa.VIEW_TYPE_SQUARE):ba.setViewType(wa.VIEW_TYPE_LONGER);return ba};this.getNewPublishSuccessCallback=function(){return function(K,H,Q){var R=ca.getScene(),la=Ka(K),sa=new ka("lappAnalysisMgr",function(ra){if(k.isDsbPublish())!Q&&H.showSuccess(b.get("publishSuccess",
"\u53d1\u5e03\u6210\u529f\u3002"));else{la.setId(ra);var ma=r.getThumbnailInfo();ma.setAnalysisId(ra);ma.setPublishId(K.getId());la.getViewType()==wa.VIEW_TYPE_SQUARE&&(ma.setApertureWidth(300),ma.setApertureHeight(150));ra=k.createFacade(function(ua){M=!1;!Q&&H.showSuccess(b.get("publishSuccess","\u53d1\u5e03\u6210\u529f\u3002"));ua.isConAvailable||(ua=new Oa,ua.setOptionType(Oa.OPTION_OK),ua.setMessage(b.get("connectImageServerFail","\u5f53\u524d\u670d\u52a1\u5668\u65e0\u6cd5\u8fde\u63a5\u5230\u4e91\u7aef\u56fe\u7247\u670d\u52a1\u5668\uff0c\u7f29\u7565\u56fe\u8c03\u5ea6\u66f4\u65b0\u529f\u80fd\u65e0\u6cd5\u6b63\u5e38\u4f7f\u7528\u3002")),
ua.showDialog())},function(ua,Fa){M=!1;k.getOuterMessageCurtain().showPrompt(b.get("publishFailed","\u53d1\u5e03\u5931\u8d25\uff1a")+Fa,2E3)});ra.setShowBlocking(!1);ra.saveThumbnailInfo(ma,M)}},function(ra,ma){M=!1;k.getOuterMessageCurtain().showPrompt(b.get("publishFailed","\u53d1\u5e03\u5931\u8d25\uff1a")+ma,2E3)});sa.setShowBlocking(!1);sa.saveAnalysis(la,ca.getEId(),R,!1,M)}};this.getAnalysisSchemaArray=function(){return null}});Hb.LAPP_CONFIGURE_FILE_URL="https://q.kdcloud.com/qing-releasenote/lappConfigurationDocument.do?productType=";
Cb.addPublishManagePanel(xa.MOBILE,cc);wa.LT_NORMAL="NORMAL";wa.LT_WIDTH="WIDTH";wa.LT_HEIGHT="HEIGHT";wa.LT_ALL="ALL";wa.LT_ADAPT="ADAPT";wa.VIEW_TYPE_LONGER="1";wa.VIEW_TYPE_SQUARE="2";wa.VIEW_TYPE_DASHBOARD="3";wa.DISPLAYSTYLE_THUMNAIL="1";wa.DISPLAYSTYLE_EXECUTION="2";var Ua=new function(){var e={},v={};this.registMobileSchedulePushUIPane=function(g,k,d){e[g]=k;v[g]=d};this.getIconName=function(g){return e[g]};this.getPushUIPane=function(g,k,d,a,f,l){var w=v[g];if(null==w)return null;w=new w;
w.setPushTargetType(g);w.setEditMode(!1);w.setPublishContext(k);w.setCreateFacadeMethod(d);w.setOuterMessageCurtain(a);w.setPushSchemaEditEntrance(f);w.setDesigner(l);return w};this.registMobileSchedulePushUIPane(za.DINGDING,"icon_dingding_off",null)};Ua.registMobileSchedulePushUIPane(za.YZJ_ROBOT,"icon_yzj",Pb);Ua.registMobileSchedulePushUIPane(za.WXQYH_ROBOT,"icon_wxqyh",Pb);Ua.registMobileSchedulePushUIPane(za.DINGDING,"icon_dingding",Pb);Ua.registMobileSchedulePushUIPane(za.MISSION_CLOUD_SERVICE_ACCOUNT,
"icon_missioncloud",function(){zb.AbstractTabPane.call(this);mc.call(this);var e=this,v,g,k,d,a,f=$a.PUSH_TO_GROUP;this.into=function(){v&&(e.clear(),a.setChecked(!0),k.setText(""),g.setText(""))};this.protectedGetModelFromUI=function(){var z=new $a;z.setPushToTarget(f);z.setUserIds(E());z.setGroupIds(F());return z};this.protectedGetGapHeight=function(){return 16};this.protectedGetJqCustomUI=function(){v||l();return v};this.protectedGetCustomUIHeight=function(){return 62};this.protectedCheckUIInput=
function(){if(f==$a.PUSH_TO_GROUP){var z=F();if(e.isEmpty(z))return e.getOuterMessageCurtain().showPrompt(b.get("group","\u7fa4\u7ec4")+b.get("canNotBeEmpty","\u4e0d\u80fd\u4e3a\u7a7a\u3002")),!1;if(!/^[0-9,]*$/.test(z))return e.getOuterMessageCurtain().showPrompt(b.get("illegalGroupInput","\u7fa4\u7ec4\u53ea\u80fd\u8f93\u5165\u6570\u5b57\u548c\u82f1\u6587\u9017\u53f7\u3002")),!1;if(255<z.length)return e.getOuterMessageCurtain().showPrompt(b.get("group","\u7fa4\u7ec4")+b.get("inputTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7#1\u5b57\u7b26\u3002").replace("#1",
255)),!1}else{z=E();if(e.isEmpty(z))return e.getOuterMessageCurtain().showPrompt(b.get("user","\u7528\u6237")+b.get("canNotBeEmpty","\u4e0d\u80fd\u4e3a\u7a7a\u3002")),!1;if(255<z.length)return e.getOuterMessageCurtain().showPrompt(b.get("user","\u7528\u6237")+b.get("inputTooLong","\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7#1\u5b57\u7b26\u3002").replace("#1",255)),!1}return!0};var l=function(){v=$("<div>");var z=new ya;z.setRequired(!0);z.setText(b.get("pushTarget","\u63a8\u9001\u76ee\u6807"));var r=new uc;
a=new Wb;a.setChecked(!0);a.setText(b.get("group","\u7fa4\u7ec4"));a.setUserObject($a.PUSH_TO_GROUP);r.addElement(a);d=new Wb;d.setText(b.get("user","\u7528\u6237"));d.setUserObject($a.PUSH_TO_USER);r.addElement(d);k=new Ya;k.setPlaceholder(b.get("enterUserId","\u8bf7\u8f93\u5165\u7528\u6237id\uff0c\u591a\u4e2a\u7528\u6237id\u7528\u82f1\u6587\u9017\u53f7\u5206\u5272"));g=new Ya;g.setPlaceholder(b.get("enterGroupTag","\u8bf7\u8f93\u5165\u5206\u7ec4id\uff0c\u591a\u4e2a\u5206\u7ec4id\u7528\u82f1\u6587\u9017\u53f7\u5206\u5272"));
z=z.getJqUi();var h=a.getJqUi(),n=d.getJqUi(),m=g.getJqUi(),u=k.getJqUi();u.css("display","none");r.addChangedListener(function(c){f=c.getUserObject();c=g.getJqUi();var p=k.getJqUi();f==$a.PUSH_TO_GROUP?(c.css("display",""),p.css("display","none")):(c.css("display","none"),g.setText(""),p.css("display",""))});w();r=0;C.layoutCtrl(z,27,r,70,23);C.layoutCtrl(h,113,r,60,23);C.layoutCtrl(n,173,r,60,23);r=r+23+16;C.layoutCtrl(m,113,r,310,23);C.layoutCtrl(u,113,r,310,23);z.appendTo(v);n.appendTo(v);h.appendTo(v);
m.appendTo(v);u.appendTo(v)},w=function(){var z=e.protectedGetModel();z&&(z.getPushToTarget()==$a.PUSH_TO_USER?(d.setChecked(!0),k.setText(z.getUserIds())):g.setText(z.getGroupIds()))},E=function(){if(f==$a.PUSH_TO_GROUP)return null;var z=k.getText();return $.trim(z)},F=function(){if(f==$a.PUSH_TO_GROUP){var z=g.getText();return $.trim(z)}return null}});bb.LappIntegration=new function(){var e=this,v;this.setLappPrivateUrl=function(r){v=r};this.getLappPrivateUrl=function(){return v};this.getRealPublishUrl=
function(r,h,n){h&&n&&(r=r.replace(h,n));return r};this.deleteLappPublishInfos=function(r,h){k(r,function(){for(var n=ca.getLappUserId(),m=ca.getLappUserType(),u=ca.getEId(),c=ca.getPublishLappConfigs(),p=0;p<c.length;p++){var q=c[p];q.getLappUserId()&&(ca.setLappUserId(q.getLappUserId()),ca.setLappUserType(q.getLappUserType()),ca.setEId(q.getCorpId()),a(h))}ca.setLappUserId(n);ca.setLappUserType(m);ca.setEId(u)})};this.loadLappContext=function(r,h,n,m,u){r=new pa(r,function(c){ca=new Da;ca.fromJsonObject(c);
if(!ca.getLappUserId()){c=ca.getPublishLappConfigs();for(var p=0;p<c.length;p++){var q=c[p];if(q.getLappUserId()){g(q.getAppType());break}}}cb=ca.getServerHostUrl();wc.setEnv(cb,ca.getAppId());ca.isPrivate()&&Db.setRemoteUrlCreator(function(N,x){N=com.kingdee.bos.qing.common.Base64Util.encode("/"+N+"/"+x);return com.kingdee.bos.qing.framework.common.RemoteFramework.getLappPrivateUrl(N)});m&&m()},function(c,p){u&&u(c,p);return!0});r.setShowBlocking(n);r.getLappContext(h)};var g=function(r){for(var h=
ca.getPublishLappConfigs(),n=0;n<h.length;n++){var m=h[n];if(m.getAppType()==r){ca.setLappUserId(m.getLappUserId());ca.setLappUserType(m.getLappUserType());ca.setEId(m.getCorpId());break}}},k=function(r,h){e.loadLappContext(r,!1,!1,function(){ca.getLappUserId()?h():ca=null})},d=function(r,h,n,m){e.loadLappContext(r,!1,!m,h,n)},a=function(r){var h=new ka("lappAnalysisMgr",function(){},function(){return!0});h.setShowBlocking(!1);h.deleteByPublishIds(r)};this.syncDatacenterInfo=function(r,h,n){var m=
new pa(r,function(u){if(u.isNeedSync){var c=u.datacenterUUID,p=u.datacenterInfo,q=u.publishIds;k(r,function(){var N=new ka("lappDatacenter",function(x){f(r,c,h,n)},function(x,J){return!0});q||(q=[]);N.setShowBlocking(!1);N.syncDatacenterInfo(p,q)})}else n&&n()},function(){return!0});m.setShowBlocking(!1);m.loadDatacenterInfo()};var f=function(r,h,n,m){r=new pa(r,function(){n&&n()},function(){m&&m();return!0});r.setShowBlocking(!1);r.finishSync(h)};this.loadHandoverDirName=function(r,h,n,m,u,c){d(r,
function(){ca.getLappUserId()?l(r,n,function(p){for(var q=[],N=0;N<n.length;N++)q=q.concat(p[n[N]]);w(h,q,m,u,c)},u,c):u&&u(0,b.get("lappUserIdNullTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u540c\u6b65\u7528\u6237\u4fe1\u606f"))},u,c)};this.handover=function(r,h,n,m,u,c){d(r,function(){ca.getLappUserId()?l(r,[n,m],function(p){E(h,p[n],p[m],u,c)},c):c&&c(0,b.get("lappUserIdNullTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u540c\u6b65\u7528\u6237\u4fe1\u606f"))},
c)};var l=function(r,h,n,m,u){r=new pa(r,function(c){n&&n(c)},function(c,p){m&&m(c,p);return!0});r.setShowBlocking(!u);r.getAllLappContextsByUserIds(h)},w=function(r,h,n,m,u){var c=new ka("lappAnalysisMgr",function(p){n&&n(p)},function(p,q){m&&m(p,q);return!0});c.setShowBlocking(!u);c.loadByUserAndPublishIds(r,h)},E=function(r,h,n,m,u){(new ka("lappAnalysisMgr",function(c){m&&m()},function(c,p){u&&u(c,p);return!0})).handover(r,h,n)};this.getLappPublishInfosByPublishIds=function(r,h,n,m){d(r,function(){ca.getLappUserId()?
F(h,n,m):m&&m(0,b.get("lappUserIdNullTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u540c\u6b65\u7528\u6237\u4fe1\u606f"))},m)};var F=function(r,h,n){var m=new ka("lappAnalysisMgr",function(u){h&&h(u)},function(u,c){n&&n(u,c);return!0});m.setShowBlocking(!1);m.getAnalysisInfosByPublishIds(r)};this.getPublishCountAggPath=function(r,h,n,m){var u=new ka("lappAnalysisMgr",function(c){n&&n(c)},function(c,p){m&&m(c,p);return!0});u.setShowBlocking(!1);
u.getPublishCountAggPath(r,h)};this.getAnalysisInfosByDirIds=function(r,h,n,m,u,c,p){var q=new ka("lappAnalysisMgr",function(N){c&&c(N)},function(N,x){p&&p(N,x);return!0});q.setShowBlocking(!1);q.getAnalysisInfosByDirIds(r,h,n,m,u)};this.getLappAllUserDirList=function(r,h,n,m){d(r,function(){ca.getLappUserId()?z(h,n,m):m&&m(0,b.get("lappUserIdNullTips","\u83b7\u53d6\u8f7b\u5e94\u7528\u7528\u6237\u4fe1\u606f\u5931\u8d25\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u540c\u6b65\u7528\u6237\u4fe1\u606f"))},
m)};var z=function(r,h,n){(new ka("lappDirectoryMgr",function(m){h&&h(m)},function(m,u){n&&n(m,u);return!0})).getAllUserDirList(r)}};zb.AbstractTabPane=function(){this.getJqUi=function(){};this.into=function(){}}})();
//qingVersionTag: 20250415