var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(Q,ua,la){Q instanceof String&&(Q=String(Q));for(var wa=Q.length,Da=0;Da<wa;Da++){var Na=Q[Da];if(ua.call(la,Na,Da,Q))return{i:Da,v:Na}}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(Q,ua,la){if(Q==Array.prototype||Q==Object.prototype)return Q;Q[ua]=la.value;return Q};$jscomp.getGlobal=function(Q){Q=["object"==typeof globalThis&&globalThis,Q,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var ua=0;ua<Q.length;++ua){var la=Q[ua];if(la&&la.Math==Math)return la}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(Q,ua){var la=$jscomp.propertyToPolyfillSymbol[ua];if(null==la)return Q[ua];la=Q[la];return void 0!==la?la:Q[ua]};
$jscomp.polyfill=function(Q,ua,la,wa){ua&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(Q,ua,la,wa):$jscomp.polyfillUnisolated(Q,ua,la,wa))};$jscomp.polyfillUnisolated=function(Q,ua,la,wa){la=$jscomp.global;Q=Q.split(".");for(wa=0;wa<Q.length-1;wa++){var Da=Q[wa];if(!(Da in la))return;la=la[Da]}Q=Q[Q.length-1];wa=la[Q];ua=ua(wa);ua!=wa&&null!=ua&&$jscomp.defineProperty(la,Q,{configurable:!0,writable:!0,value:ua})};
$jscomp.polyfillIsolated=function(Q,ua,la,wa){var Da=Q.split(".");Q=1===Da.length;wa=Da[0];wa=!Q&&wa in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Na=0;Na<Da.length-1;Na++){var sb=Da[Na];if(!(sb in wa))return;wa=wa[sb]}Da=Da[Da.length-1];la=$jscomp.IS_SYMBOL_NATIVE&&"es6"===la?wa[Da]:null;ua=ua(la);null!=ua&&(Q?$jscomp.defineProperty($jscomp.polyfills,Da,{configurable:!0,writable:!0,value:ua}):ua!==la&&(void 0===$jscomp.propertyToPolyfillSymbol[Da]&&(la=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[Da]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(Da):$jscomp.POLYFILL_PREFIX+la+"$"+Da),$jscomp.defineProperty(wa,$jscomp.propertyToPolyfillSymbol[Da],{configurable:!0,writable:!0,value:ua})))};$jscomp.polyfill("Array.prototype.find",function(Q){return Q?Q:function(ua,la){return $jscomp.findInternal(this,ua,la).v}},"es6","es3");$jscomp.arrayIteratorImpl=function(Q){var ua=0;return function(){return ua<Q.length?{done:!1,value:Q[ua++]}:{done:!0}}};$jscomp.arrayIterator=function(Q){return{next:$jscomp.arrayIteratorImpl(Q)}};
$jscomp.initSymbol=function(){};$jscomp.polyfill("Symbol",function(Q){if(Q)return Q;var ua=function(Na,sb){this.$jscomp$symbol$id_=Na;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:sb})};ua.prototype.toString=function(){return this.$jscomp$symbol$id_};var la="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",wa=0,Da=function(Na){if(this instanceof Da)throw new TypeError("Symbol is not a constructor");return new ua(la+(Na||"")+"_"+wa++,Na)};return Da},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(Q){if(Q)return Q;Q=Symbol("Symbol.iterator");for(var ua="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),la=0;la<ua.length;la++){var wa=$jscomp.global[ua[la]];"function"===typeof wa&&"function"!=typeof wa.prototype[Q]&&$jscomp.defineProperty(wa.prototype,Q,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return Q},
"es6","es3");$jscomp.iteratorPrototype=function(Q){Q={next:Q};Q[Symbol.iterator]=function(){return this};return Q};$jscomp.iteratorFromArray=function(Q,ua){Q instanceof String&&(Q+="");var la=0,wa=!1,Da={next:function(){if(!wa&&la<Q.length){var Na=la++;return{value:ua(Na,Q[Na]),done:!1}}wa=!0;return{done:!0,value:void 0}}};Da[Symbol.iterator]=function(){return Da};return Da};
$jscomp.polyfill("Array.prototype.keys",function(Q){return Q?Q:function(){return $jscomp.iteratorFromArray(this,function(ua){return ua})}},"es6","es3");
(function(){function Q(){var N=this,E,H,m,R,aa,Z,ea,ya,mb,qb,fa,eb,b,Mb,nb,oa=!1,Ob=!1,Qb=[];this.copy=function(){var n=new Q;n.setModelId(E);n.setNumber(H);n.setModelSetId(m);n.setGroupId(R);n.setModelName(aa);n.setModelType(Z);n.setLockUserName(ea);n.setDesc(ya);n.setCreator(mb);n.setCreateTime(qb);n.setDisplayCreateTime(fa);n.setModifier(eb);n.setModifyTime(b);n.setDisplayModifyTime(Mb);n.setDeployed(nb);return n};this.getDisplayCreateTime=function(){return fa};this.setDisplayCreateTime=function(n){fa=
n};this.getDisplayModifyTime=function(){return Mb};this.setDisplayModifyTime=function(n){Mb=n};this.setModelId=function(n){E=n};this.getModelId=function(){return E};this.setNumber=function(n){H=n};this.getNumber=function(){return H};this.setModelSetId=function(n){m=n};this.getModelSetId=function(){return m};this.setGroupId=function(n){R=n};this.getGroupId=function(){return R};this.setModelName=function(n){aa=n};this.getModelName=function(){return aa};this.setModelType=function(n){Z=n};this.getModelType=
function(){return Z};this.setLockUserName=function(n){ea=n};this.getLockUserName=function(){return ea};this.setDesc=function(n){ya=n};this.getDesc=function(){return ya};this.setCreator=function(n){mb=n};this.getCreator=function(){return mb};this.setCreateTime=function(n){qb=n};this.getCreateTime=function(){return qb};this.setModifier=function(n){eb=n};this.getModifier=function(){return eb};this.setModifyTime=function(n){b=n};this.getModifyTime=function(){return b};this.setDeployed=function(n){nb=
n};this.getDeployed=function(){return nb};this.setSelected=function(n){oa=n};this.getSelected=function(){return oa};this.setSpreadState=function(n){Ob=n};this.isSpreadState=function(){return Ob};this.getMetricItems=function(){return Qb};this.fromJsonObject=function(n){N.setModelId(n.modelId);N.setNumber(n.number);N.setModelSetId(n.modelSetId);N.setGroupId(n.groupId);N.setModelName(n.modelName);N.setModelType(n.modelType);N.setDesc(n.desc);var X=n.creatorId===Q.PresetID;N.setCreator(n.creator);N.setCreateTime(n.createTime);
N.setDisplayCreateTime(n.displayCreateTime);N.setModifier(X?"":n.modifier);N.setModifyTime(X?null:n.modifyTime);N.setDisplayModifyTime(X?null:n.displayModifyTime);N.setDeployed(n.deployed);N.setLockUserName(X?"":n.lockUserName);if(n=n.metricsList)for(X=0;X<n.length;X++){var L=n[X],ha=new ua;ha.fromJsonObject(L);L=new la;L.setMetric(ha);L.setModelId(E);L.setModelName(aa);Qb.push(L)}};this.toJsonObject=function(){var n={};n.modelId=E;n.number=H;n.modelSetId=m;n.groupId=R;n.modelName=aa;n.modelType=
Z;n.desc=ya;n.creator=mb;n.createTime=qb;n.displayCreateTime=fa;n.modifier=eb;n.modifyTime=b;n.displayModifyTime=Mb;n.deployed=nb;n.selected=oa;n.lockUserName=ea;return n}}function ua(){var N,E,H;this.setId=function(m){N=m};this.getId=function(){return N};this.setName=function(m){E=m};this.getName=function(){return E};this.setDesc=function(m){H=m};this.getDesc=function(){return H};this.fromJsonObject=function(m){N=m.id;E=m.name;H=m.desc}}function la(){var N,E,H,m,R=!1;this.setMetric=function(aa){N=
aa};this.getMetric=function(){return N};this.getId=function(){return N.getId()};this.setModelId=function(aa){E=aa};this.getModelId=function(){return E};this.setNumber=function(aa){H=aa};this.getNumber=function(){return H};this.setModelName=function(aa){m=aa};this.getModelName=function(){return m};this.getName=function(){return N.getName()};this.getModelType=function(){return null};this.getLockUserName=function(){return null};this.getDesc=function(){return N.getDesc()};this.getCreator=function(){return null};
this.getCreateTime=function(){return null};this.getModifier=function(){return null};this.getModifyTime=function(){return null};this.getDeployed=function(){return null};this.setSpreadState=function(aa){R=aa};this.isSpreadState=function(){return R}}function wa(){var N=this,E,H,m=[],R=[],aa=[],Z=[];this.setSuccess=function(ea){E=ea};this.isSuccess=function(){return E};this.setCode=function(ea){H=ea};this.getCode=function(){return H};this.getArrModelCheckPrompts=function(){return m};this.getArrLockCheckPrompts=
function(){return R};this.getArrModelDeletePrompts=function(){return aa};this.getArrSimplePrompts=function(){return Z};this.fromJsonObject=function(ea){N.setSuccess(ea.success);N.setCode(ea.code);if(ea.prompts){var ya=ea.prompts[Da.MODEL_CHECK],mb=ea.prompts[Da.LOCK_CHECK],qb=ea.prompts[Da.MODEL_DELETE];if(ya&&0<ya.length)for(var fa=0;fa<ya.length;fa++){var eb=new Da;eb.fromJsonObject(ya[fa]);m.push(eb)}if(mb&&0<mb.length)for(fa=0;fa<mb.length;fa++)eb=new Da,eb.fromJsonObject(mb[fa]),R.push(eb);if(qb&&
0<qb.length)for(fa=0;fa<qb.length;fa++)eb=new Da,eb.fromJsonObject(qb[fa]),aa.push(eb)}if(ea.simplePrompts&&(ea=ea.simplePrompts)&&0<ea.length)for(fa=0;fa<ea.length;fa++)eb=new Da,eb.fromJsonObject(ea[fa]),Z.push(eb)}}function Da(){var N=this,E,H,m,R,aa,Z;this.setModelId=function(ea){E=ea};this.getModelId=function(){return E};this.setModelName=function(ea){H=ea};this.getModelName=function(){return H};this.setPromptCode=function(ea){aa=ea};this.getPromptCode=function(){return aa};this.setPath=function(ea){m=
ea};this.getPath=function(){return m};this.setLockUserName=function(ea){R=ea};this.getLockUserName=function(){return R};this.setArrPrompts=function(ea){Z=ea};this.getArrPrompts=function(){return Z};this.getPromptStr=function(ea,ya){var mb="";if(Z)for(var qb=0;qb<Z.length;qb++)ya&&(mb+=qb+1),ya&&(mb+="\u3001"),mb+=Z[qb],mb+="\uff1b",ea&&(mb+="\r\n");return mb};this.fromJsonObject=function(ea){N.setModelId(ea.modelId);N.setModelName(ea.modelName);N.setPath(ea.path);N.setLockUserName(ea.lockUserName);
N.setPromptCode(ea.PromptCode);N.setArrPrompts(ea.invalidPrompt)}}function Na(){var N,E,H,m=!1,R=!1,aa;this.setId=function(Z){aa=Z};this.getId=function(){return aa};this.setMatch=function(Z){m=Z};this.getMatch=function(){return m};this.setName=function(Z){N=Z};this.getName=function(){return N};this.setDisplayName=function(Z){E=Z};this.getDisplayName=function(){return E};this.setParentNode=function(Z){H=Z};this.getParentNode=function(){return H};this.setChecked=function(Z){R=Z};this.isChecked=function(){return R};
this.check=function(Z){};this.getSubNodeLevel=function(){for(var Z=-1,ea=H;ea;)Z++,ea=ea.getParentNode();return Z}}function sb(){Na.call(this);var N=this,E=[],H=!0;this.setChildren=function(m){E=m};this.getChildren=function(){return E};this.setExpanded=function(m){H=m};this.isExpanded=function(){return H};this.check=function(m,R){if(0!==E.length&&m!==N.isChecked()){N.setChecked(m);for(var aa=0;aa<E.length;aa++)E[aa].check(m,R)}};this.toJsonObject=function(){var m={};m.children=E;return m};this.fromJsonObject=
function(m,R){N.setName(m.name);N.setDisplayName(m.displayName);N.setId(m.id);if(m=m.children)for(var aa=0;aa<m.length;aa++){var Z=m[aa];if(Z.type){var ea=new Aa;ea.fromJsonObject(Z);ea.setParentNode(N);E.push(ea);R&&ea.setCommentInfo(R)}else ea=new sb,ea.fromJsonObject(Z),ea.setParentNode(N),E.push(ea)}}}function Aa(){Na.call(this);var N=this,E,H,m,R;this.setUserSql=function(aa){R=aa};this.getUserSql=function(){return R};this.setCommentInfo=function(aa){H=aa};this.getCommentInfo=function(){return H};
this.setType=function(aa){E=aa};this.getType=function(){return E};this.setErrorMessage=function(aa){m=aa};this.getErrorMessage=function(){return m};this.fromJsonObject=function(aa){N.setType(aa.type);N.setName(aa.name);N.setDisplayName(aa.displayName);N.setCommentInfo(aa.commentInfo);N.setId(aa.id)};this.check=function(aa,Z){aa!==N.isChecked()&&(N.setChecked(aa),Z&&Z(N.getParentNode()))}}"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.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage&&(com.kingdee.bos.qing.modeler.mainpage={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage.model&&(com.kingdee.bos.qing.modeler.mainpage.model={});var pa=com.kingdee.bos.qing.modeler.mainpage.model;pa.ModelGroup=function(){var N=this,E,H,m,R,aa;this.setModelGroupId=
function(Z){E=Z};this.getModelGroupId=function(){return E};this.setModelSetId=function(Z){H=Z};this.getModelSetId=function(){return H};this.setModelGroupName=function(Z){m=Z};this.getModelGroupName=function(){return m};this.setParentId=function(Z){R=Z};this.getParentId=function(){return R};this.setSeq=function(Z){aa=Z};this.getSeq=function(){return aa};this.fromJsonObject=function(Z){N.setModelGroupId(Z.modelGroupId);N.setModelSetId(Z.modelSetId);N.setModelGroupName(Z.modelGroupName);N.setParentId(Z.parentId);
N.setSeq(Z.seq)};this.toJsonObject=function(){var Z={};Z.modelGroupId=E;Z.modelSetId=H;Z.modelGroupName=m;Z.parentId=R;Z.seq=aa;return Z}};pa.Model=Q;pa.DeployResponse=wa;pa.DeployPrompt=Da;pa.MetricItem=la;pa.DeployFolderNode=sb;pa.DeployLeafNode=Aa;var Ya=com.kingdee.bos.qing.framework.common.MultilanguageManager.createPackageAccessor(pa);Q.createInstance=function(N){if(N){var E=new Q;E.fromJsonObject(N);return E}};Q.PresetID="100000";pa.ModelDeployStatus=new function(){this.deployStatusTransformText=
function(N){switch(N){case pa.ModelDeployStatus.NONE_DEPLOYED:return Ya.get("notDeployed","\u672a\u90e8\u7f72");case pa.ModelDeployStatus.DEPLOYED:return Ya.get("deployed","\u5df2\u90e8\u7f72");case pa.ModelDeployStatus.DEPLOYED_UPDATE:return Ya.get("deployedUpdate","\u90e8\u7f72\u540e\u66f4\u6539")}return null}};pa.ModelDeployStatus.NONE_DEPLOYED="0";pa.ModelDeployStatus.DEPLOYED="1";pa.ModelDeployStatus.DEPLOYED_UPDATE="2";wa.FAILED_MODEL_CHECK=1;wa.FAILED_LOCK_CHECK=2;wa.FAILED_MODEL_LOCK_CHECK=
wa.FAILED_MODEL_CHECK|wa.FAILED_LOCK_CHECK;wa.FAILED_MODEL_DELETE=4;wa.FAILED_MODEL_LOCK_DELETE=wa.FAILED_MODEL_DELETE|wa.FAILED_MODEL_CHECK;wa.FAILED_MODEL_DELETE_CHECK=wa.FAILED_MODEL_DELETE|wa.FAILED_LOCK_CHECK;wa.FAILED_MODEL_LOCK_DELETE_CHECK=wa.FAILED_MODEL_CHECK|wa.FAILED_LOCK_CHECK|wa.FAILED_MODEL_DELETE;Da.MODEL_CHECK=1;Da.LOCK_CHECK=2;Da.MODEL_DELETE=4})();(function(){function Q(){sb.call(this);var pa;this.getRemoteUrl=function(){return pa};this.setRemoteUrl=function(Ya){pa=Ya}}"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.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage&&(com.kingdee.bos.qing.modeler.mainpage=
{});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage.common&&(com.kingdee.bos.qing.modeler.mainpage.common={});var ua=com.kingdee.bos.qing.modeler.mainpage.common;ua.Facade=function(pa,Ya,N,E){wa.call(this,pa,Ya,N,E);var H=this.protectedMethod;this.listAllGroupAndModel=function(m){H.remote("listAllGroupAndModel",{modelSetId:m})};this.createModelGroup=function(m){m={modelGroup:JSON.stringify(m.toJsonObject())};H.remote("createModelGroup",m)};this.editModelGroup=function(m){m={modelGroup:JSON.stringify(m.toJsonObject())};
H.remote("editModelGroup",m)};this.deleteModelGroup=function(m,R){H.remote("deleteModelGroup",{modelSetId:m,modelGroupId:R})};this.updateGroupSequence=function(m){m={modelGroupList:JSON.stringify(m)};H.remote("updateGroupSequence",m)};this.listGroupAllModel=function(m,R){H.remote("listGroupAllModel",{modelSetId:m,targetGroupId:R})};this.listAllModels=function(){H.remote("listAllModels",{})};this.createModel=function(m,R){m={fromPageClientId:R,model:JSON.stringify(m.toJsonObject())};H.remote("createModel",
m)};this.editModel=function(m){m={model:JSON.stringify(m.toJsonObject())};H.remote("editModel",m)};this.checkModelReferRelation=function(m,R){m={modelSetId:m,modelList:JSON.stringify(R)};H.remote("checkModelReferRelation",m)};this.deleteModel=function(m,R,aa){m={modelSetId:m,fromPageClientId:aa,modelList:JSON.stringify(R)};H.remote("deleteModel",m)};this.copyModel=function(m,R,aa,Z,ea){H.remote("copyModel",{modelId:m,modelSetId:R,number:aa,copyModelName:Z,targetGroupId:ea})};this.moveModel=function(m,
R,aa){m={modelSetId:m,modelList:JSON.stringify(R),targetGroupId:aa};H.remote("moveModel",m)};this.getAllModelGroupAndModelForExport=function(m){H.remote("getAllModelGroupAndModelForExport",{modelSetId:m})};this.confirmExportModelAndGroup=function(m,R){m={modelSetId:m,modelList:JSON.stringify(R.modelList)};H.remote("confirmExportModelAndGroup",m)};this.getExportedData=function(m){var R=la.formatDate("yyyyMMdd_HHmmss");Na.downloadFile("Qing-"+R+".qing-md",m)};this.getEnableImportModelAndGroup=function(m){H.remote("getEnableImportModelAndGroup",
{fileName:m})};this.importSelectedModel=function(m,R,aa,Z,ea,ya,mb){m={modelSetId:m,fileName:aa,modelList:JSON.stringify({importModels:Z}),sourceStrategy:ea,firstTimeImport:ya,cacheIdKey:mb,paramPathPrefix:R};H.remote("importSelectedModel",m)};this.handleConflictForImportModel=function(m,R){m={fileName:m,ModelList:JSON.stringify({exportThemes:R})};H.remote("handleConflictForImportModel",m)};this.isCurrentUserInQingAdminRole=function(){H.remote("isCurrentUserInQingAdminRole",{})};this.firstTimeCreateModel=
function(m,R){m={modelGroup:JSON.stringify(m.toJsonObject()),model:JSON.stringify(R.toJsonObject())};H.remote("firstTimeCreateModel",m)};this.loadDeployModelerForUserOperation=function(m){m={modelIds:JSON.stringify(m)};H.remote("loadDeployModelerForUserOperation",m)};this.listUnDeployGroupAndModel=function(m){H.remote("listUnDeployGroupAndModel",{modelSetId:m})};this.deployModel=function(m,R,aa){m={modelSetId:m,desc:R,modelIds:JSON.stringify(aa)};H.remote("deployModel",m)};this.loadRefDeployModelIds=
function(m){H.remote("loadRefDeployModelIds",{modelId:m})};this.batchLoadRefDeployModelIds=function(m){m={modelIds:JSON.stringify(m)};H.remote("batchLoadRefDeployModelIds",m)};this.needDeployRefModel=function(m){H.remote("needDeployRefModel",{modelId:m})};this.loadNeedDeployRefModel=function(m){H.remote("loadNeedDeployRefModel",{modelId:m})};this.deployModelForModelSetSource=function(m,R,aa,Z){m={modelId:R,modelSetId:m,desc:aa,needDeployModelIds:JSON.stringify(Z)};H.remote("deployModelForModelSetSource",
m)};this.checkModelIsExist=function(m){H.remote("checkModelIsExist",{modelId:m})};this.checkModelSetIsExist=function(m){H.remote("checkModelSetIsExist",{modelSetId:m})};this.loadModelerInfo=function(m){H.remote("loadModelerInfo",{modelId:m})};this.checkModelCycleReference=function(m){H.remote("checkModelCycleReference",{modelId:m})};this.batchCheckModelCycleReference=function(m){m={modelIds:JSON.stringify(m)};H.remote("batchCheckModelCycleReference",m)};this.getDataSysVars=function(){H.remote("getDataSysVars",
{})}};ua.RemoteImpl=Q;var la,wa,Da,Na,sb;(function(){var pa=com.kingdee.bos.qing.common;la=pa.Util;pa=com.kingdee.bos.qing.framework.common;wa=pa.AbstractFacade;Da=pa.AbstractIcons;sb=pa.AbstractRemoteCall;Na=pa.RemoteFramework;pa.MultilanguageManager.createPackageAccessor(ua)})();ua.MyIcons=new function(){Da.call(this);var pa=this.protectedMethod;this.protectedInit=function(H,m){H=com.kingdee.bos.qing.modeler.modelset.ComboIcon;if(!H)throw Error("com.kingdee.bos.qing.modeler.modelset.ComboIcon not found.");
H.define(m,"create-right-arrows.svg");E(0,0,"create-right-arrows");H.define(m,"btn-down-arrows.svg");E(0,0,"btn-down-arrows");H.define(m,"model-common");m.setGap(1);m.setStartPosition(-3,-1);m.setIconSize(64,64);E(0,3,"metric-model-icon");E(0,2,"data-table-model-icon");E(0,1,"entity-model-icon");E(0,0,"relation-model-icon");m.setGap(1);m.setStartPosition(0,116);m.setIconSize(16,16);E(0,0,"add-on");m.setStartPosition(104,285);m.setIconSize(16,16);N(0,0,"add_subDir");N(0,1,"add_dir");N(0,2,"move_up");
N(0,3,"move_down");m.setGap(1);m.setStartPosition(0,117);m.setIconSize(16,16);Ya(0,0,"add");Ya(0,1,"btn-delete");Ya(0,2,"btn-edit");Ya(0,5,"preview");m.setGap(1);m.setStartPosition(4,0);m.setIconSize(16,16);E(6,4,"model-group-item-header-expand");m.setStartPosition(4,-3);E(5,4,"model-group-item-header-expand-ed");m.setStartPosition(4,-5);E(5,0,"icon-expanded");E(6,0,"icon-expanded_hover");m.setStartPosition(6,-5);E(5,1,"icon-collapsed");E(6,1,"icon-collapsed_hover");m.setGap(1);m.setStartPosition(9,
-3);m.setIconSize(16,16);E(5,5,"data-table-model-icon-small");m.setStartPosition(12,-3);E(5,6,"relation-model-icon-small");m.setStartPosition(11,-3);E(5,7,"entity-model-icon-small");E(5,8,"metric-model-icon-small");E(5,9,"metric-icon-small");m.setStartPosition(108,105);m.setIconSize(48,48);E(0,2,"data-table-model-icon-medium");E(0,0,"relation-model-icon-medium");E(0,1,"entity-model-icon-medium");E(0,3,"metric-model-icon-medium");m.setStartPosition(170,152);m.setIconSize(36,36);E(0,2,"data-table-model-icon-tips");
E(0,0,"relation-model-icon-tips");E(0,1,"entity-model-icon-tips");E(0,3,"metric-model-icon-tips");m.setStartPosition(171,188);m.setIconSize(24,24);E(0,0,"relation-model-icon-middle");E(0,1,"entity-model-icon-middle");E(0,2,"data-table-model-icon-middle");E(0,3,"metric-model-icon-middle");m.setStartPosition(0,151);m.setIconSize(170,98);E(0,0,"icon-empty");m.setStartPosition(56,337);m.setIconSize(50,50);E(0,0,"icon-preset-big");m.setStartPosition(0,0);m.setIconSize(20,20);H.define(m,"card-view.svg");
E(0,0,"card-view");H.define(m,"card-view-click.svg");E(0,0,"card-view-on");H.define(m,"list-view.svg");E(0,0,"list-view");H.define(m,"list-view-click.svg");E(0,0,"list-view-on");m.setStartPosition(1,1);m.setIconSize(16,16);E(0,0,"icon_search");E(0,1,"icon_search_hover");m.setStartPosition(0,0);m.setIconSize(168,96);H.define(m,"msg-success.png");E(0,0,"msg-success");H.define(m,"deploy");m.setGap(1);m.setStartPosition(1,72);m.setIconSize(14,14);E(0,0,"delete_small")};var Ya=function(H,m,R){E(H+1,m,
R);E(H,m,R+"_hover")},N=function(H,m,R){E(H,m,R);E(H+1,m,R+"_hover")},E=function(H,m,R){pa.registIcon(H,m,R)}};ua.Integration=new function(){var pa=new Q,Ya,N,E,H,m,R,aa,Z,ea;this.setParamPathPrefix=function(ya){Ya=ya};this.getParamPathPrefix=function(){return Ya};this.getRemoteImpl=function(){return pa};this.setRemoteUrl=function(ya){pa.setRemoteUrl(ya)};this.setModelDesignerEntrance=function(ya){N=ya};this.getModelDesignerEntrance=function(){return N};this.setDataSourceManageEntrance=function(ya){E=
ya};this.getDataSourceManageEntrance=function(){return E};this.setDeployEntrance=function(ya){H=ya};this.getDeployEntrance=function(){return H};this.setBatchDeployEntrance=function(ya){m=ya};this.getBatchDeployEntrance=function(){return m};this.setDeployManageEntrance=function(ya){Z=ya};this.getDeployManageEntrance=function(){return Z};this.setDataAuthorityEntrance=function(ya){ea=ya};this.getDataAuthorityEntrance=function(){return ea};this.setFunGetDeployRemoteImpl=function(ya){R=ya};this.getFunGetDeployRemoteImpl=
function(){return R};this.setFunGetDesignerRemoteImpl=function(ya){aa=ya};this.getFunGetDesignerRemoteImpl=function(){return aa()}};var Aa=new function(){var pa;this.hookCollector=function(Ya){pa=Ya};this.occur=function(Ya,N){try{pa&&pa(Ya,N)}catch(E){window.console&&console.warn(E)}};this.getModelType=function(Ya){var N=com.kingdee.bos.qing.modeler.common.model.ModelType;switch(Ya){case N.DATA_TABLE_MODEL:return Aa.MODELTYPE_DATATABLE;case N.ENTITY_MODEL:return Aa.MODELTYPE_ENTIY;case N.RELATION_MODEL:return Aa.MODELTYPE_RELATION;
case N.METRICS_MODEL:return Aa.MODELTYPE_METRICS}};this.getModelShowMethod=function(Ya){return Ya?Aa.MODEL_SHOW_METHOD_LIST:Aa.MODEL_SHOW_METHOD_CARD};this.getEnterDataAuthManege=function(Ya){return Ya?Aa.ENTER_DATA_AUTH_MANAGE_MAIN_PAGE:Aa.ENTER_DATA_AUTH_MANAGE_AFTER_DEPLOY};this.getContainChildrenStatus=function(Ya){return Ya?Aa.CONTAIN:Aa.NOT_CONTAIN}};Aa.MODEL_TYPE="model-type";Aa.MODEL_SHOW_METHOD="model-show-method";Aa.DEPLOY_METHOD="deploy-method";Aa.ENTER_DATA_AUTH_MANAGE="enter-data-auth-manage";
Aa.MODEL_GROUP_LEVEL="model-group-level";Aa.CONTAIN_CHILDREN_MODEL_GROUP="contain-children-model-group";Aa.BUTTON_TYPE="button-type";Aa.DATATABLE_MODEL_TRANSFORM_NODE_TYPE="datatable-model-transform-node-type";Aa.MODELTYPE_DATATABLE="\u6570\u636e\u8868\u6a21\u578b";Aa.MODELTYPE_ENTIY="\u5b9e\u4f53\u6a21\u578b";Aa.MODELTYPE_RELATION="\u5173\u7cfb\u6a21\u578b";Aa.MODELTYPE_METRICS="\u6307\u6807\u6a21\u578b";Aa.MODEL_SHOW_METHOD_LIST="\u5217\u8868";Aa.MODEL_SHOW_METHOD_CARD="\u5361\u7247";Aa.DEPLOY_METHOD_SINGLE=
"\u5355\u4e2a\u90e8\u7f72";Aa.DEPLOY_METHOD_BATCH="\u6279\u91cf\u90e8\u7f72";Aa.ENTER_DATA_AUTH_MANAGE_AFTER_DEPLOY="\u6210\u529f\u90e8\u7f72\u540e\u70b9\u51fb\u8df3\u8f6c\u8fdb\u5165";Aa.ENTER_DATA_AUTH_MANAGE_MAIN_PAGE="\u901a\u8fc7\u4e3b\u754c\u9762\u6570\u636e\u6743\u9650\u6309\u94ae\u8fdb\u5165";Aa.CONTAIN="\u52fe\u9009";Aa.NOT_CONTAIN="\u4e0d\u52fe\u9009";Aa.DELETE="\u5220\u9664";Aa.REFRESH="\u5237\u65b0";Aa.MOVE="\u79fb\u52a8";Aa.COPY="\u590d\u5236";Aa.IMPORT="\u5bfc\u5165";Aa.EXPORT="\u5bfc\u51fa";
Aa.DEPLOY_MANAGE="\u90e8\u7f72\u7ba1\u7406";Aa.SOURCE_MANAGE="\u6570\u636e\u6e90\u7ba1\u7406";ua.UserOperationReporter=Aa})();(function(){function Q(){qb.call(this);var n=this,X=this.protectedMethod,L,ha,S,ca,C,T,V,W;this.setGlobal=function(xa){L=xa};this.setRootNode=function(xa){S=xa};this.setModelSetId=function(xa){V=xa};this.setSelectModelIds=function(xa){W=xa};this.setMessageCurtain=function(xa){ca=xa};this.showExportDialog=function(){n.setSize(640,480);n.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);X.setTitle(fa.get("exportModel","\u5bfc\u51fa\u6a21\u578b"));X.setContentPaneCreator(P);X.setClosingChecker(n.isValidToAccepted,
!0);X.setClosingAction(ra);n.showDialog()};var ra=function(xa){if(xa){xa=ha.getCheckedModelNodes();var na={},Ha=[];for(i=0;i<xa.length;i++)Ha.push(xa[i].getId());na[Q.MODEL_LIST]=Ha;Ia(na)}},P=function(){var xa=$("<div>"),na=xa.append;C=new mb;C.addSearchListener(va);C.setSearchListenerDelay(400);C.setPlaceholder(fa.get("searchModelOrNumber","\u641c\u7d22\u6a21\u578b\u540d\u79f0/\u7f16\u7801"));C.setShowSearchIcon(!0);var Ha=C.getJqUi();Ha.addClass("model-imexport-search-box");na.call(xa,Ha);na=W&&
0<W.length;Ha=xa.append;var La=new Mb;La.setChecked(na);La.addCheckedListener(bb);La.setText(fa.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));La=La.getJqUi();La.addClass("model-export-show-only-checked-box");eb.layoutCtrl(La,250,2,200,23);Ha.call(xa,La);Qa();ha=new ua(S);Ha=ha.getJqUi();xa.append(Ha);na&&(ha.setShowOnlyChecked(!0),ha.searchKey(T));return xa},Za=function(){for(var xa=[].concat(W),na=function(La,xb){if(La instanceof pa){var sa=La.getChildren();if(sa&&0<sa.length)for(La=
0;La<sa.length;La++)na(sa[La],xb)}else if(La.getId()===xb&&(xb=La.getRelativeIds())&&0<xb.length)for(La=0;La<xb.length;La++)sa=xb[La],-1===xa.indexOf(sa)&&(xa.push(sa),na(S,sa))},Ha=0;Ha<W.length;Ha++)na(S,W[Ha]);W=xa},Qa=function(){if(W&&0!==W.length){Za();var xa=function(na){if(na instanceof pa){if((na=na.getChildren())&&0<na.length)for(var Ha=0;Ha<na.length;Ha++)xa(na[Ha])}else for(Ha=0;Ha<W.length;Ha++)if(na.getId()===W[Ha]){na.setChecked(!0);break}};xa(S)}},va=function(xa){T=C.getText().trim();
ha.searchKey(T)},bb=function(xa,na){na&&(ha.setShowOnlyChecked(xa.isChecked()),ha.searchKey(T))};this.isValidToAccepted=function(xa){0===ha.getCheckedModelNodes().length?(X.getMessageCurtain().showPrompt(fa.get("selectNone","\u672a\u9009\u4e2d\u6a21\u578b\u3002")),xa(!1)):xa(!0)};var Ia=function(xa){L.createFacade(function(na){L.createFacade().getExportedData(na)},function(na,Ha){return 20009002===na?(ca.showPrompt(fa.get("publicSourceException","\u5bfc\u51fa\u5931\u8d25\uff0c\u516c\u5171\u6570\u636e\u6e90\u5f02\u5e38\u3002"),
2E3),!0):20009001===na?(ca.showPrompt(fa.get("invalidPermissionException","\u6743\u9650\u68c0\u67e5\u5931\u8d25\u3002"),2E3),!0):20009008===na?(na=fa.get("exportModelCorruptionException","\u5bfc\u51fa\u6a21\u578b\u201c#1\u201d\u5931\u8d25\uff0c\u6a21\u578b\u6570\u636e\u635f\u574f\u6216\u6570\u636e\u7248\u672c\u4e0d\u517c\u5bb9\u3002").replace("#1",Ha),ca.showPrompt(na,2E3),!0):!1}).confirmExportModelAndGroup(V,xa)}}function ua(n){function X(){KTDefaultCellRender.call(this,P);var ma=this;this.paintCellUI=
function(ia,B){var ja=ma.getCurrentRow().getUserObject(),cb=ja.getName();ia=$("<div>");ia.addClass("model-export-area-list-item");var Ma=new Mb,tb=Ma.getJqUi(),rb=$("<div>");tb.addClass("model-export-area-list-item-checkbox");rb.addClass("model-export-area-list-item-text");ia.append(tb);ia.append(rb);Ma.setChecked(ja.isChecked());Ma.setUserObject(ja);Ma.addCheckedListener(xb);W[ja.getId()]=Ma;ja instanceof pa?rb.text(cb):(Y(rb,ra,cb),cb=$("<span>"),cb.css("color","#c0c0c0"),cb.text(" ("),Ma=$("<span>"),
Ma.css("color","#c0c0c0"),Ma.text(")"),tb=$("<span>"),Y(tb,ra,ja.getNumber(),"#c0c0c0"),cb.appendTo(rb),tb.appendTo(rb),Ma.appendTo(rb));ja instanceof pa||(rb.addClass("model-export-model-name-label"),ia.append(Qb.createIcon(ja.getModelType(),"model-export-model-icon")));B?(B=$(B),B.css("overflow","visible"),ia.appendTo(B)):ia.appendTo(jqDiv);eb.layoutCtrlWithLRTB(ia,0,0,null,0,0,null)};var Y=function(ia,B,ja,cb){if(B&&ja){B=B.toUpperCase();var Ma=ja.toUpperCase(),tb=Ma.split(B),rb=B.length,Gb;for(Gb in tb){var ob=
Ma.indexOf(tb[Gb]),Ta=ja.substr(Db,tb[Gb].length);ob+=tb[Gb].length;var pb=Ma.length-ob;Ma=Ma.substr(ob,pb);ja=ja.substr(ob,pb);ob=$("<span>");ob.text(Ta);cb&&ob.css("color",cb);ob.appendTo(ia);if(Gb!==tb.length-1&&1<tb.length){var Db=Ma.indexOf(B);Ta=ja.substr(Db,rb);ob=Db+rb;pb=Ma.length-ob;Ma=Ma.substr(ob,pb);ja=ja.substr(ob,pb);ob=$("<span>");ob.text(Ta);ob.css("color","red");ob.clone().appendTo(ia)}}}else ia.text(ja),cb&&ia.css("color",cb)}}var L=this,ha,S=[],ca=[],C=[],T=!1,V=!1,W,ra,P,Za,Qa,
va;this.setShowOnlyChecked=function(ma){V=ma};this.getCheckedModelNodes=function(){var ma,Y=[];for(ma=0;ma<C.length;ma++){var ia=C[ma];ia.isChecked()&&Y.push(ia)}return Y};this.getJqUi=function(){if(!ha){bb();for(var ma=0;ma<C.length;ma++){var Y=C[ma],ia=Y.getRelativeIds();if(ia&&0<ia.length){for(var B=[],ja=0;ja<ia.length;ja++)for(var cb=ia[ja],Ma=0;Ma<C.length;Ma++){var tb=C[Ma];cb===tb.getId()&&B.push(tb)}Y.setRelativeNodes(B)}}ha=$("<div>");ha.addClass("model-export-area");ha.addClass("model-export-tree-selection-area");
Qa=$("<div>");Qa.addClass("model-export-tree-selection-area-checked-prompt");Qa.css("color","#666");eb.layoutCtrlWithLRTB(Qa,0,null,200,0,null,23);Qa.prependTo(ha);Za=Ia();ha.append(Za);Ha();La()}return ha};var bb=function(){var ma=function(B){S.push(B);if(B instanceof N||B instanceof E||B instanceof H||B instanceof m)C.push(B);else if(ca.push(B),(B=B.getChildren())&&0<B.length)for(var ja=0;ja<B.length;ja++)ma(B[ja])},Y=n.getChildren();if(Y&&0<Y.length)for(var ia=0;ia<Y.length;ia++)ma(Y[ia])},Ia=
function(){P=new KTable;var ma=$(P.getUI());ma.children().css("overflow-x","hidden");var Y=new X;P.setCellRender(Y);P.setSyncUIWhenModelChanged(!1);P.addTreeExpandListener(xa);P.addColumn().setWidth(400);eb.layoutCtrlWithLRTB(ma,0,0,null,23,0,null);return ma},xa=function(ma,Y){(ma=P.getRow(Y.getRowIdx()).getUserObject())&&ma.setExpanded(Y.isExpanded())};this.searchKey=function(ma){var Y;ra=ma;T=!!ra;for(Y=0;Y<C.length;Y++){var ia=C[Y];var B=ia.isChecked();if(ma){var ja=ia.getName();ia.getNumber&&
(ja+=ia.getNumber());ja=-1<ja.toUpperCase().indexOf(ra.toUpperCase());B=V?ja&&B:ja}else B=V?ia.isChecked():!0;ia.setVisible(B)}L.updateUi()};var na=function(){var ma=function(Y){var ia=!0,B=!1;if(Y instanceof pa){var ja=Y.getChildren();if(ja&&0<ja.length)for(var cb=0;cb<ja.length;cb++){var Ma=ja[cb];ma(Ma);Ma.isVisible()&&(ia=ia&&Ma.isChecked());B=B||Ma.isVisible()}}else ia=ia&&Y.isChecked(),B=B||Y.isVisible();Y.setVisible(B);Y.setChecked(ia)};ma(n)};this.updateUi=function(){for(var ma=!1,Y=0;Y<C.length;Y++)ma=
ma||C[Y].isVisible();ma?(va&&va.hide(),Za&&Za.remove(),Za=Ia(),ha.append(Za),Ha()):(va||(va=$("<div>"),(new Ob).getJqUi().appendTo(va),ha.append(va)),va.show(),Za.hide())};var Ha=function(){na();W={};for(var ma=0;ma<S.length;ma++){var Y=S[ma];if(Y.isVisible()){var ia=b.createRow(P,!1),B=ia.getCell(0),ja=Y.getSubNodeLevel();ja=new KTCellTreeModel(ja);ia.setHeight(23);ia.setUserObject(Y);Y instanceof pa?(Y=T?!0:Y.isExpanded(),ja.setExpanded(Y)):(Y=Y.getParentNode(),Y=T?!0:Y.isExpanded(),ia.setHide(!Y));
B.setTreeModel(ja)}}P.updateUI()},La=function(){for(var ma=0,Y=0;Y<C.length;Y++)C[Y].isChecked()&&ma++;ma=fa.get("checkedNumberPrompt","(\u5df2\u9009\u62e9 #1 \u9879)").replace("#1",ma);Qa.text(ma)},xb=function(ma,Y){if(Y){ma.getUserObject().check(ma.isChecked(),sa);for(ma=0;ma<S.length;ma++)if(Y=S[ma],Y.isVisible()){var ia=W[Y.getId()];ia&&ia.setChecked(Y.isChecked())}La()}},sa=function(ma){for(var Y=!0,ia=ma.getChildren(),B=0;B<ia.length;B++){var ja=ia[B];ja.isVisible()&&(Y=Y&&ja.isChecked())}ma.setChecked(Y);
(ma=ma.getParentNode())&&sa(ma)}}function la(){function n(S){KTDefaultCellRender.call(this,S);var ca=this,C=this.paintCellUI;this.paintCellUI=function(V,W){if(ca.getCurrentRowIdx()<b.getHeadRowCount())C(V,W);else if($(V),2===ca.getCurrentColIdx())T(V,ca.getCellWidth(),ca.getCellHeight(),ca.getCurrentRow());else if(1===ca.getCurrentColIdx()){var ra=ca.getCurrentRow();W=$("<div>");var P=$("<div>");W.addClass("model-export-conflict-item-text");ra=ra.getUserObject();W.addClass("model-export-conflict-model-name-label");
W.text(ra.modelName);P.append(Qb.createIcon(ra.modelType,"model-export-conflict-model-icon"));P.append(W);P.appendTo(V)}else C(V,W)};var T=function(V,W,ra,P){V=b.createCtrlInCell(V,W,ra,ea);V.setSelected(P.getUserObject().strategy);V.setItemModels(la.ALL_CONFLICTTYPE);V.setUserObject(P);V.setCustomPainter(function(Za,Qa,va){switch(va){case la.ALL_CONFLICTTYPE[0]:Za=fa.get("ignore","\u5ffd\u7565");break;case la.ALL_CONFLICTTYPE[1]:Za=fa.get("overwrite","\u8986\u76d6");break;case la.ALL_CONFLICTTYPE[2]:Za=
fa.get("rename","\u91cd\u547d\u540d");break;default:Za=""}va=$("<div>");va.text(Za);va.appendTo(Qa)});V.addSelectedChangedListener(function(Za,Qa,va){Za.getUserObject().getUserObject().strategy=va})}}var X=this,L,ha;this.getConflictModelList=function(){return ha};this.getJqUi=function(S){L=b.createTable();b.bindTableListenerForCtrl(L);var ca=new n(L);ca.setOutsideVisible(!1);L.setCellRender(ca);L.addColumns(3);L.getColumn(0).setWidth(100);L.getColumn(1).setWidth(260);L.getColumn(2).setWidth(180);
ca=b.createHeadRow(L);ca.getCell(0).setValue(fa.get("groupName","\u6a21\u578b\u76ee\u5f55"));ca.getCell(1).setValue(fa.get("modelName","\u6a21\u578b\u540d\u79f0"));ca.getCell(2).setValue(fa.get("strategy","\u5904\u7406\u7b56\u7565"));ha=S;for(var C in S)ha[C].strategy=la.ALL_CONFLICTTYPE[2];X.updateUi(S);b.refresh(L);S=$(L.getUI());S.addClass("model-import-selection-table");return S};this.updateUi=function(S){b.clearWithoutHead(L);b.refresh(L);for(var ca,C=0;C<S.length;C++){var T=S[C];ca=b.createRow(L);
ca.setUserObject(T);ca.getCell(0).setValue(T.groupName);ca.getCell(1).setValue(T.modelName);ca.getCell(2).setValue(T.strategy)}b.refresh(L)};this.refresh=function(){b.refresh(L)}}function wa(n){qb.call(this);var X=this,L=this.protectedMethod,ha=[],S,ca,C,T,V,W,ra;this.setGlobal=function(Ia){S=Ia};this.setFunRefreshModelGroup=function(Ia){C=Ia};this.setModelSetId=function(Ia){ra=Ia};this.addConfirmListener=function(Ia){ha.push(Ia)};this.createUi=function(Ia,xa){X.setSize(640,480);X.setPosition(window.innerWidth-
640>>1,window.innerHeight-480>>1);L.setTitle(fa.get("importModel","\u5bfc\u5165\u6a21\u578b"));L.setContentPaneCreator(function(){var na=$("<div>");na.append(P());na.append(Qa());ca=new ua(xa);var Ha=ca.getJqUi();Ha.addClass("model-export-tree-selection-area");na.append(Ha);Ha=$("<div>");com.kingdee.bos.qing.common.DomUtil.layoutCtrl(Ha,0,335,608,23);na.append(Ha);var La=fa.get("sourceStrategy","\u8d44\u6e90\u51b2\u7a81\u5904\u7406\u7b56\u7565(\u6a21\u578b\u96c6\u4e2d\u7684\u6570\u636e\u6e90)"),xb=
(new nb(La)).getJqUi();xb.attr("title",La);xb.addClass("model-export-sourceStrategy-label");xb.css("display","inline-block");Ha.append(xb);T=new ea;T.setSelected(la.ALL_CONFLICTTYPE[2]);T.setItemModels(la.ALL_CONFLICTTYPE);T.setCustomPainter(function(sa,ma,Y){switch(Y){case la.ALL_CONFLICTTYPE[0]:sa=fa.get("ignore","\u5ffd\u7565");break;case la.ALL_CONFLICTTYPE[1]:sa=fa.get("overwrite","\u8986\u76d6");break;case la.ALL_CONFLICTTYPE[2]:sa=fa.get("rename","\u91cd\u547d\u540d");break;default:sa=""}Y=
$("<div>");Y.text(sa);Y.appendTo(ma)});La=T.getJqUi();La.addClass("model-export-sourceStrategy-comboBox");Ha.append(La);return na});L.setClosingChecker(X.isValidToAccepted,!0);L.setClosingAction(function(na){if(na&&(na=ca.getCheckedModelNodes(),0!==na.length)){for(var Ha=[],La=0;La<na.length;La++)Ha.push(na[La].toJsonObject());bb(Ia,Ha)}});X.showDialog()};var P=function(){V=new mb;V.addSearchListener(Za);V.setSearchListenerDelay(400);V.setPlaceholder(fa.get("searchModelOrNumber","\u641c\u7d22\u6a21\u578b\u540d\u79f0/\u7f16\u7801"));
V.setShowSearchIcon(!0);var Ia=V.getJqUi();Ia.addClass("model-imexport-search-box");return Ia},Za=function(){W=V.getText().trim();ca.searchKey(W)},Qa=function(){var Ia=new Mb;Ia.setChecked(!1);Ia.addCheckedListener(va);Ia.setText(fa.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));Ia=Ia.getJqUi();eb.layoutCtrl(Ia,250,2,200,23);return Ia},va=function(Ia,xa){xa&&(ca.setShowOnlyChecked(Ia.isChecked()),ca.searchKey(W))};this.isValidToAccepted=function(Ia){0===ca.getCheckedModelNodes().length?
(L.getMessageCurtain().showPrompt(fa.get("selectNone","\u672a\u9009\u4e2d\u6a21\u578b\u3002")),Ia(!1)):Ia(!0)};var bb=function(Ia,xa){S.createFacade(function(na){var Ha=na.conflictModel,La=na.numberConflictModel;if(0<Ha.length){var xb=xa.length-Ha.length,sa=new Da;sa.setSourceStrategy(T.getSelected());sa.setCacheImportMapIdKey(na.cacheMapIdKey);sa.setGlobal(S);sa.setModelSetId(ra);sa.setFunRefreshModelGroup(C);sa.setArrNumberConflictModel(La);sa.createUi(Ia,Ha,xb);sa.repaint()}else 0<La.length?(na=
new Na,na.setFunRefreshModelGroup(C),na.createUi(La),na.repaint()):C&&C()},function(na,Ha){return 1020101===na||1100021===na?(n.showPrompt(fa.get("resourceFileLimit","\u5bfc\u5165\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),2E3),!0):20009004===na?(n.showPrompt(fa.get("resourceFileIncomplete","\u5bfc\u5165\u5931\u8d25\uff0c\u6570\u636e\u5305\u4e0d\u5b8c\u6574\u3002"),2E3),!0):20009008===na?(n.showPrompt(fa.get("importModelCorruptionException","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u6570\u636e\u635f\u574f\u6216\u6570\u636e\u7248\u672c\u4e0d\u517c\u5bb9\u3002"),
2E3),!0):20004001===na?(n.showPrompt(fa.get("MaterializedExceptionForImport","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u7269\u5316\u5b58\u50a8\u8bbe\u7f6e\u89e3\u6790\u5f02\u5e38\u3002"),2E3),!0):30001001===na?(n.showPrompt(fa.get("noDataWarehouseConfigForImport","\u5f53\u524d\u73af\u5883\u672a\u914d\u7f6e\u201c\u8f7b\u6570\u4ed3\u6570\u636e\u6e90\u201d\u53c2\u6570\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5728MC\u4e2d\u8fdb\u884c\u914d\u7f6e\u3002"),2E3),!0):30001002===na?(n.showPrompt(fa.get("dataWarehouseConfigParseException",
"\u201c\u8f7b\u6570\u4ed3\u6570\u636e\u6e90\u201d\u53c2\u6570\u89e3\u6790\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5728MC\u4e2d\u91cd\u65b0\u914d\u7f6e\u3002"),2E3),!0):!1}).importSelectedModel(ra,Z.getParamPathPrefix(),Ia,xa,T.getSelected(),!0,"")}}function Da(){qb.call(this);var n=this,X=this.protectedMethod,L=[],ha,S,ca,C,T,V=[],W,ra,P,Za,Qa,va,bb;this.setSourceStrategy=function(sa){Za=sa};this.setCacheImportMapIdKey=function(sa){Qa=sa};this.setGlobal=function(sa){ha=sa};this.setFunRefreshModelGroup=
function(sa){P=sa};this.setArrNumberConflictModel=function(sa){bb=sa};this.setModelSetId=function(sa){va=sa};this.addConfirmListener=function(sa){L.push(sa)};this.createUi=function(sa,ma,Y){T=sa;V=ma;ra=Y;n.setSize(640,480);n.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);X.setTitle(fa.get("importModel","\u5bfc\u5165\u6a21\u578b"));X.setContentPaneCreator(function(){var ia=$("<div>"),B=fa.get("importSuccessPrompt","\u6210\u529f\u5bfc\u5165#1\u4e2a\u6a21\u578b\u3002\u4ee5\u4e0b\u6a21\u578b\u540d\u79f0\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002").replace("#1",
Y);B=new nb(B);S=new ya(fa.get("allIgnore","\u5168\u90e8\u5ffd\u7565"));ca=new ya(fa.get("allOverwrite","\u5168\u90e8\u8986\u76d6"));C=new ya(fa.get("allRename","\u5168\u90e8\u91cd\u547d\u540d"));S.addActionListener(xa);ca.addActionListener(na);C.addActionListener(Ha);B=B.getJqUi();var ja=S.getJqUi(),cb=ca.getJqUi(),Ma=C.getJqUi();B.addClass("model-import-selection-prompt");ja.addClass("model-import-selection-ignore-btn");cb.addClass("model-import-selection-overwrite-btn");Ma.addClass("model-import-selection-rename-btn");
ia.append(B);ia.append(ja);ia.append(cb);ia.append(Ma);W=new la;ia.append(W.getJqUi(ma));return ia});X.setClosingChecker2(n.isValidToAccepted,Ia,!0);X.setClosingAction(function(ia){!ia&&bb&&0<bb.length&&xb()});n.showDialog()};var Ia=function(sa){sa(!0);0<ra&&0==bb.length&&P&&P()};this.repaint=function(){W.refresh()};var xa=function(){for(var sa in V)V[sa].strategy=la.ALL_CONFLICTTYPE[0];W.updateUi(V)},na=function(){for(var sa in V)V[sa].strategy=la.ALL_CONFLICTTYPE[1];W.updateUi(V)},Ha=function(){for(var sa in V)V[sa].strategy=
la.ALL_CONFLICTTYPE[2];W.updateUi(V)};this.isValidToAccepted=function(sa){La(T,V,sa)};var La=function(sa,ma,Y){var ia=[],B;for(B in ma)"ignore"!==ma[B].strategy&&(ia=ia.concat(ma[B]));0===ia.length?Y(!0):ha.createFacade(function(ja){Y(!0);bb=bb.concat(ja.numberConflictModel);0==bb.length?P&&P():xb()},function(ja,cb){return 1020101===ja||1100021===ja?(X.getMessageCurtain().showPrompt(fa.get("resourceFileLimit","\u5bfc\u5165\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),2E3),!0):
20009008===ja?(X.getMessageCurtain().showPrompt(fa.get("importModelCorruptionException","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u6570\u636e\u635f\u574f\u6216\u6570\u636e\u7248\u672c\u4e0d\u517c\u5bb9\u3002"),2E3),!0):20004001===ja?(X.getMessageCurtain().showPrompt(fa.get("MaterializedExceptionForImport","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u7269\u5316\u5b58\u50a8\u8bbe\u7f6e\u89e3\u6790\u5f02\u5e38\u3002"),2E3),!0):30001001===ja?(X.getMessageCurtain().showPrompt(fa.get("noDataWarehouseConfigForImport",
"\u5f53\u524d\u73af\u5883\u672a\u914d\u7f6e\u201c\u8f7b\u6570\u4ed3\u6570\u636e\u6e90\u201d\u53c2\u6570\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5728MC\u4e2d\u8fdb\u884c\u914d\u7f6e\u3002"),2E3),!0):30001002===ja?(X.getMessageCurtain().showPrompt(fa.get("dataWarehouseConfigParseException","\u201c\u8f7b\u6570\u4ed3\u6570\u636e\u6e90\u201d\u53c2\u6570\u89e3\u6790\u5f02\u5e38\uff0c\u8bf7\u8054\u7cfb\u7ba1\u7406\u5458\u5728MC\u4e2d\u91cd\u65b0\u914d\u7f6e\u3002"),2E3),!0):!1}).importSelectedModel(va,
Z.getParamPathPrefix(),sa,ia,Za,!1,Qa)},xb=function(){X.destroy();var sa=new Na;sa.setFunRefreshModelGroup(P);sa.createUi(bb);sa.repaint()}}function Na(){qb.call(this);var n=this,X=this.protectedMethod,L,ha;this.setFunRefreshModelGroup=function(S){ha=S};this.createUi=function(S){n.setSize(640,480);n.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);X.setTitle(fa.get("importModel","\u5bfc\u5165\u6a21\u578b"));X.setContentPaneCreator(function(){var ca=$("<div>"),C=fa.get("modelNumberConflictPrompt",
"\u4ee5\u4e0b\u6a21\u578b\u4e0e\u5176\u4ed6\u6a21\u578b\u5b58\u5728\u6a21\u578b\u7f16\u7801\u51b2\u7a81\uff0c\u5df2\u5c06\u6a21\u578b\u7f16\u7801\u91cd\u547d\u540d\u3002");C=(new nb(C)).getJqUi();C.addClass("model-import-selection-prompt");ca.append(C);L=new sb;ca.append(L.getJqUi(S));return ca});X.setFooterPaneCreator(function(ca){var C=new oa(fa.get("iSee","\u6211\u77e5\u9053\u4e86"));C.addActionListener(function(T){X.destroy();ha&&ha()});C=C.getJqUi();C.addClass("sa-ctrl-dialog-footer-cancel");
C.css("margin-left","-50px");C.appendTo(ca)});X.setClosingAction(function(ca){X.destroy();ha&&ha()});n.showDialog()};this.repaint=function(){L.refresh()}}function sb(){function n(ha){KTDefaultCellRender.call(this,ha);var S=this,ca=this.paintCellUI;this.paintCellUI=function(C,T){if(S.getCurrentRowIdx()<b.getHeadRowCount())ca(C,T);else if(0===S.getCurrentColIdx()){var V=S.getCurrentRow();T=$("<div>");var W=$("<div>");T.addClass("model-export-conflict-item-text");V=V.getUserObject();T.addClass("model-export-conflict-model-name-label");
T.text(V.modelName);W.append(Qb.createIcon(V.modelType,"model-export-conflict-model-icon"));W.append(T);W.appendTo(C)}else ca(C,T)}}var X=this,L;this.getJqUi=function(ha){L=b.createTable();b.bindTableListenerForCtrl(L);var S=new n(L);S.setOutsideVisible(!1);L.setCellRender(S);L.addColumns(3);L.getColumn(0).setWidth(180);L.getColumn(1).setWidth(180);L.getColumn(2).setWidth(180);S=b.createHeadRow(L);S.getCell(0).setValue(fa.get("modelName","\u6a21\u578b\u540d\u79f0"));S.getCell(1).setValue(fa.get("modelNumber",
"\u6a21\u578b\u7f16\u7801"));S.getCell(2).setValue(fa.get("renameModelNumber","\u91cd\u547d\u540d\u540e\u7684\u6a21\u578b\u7f16\u7801"));X.updateUi(ha);b.refresh(L);ha=$(L.getUI());ha.addClass("model-import-number-table");return ha};this.refresh=function(){b.refresh(L)};this.updateUi=function(ha){b.clearWithoutHead(L);for(var S,ca=0;ca<ha.length;ca++){var C=ha[ca];S=b.createRow(L);S.getCell(1).setValue(C.oldModelNumber);S.getCell(2).setValue(C.newModelNumber);S.setUserObject(C)}b.refresh(L)}}function Aa(){var n,
X,L,ha,S=!1,ca=!0;this.setName=function(C){n=C};this.getName=function(){return n};this.setId=function(C){X=C};this.getId=function(){return X};this.setIsPreset=function(C){L=C};this.isPreset=function(){return L};this.setParentNode=function(C){ha=C};this.getParentNode=function(){return ha};this.setChecked=function(C){S=C};this.isChecked=function(){return S};this.setVisible=function(C){ca=C};this.isVisible=function(){return ca};this.getSubNodeLevel=function(){for(var C=-1,T=ha;T;)C++,T=T.getParentNode();
return C};this.check=function(C){};this.protectedMethod={fromJsonObject:function(C){},toJsonObject:function(){return{}}}}function pa(){Aa.call(this);var n=this,X=this.protectedMethod,L=!0,ha=[];this.setExpanded=function(S){L=S};this.isExpanded=function(){return L};this.setChildren=function(S){ha=S};this.getChildren=function(){return ha};this.setParentId=function(S){_sParentId=S};this.getParentId=function(){return _sParentId};this.fromJsonObject=function(S){X.fromJsonObject(S);n.setName(S.modelGroupName);
n.setId(S.modelGroupId);var ca=S.modelList;if(ca&&0<ca.length)for(var C=0;C<ca.length;C++){var T=ca[C],V,W=T.modelType;"1"===W&&(V=new N);"2"===W&&(V=new E);"3"===W&&(V=new H);"4"===W&&(V=new m);V||(V=new N);V.fromJsonObject(T);V.setParentNode(n);ha.push(V)}if((S=S.children)&&0<S.length)for(C=0;C<S.length;C++)ca=S[C],V=new pa,V.fromJsonObject(ca),V.setParentNode(n),ha.push(V)};this.toJsonObject=function(){return X.toJsonObject()};this.check=function(S,ca){if(0!==ha.length&&S!==n.isChecked()){n.setChecked(S);
for(var C=0;C<ha.length;C++){var T=ha[C];T.isVisible()&&T.check(S,ca)}}}}function Ya(){Aa.call(this);var n=this,X=this.protectedMethod,L=[],ha=[],S,ca;this.setModelType=function(C){S=C};this.setRelativeIds=function(C){L=C};this.getRelativeIds=function(){return L};this.setRelativeNodes=function(C){ha=C};this.getRelativeNodes=function(){return ha};this.getModelType=function(){return S};this.setNumber=function(C){ca=C};this.getNumber=function(){return ca};this.protectedMethod={fromJsonObject:function(C){X.fromJsonObject(C);
n.setModelType(C.modelType);n.setId(C.modelId);n.setName(C.modelName);n.setRelativeIds(C.refModelIds);n.setNumber(C.number)},toJsonObject:function(){var C=X.toJsonObject(),T=n.getParentNode();C.modelId=n.getId();C.groupId=T.getId();C.modelName=n.getName();C.modelType=S;C.number=ca;return C}};this.check=function(C,T){if(C!==n.isChecked()){n.setChecked(C);for(var V=0;V<ha.length;V++)ha[V].check(C,T);T&&T(n.getParentNode())}}}function N(){Ya.call(this);var n=this.protectedMethod;this.fromJsonObject=
function(X){n.fromJsonObject(X)};this.toJsonObject=function(){return n.toJsonObject()}}function E(){Ya.call(this);var n=this.protectedMethod;this.fromJsonObject=function(X){n.fromJsonObject(X)};this.toJsonObject=function(){return n.toJsonObject()}}function H(){Ya.call(this);var n=this.protectedMethod;this.fromJsonObject=function(X){n.fromJsonObject(X)};this.toJsonObject=function(){return n.toJsonObject()}}function m(){Ya.call(this);var n=this.protectedMethod;this.fromJsonObject=function(X){n.fromJsonObject(X)};
this.toJsonObject=function(){return n.toJsonObject()}}"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.modeler&&(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage&&(com.kingdee.bos.qing.modeler.mainpage={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage.imexport&&
(com.kingdee.bos.qing.modeler.mainpage.imexport={});var R=com.kingdee.bos.qing.modeler.mainpage.imexport;R.ExportDialog=Q;R.UploadPane=function(){var n,X,L;this.createJqUi=function(T,V,W,ra){n=ra;ra=$("<div>");ra.addClass("model-importing-exporting-main");var P=$(document.body),Za=$("<div class='sa-ctrl-modallayer'>");Za.appendTo(P);X=$("<progress value='0' max='100'>");X.addClass("model-importing-upload-progress");var Qa=$("<div>");Qa.addClass("model-importing-exporting-text");Qa.text(fa.get("uploading",
"\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u5019"));ra.append(X);ra.append(Qa);P.append(ra);ha(T,V,W,ra,Za)};var ha=function(T,V,W,ra,P){var Za=new FormData;Za.append("filename",V);V=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();var Qa=new XMLHttpRequest;Qa.upload.addEventListener("progress",S,!1);Qa.addEventListener("error",ca,!1);Qa.open("post",V,!0);Qa.onload=function(va){200===this.status&&(va=JSON.parse(this.response),"number"==typeof va.errorCode&&3099003===
va.errorCode?n.showError(va.errorMessage):C(T,va.data,W),ra.remove(),P.remove())};Qa.send(Za)},S=function(T){var V=X.get(0);T.lengthComputable&&(V.max=T.total,V.value=T.loaded)},ca=function(T){_funErrorCallbackEvent&&_funErrorCallbackEvent(fa.get("uploadFail","\u4e0a\u4f20\u5931\u8d25"))},C=function(T,V,W){W.createFacade(function(ra){var P=new pa;P.fromJsonObject(ra);0!==P.getChildren().length?(ra=new wa(n),ra.setGlobal(W),ra.setModelSetId(T),ra.setFunRefreshModelGroup(L),ra.createUi(V,P)):n.showPrompt(fa.get("noModelAndGroup",
"\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u6a21\u578b\u3002"))},function(ra,P){return!1}).getEnableImportModelAndGroup(V)};this.setFunRefreshModelGroup=function(T){L=function(){n.showSuccess(fa.get("importModelSuccess","\u6a21\u578b\u5bfc\u5165\u6210\u529f\u3002"));T()}}};R.FolderNode=pa;var aa,Z,ea,ya,mb,qb,fa,eb,b,Mb,nb,oa,Ob;(function(){var n=com.kingdee.bos.qing.modeler.mainpage.common;aa=n.MyIcons;Z=n.Integration;n=com.kingdee.bos.qing.ui.component;ea=n.ComboBox;ya=n.WorkButton;nb=n.Label;mb=n.SearchBox;
Mb=n.CheckBox;qb=n.AbstractModalDialog;oa=n.Button;n=com.kingdee.bos.qing.framework.common;fa=n.MultilanguageManager.createPackageAccessor(R);n=com.kingdee.bos.qing.common.ui;b=n.TableUtil;n=com.kingdee.bos.qing.common;eb=n.DomUtil;n=com.kingdee.bos.qing.modeler.common.ui;Ob=n.SearchNoDataContainer})();Q.MODEL_LIST="modelList";Q.MODEL_GROUP_LIST="modelGroupList";la.ALL_CONFLICTTYPE=["ignore","overwrite","rename"];la.ALL_PUBLISHCONFLICTTYPE=["noDisposal","overwrite"];var Qb=new function(){this.createIcon=
function(n,X){var L=$("<span>");L.addClass(X);switch(n){case "1":n="data-table-model-icon-small";break;case "2":n="entity-model-icon-small";break;case "3":n="relation-model-icon-small";break;case "4":n="metric-model-icon-small";break;default:n=""}aa.background(L,n);return L}}})();(function(){function Q(){eb.call(this);var B=this,ja=this.protectedMethod,cb,Ma,tb,rb;this.destroy=function(){ja.destroy()};this.setRootNode=function(Ta){cb=Ta};this.textFieldFocus=function(){rb&&rb.requestFocus()};this.asyncShowDeployDialog=function(){ma.setCallback(function(){Gb();B.textFieldFocus()});ma.loadJs("common/qing-table.js")};this.setDescConfirmCallback=function(Ta){Ma=Ta};var Gb=function(){B.setSize(640,480);B.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);ja.setTitle(b.get("deploy",
"\u90e8\u7f72"));ja.setContentPaneCreator(ob);ja.setClosingAction(function(){});ja.setClosingChecker2(function(Ta){Ta=$.trim(rb.getText());var pb;""!==Ta&&500<Ta.length?pb=b.get("descTooLong","\u90e8\u7f72\u63cf\u8ff0\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002"):""===Ta&&(pb=b.get("enterDeployDesc","\u8bf7\u8f93\u5165\u90e8\u7f72\u63cf\u8ff0\u3002"));if(pb)return ja.getMessageCurtain().showPrompt(pb),!1;Ta=tb.getCheckedModelNodes();pb=[];for(var Db=0;Db<Ta.length;Db++){var Rb=Ta[Db],Nb=Rb.getId();
Rb instanceof ia&&pb.push(Nb)}Ta=$.trim(rb.getText());Ma&&Ma(Ta,pb);return!0});B.showDialog()},ob=function(){var Ta=$("<div>");tb=new ua(cb);var pb=tb.getJqUi();Ta.append(pb);pb=$("<div>");pb.addClass("deploy-dialog-batch-split-bottom");Ta.append(pb);pb=Ta.append;var Db=new Na;Db.setRequired(!0);Db.setText(b.get("desc","\u63cf\u8ff0"));Db=Db.getJqUi();rb=new Aa;var Rb=rb.getJqUi();Rb.find(".sa-ctrl-textarea-real").css("font-family","MicrosoftYaHei");var Nb=$("<div>");Nb.addClass("deploy-dialog-desc-div");
Db.appendTo(Nb);Rb.appendTo(Nb);oa.layoutCtrl(Db,0,-8,45,20);oa.layoutCtrl(Rb,35,-5,568,70);oa.layoutCtrlCenterAlign(Nb,600);pb.call(Ta,Nb);return Ta}}function ua(B){function ja(){KTDefaultCellRender.call(this,Ta);var Va=this;this.paintCellUI=function(Ea,gb){var Ka=Va.getCurrentRow().getUserObject(),fb=Ka.getName();Ea=$("<div>");Ea.addClass("deploy-dialog-tree-area-list-item");var ub=new H,zb=ub.getJqUi(),Pb=$("<div>");zb.addClass("deploy-dialog-area-list-item-checkbox");Pb.addClass("deploy-dialog-area-list-item-text");
Ea.append(zb);Ea.append(Pb);ub.setChecked(Ka.isChecked());ub.setUserObject(Ka);ub.addCheckedListener(Wb);-1!=Gb.indexOf(Ka.getId())&&(ub.setEnabled(!1),ub.setChecked(!0));ob[Ka.getId()]=ub;0==Ka.getSubNodeLevel()?(Pb.text(fb),"ND_0"==Ka.getId()?(Ka=b.get("notDeployedHelpIconTips","\u5728\u540c\u4e00\u4e2a\u6a21\u578b\u96c6\u4e0b\uff0c\u6a21\u578b\u8bbe\u8ba1\u65f6\u53ef\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u8bbe\u8ba1\u671f\u7684\u72b6\u6001\uff0c\u4f46\u5728\u6267\u884c\u671f(\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u6267\u884c\u65f6)\u53ea\u80fd\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u7684\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u3002\u56e0\u6b64\u9700\u8981\u5c06\u5f15\u7528\u7684\u201c\u672a\u90e8\u7f72\u201d\u72b6\u6001\u7684\u6a21\u578b\u4e00\u540c\u90e8\u7f72\u3002"),
Pb.append(Sa(Ka,160,70))):"DU_0"==Ka.getId()&&(Ka=b.get("deployedUpdateHelpIconTips","\u5728\u540c\u4e00\u4e2a\u6a21\u578b\u96c6\u4e0b\uff0c\u6a21\u578b\u8bbe\u8ba1\u65f6\u53ef\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u8bbe\u8ba1\u671f\u7684\u72b6\u6001\uff0c\u4f46\u5728\u6267\u884c\u671f (\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u6267\u884c\u65f6)\u53ea\u80fd\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u7684\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u3002\u5982\u679c\u9700\u8981\u6267\u884c\u671f\u4e0e\u8bbe\u8ba1\u671f\u7684\u72b6\u6001\u4fdd\u6301\u4e00\u81f4\uff0c\u8bf7\u5c06\u5f15\u7528\u7684\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201c\u72b6\u6001\u7684\u6a21\u578b\u518d\u6b21\u90e8\u7f72\u3002"),
Pb.append(Sa(Ka,185,88)))):(Pb.text(fb),Ka instanceof ia&&(Pb.addClass("deploy-dialog-model-name-label"),Pb=Ea.append,Ka=Ka.getType(),fb=$("<span>"),fb.addClass("deploy-dialog-model-icon"),ub=va.getModelIconByType(va.DATA_TABLE_MODEL)+"-small","metrics_model"==Ka&&(ub="metric-model-icon-small"),W.background(fb,ub),Pb.call(Ea,fb)));gb?(gb=$(gb),gb.css("overflow","visible"),Ea.appendTo(gb)):Ea.appendTo(jqDiv);oa.layoutCtrlWithLRTB(Ea,0,0,null,0,0,null)};var Sa=function(Ea,gb,Ka){var fb=$("<div>"),ub=
$("<span>");ub.text(Ea);ub.appendTo(fb);Ea=new ya;Ea.setIconType(ya.ICON_TYPE_QUESTION);Ea.setTipsSize(400,Ka);Ea.setTipsHtml(fb[0]);Ka=Ea.getJqUi();Ka.addClass("dm-notice-icon");oa.layoutCtrl(Ka,gb,3,16,16);return Ka}}var cb,Ma=[],tb=[],rb=[],Gb=[],ob,Ta,pb;this.getJqUi=function(){if(!cb){Rb();cb=$("<div>");cb.addClass("deploy-dialog-area");cb.addClass("deploy-dialog-tree-selection-area");Ta=new KTable;var Va=$(Ta.getUI());Va.children().css("overflow-x","hidden");var Sa=new ja;Ta.setCellRender(Sa);
Ta.setSyncUIWhenModelChanged(!1);Ta.addTreeExpandListener(Nb);Ta.addColumn().setWidth(400);oa.layoutCtrlWithLRTB(Va,0,0,null,23,0,null);pb=Va;cb.append(pb);ob={};for(Va=0;Va<Ma.length;Va++){var Ea=Ma[Va];Sa=nb.createRow(Ta,!1);var gb=Sa.getCell(0),Ka=Ea.getSubNodeLevel();Ka=new KTCellTreeModel(Ka);Sa.setHeight(23);Sa.setUserObject(Ea);Ea instanceof Y?(Ea=Ea.isExpanded(),Ka.setExpanded(Ea)):(Ea=Ea.getParentNode().isExpanded(),Sa.setHide(!Ea));gb.setTreeModel(Ka)}Ta.updateUI();Db()}return cb};var Db=
function(){var Va=function(Ka,fb){var ub=ob[Ka.getId()];ub&&(ub.setChecked(!0),fb||(ub.setEnabled(!1),Gb.push(Ka.getId())));if(Ka instanceof Y&&(Ka=Ka.getChildren())&&0<Ka.length)for(ub=0;ub<Ka.length;ub++)Va(Ka[ub],fb)},Sa=B.getChildren();if(Sa&&0<Sa.length)for(var Ea=0;Ea<Sa.length;Ea++){var gb=!0;"ND_0"==Sa[Ea].getId()&&(gb=!1);Va(Sa[Ea],gb)}};this.getCheckedModelNodes=function(){for(var Va=[],Sa=0;Sa<rb.length;Sa++){var Ea=rb[Sa];(ob[Ea.getId()].isChecked()||-1!=Gb.indexOf(Ea.getId()))&&Va.push(Ea)}return Va};
var Rb=function(){var Va=function(gb){Ma.push(gb);if(gb instanceof ia)rb.push(gb);else if(tb.push(gb),(gb=gb.getChildren())&&0<gb.length)for(var Ka=0;Ka<gb.length;Ka++)Va(gb[Ka])},Sa=B.getChildren();if(Sa&&0<Sa.length)for(var Ea=0;Ea<Sa.length;Ea++)Va(Sa[Ea])},Nb=function(Va,Sa){(Va=Ta.getRow(Sa.getRowIdx()).getUserObject())&&Va.setExpanded(Sa.isExpanded())},Wb=function(Va,Sa){var Ea=Va.getUserObject();if(-1==Gb.indexOf(Ea.getId())&&Sa)for(Ea.check(Va.isChecked(),Xb),Va=0;Va<Ma.length;Va++)Sa=Ma[Va],
-1==Gb.indexOf(Sa.getId())&&(Ea=ob[Sa.getId()])&&Ea.setChecked(Sa.isChecked())},Xb=function(Va){for(var Sa=!0,Ea=Va.getChildren(),gb=0;gb<Ea.length;gb++){var Ka=Ea[gb];Sa=Sa&&Ka.isChecked()}Va.setChecked(Sa);(Va=Va.getParentNode())&&Xb(Va)}}"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.modeler&&
(com.kingdee.bos.qing.modeler={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage&&(com.kingdee.bos.qing.modeler.mainpage={});"undefined"==typeof com.kingdee.bos.qing.modeler.mainpage.ui&&(com.kingdee.bos.qing.modeler.mainpage.ui={});var la=com.kingdee.bos.qing.modeler.mainpage.ui;la.Main=function(){function B(){var d;this.getJqUi=function(){d||(d=a());return d};var a=function(){d=$("<div>");Oa=new ja;var k=Oa.getJqUi();U=new rb;var e=U.getJqUi(),u=new pa;u.setHorizontalSplit(!0);u.setSplitLineWide(8);
u.setResizeMode(pa.RESIZE_MODE_FIRST_FIXED);u.setFirstSize(250,224,400);u.setSecondSize(document.documentElement.clientWidth-250-20,document.documentElement.clientWidth-400-20,document.documentElement.clientWidth-200-20);u.setFirstChild(pa.createChildWrapper(k,function(){k.css({width:u.getNonemptyFirstWide()+"px"});e.css({width:document.documentElement.clientWidth-u.getNonemptyFirstWide()-28+"px"});U.getModelListView().relayoutViews()}));u.setSecondChild(pa.createChildWrapper(e));U.setSplitPane(u);
d=u.getJqUi();d.addClass("model-set-main-page-work-area");return d}}function ja(){var d,a,k,e,u,g,r,w;this.getJqUi=function(){d||f();return d};this.getModelGroupTree=function(){e||(e=new C);return e};this.resetModelGroupTree=function(){e&&e.getJqUi().remove();e=new C};this.updateUiWhenNoGroup=function(){a.hideAllButton();u&&u.show();g.setContainChildStatus(!1,Bb,!1);e.setRootVisible(!1);e.setModelGroupFolderNode(Eb);e.setFunModelGroupTreeNodeClick(p);e.setSelectedNode([e.getRootGroup()]);r=e.getRootGroup()};
this.updateUiWhenRootGroup=function(q){a.onlyShowAddChildGroupBtn();u&&u.hide();g.setContainChildStatus(!1,!0,!0);q&&(e.setRootVisible(!0),e.setModelGroupFolderNode(Eb),e.setFunModelGroupTreeNodeClick(p),e.setSelectedNode([e.getRootGroup()]),r=e.getRootGroup(),e.refresh())};this.updateUiWhenNotRootGroup=function(q){a.showAllButton();u&&u.hide();g.setContainChildStatus(!0,Bb,!0);q&&t(e.getSelectedNode(),!0)};this.createGroupOnBranchNode=function(q,l,y){y=y?y:e.getSelectedNode();q=e.createLeafNode(q);
e.addChild(y,q,l);t(q,!0)};this.createGroupOnLeafNode=function(q,l,y){var F=e.getSelectedNode(),M=F.getParent();q=e.createLeafNode(q);l=e.createBranch(l);M.removeChild(F);e.addChild(M,l,y);e.addChild(l,q,0);t(q,!0)};var t=function(q,l){e.setRootVisible(l);e.setSelectedNode([q]);r=q;e.getTree().expandToNode(q,!1);e.refresh()};this.removeGroupLeafNode=function(){var q=e.getSelectedNode(),l=q.getParent();e.removeChild(l,q);if(0!==l.getChildCount())Oa.updateUiWhenRootGroup(!0);else if(q=l.getUserObject(),
q.getModelGroupId()===T.ROOT_NODE_ID)Hb=[],Bb=!1,Oa.updateUiWhenNoGroup();else{for(var y=e.createLeafNode(q),F=l.getParent(),M,G=F.getAllChildren(),z=0;z<G.length;z++)if(G[z].getUserObject().getModelGroupId()===q.getModelGroupId()){M=z;break}F.removeChild(l);e.addChild(F,y,M);Oa.updateUiWhenRootGroup(!0)}};this.resizeAfterObserver=function(){if(!L){var q=document.documentElement.clientHeight-250,l=a.getJqUi().height(),y=u.getJqUi().height(),F=k.getJqUi().height(),M=l+F;q=0<q-M-y?(d.height()-M-y)/
2+l+F:M;u.getJqUi().css("top",q)}};this.clearSearchStatus=function(){k.clear();k.getJqUi().find("input").blur()};var f=function(){d=$("<div class='model-group-container'>");a=new cb;a.getJqUi().appendTo(d);k=new N;k.setSearchListenerDelay(1E3);k.addSearchListener(function(){c($.trim(k.getText()).toLowerCase())});k.setShowSearchIcon(!0);k.setPlaceholder(b.get("searchGroupName","\u8bf7\u8f93\u5165\u76ee\u5f55\u540d\u79f0"));var q=k.getJqUi();q.addClass("model-group-search-box");q.find("input").on("keydown",
function(l){13===(l.keyCode||l.which||l.charCode)&&c($.trim(k.getText()).toLowerCase())});d.append(q);e=new C;e.addExpandedListener(function(l,y){y.isExpanded()&&c($.trim(k.getText()).toLowerCase())});L||(u=new Ma,u.getJqUi().appendTo(d));g=new tb;g.getUi().appendTo(d)},p=function(q,l){r=l;l=l.getUserObject();var y=l.getModelGroupId();q&&q.getSelecteds()[0].getUserObject().getModelGroupId()===y||(U.getToolbar().clearSearchStatus(),Ja=[],U.clearModelSelectedStatus(Kb),U.clearMetricSpreadStatus(Kb),
y===T.ROOT_NODE_ID?(Oa.updateUiWhenRootGroup(!1),q=Kb):(Oa.updateUiWhenNotRootGroup(),q=l.getArrAllModelList(Bb)),!U.getIsListView()&&U.getModelCardView().resizeModelCardView(),U.showModelView(q,!0))},c=function(q){if(""===q){if(w){var l=e.getSelectedNode().getUserObject().getModelGroupId();r&&(l=r.getUserObject().getModelGroupId());var y;e.getRootGroup().visiting(function(O){if(O.getUserObject().getModelGroupId()===l)return y=O,!0});t(y,0<Hb.length);w=!1}}else{w=!0;var F=[],M=[];e.getRootGroup().deepFirstVisiting(function(O){var qa=
O.getUserObject();-1!==qa.getModelGroupName().toLowerCase().indexOf(q)&&(F.push(O),M.push(qa.getModelGroupId()))},!1);for(var G=0;G<F.length;G++){var z=F[G];h(z,M);v(z,M);e.getTree().expandToNode(z,!1)}e.getTree().searchAllNodeUi(function(O,qa){O=O.getUserObject();var Fa=O.getModelGroupId();Fa!==T.ROOT_NODE_ID&&(-1!==O.getModelGroupName().toLowerCase().indexOf(q)?qa.show():-1===M.indexOf(Fa)?qa.hide():qa.show())})}},h=function(q,l,y){if(!q.isLeafNode()){q=q.getAllChildren();for(var F=0;F<q.length;F++){var M=
q[F].getUserObject();-1!==M.getModelGroupName().toLowerCase().indexOf(y)&&(l.push(M.getModelGroupId()),h(q[F],l))}}},v=function(q,l){q.getUserObject().getModelGroupId()!==T.ROOT_NODE_ID&&(q=q.getParent(),l.push(q.getUserObject().getModelGroupId()),v(q,l))}}function cb(){var d,a,k,e,u,g,r;this.getJqUi=function(){d||w();return d};this.hideAllButton=function(){a&&a.hide();k&&k.hide();e&&e.hide();u&&u.hide();g&&g.hide();r&&r.hide()};this.showAllButton=function(){a&&a.css("right","140px")&&a.show();k&&
k.css("right","116px")&&k.show();e&&e.show();u&&u.show();g&&g.show();r&&r.show()};this.onlyShowAddChildGroupBtn=function(){a&&a.hide();e&&e.hide();u&&u.hide();g&&g.hide();r&&r.hide();k&&k.css("right","20px")&&k.show()};var w=function(){d=$("<div class='model-group-tool-bar'>");var l=$("<div class='model-group-text'>");l.text(b.get("group","\u76ee\u5f55"));l.appendTo(d);L||(a=t("model-group-add-btn",function(){jc(b.get("addDir","\u65b0\u589e\u540c\u7ea7"))},"add_dir",b.get("addDir","\u65b0\u589e\u540c\u7ea7")),
k=t("model-group-add-btn",f,"add_subDir",b.get("addSubDir","\u65b0\u589e\u5b50\u7ea7")),e=t("model-group-edit-btn",p,"btn-edit",b.get("editGroup","\u7f16\u8f91\u76ee\u5f55")),u=t("model-group-del-btn",c,"btn-delete",b.get("deleteGroup","\u5220\u9664\u76ee\u5f55")),g=t("model-group-move-up-btn",v,"move_up",b.get("moveUp","\u4e0a\u79fb")),r=t("model-group-move-down-btn",q,"move_down",b.get("moveDown","\u4e0b\u79fb")),a.appendTo(d),k.appendTo(d),e.appendTo(d),u.appendTo(d),g.appendTo(d),r.appendTo(d))},
t=function(l,y,F,M){var G=$("<div>");G.addClass(l);G.on("click",y);W.backgroundWithHover(G,F);G.attr("title",M);G.hide();return G},f=function(){var l=0;Oa&&Oa.getModelGroupTree().getSelectedNode()&&(l=Oa.getModelGroupTree().getSelectedNode().getLevel());4<=l?I.getMessageCurtain().showPrompt(b.get("modelGroupMaxLevel","\u6700\u591a\u53ef\u652f\u63014\u7ea7\u76ee\u5f55\uff0c\u5f53\u524d\u76ee\u5f55\u4e3a\u7b2c4\u7ea7\u76ee\u5f55\uff0c\u65e0\u6cd5\u65b0\u589e\u4e0b\u7ea7\u76ee\u5f55\u3002")):(l=new Wb(!0),
l.setTitle(b.get("addSubDir","\u65b0\u589e\u5b50\u7ea7")),l.setSubDir(!0),l.showDialog(),l.textFieldFocus())},p=function(){var l=new Wb(!1);l.setTitle(b.get("updateModelGroupText","\u7f16\u8f91\u76ee\u5f55"));l.showDialog();l.textFieldFocus()},c=function(){var l=Oa.getModelGroupTree().getSelectedNode();if(l instanceof ea.BranchNode)l=b.get("deleteChildModelGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u5b50\u76ee\u5f55\u518d\u5220\u9664\u76ee\u5f55\u3002"),I.getMessageCurtain().showPrompt(l);
else{l=l.getUserObject();var y=l.getArrModelList();y&&0<y.length?(l=b.get("deleteModelBeforeModelGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u6a21\u578b\u518d\u5220\u9664\u76ee\u5f55\u3002"),I.getMessageCurtain().showPrompt(l)):(l=l.getModelGroupName(),l=b.get("confirmToDelGroupPrefix","\u5220\u9664\u201c").concat(l).concat(b.get("confirmToDelGroupSuffix","\u201d\u76ee\u5f55\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u5417\uff1f")),y=new Xb(!0),y.setConfirmMsg(l),
y.showDialog(),$(".sa-ctrl-dialog-titlebar").removeClass("sa-ctrl-dialog-titlebar"))}},h=function(l,y){var F=Oa.getModelGroupTree().getSelectedNode();if(F){var M=F.getUserObject(),G=F.getParent(),z=G.getUserObject().getChildren();if(l?z[0].getModelGroupId()!==M.getModelGroupId():z[z.length-1].getModelGroupId()!==M.getModelGroupId()){y=z.concat([]);var O=z.indexOf(M),qa=l?O-1:O+1;y[O]=y.splice(qa,1,y[O])[0];l=[];M=z.length;for(var Fa=0;Fa<y.length;Fa++){var $a=y[Fa],jb=new Za;jb.setModelGroupId($a.getModelGroupId());
jb.setSeq(M);l.push(jb.toJsonObject());M--}(new V(ra.getRemoteImpl(),function(K){z[O]=z.splice(qa,1,z[O])[0];G.removeChild(F);G.insertChild(F,qa);Oa.updateUiWhenNotRootGroup(!0)})).updateGroupSequence(l)}else I.getMessageCurtain().showPrompt(y)}},v=function(){h(!0,b.get("unableMoveUp","\u540c\u5c42\u7ea7\u7b2c\u4e00\u4e2a\u76ee\u5f55\u4e0d\u652f\u6301\u4e0a\u79fb\u3002"))},q=function(){h(!1,b.get("unableMoveDown","\u540c\u5c42\u7ea7\u6700\u540e\u4e00\u4e2a\u76ee\u5f55\u4e0d\u652f\u6301\u4e0b\u79fb\u3002"))}}
function Ma(){var d;this.getJqUi=function(){d||a();return d};this.show=function(){d&&d.show()};this.hide=function(){d&&d.hide()};var a=function(){d=$("<div class='model-group-no-data'>");d.on("click",function(){jc(b.get("addGroup","\u65b0\u5efa\u76ee\u5f55"))});var k=$("<div class='model-group-no-data-add-btn'>");W.background(k,"add-on");k.appendTo(d);k=$("<div class='model-group-no-data-add-group-text'>");k.text(b.get("addGroup","\u65b0\u5efa\u76ee\u5f55"));k.attr("title",b.get("addGroup","\u65b0\u5efa\u76ee\u5f55"));
k.appendTo(d);d.hide()}}function tb(){var d,a;this.getUi=function(){if(!d){d=$("<div class='model-group-contain-children'>");a=new H;a.setEnabled(!1);a.setChecked(!0);a.setText(b.get("containChildren","\u5305\u542b\u4e0b\u7ea7"));a.setCustomStyle("font-size","14px");var e=a.getJqUi();oa.layoutCtrlWithLRTB(e,25,null,135,8,null);e.on("click",k);e.appendTo(d);d.hide()}return d};this.setContainChildStatus=function(e,u,g){a.setEnabled(e);a.setChecked(u);g?d&&d.show():d&&d.hide()};var k=function(){if(a.isEnabled()){Bb=
!Bb;Ja=[];var e=I.getCurrentGroupModel(Bb,I.getSelectedGroup());U.clearModelSelectedStatus(e);Ab&&(e=Sb(e,U.getToolbar().getSearchText()));U.showModelView(e,!1);P.occur(P.CONTAIN_CHILDREN_MODEL_GROUP,P.getContainChildrenStatus(Bb))}}}function rb(){var d=this,a,k,e,u,g,r,w;this.getJqUi=function(){a||t();return a};var t=function(){a=$("<div class='model-container'>");k=new Gb;k.getJqUi().appendTo(a);e=new ob;e.getJqUi().appendTo(a);u=new S;var c=u.getJqUi();c.css("max-height","120px");c.appendTo(a);
c.hide();g=new Ta;c=[{width:50},{width:120,text:b.get("number","\u7f16\u7801")},{width:120,text:b.get("modelName","\u540d\u79f0")},{width:150,text:b.get("modelDesc","\u63cf\u8ff0")},{width:100,text:b.get("modelType","\u7c7b\u578b")},{width:100,text:b.get("currentLocker","\u5f53\u524d\u9501\u5b9a\u4eba")},{width:100,text:b.get("deployStatus","\u90e8\u7f72\u72b6\u6001")},{width:100,text:b.get("creator","\u521b\u5efa\u4eba")},{width:100,text:b.get("createTime","\u521b\u5efa\u65f6\u95f4")},{width:100,
text:b.get("modifier","\u6700\u540e\u4fee\u6539\u4eba")},{width:100,text:b.get("modifyTime","\u6700\u540e\u4fee\u6539\u65f6\u95f4")}];g.setArrHeadRowMap(c);g.setFunIsSearch(function(){return Ab});g.setFunGetArrSelectedWhenSearchModel(function(){return[]});g.setFunSetArrSelectedWhenSearchModel(function(h){return null});g.setFunGetSearchBox(function(){return U.getToolbar().getSearchBox()});g.setJqModelNoDataView(U.getModelNoDataView());g.setJqSearchNoDataView(U.getSearchNoResultView());g.setDraggableAdjusting(!1);
g.getJqUi().appendTo(a);r=new pb;c=r.getJqUi();c.appendTo(a);c.hide();c=new Mb;c.setCallbackImmediately(function(){document.body.style.height=document.documentElement.clientHeight+"px";d.resizeAfterObserver();Oa.resizeAfterObserver();dc&&dc()});c.setDelay(250);c.observe()};this.getToolbar=function(){return k};this.getModelListView=function(){return g};this.getModelCardView=function(){return r};this.getIsListView=function(){return k.getIsListView()};this.getModelNoDataView=function(){return e.getJqUi()};
this.showModelListView=function(){r&&r.hide();g&&g.show()};this.showModelCardView=function(){g&&g.hide();r&&r.show()};this.setSplitPane=function(c){w=c};this.getSearchNoResultView=function(){return u.getJqUi()};this.showModelNoData=function(){e&&(e.show(),f())};this.hideModelNoData=function(){e&&e.hide()};this.showSearchNoResult=function(){u&&(u.show(),p())};this.hideSearchNoResult=function(){u&&u.hide()};this.showModelView=function(c,h){h&&I.sortModelByModifyTime(c);d.getIsListView()?(d.showModelListView(),
g.clearArrAllSelectedModels(),g.setArrAutoSelectedModel(Ja),g.setModels(c)):(d.showModelCardView(),r.setModels(c),r.updateModelCardView())};this.clearModelSelectedStatus=function(c){c.forEach(function(h){h.setSelected(!1)})};this.clearMetricSpreadStatus=function(c){c.forEach(function(h){h.setSpreadState(!1)})};this.getSelectedModels=function(){return d.getIsListView()?U.getModelListView().getSelectedModel():U.getModelCardView().getSelectedModel()};this.resizeAfterObserver=function(){w.setSecondSize(document.documentElement.clientWidth-
w.getNonemptyFirstWide()-28);k.resizeToolbarViewWidth();f();p();g.resizeViewHeight();d.getIsListView()&&g.updateUi(!0)};var f=function(){var c=g.getJqUi().height()-41-10-6;d.getModelNoDataView().css("height",c);var h=e.getJqUi().height();c=c<=h?101:(c-h)/2+101;d.getModelNoDataView().css("top",c)},p=function(){var c=g.getJqUi().height()-41-10-6;d.getSearchNoResultView().css("height",c);var h=u.getJqUi().height();c=c<=h?101:(c-h)/2+101;d.getSearchNoResultView().css("top",c)}}function Gb(){function d(){var K,
ta,Ba=!0;this.getJqUi=function(){K||Ra();return K};this.setClickListener=function(za){ta=za};this.setListView=function(za){Ba=za};this.getIsListView=function(){return Ba};var Ra=function(){K=$("<div class='toolbar-model-view-switch'>");var za=$("<div class='model-list-view-icon'>");W.background(za,"list-view-on");za.attr("title",b.get("listView","\u5217\u8868\u89c6\u56fe"));za.appendTo(K);var D=$("<div class='model-card-view-icon'>");W.background(D,"card-view");D.attr("title",b.get("cardView","\u5361\u7247\u89c6\u56fe"));
D.appendTo(K);za.on("click",function(){W.background(D,"card-view");W.background(za,"list-view-on");ta(!0)});D.on("click",function(){W.background(D,"card-view-on");W.background(za,"list-view");ta(!1)});return K}}var a=this,k,e,u,g,r,w,t,f,p,c,h,v=va.ALL_TYPE;this.getJqUi=function(){k||q();return k};this.getAllBtnWidth=function(){return L?e.width()+g.width()+w.width():e.width()+(u.width()+56)+g.width()+t.width()+r.width()+w.width()+(p.width()+40)};this.getSearchBox=function(){return c};this.getUploadBtn=
function(){return f};this.getSearchText=function(){return c.getText()};this.getViewSwitch=function(){return h};this.getIsListView=function(){return h&&h.getIsListView()};this.resizeToolbarViewWidth=function(){var K=a.getAllBtnWidth();K=a.getJqUi().width()-K-180-100;c.getJqUi().css("width",K);h.getJqUi().css("width",K)};this.clearSearchStatus=function(){Ab=!1;c.clear();c.getJqUi().find("input").blur()};var q=function(){k=$("<div class='main-page-toolbar'>");L?l():y();c=new N;c.setSearchListenerDelay(1E3);
c.addSearchListener(function(){$a(c.getText())});c.setShowSearchIcon(!0);c.setPlaceholder(b.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));var K=c.getJqUi();K.addClass("toolbar-model-search-box");K.find("input").on("keydown",function(ta){13===(ta.keyCode||ta.which||ta.charCode)&&$a(c.getText())});k.append(K);h=new d;h.setClickListener(jb);k.append(h.getJqUi())},l=function(){e=F("toolbar-btn-data-source-manage",b.get("dataSourceManage","\u6570\u636e\u6e90\u7ba1\u7406"),kc);k.append(e);
g=F("toolbar-btn-data-permission-preset",b.get("dataPermission","\u6570\u636e\u6743\u9650"),function(){ec(!0)});k.append(g);w=F("toolbar-btn-refresh-preset",b.get("refresh","\u5237\u65b0"),function(){P.occur(P.BUTTON_TYPE,P.REFRESH);Tb()},!0);k.append(w)},y=function(){e=F("toolbar-btn-data-source-manage",b.get("dataSourceManage","\u6570\u636e\u6e90\u7ba1\u7406"),kc);k.append(e);u=M();g=F("toolbar-btn-data-permission",b.get("dataPermission","\u6570\u636e\u6743\u9650"),function(){ec(!0)});k.append(g);
t=F("toolbar-btn-model-edit",b.get("editModelBtn","\u7f16\u8f91"),rc);k.append(t);r=F("toolbar-btn-model-delete",b.get("deleteModelBtn","\u5220\u9664"),sc);k.append(r);w=F("toolbar-btn-refresh",b.get("refresh","\u5237\u65b0"),function(){P.occur(P.BUTTON_TYPE,P.REFRESH);Tb()});k.append(w);G(p);k.append(p)},F=function(K,ta,Ba,Ra){var za=$("<div>");za.addClass(K);za.on("click",Ba);za.text(ta);za.attr("title",ta);Ra||(K=$("<div class='toolbar-btn-split-line'>"),za.append(K));return za},M=function(){var K=
$("<div class='toolbar-btn-deploy'>");K.on("click",tc);K.text(b.get("deploy","\u90e8\u7f72"));K.attr("title",b.get("deploy","\u90e8\u7f72"));k.append(K);var ta=new qb;z(ta,uc,b.get("batchDeploy","\u6279\u91cf\u90e8\u7f72"));z(ta,vc,b.get("deployManager","\u90e8\u7f72\u7ba1\u7406"),!0);var Ba=$("<div class='deploy-btn-down-arrows'>");Ba.on("click",function(za){qa(K,$(za.target),function(){return ta})});W.background(Ba,"btn-down-arrows");var Ra=$("<div class='deploy-button-split-line'>");Ba.appendTo(k);
Ra.appendTo(k);return K},G=function(){p=$("<div class='toolbar-btn-more'>");var K=new qb;z(K,wc,b.get("move","\u79fb\u52a8"));z(K,xc,b.get("copy","\u590d\u5236"));z(K,yc,b.get("export","\u5bfc\u51fa"));f=$("<input type='file' id='uploadBtn'>");f.addClass("import-model-file");f.css("display","none");f.attr("accept",[".qing-md"]);f.on("change",function(Ra){var za=U.getJqUi();if(Ra=za.find("#uploadBtn").get(0).files[0]){var D=Ra.name,ka=Ra.size,ib=D.lastIndexOf(".");D=D.substring(ib+1,D.length).toLowerCase();
za.find("#uploadBtn").val("");"qing-md"!=D?I.getMessageCurtain().showPrompt(b.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002")):0==ka?I.getMessageCurtain().showPrompt(b.get("uploadFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002")):104857600<=ka?I.getMessageCurtain().showPrompt(b.get("fileTooLarge","\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002")):(za=new xb,za.createJqUi(n,
Ra,I,I.getMessageCurtain()),za.setFunRefreshModelGroup(Tb))}f.val("")});k.append(f);z(K,function(){f.click()},b.get("import","\u5bfc\u5165"),!0);var ta=b.get("moreButton","\u66f4\u591a");ta=O(p,!0,function(){return K},ta,ta);var Ba=$("<div class='btn-down-arrows'>");W.background(Ba,"btn-down-arrows");Ba.appendTo(ta.getJqUi())},z=function(K,ta,Ba,Ra){ta=new fa(ta);Ra?ta.setText(Ba):ta.setText(Ba+"...");K.addItemModel(ta)},O=function(K,ta,Ba,Ra,za){var D=new Ya;D.setText(Ra);D.setTooltips(za);D.setShowDropdownArrow(!1);
D.addActionListener(function(ka,ib){ta?Fa(ka.getJqUi(),ib,Ba,K):Ba(ka)});Ra=D.getJqUi();Ra.css({"background-color":"white"});Ra.find(".sa-ctrl-tbbtn-text").css({color:"#2b87f3"});Ra.appendTo(K);return D},qa=function(K,ta,Ba){var Ra=K.data("menu");if(Ra&&Ra.isShowing())K.data("menu",null),Ra.hide();else{var za=K.outerWidth()-20,D=K.outerHeight(),ka=Math.min(120,Math.max(za,120));Ra=new mb;Ra.setWidth(ka);Ra.setModel(Ba());Ra.setHideListener(function(){K.data("menu",null)});K.data("menu",Ra);var ib=
100<e.outerWidth()?90:110;Ra.getJqUi().find(".sa-ctrl-menu-item").css("color","#2B87F3");Ra.getJqUi().find(".sa-ctrl-menu-item-text").css("font-size","14px");Ba=U.getJqUi();za=[ka-za-ib,D+3];za=oa.upwardCoordinate(K[0],za,Ba[0]);Ra.show(Ba,za[0],za[1],ta,!0,[0,-D-2])}},Fa=function(K,ta,Ba,Ra){var za=K.data("menu");if(za&&za.isShowing())K.data("menu",null),za.hide();else{za=new mb;za.setModel(Ba());za.setHideListener(function(){K.data("menu",null)});za.getJqUi().find(".sa-ctrl-menu-item").css("color",
"#2B87F3");za.getJqUi().find(".sa-ctrl-menu-item-text").css("font-size","14px");K.data("menu",za);Ba=K.prop("offsetLeft");var D=K.prop("offsetHeight")+K.prop("offsetTop");za.show(Ra,Ba,D,ta,!0)}},$a=function(K){var ta=I.getSelectedGroup();if(ta){var Ba=I.getCurrentGroupModel(Bb,ta);if(v!=va.ALL_TYPE&&v){ta=[];for(var Ra=0;Ra<Ba.length;Ra++){var za=Ba[Ra];za.getModelType()==v&&ta.push(za)}Ba=ta}}if(""!==K){if(Ab=!0,Ba=Sb(Ba,K),lc(Ba),U.showModelView(Ba,!0),Ba=v==va.ALL_TYPE||v==va.METRICS_MODEL,ta=
U.getModelCardView().getMetricsInfoPanel(),!U.getIsListView()&&ta)Ba?K&&(Ba=ta.getModel(),0==Sb([Ba],K).length&&U.getModelCardView().resizeModelCardView()):U.getModelCardView().resizeModelCardView()}else Ab&&(Ab=!1,console.log(Ba),lc(Ba),U.showModelView(Ba,!0),U.getModelCardView().resizeModelCardView())},jb=function(K){var ta=U.getIsListView();ta!==K&&(Ja=U.getSelectedModels(),!ta&&U.getModelCardView().resizeModelCardView(),U.getToolbar().getViewSwitch().setListView(K),K=Oa.getModelGroupTree().getSelectedNode().getUserObject(),
K=I.getCurrentGroupModel(Bb,K),Ab&&(K=Sb(K,U.getToolbar().getSearchText())),U.showModelView(K,!1),P.occur(P.MODEL_SHOW_METHOD,P.getModelShowMethod(ta)))}}function ob(){var d;this.getJqUi=function(){if(!d){d=$("<div class='model-no-data-container'>");var a=$("<div class='model-no-data-icon'>");W.background(a,"icon-empty");var k=$("<div class='model-no-data-text'>"),e=b.get("noModelTips","\u6682\u65e0\u6a21\u578b");k.text(e);a.appendTo(d);k.appendTo(d)}return d};this.hide=function(){d&&d.hide()};this.show=
function(){d&&d.show()}}function Ta(){function d(D){KTDefaultCellRender.call(this,D);var ka=this,ib=this.paintCellUI;this.paintCellUI=function(ab,Fb){var ba=ka.getCurrentRowIdx(),kb=ka.getCurrentRow(),Ca=ka.getCurrentColIdx(),Wa=kb.getUserObject();(new Qb).setFormatString("yyyy-MM-dd HH:mm:ss");if(ba<nb.getHeadRowCount())ib(ab,Fb),0===Ca&&1===ba&&(ba=t&&t.isChecked(),t=new H,t.setChecked(ba),t.addCheckedListener(function(wb,hb){if(hb){var Cb=Object.keys(r);if(!Fa&&wb.isChecked())hb=I.createFacade(function(A){var J=
A.deployableModelIds;if((A=A.notDeployableModelIds)&&0<A.length){var da=k.getModelNameById(A[0]);A=1==A.length?b.get("selectedModelCycleRef",'"#1"\u6a21\u578b\u5b58\u5728\u5faa\u73af\u5f15\u7528\uff0c\u65e0\u6cd5\u9009\u62e9\u3002').replace("#1",da):b.get("batchSelectedModelCycleRef",'"#1"\u7b49"#2"\u4e2a\u6a21\u578b\u5b58\u5728\u5faa\u73af\u5f15\u7528\uff0c\u65e0\u6cd5\u9009\u62e9\u3002').replace("#1",da).replace("#2",A.length);$a.showPrompt(A,2E3);jb&&jb(J);wb.setChecked(!1)}else for(J=0;J<Cb.length;J++)r[Cb[J]].setChecked(wb.isChecked())},
null,null,ra.getFunGetDeployRemoteImpl()()),hb.setShowBlocking(!0),hb.batchCheckModelCycleReference(Cb);else for(Ib&&Ib.setAutoSelectedModel([]),hb=0;hb<Cb.length;hb++)r[Cb[hb]].setChecked(wb.isChecked());if(h()&&wb.isChecked()){var x=v();for(hb=0;hb<e.length;hb++)x.push(e[hb]);q(x)}}}),ba=t.getJqUi(),oa.layoutCtrlCenterAlign(ba,14),oa.layoutCtrlMiddleAlign(ba,22),ba.appendTo(ab));else if(0===Ca){ba=$(ab);Fa&&ba.css("border-right","1px solid rgb(229, 229, 229)");if(Wa instanceof xa)return;kb=Wa.getModelId();
Ca=new H;ba=Wa.getSelected();if(h())for(Ga in v()){if(Jb=Wa.getModelId(),Ub=v()[Ga].getModelId(),Jb===Ub){ba=!0;break}}else for(var Ga=0,vb=w.length;Ga<vb;Ga++){var Jb=Wa.getModelId(),Ub=w[Ga];if(Jb===Ub){ba=!0;break}}Ca.setUserObject(Wa);Fa||F&&Ca.addCheckedListener(F);Ca.setChecked(ba);Ca.addCheckedListener(function(wb,hb){hb=wb.isChecked();var Cb=wb.getUserObject().getModelId();r[Cb].setChecked(hb);wb.getUserObject().setSelected(hb);if(h()){var x=v();if(hb)x.push(wb.getUserObject());else for(var A=
0;A<x.length;A++)x[A].getModelId()===Cb&&x.splice(A,1);q(x)}if(hb)0>w.indexOf(Cb)&&w.push(Cb);else for(A in w)Cb===w[A]&&w.splice(A,1);if(hb)for(wb=Object.keys(r),A=0,Cb=wb.length;A<Cb;A++)if(!r[wb[A]].isChecked())return;t.setChecked(hb)});r[kb]=Ca;ba=Ca.getJqUi();oa.layoutCtrlCenterAlign(ba,14);oa.layoutCtrlWithLRTB(ba,null,null,16,10,null,null);ba.appendTo(ab)}else if(1===Ca)ba=$("<div class='list-cell-item'>"),Ga=Wa.getNumber(),ba.attr("title",Ga),h()&&""!=$.trim(y().getText())?Lb(ba,Ga,$.trim(y().getText())):
ba.text(Ga),ba.appendTo(ab);else if(2===Ca){Ga=$("<div class='model-name-info'>");kb=0;Ca=$("<div class='model-cell-item-preset'>");L&&(kb=b.get("preset","\u9884\u7f6e"),Ca.text(kb),kb=2!==kb.length?40:28,Ca.appendTo(Ga));vb=$("<div class='list-cell-item-name'>");if(Wa instanceof xa)Jb=Wa.getName();else{Jb=Wa.getModelName();var Vb=Wa.getModelType()}h()&&""!==$.trim(y().getText())?Lb(vb,Jb,$.trim(y().getText())):vb.text(Jb);vb.attr("title",Jb);Fa?(Jb=za(Wa),va.METRICS_MODEL===Vb&&0<Wa.getMetricItems().length?
(Ca=$("<div>"),oa.layoutCtrlWithLRTB(Ca,L?kb+10:null,null,16,12,null,16),W.backgroundWithHover(Ca,Wa.isSpreadState()?"icon-expanded":"icon-collapsed"),Ga.append(Ca),Ca.attr("iRowIdx",ba),Ca.css("cursor","pointer"),Ca.on("click",function(wb){var hb=$(wb.currentTarget).attr("iRowIdx"),Cb=Wa.getMetricItems().length;wb=Wa.isSpreadState();Wa.setSpreadState(!wb);hb=parseInt(hb);Cb+=hb;for(hb+=1;hb<=Cb;hb++){var x=u.getRow(hb),A=x.getUserObject();A=wb?!0:!fc(A);x.setHide(A)}u.updateUI();Ba()}),Jb.css("left",
L?kb+31:"26px"),vb.css("padding-left",L?kb+47:"42px")):Wa instanceof xa?(Ca.css("left",L?25:null),Jb.css("left",L?kb+30:"26px"),vb.css("padding-left",L?kb+47:"42px")):(Jb.css("left",L?kb+10:null),vb.css("padding-left",L?kb+26:"21px")),vb.css({cursor:"pointer",color:"#2B87F3"}),vb.on("click",function(wb){wb.stopPropagation();Vb=Vb?Vb:va.METRICS_MODEL;Yb(n,Wa.getModelId(),Vb,Wa.getModelName(),X)}),Jb.appendTo(Ga)):vb.css("color","#333");vb.appendTo(Ga);Ga.appendTo(ab)}else if(3===Ca)ba=$("<div class='list-cell-item'>"),
Ga=Wa.getDesc(),ba.attr("title",Ga),h()&&""!=$.trim(y().getText())?Lb(ba,Ga,$.trim(y().getText())):ba.text(Ga),ba.appendTo(ab);else if(4===Ca)ba=$("<div class='list-cell-item'>"),ba.appendTo(ab),ba.text(va.modelTypeTransformName(Wa.getModelType()));else if(5===Ca)ba=$("<div class='list-cell-item'>"),Ga=Wa.getLockUserName(),h()&&""!=$.trim(y().getText())?Lb(ba,Ga,$.trim(y().getText())):ba.text(Ga),ba.appendTo(ab);else if(6===Ca)ba=$("<div>"),ba.appendTo(ab),Ga=Wa.getDeployed(),kb=bb.deployStatusTransformText(Ga),
qa?qa(ba,Ga,kb):(Ca=$("<span>"),vb=$("<span>"),Ca.addClass("list-cell-item-deploy-status-circle"),vb.addClass("list-cell-item-deploy-status-text"),ba.addClass("list-cell-item"),vb.text(kb),Ga===bb.NONE_DEPLOYED?(Ca.css("background-color","#808080"),vb.css("color","#808080")):Ga===bb.DEPLOYED?(Ca.css("background-color","#26B175"),vb.css("color","#26B175")):Ga===bb.DEPLOYED_UPDATE&&(Ca.css("background-color","#ec7a09"),vb.css("color","#ec7a09")),vb.attr("title",kb),Ca.appendTo(ba),vb.appendTo(ba));
else if(7===Ca)ba=$("<div class='list-cell-item'>"),Ga=Wa.getCreator(),h()&&""!=$.trim(y().getText())?Lb(ba,Ga,$.trim(y().getText())):ba.text(Ga),ba.attr("title",Ga),ba.appendTo(ab);else if(8===Ca){if(Wa instanceof xa)return;ba=$("<div class='list-cell-item'>");Ga=Wa.getDisplayCreateTime();ba.text(Ga);ba.attr("title",Ga);ba.appendTo(ab)}else if(9===Ca)ba=$("<div class='list-cell-item'>"),Ga=Wa.getModifier(),h()&&""!=$.trim(y().getText())?Lb(ba,Ga,$.trim(y().getText())):ba.text(Ga),ba.attr("title",
Ga),ba.appendTo(ab);else if(10===Ca){if(Wa instanceof xa)return;ba=$("<div class='list-cell-item'>");Ga=Wa.getDisplayModifyTime();ba.text(Ga);ba.attr("title",Ga);ba.appendTo(ab)}ib(ab,Fb)}}function a(){this.getTailBlankForDragging=function(){return-1};this.isRowDraggable=function(D,ka){return!1};this.isColumnDraggable=function(D,ka){return D.getColumnsCount()==ka+1?!1:!0};this.getMinRowHeightLimited=function(D,ka){return 3};this.getMinColumnWidthLimited=function(D,ka){return 4};this.rowDraggedAction=
function(D,ka,ib){var ab=D.isSyncUIWhenModelChanged();D.setSyncUIWhenModelChanged(!0);ka=D.getRow(ka);ka.setHeight(ka.getHeight()+ib);D.setSyncUIWhenModelChanged(ab)};this.setMinColumnWidth=function(D){};this.columnDraggedAction=function(D,ka,ib){var ab=D.isSyncUIWhenModelChanged();D.setSyncUIWhenModelChanged(!0);ka=D.getColumn(ka);ka.setWidth(ka.getWidth()+ib);D.setSyncUIWhenModelChanged(ab);Ba()}}var k=this,e=[],u,g,r={},w=[],t,f,p=!0,c,h,v,q,l,y,F,M=!0,G,z,O=!0,qa,Fa=!0,$a,jb,K=[];this.setFunIsSearch=
function(D){h=D};this.setFunGetArrSelectedWhenSearchModel=function(D){v=D};this.setFunSetArrSelectedWhenSearchModel=function(D){q=D};this.setArrHeadRowMap=function(D){l=D};this.setFunGetSearchBox=function(D){y=D};this.setFunCheckBoxListener=function(D){F=D};this.setArrAutoSelectedModel=function(D){K=D;for(D=0;D<K.length;D++)w.push(K[D].getModelId())};this.setGroupChangedClearChecked=function(D){M=D};this.setJqModelNoDataView=function(D){G=D};this.setJqSearchNoDataView=function(D){z=D};this.setDraggableAdjusting=
function(D){p=D};this.setColumnFitVisibleWidth=function(D){O=D};this.setFunDeployStatusCustomStyle=function(D){qa=D};this.setModelNameJumpToDesigner=function(D){Fa=D};this.setDeployMessageCurtain=function(D){$a=D};this.setFunAllSelectCallBack=function(D){jb=D};this.clearArrAllSelectedModels=function(){w=[]};this.getSelectAllCheckBox=function(){return t};this.addSelectedModel=function(D){D.setSelected(!0);0>w.indexOf(D.getModelId())&&w.push(D.getModelId())};this.removeSelectedModel=function(D){D.setSelected(!1);
for(var ka in w)D.getModelId()===w[ka]&&w.splice(ka,1)};this.setModels=function(D){e=D;k.updateUi(!1)};this.refresh=function(){nb.refresh(u);t&&t.setChecked(Ra())};this.getJqUi=function(){f||ta();return f};this.show=function(){f&&f.show()};this.hide=function(){f&&f.hide()};this.resizeViewHeight=function(){f&&f.css({height:document.documentElement.clientHeight-305+"px"})};this.relayoutViews=function(){u&&u.relayoutViews()};this.updateUi=function(D){g&&g.show();var ka;u||ta();nb.clear(u);c&&c.removeAllSelecteds();
var ib=l.length;u.addColumns(ib);var ab=nb.createHeadRow(u);ab.setHeight(28);for(ka=0;ka<ib;ka++)u.getColumn(ka).setWidth(l[ka].width),l[ka].text&&ab.getCell(ka).setValue(l[ka].text);ka=new d(u);ka.setOutsideVisible(!1);u.setCellRender(ka);D||(r={});M&&(w=[]);D=[];ib=[];var Fb=ab=3;for(ka=0;ka<e.length;ka++){var ba=e[ka];D.push(ba);if(ba.getModelType()===va.METRICS_MODEL&&0<ba.getMetricItems().length){for(var kb=ba.getMetricItems(),Ca=kb.length,Wa=0;Wa<Ca;Wa++){var Ga=kb[Wa];Ga.setSpreadState(ba.isSpreadState());
D.push(Ga)}ab+=Ca;ba=new KTMergeBlock(Fb,ab,0,0);ib.push(ba);Fb+=Ca}ab+=1;Fb+=1}u.addMergeBlocks(ib);ab=new KTBorderStyle;ab.setBottomBorderWidth(1);ab.setBottomBorderPen("solid");ab.setBottomBorderColor("#e5e5e5");ka=0;for(ib=D.length;ka<ib;ka++)Ca=D[ka],Fb=nb.createRow(u,!1),Fb.setBorder(ab),Fb.setUserObject(Ca),Fb.setHeight(40),Ca instanceof xa&&(Ca=Ca.isSpreadState()?!fc(Ca):!0,Fb.setHide(Ca));0<e.length?(G&&G.hide(),z&&z.hide()):(!h()&&G.show()&&z.hide(),h()&&G.hide()&&z.show());nb.refresh(u);
t&&t.setChecked(Ra())};this.getSelectedModel=function(){for(var D=[],ka=Object.keys(r),ib=0,ab=ka.length;ib<ab;ib++){var Fb=ka[ib];if(r[Fb].isChecked())for(var ba=0;ba<e.length;ba++){var kb=e[ba];Fb===kb.getModelId()&&D.push(kb)}}return D};this.getCheckBoxMap=function(){return r};this.getModelNameById=function(D){for(var ka=0;ka<e.length;ka++)if(D==e[ka].getModelId())return e[ka].getModelName()};var ta=function(){f=$("<div class='model-list-view'>");u=nb.createTable();u.setColumnFitVisibleWidth(O);
p&&u.setDraggableAdjusting(!0,3,0,new a);nb.setupSingleRowSelection(u);c=u.getSelectionModel();g=$(u.getUI());oa.layoutCtrlWithLRTB(g,5,5,null,5,5,null);f.append(g)},Ba=function(){if(c&&c.hasSelected()){var D=c.getSelected();D&&c.addSelected(D)}},Ra=function(){var D=Object.keys(r);if(0==D.length)return!1;for(var ka=0;ka<D.length;ka++)if(!r[D[ka]].isChecked())return!1;return!0},za=function(D){var ka=$("<div class='model-icon-info'>");D instanceof xa?(D="metric-icon-small",ka.css("left","20px")):D=
va.getModelIconByType(D.getModelType())+"-small";W.background(ka,D);return ka}}function pb(){var d=this,a,k=[],e=[],u;this.getJqUi=function(){a||(a=$("<div class='model-card-view'>"));return a};this.setModels=function(g){k=g};this.empty=function(){a&&a.empty()};this.hide=function(){a&&a.hide()};this.show=function(){a&&a.show()};this.showClickStatus=function(g){va.METRICS_MODEL!==g.getModelType()&&d.resizeModelCardView();e.forEach(function(r){r.getModel().getModelId()===g.getModelId()?r.setClickStatus(!0):
r.setClickStatus(!1)})};this.resizeModelCardView=function(){u&&u.close();a&&a.css("width","100%")};this.getMetricsInfoPanel=function(){return u};this.setMetricsInfoPanel=function(g){u=g};this.updateModelCardView=function(){d.empty();if(0!==k.length){U.hideModelNoData();U.hideSearchNoResult();for(var g=d.getMetricsInfoPanel(),r=g&&g.getJqUi().is(":visible"),w=$(document.createDocumentFragment()),t=0;t<k.length;t++){var f=k[t];r&&g.getModel().getModelId()===f.getModelId()&&g.setModel(f);f=new Db(f);
e.push(f);f.getJqUi().appendTo(w)}w.appendTo(a);r&&g.update()}else Ab?(U.hideModelNoData(),U.showSearchNoResult()):(U.hideSearchNoResult(),U.showModelNoData())};this.getSelectedModel=function(){for(var g=[],r=0;r<k.length;r++){var w=k[r];w.getSelected()&&g.push(w)}return g}}function Db(d){var a,k;this.getJqUi=function(){a||e(d);return a};this.getSelected=function(){return k.isChecked()};this.setClickStatus=function(g){g?a.addClass("model-card-item-selected"):a.removeClass("model-card-item-selected")};
this.getModel=function(){return d};var e=function(g){var r=U.getToolbar().getSearchText();a=$("<div class='model-card-item'>");a.on("click",function(l){U.getModelCardView().showClickStatus(g)});var w=$("<div class='model-card-item-icon'>");W.background(w,va.getModelIconByType(g.getModelType())+"-middle");var t=$("<div class='model-card-item-name'>"),f=g.getModelName();Ab&&""!==$.trim(r)?Lb(t,f,$.trim(r)):t.text(f);t.attr("title",f);t.on("click",function(l){l.stopPropagation();Yb(n,g.getModelId(),
g.getModelType(),g.getModelName(),X)});var p=0;L&&(f=$("<div class='model-card-item-preset'>"),p=b.get("preset","\u9884\u7f6e"),f.text(b.get("preset","\u9884\u7f6e")),p=2!==p.length?40:28,w.css("left",p+20),t.css("left",p+49),a.append(f));f=new ya;f.setIconType(ya.ICON_TYPE_INFO);f.setTipsSize(310,290);f.setTipsHtml(u(g));f=f.getJqUi();oa.layoutCtrlWithLRTB(f,null,46,null,20,null,null);k=new H;k.setChecked(g.getSelected());p=k.getJqUi();oa.layoutCtrlWithLRTB(p,null,15,16,17,null,null);k.addCheckedListener(function(l,
y){g.setSelected(l.isChecked())});var c=$("<div class='model-card-item-description'>"),h=g.getDesc();c.attr("title",h);Ab&&""!==$.trim(r)?Lb(c,h,$.trim(r)):c.text(h);h=$("<div class='model-card-item-lock-status'>");var v=b.get("tipsModelLocker","\u5f53\u524d\u9501\u5b9a\u4eba")+b.get("colon","\uff1a"),q="";L||(q=g.getLockUserName())&&0!==q.length||(q=b.get("noLocked","\u6682\u672a\u9501\u5b9a"));Ab&&""!==$.trim(r)?(h.text(v),Lb(h,q,$.trim(r))):h.text(v.concat(q));h.attr("title",v.concat(q));r=$("<div class='model-card-item-deploy-status'>");
v=g.getDeployed();q=bb.deployStatusTransformText(v);r.text(q);v===bb.NONE_DEPLOYED?r.css("color","#808080"):v===bb.DEPLOYED?r.css("color","#26B175"):v===bb.DEPLOYED_UPDATE&&r.css("color","#ec7a09");a.append(w);a.append(t);a.append(f);a.append(p);a.append(c);a.append(h);a.append(r);g.getModelType()===va.METRICS_MODEL&&0<g.getMetricItems().length&&(w=$("<div class = 'model-card-preview-metrics'>"),w.text(b.get("previewMetrics","\u67e5\u770b\u6307\u6807")+" >>"),w.on("click",function(){U.getModelCardView().getJqUi().css("width",
"calc(100% - 300px)");var l=U.getModelCardView().getMetricsInfoPanel();l||(l=new Rb,U.getModelCardView().setMetricsInfoPanel(l));l.setFunCloseMetricsPanel(U.getModelCardView().resizeModelCardView);l.show();l.setModel(g);l.getJqUi().appendTo(U.getJqUi());l.update()}),a.append(w));return a},u=function(g){var r=U.getToolbar().getSearchText(),w=function(h,v){var q=$("<div class='model-card-item-tips-info'>"),l=$("<span>");l.text(h+b.get("colon","\uff1a"));h=$("<span>");Ab&&""!==$.trim(r)?Lb(h,v,$.trim(r)):
h.text(v);q.attr("title",v);q.append(l);q.append(h);return q},t=$("<div>");oa.layoutCtrl(t,null,null,280,270);var f=va.getModelIconByType(g.getModelType())+"-tips",p=$("<div>");W.background(p,f);oa.layoutCtrl(p,0,0,36,36);f=$("<div class='model-info-name'>");var c=g.getModelName();Ab&&""!==$.trim(r)?Lb(f,c,$.trim(r)):f.text(c);f.attr("title",g.getModelName());t.append(p);t.append(f);p=$("<div>");oa.layoutCtrl(p,null,38,280,234);p.append(w(b.get("tipsModelNumber","\u7f16\u7801"),g.getNumber()));p.append(w(b.get("tipsModelDesc",
"\u63cf\u8ff0"),g.getDesc()));p.append(w(b.get("tipsModelType","\u7c7b\u578b"),va.modelTypeTransformName(g.getModelType())));f=L?"":g.getLockUserName()?g.getLockUserName():b.get("noLocked","\u6682\u672a\u9501\u5b9a");p.append(w(b.get("tipsModelLocker","\u5f53\u524d\u9501\u5b9a\u4eba"),f));p.append(w(b.get("tipsModelDeployStatus","\u90e8\u7f72\u72b6\u6001"),bb.deployStatusTransformText(g.getDeployed())));p.append(w(b.get("tipsModelCreator","\u521b\u5efa\u4eba"),g.getCreator()));(new Qb).setFormatString("yyyy/MM/dd HH:mm:ss");
f=g.getDisplayCreateTime();p.append(w(b.get("tipsModelCreateTime","\u521b\u5efa\u65f6\u95f4"),f));p.append(w(b.get("tipsModelModifier","\u6700\u540e\u4fee\u6539\u4eba"),g.getModifier()));g=g.getDisplayModifyTime();p.append(w(b.get("tipsModelModifyTime","\u6700\u540e\u4fee\u6539\u65f6\u95f4"),g));t.append(p);return t}}function Rb(){function d(f){KTDefaultCellRender.call(this,f);var p=this,c=this.paintCellUI;this.paintCellUI=function(h,v){var q=p.getCurrentRowIdx(),l=p.getCurrentRow(),y=p.getCurrentColIdx(),
F=l.getUserObject();l=U.getToolbar().getSearchText();if(q<nb.getHeadRowCount())c(h,v);else if(0===y){q=$("<div class='metric-name-info'>");y=$("<div class='metric-cell-item-name'>");y.on("click",function(){Yb(n,u.getModelId(),va.METRICS_MODEL,u.getModelName(),X)});var M=$("<div class='metric-cell-item-icon'>");W.background(M,"metric-icon-small");var G=F.getName();Ab&&""!==$.trim(l)?Lb(y,G,$.trim(l)):y.text(G);y.attr("title",G);y.appendTo(q);M.appendTo(q);q.appendTo(h)}else 1===y?(q=$("<div class='metric-cell-item'>"),
y=F.getDesc(),Ab&&""!==$.trim(l)?Lb(q,y,$.trim(l)):q.text(y),q.attr("title",y),q.appendTo(h)):2===y&&(l=$("<div class='model-metrics-detail-preview'>"),l.on("click",function(){zc(u,F.getMetric())}),l.attr("title",b.get("metricsPreview","\u6307\u6807\u67e5\u770b")),W.backgroundWithHover(l,"preview"),l.appendTo(h));c(h,v)}}var a,k,e,u,g,r=[{width:120,text:b.get("metricsName","\u6307\u6807\u540d\u79f0")},{width:120,text:b.get("metricsDesc","\u6307\u6807\u63cf\u8ff0")},{width:50,text:""}],w;this.getJqUi=
function(){a||t();return a};this.setModel=function(f){u=f};this.getModel=function(){return u};this.setFunCloseMetricsPanel=function(f){w=f};this.update=function(){var f=u.getModelName();k.text("");var p=U.getToolbar().getSearchText();Ab&&""!==$.trim(p)?Lb(k,f,$.trim(p)):k.text(f);k.attr("title",f);nb.clear(g);p=r.length;g.addColumns(p);var c=nb.createHeadRow(g);c.setHeight(28);for(f=0;f<p;f++)g.getColumn(f).setWidth(r[f].width),c.getCell(f).setValue(r[f].text);f=new d(g);f.setOutsideVisible(!1);g.setCellRender(f);
p=u.getMetricItems();for(f=0;f<p.length;f++){c=p[f];var h=nb.createRow(g,!1),v=new KTBorderStyle;v.setBottomBorderWidth(1);v.setBottomBorderPen("solid");v.setBottomBorderColor("#e5e5e5");h.setBorder(v);h.setUserObject(c);h.setHeight(40);h.setHide(!fc(c))}nb.refresh(g)};var t=function(){a=$("<div class='model-metrics-panel'>");var f=$("<div class='model-metrics-panel-title'>"),p=$("<div class='model-metrics-panel-model-icon'>");W.background(p,va.getModelIconByType(va.METRICS_MODEL)+"-tips");k=$("<div class='model-metrics-panel-model-name'>");
var c=u.getModelName();k.attr("title",c);k.on("click",function(){Yb(n,u.getModelId(),va.METRICS_MODEL,u.getModelName(),X)});if(L){c=$("<div class='model-metric-panel-preset'>");var h=$("<div class='model-metric-preset-text'>");h.text(b.get("preset","\u9884\u7f6e"));W.background(c,"icon-preset-big");h.appendTo(c);f.append(c)}f.append(p);f.append(k);p=$("<div class='model-metrics-panel-table'>");g=nb.createTable();g.setColumnFitVisibleWidth(!0);g.setDraggableAdjusting(!1);e=$(g.getUI());oa.layoutCtrlWithLRTB(e,
5,5,"calc(100% - 10px)",0,0,"calc(100% - 10px)");p.append(e);c=$("<div class='model-metrics-panel-close-button'>");h=$("<div>");h.text(b.get("close","\u5173\u95ed"));h.appendTo(c);c.on("click",function(){w&&w()});a.append(f);a.append(p);a.append(c)};this.close=function(){a&&a.hide()};this.show=function(){a&&a.show()}}function Nb(d){eb.call(this);var a=this.protectedMethod,k=this,e,u,g,r;(function(){a.setTitle(d);a.setSelectable(!0);a.setContentPaneCreator(function(){k.setSize(430,350);var f=$("<div>"),
p=$("<div>");p.css({"float":"left",width:"auto",position:"relative",left:"0px"});var c=new Na;c.setRequired(!0);c.setText(b.get("number","\u7f16\u7801"));c=c.getJqUi();c.css({position:"relative",height:"23px","margin-right":"5px","float":"left"});var h=new ya;h.setIconType(ya.ICON_TYPE_QUESTION);h.setTipsSize(310,40);h.setTipsText(b.get("numberTips","\u6a21\u578b\u7f16\u7801\u662f\u6a21\u578b\u7684\u552f\u4e00\u6807\u8bc6\uff0c\u521b\u5efa\u6a21\u578b\u540e\u65e0\u6cd5\u4fee\u6539\u3002"));h=h.getJqUi();
h.css({position:"relative",top:"4px",width:"16px",height:"16px","float":"right"});g=new sb;if(e.getModelId()){var v=e.getNumber()?e.getNumber():"";g.setText(v);g.setEnabled(!1)}var q=b.get("numberPlaceholder","\u5fc5\u987b\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934");g.setPlaceholder(q);v=g.getJqUi();var l=v.find(".sa-ctrl-textfield-input");l.attr("title",q);oa.makeTextOmissible(l);q=new Na;q.setRequired(!0);q.setText(b.get("dataModelName",
"\u540d\u79f0"));q=q.getJqUi();u=new sb;e&&u.setText(e.getModelName());l=u.getJqUi();var y=new Na;y.setText(b.get("dataModelDesc","\u63cf\u8ff0"));y=y.getJqUi();r=new Aa;e&&r.setText(e.getDesc());var F=r.getJqUi();F.find(".sa-ctrl-textarea-real").css("font-family","Microsoft YaHei");c.appendTo(p);h.appendTo(p);p.appendTo(f);v.appendTo(f);q.appendTo(f);l.appendTo(f);y.appendTo(f);F.appendTo(f);oa.layoutCtrl(v,84,0,300,23);oa.layoutCtrl(q,0,49,70,23);oa.layoutCtrl(l,84,49,300,23);oa.layoutCtrl(y,0,
99,70,23);oa.layoutCtrl(F,84,105,300,120);return f});a.setFooterPaneCreator(function(f){var p=new E(b.get("confirm","\u786e\u5b9a"));p.setHighlight(!0);var c=p.getJqUi();c.addClass("sa-ctrl-dialog-footer-ok");c.appendTo(f);p.addActionListener(function(h){h=$.trim(g.getText());var v=$.trim(u.getText()),q=$.trim(r.getText());e.getModelId()?t(h,v,q):w(h,v,q);return!0});p=new E(b.get("cancel","\u53d6\u6d88"));p.setHighlight(!1);c=p.getJqUi();c.addClass("sa-ctrl-dialog-footer-cancel");c.appendTo(f);p.addActionListener(function(){a.destroy();
return!0})});a.setClosingAction(function(f){})})();this.setModel=function(f){e=f};var w=function(f,p,c){var h=I.getSelectedGroup(),v=h.getArrModelList(),q=I.getUrlParam("fromPageClientId"),l=bc(f,"");if(l||(l=cc(p,c)))return a.getMessageCurtain().showPrompt(l),!1;for(var y=0;y<v.length;y++){var F=v[y];if(F.getModelType()===e.getModelType()&&F.getModelName()===p){l=b.get("groupHasSameDataModel","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d#1\u3002").replace("#1",va.modelTypeTransformName(e.getModelType()));
break}}if(l)return a.getMessageCurtain().showPrompt(l),!1;l=new Qa;l.setNumber(f);l.setModelName(p);l.setDesc(c);l.setModelType(e.getModelType());l.setModelSetId(n);l.setGroupId(h.getModelGroupId());f=I.createFacade(function(M){a.destroy();if(!M)return!1;U.getToolbar().clearSearchStatus();var G=new Qa;G.fromJsonObject(M);Kb.push(G);v.push(G);M=I.getCurrentGroupModel(Bb,h);U.showModelView(M,!1);M=b.get("addModelSuccess","\u65b0\u5efa\u6a21\u578b\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(M,
2E3);P.occur(P.MODEL_TYPE,P.getModelType(G.getModelType()));return!0},function(M,G){return 20003101===M?(M=b.get("groupHasSameDataModel","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d#1\u3002").replace("#1",va.modelTypeTransformName(e.getModelType())),a.getMessageCurtain().showPrompt(M),!0):20003003===M?(a.destroy(),M=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+h.getModelGroupName()+"\u201d"),I.getMessageCurtain().showPrompt(M),!0):20003109===M?(M=
b.get("numberDuplicate","\u7f16\u7801\u5df2\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002"),a.getMessageCurtain().showPrompt(M),!0):20003202===M?(M=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),I.getMessageCurtain().showPrompt(M),!0):!1});f.setShowBlocking(!0);f.createModel(l,q)},t=function(f,p,c){var h=I.getSelectedGroup(),v=e.getNumber(),q=e.getModelName(),l=e.getDesc();if(f===v&&p===q&&c===l)a.destroy();else{var y;bb.NONE_DEPLOYED===e.getDeployed()&&(y=bc(f,e.getModelId()));
if(y||(y=cc(p,c)))return a.getMessageCurtain().showPrompt(y),!1;v=!1;q=h.getArrModelList();for(l=0;l<q.length;l++){var F=q[l];if(F.getModelId()!==e.getModelId()&&F.getModelName()===p&&F.getModelType()===e.getModelType()){v=!0;break}}v&&(y=b.get("groupHasSameDataModel","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d#1\u3002").replace("#1",va.modelTypeTransformName(e.getModelType())));if(y)return a.getMessageCurtain().showPrompt(y),!1;var M=e.getModelType();y=new Qa;y.setModelId(e.getModelId());y.setNumber(f);
y.setModelName(p);y.setDesc(c);y.setModelType(M);y.setModelSetId(n);y.setGroupId(e.getGroupId());v=I.createFacade(function(G){a.destroy();if(!G)return!1;var z=new Qa;z.fromJsonObject(G);e.setModelName(p);e.setNumber(f);e.setDesc(c);e.setModifier(z.getModifier());e.setModifyTime(z.getModifyTime());G=I.getCurrentGroupModel(Bb,h);U.showModelView(G,!0);G=b.get("editModelSuccess","\u7f16\u8f91\u6a21\u578b\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(G,2E3);P.occur(P.MODEL_TYPE,P.getModelType(z.getModelType()));
return!0},function(G,z){return 20003101===G?(G=b.get("groupHasSameDataModel","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d#1\u3002").replace("#1",va.modelTypeTransformName(M)),a.getMessageCurtain().showPrompt(G),!0):20003102===G?(a.destroy(),G=b.get("moveModelNotExist","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),I.getMessageCurtain().showPrompt(G,2E3),!0):20003109===G?(G=b.get("numberDuplicate","\u7f16\u7801\u5df2\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002"),
a.getMessageCurtain().showPrompt(G),!0):20003202===G?(G=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),I.getMessageCurtain().showPrompt(G),!0):!1});v.setShowBlocking(!0);v.editModel(y)}}}function Wb(d){eb.call(this);var a=this.protectedMethod,k=this,e,u;(function(){a.setSelectable(!0);a.setContentPaneCreator(function(){k.setSize(360,270);var t=$("<div>"),f=new Na;f.setRequired(!0);f.setText(b.get("modelGroupName","\u540d\u79f0"));f=f.getJqUi();e=new sb;if(!d){var p=I.getSelectedGroup();
e.setText(p.getModelGroupName())}p=e.getJqUi();f.appendTo(t);p.appendTo(t);oa.layoutCtrl(f,34,40,70,23);oa.layoutCtrl(p,34,70,260,23);return t});a.setFooterPaneCreator(function(t){var f=new E(b.get("confirm","\u786e\u5b9a"));f.setHighlight(!0);var p=f.getJqUi();p.addClass("sa-ctrl-dialog-footer-ok");p.appendTo(t);f.addActionListener(function(c){if(!d)return w(),!0;if(u)return g(),!0;r();return!0});f=new E(b.get("cancel","\u53d6\u6d88"));f.setHighlight(!1);p=f.getJqUi();p.addClass("sa-ctrl-dialog-footer-cancel");
p.appendTo(t);f.addActionListener(function(c){a.destroy();return!0})});a.setClosingAction(function(t){})})();this.setSubDir=function(t){u=t};this.setModelType=function(t){};this.setTitle=function(t){a.setTitle(t)};this.textFieldFocus=function(){e&&e.requestFocus()};var g=function(){var t=$.trim(e.getText()),f;""!==t&&50<t.length?f=b.get("groupNameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""===t?f=b.get("groupNameCannotBeEmpty","\u8bf7\u8f93\u5165\u76ee\u5f55\u540d\u79f0\u3002"):
gc(t)&&(f=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"));if(f)a.getMessageCurtain().showPrompt(f);else{var p=I.getSelectedGroup();f=new Za;f.setModelSetId(n);f.setModelGroupName(t);f.setParentId(p.getModelGroupId());t=I.createFacade(function(c){a.destroy();if(!c)return!1;var h=b.get("addGroupSuccess","\u65b0\u5efa\u76ee\u5f55\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(h,2E3);!U.getIsListView()&&U.getModelCardView().resizeModelCardView();h=new T(Zb);h.fromJsonObject(c);h.setLevel(p.getLevel()+
1);h.setParentNode(p);p.getChildren().push(h);c=Oa.getModelGroupTree().getSelectedNode();if(c instanceof ea.LeafNode){c=c.getParent().getAllChildren();for(var v=0;v<c.length;v++)if(c[v].getUserObject().getModelGroupId()===p.getModelGroupId()){var q=v;break}Oa.createGroupOnLeafNode(h,p,q)}else Oa.createGroupOnBranchNode(h,c.getAllChildren().length);Hb.push(h);U.showModelView([],!1);Oa.updateUiWhenNotRootGroup();P.occur(P.MODEL_GROUP_LEVEL,h.getLevel())},function(c,h){return 20003001===c?(c=b.get("groupNameExist",
"\u540d\u79f0\u91cd\u590d\u3002"),a.getMessageCurtain().showPrompt(c),!0):20003003===c?(a.destroy(),c=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+p.getModelGroupName()+"\u201d"),I.getMessageCurtain().showPrompt(c),!0):20003301===c?(a.destroy(),$b(),!0):20003203===c?(c=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),a.destroy(),I.getMessageCurtain().showPrompt(c),!0):!1});t.setShowBlocking(!0);t.createModelGroup(f)}},r=function(){var t=
$.trim(e.getText()),f;""!==t&&50<t.length?f=b.get("groupNameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""===t?f=b.get("groupNameCannotBeEmpty","\u8bf7\u8f93\u5165\u76ee\u5f55\u540d\u79f0\u3002"):gc(t)&&(f=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"));if(f)a.getMessageCurtain().showPrompt(f);else{var p=Oa.getModelGroupTree().getSelectedNode(),c=p.getUserObject();c.getParentId()?(f=new Za,f.setModelSetId(n),f.setModelGroupName(t),f.setParentId(c.getParentId()),
t=I.createFacade(function(h){a.destroy();if(!h)return!1;var v=b.get("addGroupSuccess","\u65b0\u5efa\u76ee\u5f55\u6210\u529f\u3002");!U.getIsListView()&&U.getModelCardView().resizeModelCardView();I.getMessageCurtain().showSuccess(v,2E3);var q=c.getParentNode();v=new T(Zb);v.fromJsonObject(h);v.setLevel(c.getLevel());v.setParentNode(q);q.getChildren().push(v);h=p.getParent().getAllChildren();Hb.push(v);U.showModelView([],!1);q=Oa.getModelGroupTree().getSelectedNode().getParent();Oa.createGroupOnBranchNode(v,
h.length,q);Oa.updateUiWhenNotRootGroup()},function(h,v){return 20003001===h?(h=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"),a.getMessageCurtain().showPrompt(h),!0):20003003===h?(a.destroy(),h=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+c.getModelGroupName()+"\u201d"),I.getMessageCurtain().showPrompt(h),!0):20003301===h?(a.destroy(),$b(),!0):20003203===h?(h=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),a.destroy(),
I.getMessageCurtain().showPrompt(h),!0):!1}),t.setShowBlocking(!0),t.createModelGroup(f)):g()}},w=function(){var t=$.trim(e.getText()),f=I.getSelectedGroup();if(t===f.getModelGroupName())a.destroy();else{var p;""!==t&&50<t.length?p=b.get("groupNameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""===t?p=b.get("groupNameCannotBeEmpty","\u8bf7\u8f93\u5165\u76ee\u5f55\u540d\u79f0\u3002"):gc(t)&&(p=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"));p?a.getMessageCurtain().showPrompt(p):
(p=new Za,p.setModelGroupId(f.getModelGroupId()),p.setModelSetId(n),p.setModelGroupName(t),t=I.createFacade(function(c){if(!c)return!1;a.destroy();var h=b.get("editGroupSuccess","\u7f16\u8f91\u76ee\u5f55\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(h,2E3);h=new T(Zb);h.fromJsonObject(c);f.setModelGroupName(h.getModelGroupName());Oa.getModelGroupTree().refresh()},function(c,h){return 20003001===c?(c=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"),a.getMessageCurtain().showPrompt(c),
!0):20003003===c?(a.destroy(),c=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+f.getModelGroupName()+"\u201d"),I.getMessageCurtain().showPrompt(c),!0):20003301===c?(a.destroy(),$b(),!0):20003203===c?(c=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),I.getMessageCurtain().showPrompt(c),!0):!1}),t.setShowBlocking(!0),t.editModelGroup(p))}}}function Xb(d){eb.call(this);var a=this.protectedMethod,k=this,e,u;(function(){a.setTitle(b.get("operateConfirm",
"\u64cd\u4f5c\u786e\u8ba4"));a.setSelectable(!0);a.setContentPaneCreator(function(){k.setSize(400,300);var w=$("<div>"),t=$("<span>");m.background(t,"msg-delete");var f=$("<span class='model-delete-dialog'>");f.text(u);f.attr("title",u);t.appendTo(w);f.appendTo(w);oa.layoutCtrl(t,140,20,98,80);oa.layoutCtrl(f,0,125,370,23);return w});a.setFooterPaneCreator(function(w){var t=new E(b.get("confirm","\u786e\u5b9a"));t.setHighlight(!0);var f=t.getJqUi();f.addClass("sa-ctrl-dialog-footer-ok");f.appendTo(w);
t.addActionListener(function(p){d?g():r(e);return!0});t=new E(b.get("cancel","\u53d6\u6d88"));t.setHighlight(!1);f=t.getJqUi();f.addClass("sa-ctrl-dialog-footer-cancel");f.appendTo(w);t.addActionListener(function(p){a.destroy();return!0})});a.setClosingAction(function(w){})})();this.setConfirmMsg=function(w){u=w};this.setArrDeleteModel=function(w){e=w};var g=function(){var w=Oa.getModelGroupTree().getSelectedNode().getUserObject(),t=w.getModelGroupId(),f=w.getModelGroupName(),p=I.createFacade(function(c){a.destroy();
c=b.get("deleteModelGroupSuccess","\u5220\u9664\u76ee\u5f55\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(c,2E3);c=w.getParentNode().getChildren();for(var h=0;h<c.length;h++)if(c[h].getModelGroupId()===t){c.splice(h,1);break}for(h=0;h<Hb.length;h++)Hb[h].getModelGroupId()===t&&Hb.splice(h,1);Oa.removeGroupLeafNode();U.showModelView(Kb,!0)},function(c,h){a.destroy();var v;20003002===c?v=b.get("deleteModelBeforeModelGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u6a21\u578b\u518d\u5220\u9664\u76ee\u5f55\u3002"):
20003003===c?v=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+f+"\u201d"):20003004===c?v=b.get("deleteChildModelGroup","\u8bf7\u5148\u5220\u9664\u76ee\u5f55\u4e0b\u7684\u5b50\u76ee\u5f55\u518d\u5220\u9664\u76ee\u5f55\u3002"):20003203===c&&(v=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"));return v?(I.getMessageCurtain().showPrompt(v),!0):!1});p.setShowBlocking(!0);p.deleteModelGroup(n,t)},r=function(w){for(var t=[],f=I.getUrlParam("fromPageClientId"),
p=0;p<w.length;p++)t.push(w[p].getModelId());p=I.createFacade(function(c){a.destroy();if(c){c=b.get("deleteModelSuccess","\u5220\u9664\u6a21\u578b\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(c,2E3);Ja=[];var h=[];Oa.getModelGroupTree().getRootGroup().visiting(function(F){h.push(F)});for(c=0;c<w.length;c++){for(var v=w[c].getModelId(),q=w[c].getGroupId(),l=0;l<h.length;l++)if(h[l].getUserObject().getModelGroupId()===q){q=h[l].getUserObject().getArrModelList();for(var y=0;y<q.length;y++)q[y].getModelId()===
v&&q.splice(y,1);h[l].setUserObject(h[l].getUserObject());break}for(l=0;l<Kb.length;l++)Kb[l].getModelId()===v&&Kb.splice(l,1)}c=I.getSelectedGroup();c=I.getCurrentGroupModel(Bb,c);Ab&&(c=Sb(c,U.getToolbar().getSearchText()));U.showModelView(c,!1)}P.occur(P.BUTTON_TYPE,P.DELETE)},function(c,h){a.destroy();var v;20003108===c?v=b.get("deleteArrDeployedModel","\u201c\u5df2\u90e8\u7f72\u201d\u3001\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"):
20003107===c?v=b.get("deleteDeployedUpdateModel","\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"):20003106===c?v=b.get("deleteDeployedModel","\u201c\u5df2\u90e8\u7f72\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"):20003202===c&&(v=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"));return v?(I.getMessageCurtain().showPrompt(v),!0):!1});p.setShowBlocking(!0);p.deleteModel(n,t,f)}}function Va(){eb.call(this);
var d=this.protectedMethod,a=this,k,e,u,g,r=!1;(function(){d.setTitle(b.get("copyDataModel","\u590d\u5236\u6a21\u578b"));d.setSelectable(!0);d.setContentPaneCreator(function(){a.setSize(430,350);return w()});d.setFooterPaneCreator(function(c){var h=new E(b.get("confirm","\u786e\u5b9a"));h.setHighlight(!0);var v=h.getJqUi();v.addClass("sa-ctrl-dialog-footer-ok");v.appendTo(c);h.addActionListener(function(q){p();return!0});h=new E(b.get("cancel","\u53d6\u6d88"));h.setHighlight(!1);v=h.getJqUi();v.addClass("sa-ctrl-dialog-footer-cancel");
v.appendTo(c);h.addActionListener(function(q){d.destroy();return!0})});d.setClosingAction(function(c){})})();this.setCopyModel=function(c){k=c};var w=function(){var c=$("<div>"),h=$("<div>");h.css({"float":"left",width:"auto",position:"relative",left:"0px",top:"10px"});var v=new Na;v.setRequired(!0);v.setText(b.get("number","\u7f16\u7801"));v=v.getJqUi();v.css({position:"relative",height:"23px","margin-right":"5px","float":"left"});v.appendTo(h);var q=new ya;q.setIconType(ya.ICON_TYPE_QUESTION);q.setTipsSize(310,
40);q.setTipsText(b.get("numberTips","\u6a21\u578b\u7f16\u7801\u662f\u6a21\u578b\u7684\u552f\u4e00\u6807\u8bc6\uff0c\u521b\u5efa\u6a21\u578b\u540e\u65e0\u6cd5\u4fee\u6539\u3002"));q=q.getJqUi();q.css({position:"relative",top:"4px",width:"16px",height:"16px","float":"right"});q.appendTo(h);u=new sb;u.setPlaceholder(b.get("numberPlaceholder","\u5fc5\u987b\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934"));var l=u.getJqUi(),y=new Na;
y.setText(b.get("name","\u540d\u79f0"));y.setRequired(!0);y=y.getJqUi();e=new sb;e.addEditedListener(function(){r=!0});var F=e.getJqUi(),M=new Na;M.setText(b.get("copyTo","\u590d\u5236\u5230"));M=M.getJqUi();var G=Eb.getChildren(),z=I.getAllModelGroup(),O=new Ea(1);O.setRootChildrenFolderNode(G);O.setAllFolderNodeCount(G.length);g=new Z;var qa=new gb;G=z[0];for(var Fa="",$a=k.getGroupId(),jb=0;jb<z.length;jb++)if($a===z[jb].getModelGroupId()){G=z[jb];$a=[];for(z=z[jb];z.getModelGroupId()!=T.ROOT_NODE_ID;)$a.push(z.getModelGroupName()),
z=z.getParentNode();for(;0!=$a.length;)Fa+=$a.pop(),0!=$a.length&&(Fa+="/");break}qa.setSelectedGroup(G);qa.setPath(Fa);g.setSelectedModel(qa);g.setDropdownCreator(function(K,ta,Ba){return O.createJqPopup(K,ta,Ba)});g.setCustomPainter(function(K,ta){ta.text(K?K.getPath():"");ta.attr("title",K?K.getPath():"")});g.addSelectionListener(function(K){r||(K=K.getSelectedModel().getSelectedGroup().getModelGroupId(),t(n,K),k.copy().setGroupId(K))});z=g.getJqUi();z.appendTo(c);oa.layoutCtrl(z,100,50,240,23);
f();t(n,G.getModelGroupId());c.append(h);c.append(l);c.append(y);c.append(F);c.append(M);c.append(z);a.protectedCustomLayout(c,v,q,l,y,F,M,z);return c};this.protectedCustomLayout=function(c,h,v,q,l,y,F,M){oa.layoutCtrl(q,84,10,300,23);oa.layoutCtrl(l,0,65,70,23);oa.layoutCtrl(y,84,65,300,23);oa.layoutCtrl(F,0,120,70,23);oa.layoutCtrl(M,84,120,300,23)};var t=function(c,h){var v=I.createFacade(function(q){for(var l=k.getModelName(),y=k.getModelType(),F=[],M=0,G=q.length;M<G;M++){var z=Qa.createInstance(q[M]),
O=z.getModelName();z=z.getModelType();y===z&&0===O.indexOf(l)&&F.push(O)}if(0<F.length){q=1;for(M=!1;!M;){y=!1;for(M=0;M<F.length;M++)if(F[M]===l+"_"+q){q++;y=!0;break}M=!y}l=l+"_"+q}e.setText(l)},function(q,l){return!1});v.setShowBlocking(!0);v.listGroupAllModel(c,h)},f=function(){var c=I.createFacade(function(h){for(var v=k.getNumber(),q=[],l=0,y=h.length;l<y;l++){var F=Qa.createInstance(h[l]).getNumber();0===F.indexOf(v)&&q.push(F)}if(0<q.length){h=1;for(l=!1;!l;){y=!1;for(l=0;l<q.length;l++)if(q[l]===
v+"_"+h){h++;y=!0;break}l=!y}v=v+"_"+h}else v+="_1";u.setText(v)},function(h,v){return!1});c.setShowBlocking(!0);c.listAllModels()},p=function(){var c=g.getSelectedModel().getSelectedGroup(),h=c.getModelGroupId(),v=c.getModelGroupName();c=$.trim(e.getText());var q=$.trim(u.getText()),l=bc(q,"");if(l||(l=cc(c,null)))return d.getMessageCurtain().showPrompt(l),!1;l=I.createFacade(function(F){if(!F)return!1;F=Qa.createInstance(F);Kb.push(F);var M=[];Oa.getModelGroupTree().getRootGroup().visiting(function(z){M.push(z)});
for(var G=0;G<M.length;G++)if(M[G].getUserObject().getModelGroupId()===h){M[G].getUserObject().getArrModelList().push(F);break}F=I.getSelectedGroup();F=I.getCurrentGroupModel(Bb,F);Ab&&(F=Sb(F,U.getToolbar().getSearchText()));U.showModelView(F,!1);F=b.get("copyModelSuccess","\u590d\u5236\u6a21\u578b\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(F,2E3);d.destroy();P.occur(P.BUTTON_TYPE,P.COPY)},function(F,M){var G;20003101===F?G=b.get("groupHasSameDataModel","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d#1\u3002").replace("#1",
va.modelTypeTransformName(k.getModelType())):20003109===F&&(G=b.get("numberDuplicate","\u7f16\u7801\u5df2\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002"));if(G)return d.getMessageCurtain().showPrompt(G),!0;20003102===F?G=b.get("modelNotExist","#1\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002").replace("#1","'"+Ja[0].getModelName()+"'"):20003003===F&&(G=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+v+"\u201d"));return G?(I.getMessageCurtain().showPrompt(G),
d.destroy(),!0):!1});l.setShowBlocking(!0);var y=k.getModelId();l.copyModel(y,n,q,c,h)}}function Sa(){eb.call(this);var d=this.protectedMethod,a=this,k,e,u,g,r;(function(){d.setTitle(b.get("moveTo","\u79fb\u52a8\u5230"));d.setSelectable(!0);d.setContentPaneCreator(function(){a.setSize(400,300);return w()});d.setFooterPaneCreator(function(f){var p=new E(b.get("confirm","\u786e\u5b9a"));p.setHighlight(!0);var c=p.getJqUi();c.addClass("sa-ctrl-dialog-footer-ok");c.appendTo(f);p.addActionListener(function(h){t();
return!0});p=new E(b.get("cancel","\u53d6\u6d88"));p.setHighlight(!1);c=p.getJqUi();c.addClass("sa-ctrl-dialog-footer-cancel");c.appendTo(f);p.addActionListener(function(h){d.destroy();return!0})});d.setClosingAction(function(f){})})();this.setGlobal=function(f){e=f};this.setModelSetId=function(f){u=f};this.setSelectedMoveModel=function(f){k=f};this.setSuccessCallback=function(f){r=f};var w=function(){var f=$("<div>");f.addClass("move-model-panel");var p=new Na;p.setText(b.get("group","\u76ee\u5f55"));
p=p.getJqUi();p.appendTo(f);oa.layoutCtrl(p,25,50,70,23);var c=Eb.getChildren();p=e.getAllModelGroup();var h=new Ea(0);h.setRootChildrenFolderNode(c);h.setAllFolderNodeCount(c.length);g=new Z;c=new gb;c.setSelectedGroup(p[0]);c.setPath(p[0].getModelGroupName());g.setSelectedModel(c);g.setDropdownCreator(function(v,q,l){return h.createJqPopup(v,q,l)});g.setCustomPainter(function(v,q){q.text(v?v.getPath():"");q.attr("title",v?v.getPath():"")});p=g.getJqUi();p.appendTo(f);oa.layoutCtrl(p,100,50,240,
23);return f},t=function(){for(var f=g.getSelectedModel().getSelectedGroup().getModelGroupId(),p=g.getSelectedModel().getSelectedGroup().getModelGroupName(),c=[],h=[],v=0;v<k.length;v++){var q=k[v];q.getGroupId()!==f&&(c.push(q.getModelId()),h.push(q))}0===c.length?(c=b.get("modelExistTargetModelGroup","\u6a21\u578b\u5df2\u7ecf\u5728\u76ee\u6807\u76ee\u5f55\u4e0b\u3002"),d.getMessageCurtain().showPrompt(c)):(v=e.createFacade(function(l){l&&(d.destroy(),r&&r(f,h,l),P.occur(P.BUTTON_TYPE,P.MOVE))},
function(l,y){if(20003101===l){var F=b.get("sameModelInGroup","\u8be5\u76ee\u5f55\u4e0b\u5b58\u5728\u540c\u540d\u6a21\u578b\u3002");d.getMessageCurtain().showPrompt(F);return!0}20003003===l?F=b.get("modelGroupNotExist","#1\u76ee\u5f55\u4e0d\u5b58\u5728\u3002").replace("#1","\u201c"+p+"\u201d"):20003102===l&&(F=b.get("moveModelNotExist","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"));return F?(e.getMessageCurtain().showPrompt(F),d.destroy(),!0):!1}),v.setShowBlocking(!0),v.moveModel(u,
c,f))}}function Ea(d){var a,k=[],e=0,u,g=[162,150];this.setAllFolderNodeCount=function(h){e=h};this.createJqPopup=function(h,v,q){u=q;return k?(a=new ea,a.setRootVisible(!1),a.setNodePainter(c),a.setRoot(w(k)),a.hookLoadingHandler(p),a.addSelectingListener(r),a.getRoot().setExpanded(!0),a.getRoot().setSelectable(!1),a.setLineHeight(30),a.getJqUi().css("border","1px solid rgba(138, 153, 170, 0.4)"),a.getJqUi().css("background","white"),a.getJqUi().css("max-height",g[d]+"px"),a.getJqUi().appendTo(h),
h=null==k||0==k.length?22:Math.min(30*e,g[d])+2,[-1,h]):null};this.setRootChildrenFolderNode=function(h){k=h};var r=function(h,v){var q=v.getTreePath();h="";for(var l=1;l<q.length;l++)1<l&&(h+="/"),h+=q[l].getUserObject().getModelGroupName();q=new gb;q.setSelectedGroup(v.getUserObject());q.setPath(h);u(q)},w=function(h){var v=new T(w);v.setParentId(" ");v.setModelGroupName("\u65b0\u589e\u76ee\u5f55");v.setModelGroupId(" ");v=t(v);f(v,h);return v},t=function(h){var v=new ea.BranchNode;v.setUserObject(h);
return v},f=function(h,v){if(v)for(var q=0;q<v.length;q++){var l=v[q];if(0<l.getChildren().length){var y=t(l);h.addChild(y)}else{y=h;var F=y.addChild,M=new ea.LeafNode;M.setUserObject(l);F.call(y,M)}}},p=function(h,v){f(h,h.getUserObject().getChildren());v()},c=function(h,v){v=v.getUserObject().getModelGroupName();h.css("padding-left","4px");h.css("padding-right","4px");h.text(v);h.attr("title",v)}}function gb(){var d,a;this.setSelectedGroup=function(k){d=k};this.getSelectedGroup=function(){return d};
this.setPath=function(k){a=k};this.getPath=function(){return a}}function Ka(){eb.call(this);var d=this.protectedMethod,a=this,k,e;(function(){d.setTitle(b.get("deploy","\u90e8\u7f72"));d.setSelectable(!0);d.setContentPaneCreator(function(){a.setSize(400,300);var g=$("<div>");g.css("display","flex");var r=new Na;r.setRequired(!0);r.setText(b.get("description","\u63cf\u8ff0"));r=r.getJqUi();r.css({position:"relative",top:"9px",width:"auto",height:"20px","margin-right":"10px"});e=new Aa;var w=e.getJqUi();
w.css({position:"relative",top:"14px",width:"300px",height:"150px"});w.find(".sa-ctrl-textarea-real").css("font-family","MicrosoftYaHei");r.appendTo(g);w.appendTo(g);return g});d.setFooterPaneCreator(function(g){var r=new E(b.get("confirm","\u786e\u5b9a"));r.setHighlight(!0);var w=r.getJqUi();w.addClass("sa-ctrl-dialog-footer-ok");w.appendTo(g);r.addActionListener(function(t){t=$.trim(e.getText());var f;""!==t&&500<t.length?f=b.get("descTooLong","\u90e8\u7f72\u63cf\u8ff0\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002"):
""===t&&(f=b.get("enterDeployDesc","\u8bf7\u8f93\u5165\u90e8\u7f72\u63cf\u8ff0\u3002"));f?d.getMessageCurtain().showPrompt(f):u(n,t,[k.getModelId()]);return!0});r=new E(b.get("cancel","\u53d6\u6d88"));r.setHighlight(!1);w=r.getJqUi();w.addClass("sa-ctrl-dialog-footer-cancel");w.appendTo(g);r.addActionListener(function(t){d.destroy();return!0})});d.setClosingAction(function(g){})})();this.setSelectedModel=function(g){k=g};this.textFieldFocus=function(){e&&e.requestFocus()};var u=function(g,r,w){var t=
I.createFacade(function(f){if(f){d.destroy();var p=new Ia;p.fromJsonObject(f);(new fb(p,null,fb.ONE)).show();hc(!1,w)}},function(f,p){if(20008001<=f&&20009E3>f){switch(f){case 20008001:var c=b.get("duplicateDeployException","\u6a21\u578b\u5df2\u90e8\u7f72\uff0c\u8bf7\u52ff\u91cd\u590d\u90e8\u7f72\u3002");break;case 20008009:c=b.get("modelNotExistException","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}return c?(d.destroy(),I.getMessageCurtain().showPrompt(c),
Tb(),!0):!1}},null,ra.getFunGetDeployRemoteImpl()());t.setShowBlocking(!0);t.deployModel(g,r,w)}}function fb(d,a,k){function e(){this.getHandler=function(z,O){switch(z.getCode()){case Ia.FAILED_MODEL_LOCK_CHECK:var qa=new g;break;case Ia.FAILED_MODEL_CHECK:qa=new r;break;case Ia.FAILED_LOCK_CHECK:qa=new w;break;case Ia.FAILED_MODEL_DELETE:qa=new t;break;case Ia.FAILED_MODEL_LOCK_DELETE:qa=new f;break;case Ia.FAILED_MODEL_DELETE_CHECK:qa=new p;break;case Ia.FAILED_MODEL_LOCK_DELETE_CHECK:qa=new c}qa&&
(qa.setResponse(z),qa.setDeployType(O));return qa}}function u(){var z,O;this.setResponse=function(qa){z=qa};this.setDeployType=function(qa){O=qa};this.getDetail=function(){throw Error("override me");};this.getTitle=function(){throw Error("override me");};this.protectedMethod={getResponse:function(){return z},getDeployType:function(){return O}}}function g(){u.call(this);var z=this.protectedMethod;this.getDetail=function(){var O="";k===fb.ONE?(O+=F(),O+=M()):k===fb.BATCH&&(1==v?(O=y(),O+=M()):O=l());
return O};this.getTitle=function(){var O=z.getDeployType();if(O===fb.BATCH)return b.get("batchDeployModelLockCheckFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\u3001\u4ee5\u53ca\u8bbe\u7f6e\u4e0d\u5b8c\u6574\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002");if(O===fb.ONE)return b.get("deployModelLockCheckFailedTips","\u6a21\u578b\u5df2\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\uff0c\u5e76\u4e14\u8bbe\u7f6e\u4e0d\u5b8c\u6574\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}
function r(){u.call(this);var z=this.protectedMethod;this.getDetail=function(){var O="";return O=k===fb.BATCH&&0==v?l():O+M()};this.getTitle=function(){return z.getDeployType()===fb.BATCH&&0==v?b.get("batchDeployModelCheckFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u8bbe\u7f6e\u4e0d\u5b8c\u6574\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002"):b.get("deployModelCheckFailedTips","\u6a21\u578b\u8bbe\u7f6e\u4e0d\u5b8c\u6574\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}function w(){u.call(this);
var z=this.protectedMethod;this.getDetail=function(){var O="";k===fb.ONE?O+=F():k===fb.BATCH&&(O=1==v?y():l());return O};this.getTitle=function(){var O=z.getDeployType();if(O===fb.BATCH)return b.get("batchDeployLockCheckFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002");if(O===fb.ONE)return b.get("deployLockCheckFailedTips","\u6a21\u578b\u5df2\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}
function t(){u.call(this);this.getDetail=function(){return G()};this.getTitle=function(){return b.get("deployDeleteCheckFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}function f(){u.call(this);this.getDetail=function(){var z="";1==v?(z+=G(),z+=M()):z=l();return z};this.getTitle=function(){return b.get("deployModelDeleteCheckFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b\u3001\u4ee5\u53ca\u8bbe\u7f6e\u4e0d\u5b8c\u6574\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}
function p(){u.call(this);this.getDetail=function(){var z="";1==v?(z+=G(),z+=F()):z=l();return z};this.getTitle=function(){return b.get("deployModelDeleteLockFailedTips","\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b\u3001\u4ee5\u53ca\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}function c(){u.call(this);this.getDetail=function(){var z="";1==v?(z+=G(),z+=F(),z+=M()):z=l();return z};this.getTitle=function(){return b.get("deployModelDeleteLockCheckFailedTips",
"\u9009\u4e2d\u7684\u6a21\u578b\u4e2d\u5b58\u5728\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b\u3001\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\u3001\u4ee5\u53ca\u8bbe\u7f6e\u4e0d\u5b8c\u6574\u7684\u6a21\u578b\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}}var h,v=!1;this.setMapModelName=function(z){h=z};this.setRefModel=function(z){v=z};this.show=function(){if(d.isSuccess())q();else{var z=(new e).getHandler(d,k),O=R.createFeedbackDialog();O.setMsgImageType(R.MSG_WARNING);O.setMessage(z.getTitle());
O.setDetail(z.getDetail());O.setTitle(b.get("operatingTips","\u64cd\u4f5c\u63d0\u793a"));O.setOptionType(R.OPTION_OK);O.setButtonText(R.RETURN_OK,b.get("iSee","\u6211\u77e5\u9053\u4e86"));O.showDialog()}};var q=function(){var z=new R;z.setTitle(b.get("operatorTips","\u64cd\u4f5c\u63d0\u793a"));z.setOptionType(R.OPTION_OK);z.setButtonText(R.RETURN_OK,b.get("iSee","\u6211\u77e5\u9053\u4e86"));z.setCustomPainter(function(O){var qa=$("<div>");qa.addClass("deploy-feedback-dialog-image");W.background(qa,
"msg-success");var Fa=$("<div>");Fa.addClass("deploy-feedback-dialog-text");Fa.text(b.get("deploySucceeded","\u5df2\u6210\u529f\u90e8\u7f72"));var $a=$("<div>");$a.addClass("deploy-dialog-rolesetting-box");var jb=$("<div>");jb.addClass("deploy-dialog-rolesetting-text");jb.text(b.get("nowGoSetting","\u73b0\u5728\u53bb\u8bbe\u7f6e"));var K=$("<div>");K.addClass("deploy-dialog-rolesetting-text-link");var ta=b.get("dataRole","\u6570\u636e\u6743\u9650");K.text(ta);K.attr("title",ta);K.css("cursor","pointer");
K.css("color","#0E5FD8");K.on("click",function(Ba){ec(!1)});$a.append(jb);$a.append(K);O.append($a);O.append(qa);O.append(Fa)});z.setClosingChecker(function(O){O===R.RETURN_OK&&(a&&a(),Tb());return!0});z.showDialog(380,280)},l=function(){for(var z=b.get("modelPath","\u6a21\u578b\u8def\u5f84")+"\uff1a\r\n",O=d.getArrSimplePrompts(),qa=[],Fa=0;Fa<O.length;Fa++){var $a=O[Fa];$a.getModelName()?($a=O[Fa],z+=$a.getPath(),z+="\uff1a",z+=$a.getModelName(),z+="\uff1b\r\n"):qa.push(h[$a.getModelId()])}if(0<
qa.length){z+=b.get("deletedModel","\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b")+"\uff1a\r\n";for(Fa=0;Fa<qa.length;Fa++)z+=qa[Fa],z+="\uff1b";z+="\r\n"}return z},y=function(){for(var z="",O=d.getArrLockCheckPrompts(),qa=0;qa<O.length;qa++){var Fa=O[qa];z+=b.get("lockedModelCannotDeploy","\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\u4e0d\u5141\u8bb8\u90e8\u7f72\uff0c#1\u6a21\u578b\u5df2\u88ab#2\u9501\u5b9a");z=z.replace("#1",Fa.getModelName()).replace("#2",Fa.getLockUserName());z+=
"\uff1b\r\n"}return z},F=function(){var z="",O=d.getArrLockCheckPrompts()[0];z+=b.get("lockedModelCannotDeploy","\u88ab\u5176\u4ed6\u7528\u6237\u9501\u5b9a\u7684\u6a21\u578b\u4e0d\u5141\u8bb8\u90e8\u7f72\uff0c#1\u6a21\u578b\u5df2\u88ab#2\u9501\u5b9a");z=z.replace("#1",O.getModelName()).replace("#2",O.getLockUserName());return z+"\uff1b\r\n"},M=function(){var z="",O=d.getArrModelCheckPrompts()[0];z+=b.get("configIncompleteReason","\u8bbe\u7f6e\u4e0d\u5b8c\u6574\u539f\u56e0");return z=z+"\uff1a\r\n"+
O.getPromptStr(!0,!0)},G=function(){for(var z="",O=d.getArrSimplePrompts(),qa=[],Fa=0;Fa<O.length;Fa++){var $a=O[Fa];$a.getModelName()||qa.push(h[$a.getModelId()])}if(0<qa.length){z+=b.get("deletedModel","\u5df2\u88ab\u5220\u9664\u7684\u6a21\u578b")+"\uff1a\r\n";for(Fa=0;Fa<qa.length;Fa++)z+=qa[Fa],z+="\uff1b";z+="\r\n"}return z}}function ub(){var d=[],a,k=[960,560],e,u,g,r,w,t,f,p,c,h,v,q,l,y,F,M=[],G=[],z=!1,O,qa={},Fa={},$a=[],jb=!1,K=!0,ta=!0,Ba=[];this.setGlobal=function(x){e=x};this.setModelSetId=
function(x){u=x};this.setAutoSelectedModel=function(x){d=x};this.setAutoSelectedGroup=function(x){a=x};this.setAutoCheckedContainChild=function(x){z=x};this.setMapModelRefJson=function(x){$a=x};this.showNotDeployableModelPrompt=function(x,A){if(x&&0<x.length){for(var J,da=0;da<A.length;da++)x[0]==A[da].getModelId()&&(J=A[da].getModelName());x=1==x.length?b.get("selectedModelCycleRef",'"#1"\u6a21\u578b\u5b58\u5728\u5faa\u73af\u5f15\u7528\uff0c\u65e0\u6cd5\u9009\u62e9\u3002').replace("#1",J):b.get("batchSelectedModelCycleRef",
'"#1"\u7b49"#2"\u4e2a\u6a21\u578b\u5b58\u5728\u5faa\u73af\u5f15\u7528\uff0c\u65e0\u6cd5\u9009\u62e9\u3002').replace("#1",J).replace("#2",x.length);O.showPrompt(x,2E3)}};this.textFieldFocus=function(){y&&y.requestFocus()};this.createDialog=function(){var x=$(document.body),A=$("<div class='sa-ctrl-common-modallayer'>");A.appendTo(x);var J=new Da(A),da=b.get("batchDeploy","\u6279\u91cf\u90e8\u7f72");J.setTitle(da);da=k[0];var Ua=k[1],yb=x.prop("clientWidth");x=x.prop("clientHeight");var Pa=function(){J.destroy();
A.remove()};J.setBounds(yb-da>>1,x-Ua>>1,da,Ua);J.setToolbarVisible(!1);O=J.getMessageCurtain();J.setContent(Ra());$(".sa-ctrl-dialog-padding").css({position:"absolute",top:"0",bottom:"0",left:"0",right:"0",width:"100%",height:"100%"});J.addClosingListener(function(Xa,lb){lb?ab(Xa.getMessageCurtain(),Pa):Pa()});J.showFooterPane();return J};var Ra=function(){var x=$("<div>");za();D();var A=$("<div>");A.css({position:"relative",top:"5px",left:"15px"});w=$("<div>");w.addClass("deploy-batch-split-right");
h=new Na;h.setText(b.get("selectedModel","\u5df2\u9009\u6a21\u578b")+"("+G.length+")");var J=h.getJqUi();J.addClass("deploy-batch-selected-model-label");var da=(new Na(b.get("clearAll","\u5168\u90e8\u6e05\u9664"))).getJqUi();da.addClass("deploy-batch-clear-all-label");da.on("mousedown",Cb);v=$("<div>");v.addClass("deploy-batch-selected-model-area");J.appendTo(A);J=$("<div>");var Ua=$("<span>");Ua.text(b.get("notDeployedHelpIconTips","\u5728\u540c\u4e00\u4e2a\u6a21\u578b\u96c6\u4e0b\uff0c\u6a21\u578b\u8bbe\u8ba1\u65f6\u53ef\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u8bbe\u8ba1\u671f\u7684\u72b6\u6001\uff0c\u4f46\u5728\u6267\u884c\u671f(\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u6267\u884c\u65f6)\u53ea\u80fd\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u7684\u6700\u65b0\u90e8\u7f72\u72b6\u6001\u3002\u56e0\u6b64\u9700\u8981\u5c06\u5f15\u7528\u7684\u201c\u672a\u90e8\u7f72\u201d\u72b6\u6001\u7684\u6a21\u578b\u4e00\u540c\u90e8\u7f72\u3002")+
b.get("deployHelpIconTips","\u5982\u679c\u9700\u8981\u6267\u884c\u671f\u4e0e\u8bbe\u8ba1\u671f\u7684\u72b6\u6001\u4fdd\u6301\u4e00\u81f4\uff0c\u8bf7\u5c06\u5f15\u7528\u7684\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201c\u72b6\u6001\u7684\u6a21\u578b\u518d\u6b21\u90e8\u7f72"));Ua.appendTo(J);Ua=new ya;Ua.setIconType(ya.ICON_TYPE_QUESTION);Ua.setTipsSize(420,90);Ua.setTipsHtml(J[0]);J=Ua.getJqUi();J.addClass("dm-notice-icon");J.css({position:"relative",top:"5px",width:"16px",height:"16px","float":"left"});
J.appendTo(A);w.append(A);w.append(da);w.append(v);t=$("<div>");t.addClass("deploy-batch-split-bottom");A=new Na;A.setRequired(!0);A.setText(b.get("deployDesc","\u90e8\u7f72\u63cf\u8ff0"));A=A.getJqUi();y=new Aa;da=y.getJqUi();da.find(".sa-ctrl-textarea-real").css("font-family","MicrosoftYaHei");J=$("<div>");J.css({position:"absolute",width:"912px",height:"100%"});A.appendTo(J);da.appendTo(J);oa.layoutCtrl(A,0,8,"auto",20);oa.layoutCtrl(da,0,35,912,70);J.appendTo(t);oa.layoutCtrlCenterAlign(J,912);
A=ka().getJqUi();x.append(A);ba();return x},za=function(){r=$("<div>");l=new ca;l.setFunCustomModelCreator(kb);l.setFunCustomModelSort(function(J){J.sort(function(da,Ua){var yb=(new Date(Ua.getModifyTime())).getTime(),Pa=(new Date(da.getModifyTime())).getTime();yb===Pa&&(yb=(new Date(Ua.getModifyTime())).getTime(),Pa=(new Date(da.getModifyTime())).getTime());return yb-Pa})});l.setFunShowModels(Ca);l.setFunIsModelSearch(function(){return F});l.setFunDoModelSearch(ib);l.setFunClearSearchStatus(Wa);
a&&l.setAutoSelectedGroupId(a);z&&l.setAutoCheckedContainChild(z);l.setModelSetId(u);var x=$("<div>");x.css({position:"relative",left:"22px",top:"10px"});var A=$("<span>");A.addClass("qdm-group-manager-area-text");A.text(b.get("group","\u76ee\u5f55"));x.append(A);A=new ya;A.setIconType(ya.ICON_TYPE_INFO);A.setTipsSize(255,55);A.setTipsText(b.get("batchDeployGroupTips","\u201c\u5df2\u90e8\u7f72\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u9700\u518d\u6b21\u90e8\u7f72\uff0c\u5df2\u9690\u85cf\u53ea\u6709\u201c\u5df2\u90e8\u7f72\u201d\u72b6\u6001\u6a21\u578b\u7684\u76ee\u5f55\u3002"));
A=A.getJqUi();A.css({position:"relative","float":"left",top:"3px"});A.appendTo(x);l.setTitleContent(x);r.append(l.getJqUi())},D=function(){g=$("<div>");g.addClass("deploy-batch-split-center");q=new N;q.setSearchListenerDelay(1E3);q.addSearchListener(function(){ib(q.getText())});q.setShowSearchIcon(!0);q.setPlaceholder(b.get("pleaseEnterSearchText","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));var x=q.getJqUi();x.addClass("deploy-batch-search");x.find(":input").on("keydown",function(A){13==(A.keyCode||
A.which||A.charCode)&&ib(q.getText())});g.append(x);c=new Ta;x=[{width:50},{width:100,text:b.get("number","\u7f16\u7801")},{width:120,text:b.get("modelName","\u540d\u79f0")},{width:130,text:b.get("modelDesc","\u63cf\u8ff0")},{width:100,text:b.get("modelType","\u7c7b\u578b")},{width:80,text:b.get("currentLocker","\u5f53\u524d\u9501\u5b9a\u4eba")},{width:100,text:b.get("deployStatus","\u90e8\u7f72\u72b6\u6001")},{width:80,text:b.get("creator","\u521b\u5efa\u4eba")},{width:130,text:b.get("createTime",
"\u521b\u5efa\u65f6\u95f4")},{width:80,text:b.get("modifier","\u6700\u540e\u4fee\u6539\u4eba")},{width:130,text:b.get("modifyTime","\u6700\u540e\u4fee\u6539\u65f6\u95f4")}];c.setArrHeadRowMap(x);c.setFunIsSearch(function(){return F});c.setFunGetArrSelectedWhenSearchModel(function(){return M});c.setFunSetArrSelectedWhenSearchModel(function(A){M=A});c.setFunGetSearchBox(function(){return q});c.setFunCheckBoxListener(Ga);d&&c.setArrAutoSelectedModel(d);c.setGroupChangedClearChecked(!1);c.setColumnFitVisibleWidth(!1);
c.setModelNameJumpToDesigner(!1);c.setDeployMessageCurtain(O);c.setFunAllSelectCallBack(function(A){var J=e.createFacade(function(da){for(var Ua in da)$a[Ua]=da[Ua];for(da=0;da<A.length;da++)c.getCheckBoxMap()[A[da]].setChecked(!0)},null,null,ra.getFunGetDeployRemoteImpl()());J.setShowBlocking(!0);J.batchLoadRefDeployModelIds(A)});f=(new ha).getJqUi();f.css("top",35);f.appendTo(g);f.hide();c.setJqModelNoDataView(f);p=(new S).getJqUi();p.appendTo(g);p.hide();c.setJqSearchNoDataView(p);x=c.getJqUi();
x.addClass("deploy-batch-model-list");g.append(x)},ka=function(){var x=new pa;x.setHorizontalSplit(!0);x.setEnabled(!0);x.setSplitLineWide(0);x.setFirstSize(220);x.setSecondSize(500);x.setResizeMode(pa.RESIZE_MODE_FIRST_FIXED);x.setFirstChild(pa.createChildWrapper(r));x.setSecondChild(pa.createChildWrapper(g,function(){c.refresh()}));var A=new pa;A.setHorizontalSplit(!0);A.setEnabled(!0);A.setSplitLineWide(0);A.setFirstSize(720);A.setSecondSize(240);A.setResizeMode(pa.RESIZE_MODE_SECOND_FIXED);A.setFirstChild(x);
A.setSecondChild(pa.createChildWrapper(w));x=new pa;x.setHorizontalSplit(!1);x.setEnabled(!1);x.setSplitLineWide(0);x.setFirstSize(347);x.setSecondSize(120);x.setFirstChild(A);x.setSecondChild(pa.createChildWrapper(t));return x},ib=function(){var x=q.getText(),A,J=l.getCurrentSelectedGroup(),da=l.isContainChild();J&&(A=l.getCurrentGroupModels(da,J));""===x?F&&(F=!1,Ca(A)):(F||(M=c.getSelectedModel()),F=!0,x=Sb(A,x),Ca(x))},ab=function(x,A){var J=$.trim(y.getText()),da;""!==J&&500<J.length?da=b.get("descTooLong",
"\u90e8\u7f72\u63cf\u8ff0\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002"):""===J&&(da=b.get("enterDeployDesc","\u8bf7\u8f93\u5165\u90e8\u7f72\u63cf\u8ff0\u3002"));var Ua=[],yb={};if(G&&0<G.length)for(var Pa=0;Pa<G.length;Pa++){var Xa=G[Pa];Ua.push(Xa.getModelId());yb[Xa.getModelId()]=Xa.getModelName()}else da=b.get("selectOneModelAtLeast","\u8bf7\u81f3\u5c11\u9009\u4e2d\u4e00\u4e2a\u6a21\u578b\u3002");da?x.showPrompt(da):(x=R.createFeedbackDialog(),x.setMsgImageType(R.MSG_CONFIRM),x.setMessage(b.get("confirmDeploy",
"\u6a21\u578b\u90e8\u7f72\u5e76\u6388\u6743\u540e\u53ef\u88ab\u5176\u4ed6\u7528\u6237\u5f15\u7528\uff0c\u786e\u5b9a\u90e8\u7f72\u5417\uff1f")),x.showDialog(),x.setClosingChecker(function(lb){lb===R.RETURN_OK&&Fb(A,u,J,Ua,yb);return!0}))},Fb=function(x,A,J,da,Ua){var yb=e.createFacade(function(Pa){if(Pa){var Xa=new Ia;Xa.fromJsonObject(Pa);Pa=new fb(Xa,x,fb.BATCH);Pa.setMapModelName(Ua);Pa.show();hc(!0,da)}},function(Pa,Xa){if(20008001<=Pa&&20009E3>Pa){switch(Pa){case 20008001:var lb=b.get("duplicateDeployException",
"\u6a21\u578b\u5df2\u90e8\u7f72\uff0c\u8bf7\u52ff\u91cd\u590d\u90e8\u7f72\u3002");break;case 20008009:lb=b.get("modelNotExistException","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}return lb?(e.getMessageCurtain().showPrompt(lb),ba(),Cb(),!0):!1}},null,ra.getFunGetDeployRemoteImpl()());yb.setShowBlocking(!0);yb.deployModel(A,J,da)},ba=function(){e.createFacade(function(x){l.setJsonDataAndUpdateUI(x);var A=l.getAllModels();for(x=0;x<A.length;x++){var J=
A[x];Ba[J.getModelId()]=J}A=c.getCheckBoxMap();if(d&&0<d.length)for(x=0;x<d.length;x++)J=d[x].getModelId(),A[J]&&A[J].setChecked(!1);jb=!0;K=!1;if(d&&0<d.length)for(x=0;x<d.length;x++)J=d[x].getModelId(),A[J]&&A[J].setChecked(!0);return K=!0},function(x,A){return!1}).listUnDeployGroupAndModel(u)},kb=function(){return new Qa},Ca=function(x){if(jb){for(var A={},J=0;J<x.length;J++)A[x[J].getModelId()]=x[J];J=e.createFacade(function(da){ta=jb=!1;c.setModels(x);var Ua=c.getCheckBoxMap();if(x&&0<x.length)for(var yb=
0;yb<x.length;yb++){var Pa=x[yb].getModelId();(Pa=Ua[Pa])&&Pa.setChecked(!1)}var Xa=da.deployableModelIds;da=e.createFacade(function(lb){for(var db in lb)$a[db]=lb[db];jb=!0;K=!1;for(db=lb=0;db<Xa.length;db++){var mc=Xa[db],nc;for(nc in G)if(Xa[db]==G[nc].getModelId()){var ic=Ua[mc];ic&&ic.setChecked(!0);0<qa[mc]&&(ic.setEnabled(!1),lb++);break}}0<Xa.length&&Xa.length==lb&&c.getSelectAllCheckBox().setEnabled(!1);ta=K=!0},null,null,ra.getFunGetDeployRemoteImpl()());da.setShowBlocking(!0);da.batchLoadRefDeployModelIds(Xa)},
null,null,ra.getFunGetDeployRemoteImpl()());J.setShowBlocking(!0);J.batchCheckModelCycleReference(Object.keys(A))}else c.setModels(x)},Wa=function(){M=[];F=!1;q.clear();q.getJqUi().find("input").blur()},Ga=function(x,A){if(jb){var J=x.getUserObject(),da=x.isChecked();K&&da&&(A||0<d.length)?(A=e.createFacade(function(Ua){1==Ua?(jb=!1,x.setChecked(!1),jb=!0,Ua=b.get("selectedModelCycleRef",'"#1"\u6a21\u578b\u5b58\u5728\u5faa\u73af\u5f15\u7528\uff0c\u65e0\u6cd5\u9009\u62e9\u3002').replace("#1",c.getModelNameById(J.getModelId())),
O.showPrompt(Ua,2E3)):vb(da,J)},null,null,ra.getFunGetDeployRemoteImpl()()),A.setShowBlocking(!0),A.checkModelCycleReference(J.getModelId())):vb(da,J)}},vb=function(x,A){Jb(x,A);var J=function(da){if(da){$a[A.getModelId()]=da;for(var Ua=c.getCheckBoxMap(),yb=da.noDeployModelIds,Pa=0;Pa<yb.length;Pa++){var Xa=yb[Pa];if(ta){var lb=qa[Xa];lb||(lb=0);var db=Fa[Xa];db||(db=[]);x?(qa[Xa]=lb+1,-1==db.indexOf(A.getModelName())&&db.push(A.getModelName())):(qa[Xa]=lb-1,lb=db.indexOf(A.getModelName()),-1<lb&&
db.splice(lb,1));Fa[Xa]=db}db=Ua[Xa];db||(db=new H,x||db.setChecked(!0),db.setUserObject(Ba[Xa]),db.addCheckedListener(Ga));0<qa[Xa]?(db.setChecked(!0),db.setEnabled(!1)):(db.setChecked(!1),db.setEnabled(!0))}da=da.deployUpdateModelIds;for(Pa=0;Pa<da.length;Pa++)db=Ua[da[Pa]],db||(db=new H,x||db.setChecked(!0),db.setUserObject(Ba[da[Pa]]),db.addCheckedListener(Ga)),x?db.setChecked(!0):db.setChecked(!1)}};$a[A.getModelId()]?J($a[A.getModelId()]):(J=e.createFacade(J,null,null,ra.getFunGetDeployRemoteImpl()()),
J.setShowBlocking(!1),J.loadRefDeployModelIds(A.getModelId()))},Jb=function(x,A){if(x)0>G.indexOf(A)&&G.push(A);else for(var J in G)A===G[J]&&G.splice(J,1);for(J in G){var da=!1;G[J].getModelId==A.getModelId()&&(da=!0)}da||Ub()},Ub=function(){v.empty();if(0<G.length){var x=$(document.createDocumentFragment()),A;for(A in G)x.append(Vb(G[A]));v.append(x)}h.setText(b.get("selectedModel","\u5df2\u9009\u6a21\u578b")+"("+G.length+")");100<=G.length&&h.getJqUi().attr("title",b.get("selectedModel","\u5df2\u9009\u6a21\u578b")+
"("+G.length+")")},Vb=function(x){var A=$("<div>"),J=x.getModelName(),da=x.getNumber();A.addClass("deploy-batch-model-selected-list-item");A.attr("table-name",J);A.data("object",x);A.on("mouseenter",wb);A.on("mouseleave",hb);A.css("margin-left",20);x=$("<div>");x.addClass("deploy-batch-model-selected-list-item-name");var Ua=$("<span class='deploy-batch-model-selected-list-item-text'>"),yb=J;Ua.text(J);Ua.appendTo(x);da&&0<da.length&&(yb=J+"("+da+")",J=$("<span>"),J.css("color","#c0c0c0"),oa.makeTextOmissible(J),
Ua=$("<span>"),Ua.text("("+da+")"),J.append(Ua),x.append(J));x.attr("title",yb);da=$("<div>");da.addClass("deploy-batch-model-selected-list-item-icon");W.background(da,"delete_small");da.on("click",function(Pa){var Xa=$(Pa.currentTarget).parent().data("object");if(0<qa[Xa.getModelId()])Pa=1==qa[Xa.getModelId()]?b.get("deleteSingleRefModelTips",'\u8be5\u6a21\u578b\u88ab"#1"\u6a21\u578b\u5728\u8bbe\u8ba1\u671f\u5f15\u7528\uff0c\u90e8\u7f72"#2"\u6a21\u578b\u9700\u8981\u5c06\u5f15\u7528\u7684"\u672a\u90e8\u7f72\u72b6\u6001\u7684\u6a21\u578b"\u4e00\u540c\u90e8\u7f72\u3002').replace("#1",
Fa[Xa.getModelId()][0]).replace("#2",Fa[Xa.getModelId()][0]):b.get("deleteBatchRefModelTips",'\u8be5\u6a21\u578b\u88ab"#1"\u7b49"#2"\u4e2a\u6a21\u578b\u5728\u8bbe\u8ba1\u671f\u5f15\u7528\uff0c\u90e8\u7f72"#3"\u7b49\u6a21\u578b\u9700\u8981\u5c06\u5f15\u7528\u7684"\u672a\u90e8\u7f72\u72b6\u6001\u7684\u6a21\u578b"\u4e00\u540c\u90e8\u7f72\u3002').replace("#1",Fa[Xa.getModelId()][0]).replace("#2",qa[Xa.getModelId()]).replace("#3",Fa[Xa.getModelId()][0]),O.showPrompt(Pa);else{Pa=$(Pa.currentTarget).parent().data("object");
for(var lb in G)Pa==G[lb]&&G.splice(lb,1);lb=Pa.getModelId();Xa=c.getCheckBoxMap();Xa[lb]?Xa[lb].setChecked(!1):c.removeSelectedModel(Pa);Ub()}});A.append(da);A.append(x);return A},wb=function(x){$(x.currentTarget).find(".deploy-batch-model-selected-list-item-icon").css("display","block")},hb=function(x){$(x.currentTarget).find(".deploy-batch-model-selected-list-item-icon").css("display","none")},Cb=function(){G=[];for(var x=c.getCheckBoxMap(),A=Object.keys(x),J=0,da=A.length;J<da;J++)x[A[J]].setChecked(!1);
c.clearArrAllSelectedModels();x=l.getAllModels();for(J in x)x[J].setSelected(!1);Ub()}}function zb(){aa.AbstractWizardStep.call(this);var d=this,a,k,e,u;this.setCallback=function(g){u=g};this.setTitleName=function(g){e=g};this.getSubTitle=function(){return e};this.getJqUi=function(g){k||(a=g,k=d.protectedCreateUi());return k};this.protectedCreateUi=function(){throw Error("override me");};this.protectedCreateIconStyle=function(g,r,w,t){throw Error("override me");};this.protectedMethod={fireFinishEvent:function(g,
r){if(u)return u(g,r)},getMessageCurtain:function(){return a.getMessageCurtain()},createWizardPanel:function(){var g=zb.WIZARD_PANEL_WIDTH,r=zb.WIZARD_PANEL_HEIGHT,w=zb.WIZARD_PANEL_LEFT_MARGIN,t=$("<div>");oa.layoutCtrl(t,w,0,g,r);g=$("<div>");g.appendTo(t);oa.layoutCtrl(g,35,0,24,24);r=$("<div>");r.appendTo(t);r.addClass("model-first-create-line");r=$("<div>");r.appendTo(t);oa.layoutCtrl(r,195,0,24,24);w=$("<div>");w.text(b.get("createGroup","\u521b\u5efa\u76ee\u5f55"));oa.layoutCtrl(w,0,40,100,
16);w.appendTo(t);var f=$("<div>");f.text(e);oa.layoutCtrl(f,135,40,150,16);f.appendTo(t);d.protectedCreateIconStyle(w,g,f,r);return t}}}function Pb(){zb.call(this);var d=this.protectedMethod,a=this,k=new sb;this.intoThisStep=function(e,u){};this.outThisStep=function(e,u){e=$.trim(k.getText());var g;""!=e&&50<e.length?g=b.get("groupNameTooLong","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):""==e&&(g=b.get("groupNameCannotBeEmpty","\u8bf7\u8f93\u5165\u76ee\u5f55\u540d\u79f0\u3002"));
g?(d.getMessageCurtain().showPrompt(g),u(a)):(g=d.fireFinishEvent(e),u([g]))};this.protectedCreateUi=function(){var e=$("<div>");e.append(d.createWizardPanel());var u=new Na;u.setRequired(!0);u.setText(b.get("name","\u540d\u79f0"));u=u.getJqUi();var g=k.getJqUi();e.append(u);e.append(g);var r=zb.WIZARD_PANEL_HEIGHT,w=zb.WIZARD_PANEL_LEFT_MARGIN;oa.layoutCtrl(u,w,r,70,23);oa.layoutCtrl(g,w,r+25,280,23);return e};this.protectedCreateIconStyle=function(e,u,g,r){e.addClass("model-first-create-name-current");
g.addClass("model-first-create-name-wait");u.text("1");r.text("2");u.addClass("model-first-create-current-step");r.addClass("model-first-create-wait-step")}}function Ac(){zb.call(this);var d=this.protectedMethod,a=this,k=new sb,e=new sb,u=new sb,g,r,w;this.intoThisStep=function(f,p){};this.outThisStep=function(f,p){f?(a.getJqUi().remove(),p(null)):t(p)};this.isLastStep=function(){return!0};this.setGroupName=function(f){g=f};this.setModelTypeName=function(f){};this.setModelType=function(f){r=f};this.setModelGroupFolderNode=
function(f){w=f};this.protectedCreateUi=function(){var f=$("<div>");f.append(d.createWizardPanel());var p=$("<div>");p.css({"float":"left",width:"auto",position:"relative",left:"15px",top:"80px"});var c=new Na;c.setRequired(!0);c.setText(b.get("number","\u7f16\u7801"));c=c.getJqUi();c.css({position:"relative",height:"23px","margin-right":"5px","float":"left"});c.appendTo(p);c=new ya;c.setIconType(ya.ICON_TYPE_QUESTION);c.setTipsSize(310,40);c.setTipsText(b.get("numberTips","\u6a21\u578b\u7f16\u7801\u662f\u6a21\u578b\u7684\u552f\u4e00\u6807\u8bc6\uff0c\u521b\u5efa\u6a21\u578b\u540e\u65e0\u6cd5\u4fee\u6539\u3002"));
c=c.getJqUi();c.css({position:"relative",top:"4px",width:"16px",height:"16px","float":"right"});c.appendTo(p);k.setPlaceholder(b.get("numberPlaceholder","\u5fc5\u987b\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934"));c=k.getJqUi();var h=new Na;h.setRequired(!0);h.setText(b.get("name","\u540d\u79f0"));h=h.getJqUi();var v=e.getJqUi(),q=new Na;q.setText(b.get("desc","\u63cf\u8ff0"));q=q.getJqUi();var l=u.getJqUi();f.append(p);f.append(c);
f.append(h);f.append(v);f.append(q);f.append(l);p=zb.WIZARD_PANEL_HEIGHT;oa.layoutCtrl(c,100,p,300,23);oa.layoutCtrl(h,15,p+50,70,23);oa.layoutCtrl(v,100,p+50,300,23);oa.layoutCtrl(q,15,p+100,70,23);oa.layoutCtrl(l,100,p+100,300,23);return f};this.protectedCreateIconStyle=function(f,p,c,h){f.addClass("model-first-create-name-completed");c.addClass("model-first-create-name-current");f=$("<div>");f.addClass("model-first-create-ok");f.appendTo(p);h.text("2");p.addClass("model-first-create-completed-step");
h.addClass("model-first-create-current-step")};var t=function(f){var p=$.trim(k.getText()),c=$.trim(e.getText()),h=$.trim(u.getText()),v=bc(p,"");if(v||(v=cc(c,h)))return d.getMessageCurtain().showPrompt(v),!1;v=new Za;v.setModelSetId(w.getModelSetId());v.setModelGroupName(g);v.setParentId(w.getModelGroupId());var q=new Qa;q.setModelName(c);q.setDesc(h);q.setModelType(r);q.setModelSetId(n);q.setNumber(p);p=I.createFacade(function(l){if(!l)return!1;var y=new Qa;y.fromJsonObject(l);d.fireFinishEvent(g,
y);f(null)},function(l,y){return 20003001===l?(l=b.get("groupNameExist","\u540d\u79f0\u91cd\u590d\u3002"),d.getMessageCurtain().showPrompt(l),!0):20003301===l?(f(null),$b(),!0):20003109===l?(l=b.get("numberDuplicate","\u7f16\u7801\u5df2\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002"),d.getMessageCurtain().showPrompt(l),!0):20003203===l?(l=b.get("withoutOperatePermission","\u65e0\u64cd\u4f5c\u6743\u9650\u3002"),d.getMessageCurtain().showPrompt(l),!0):!1});p.setShowBlocking(!0);p.firstTimeCreateModel(v,
q);return!0}}var Oa,Bb=!1,U,Ab=!1,Bc=/^([a-zA-Z_])[a-zA-Z0-9_]{0,}$/,Eb,Hb=[],Kb=[],Ja=[],dc,Ib;this.setMessageResize=function(d){dc=d};var I=new function(){var d;this.getAllModelGroup=function(){for(var a=[],k=0;k<Hb.length;k++)Hb[k].getModelGroupId()!==T.ROOT_NODE_ID&&a.push(Hb[k]);return a};this.getSelectedGroup=function(){return Oa&&Oa.getModelGroupTree().getSelectedNode()?Oa.getModelGroupTree().getSelectedNode().getUserObject():Eb};this.getCurrentGroupModel=function(a,k){a=k.getModelGroupId()===
T.ROOT_NODE_ID?Kb:k.getArrAllModelList(a);I.sortModelByModifyTime(a);return a};this.sortModelByModifyTime=function(a){a.sort(function(k,e){var u=(new Date(e.getModifyTime())).getTime(),g=(new Date(k.getModifyTime())).getTime();u===g&&(u=(new Date(e.getCreateTime())).getTime(),g=(new Date(k.getCreateTime())).getTime());return u-g})};this.getMessageCurtain=function(){d||(d=new wa,d.getJqUi().appendTo($("body")));return d};this.getUrlParam=function(a){return Ob.decodeParamFromUrl(window.location.search,
a)};this.createFacade=function(a,k,e,u){u||(u=ra.getRemoteImpl());return new V(u,a,function(g,r,w){return k?k(g,r,w):!1},e)};this.getRemoteImpl=function(){return ra.getFunGetDesignerRemoteImpl()}};this.createMainPageJqUi=function(){var d=$("<div class='model-set-main-page'>"),a=$("<div class='model-type-card-container'>");a.append(oc(va.DATA_TABLE_MODEL,b.get("dataTableModelDesc","\u57fa\u4e8e\u4e00\u4e2a\u6216\u591a\u4e2a\u6570\u636e\u8868\uff0c\u901a\u8fc7\u4e00\u7cfb\u5217\u7684\u5904\u7406\u6b65\u9aa4\u521b\u5efa\u4e00\u4e2a\u6570\u636e\u8868\u6a21\u578b")));
a.append(oc(va.METRICS_MODEL,b.get("metricsModelDesc","\u57fa\u4e8e\u6570\u636e\u8868\u6216\u6307\u6807\uff0c\u5b9a\u4e49\u8ba1\u7b97\u516c\u5f0f\u53ca\u7edf\u8ba1\u53e3\u5f84\u521b\u5efa\u4e00\u4e2a\u6307\u6807\u6a21\u578b")));a.appendTo(d);(new B).getJqUi().appendTo(d);$("<div class='model-set-main-page-statusbar'>").appendTo(d);pc();return d};var oc=function(d,a){var k=new function(){var e,u,g,r;this.setModelDesc=function(t){g=t};this.setModelType=function(t){u=t};this.setFunCreateModel=function(t){r=
t};this.getJqUi=function(){e||w();return e};var w=function(){e=$("<div class='model-type-card-item'>");var t=$("<div class='model-type-card-title'>"),f=va.modelTypeTransformName(u);t.text(f);t.attr("title",f);var p=$("<div class='model-type-card-desc'>");p.text(g);p.attr("title",g);var c=$("<div class='model-type-card-icon'>");W.background(c,va.getModelIconByType(u));if(L)t.css("top","40px"),c.css("top","45px"),p.css("top","80px");else{var h=$("<div class='model-type-card-create-btn'>");h.on("click",
function(){r&&r(u,f)});var v=$("<div class='model-type-card-create-text'>");v.text(b.get("new","\u65b0\u5efa"));var q=$("<div class='model-type-card-create-icon'>");W.background(q,"create-right-arrows");v.appendTo(h);q.appendTo(v);h.appendTo(e)}t.appendTo(e);c.appendTo(e);p.appendTo(e)}};k.setModelType(d);k.setModelDesc(a);k.setFunCreateModel(function(e,u){if(0===Oa.getModelGroupTree().getChildCount()){var g=function(p,c){var h=b.get("addModelSuccess","\u65b0\u5efa\u6a21\u578b\u6210\u529f\u3002");
I.getMessageCurtain().showSuccess(h,2E3);h=new T(Zb);h.setModelGroupId(c.getGroupId());h.setModelSetId(n);h.setModelGroupName(p);h.setParentId(Eb.getModelGroupId());h.setLevel(Eb.getLevel()+1);h.setArrChildren([]);h.setArrModelList([c]);h.setParentNode(Eb);Eb.setArrChildren([h]);Hb.push(h);Kb.push(c);Oa.createGroupOnBranchNode(h,0);Oa.updateUiWhenNotRootGroup();U.showModelView([c],!1)},r=b.get("createSth","\u65b0\u5efa#1").replace("#1",u),w=new Pb;w.setTitleName(r);var t;w.setCallback(function(p){t=
new Ac;t.setTitleName(r);t.setGroupName(p);t.setModelTypeName(u);t.setModelType(e);t.setModelGroupFolderNode(Eb);t.setCallback(g);return t});var f=new aa;f.setSteps([w]);f.show(zb.DIALOG_WIDTH,zb.DIALOG_HEIGHT)}else(w=Oa.getModelGroupTree().getSelectedNode())?w.getUserObject().getModelGroupId()===T.ROOT_NODE_ID?I.getMessageCurtain().showPrompt(b.get("createModelOnRootNode","\u4e0d\u80fd\u5728\u6839\u8282\u70b9\u4e0a\u521b\u5efa\u6a21\u578b\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u76ee\u5f55\u3002")):
(w=b.get("createSth","\u65b0\u5efa#1").replace("#1",u),w=new Nb(w),f=new Qa,f.setModelType(e),w.setModel(f),w.showDialog()):I.getMessageCurtain().showPrompt(b.get("noSelectedModelGroup","\u8bf7\u9009\u62e9\u4e00\u4e2a\u76ee\u5f55\u3002"))});return k.getJqUi()},jc=function(d){var a=new Wb(!0);a.setTitle(d);a.setSubDir(!1);a.showDialog();a.textFieldFocus()},zc=function(d,a){var k=new na;k.setMetric(a);k.setFunLoadModelerInfo(function(e){e=I.createFacade(e);e.setShowBlocking(!0);e.loadModelerInfo(d.getModelId())});
k.setFunEntryDesignerFromMainPage(function(){Yb(n,d.getModelId(),d.getModelType(),d.getModelName(),X)});k.setTitle(b.get("metricsPreview","\u6307\u6807\u67e5\u770b"));k.setButtonName(b.get("calculateMetrics","\u8ba1\u7b97"));k.setGlobal(I);k.showDialog()},Yb=function(d,a,k,e,u){var g=I.createFacade(function(r){r?ra.getModelDesignerEntrance()(L,d,a,k,e,u):(r=b.get("modelNotExistOrBeDeleted","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\u3002"),I.getMessageCurtain().showPrompt(r),Tb())});
g.setShowBlocking(!1);g.checkModelIsExist(a)},Zb=function(){return new Qa},Lb=function(d,a,k){if(d&&a&&k){k=k.toUpperCase();for(var e=a.toUpperCase(),u=e.split(k),g=k.length,r=0;r<u.length;r++){var w=e.indexOf(u[r]),t=a.substr(0,u[r].length);w+=u[r].length;var f=e.length-w;e=e.substr(w,f);a=a.substr(w,f);w=$("<span>");w.text(t);w.appendTo(d);r!=u.length-1&&1<u.length&&(w=e.indexOf(k),t=a.substr(w,g),w+=g,f=e.length-w,e=e.substr(w,f),a=a.substr(w,f),w=$("<span>"),w.text(t),w.css("color","red"),w.clone().appendTo(d))}}},
bc=function(d,a){var k;d&&""!==d?25<d.length?k=b.get("modelNumberTooLong","\u7f16\u7801\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc725\u4e2a\u5b57\u7b26\u3002"):d.match(Bc)?Ha.isSpecialWord(d)&&(k=b.get("specialWordAsFieldNumber","\u201c#1\u201d\u4e3a\u7279\u6b8a\u5173\u952e\u5b57\uff0c\u4e0d\u80fd\u4f5c\u4e3a\u6a21\u578b\u7f16\u7801\u3002").replace("#1",d)):k=b.get("numberStandard","\u7f16\u7801\u5fc5\u987b\u7531\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf\u7ec4\u6210\uff0c\u4e0d\u80fd\u4ee5\u6570\u5b57\u5f00\u5934\u3002"):
k=b.get("modelNumberCannotBeEmpty","\u8bf7\u8f93\u5165\u7f16\u7801\u3002");return k},cc=function(d,a){var k;d&&""!==d?50<d.length?k=b.get("modelNameTooLong","\u540d\u79f0\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002"):a&&500<a.length&&(k=b.get("descriptionTooLong","\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002")):k=b.get("modelNameCannotBeEmpty","\u8bf7\u8f93\u5165\u540d\u79f0\u3002");return k},gc=function(d){for(var a=!1,k=0;k<Hb.length;k++)if(Hb[k].getModelGroupName()===
d){a=!0;break}return a},hc=function(d,a){var k=I.createFacade(function(e){if(e){d?P.occur(P.DEPLOY_METHOD,P.DEPLOY_METHOD_BATCH):P.occur(P.DEPLOY_METHOD,P.DEPLOY_METHOD_SINGLE);for(var u=0;u<e.length;u++){var g=e[u],r=Object.keys(g);if(!r||0==r.length)break;r=r[0];"tableModeler"==r?P.occur(P.DATATABLE_MODEL_TRANSFORM_NODE_TYPE,g[r]):"metricModeler"==r&&P.occur(P.METRIC_MODEL_DIMENSION_TYPE,g[r])}}},function(e,u){return!0});k.setShowBlocking(!1);k.loadDeployModelerForUserOperation(a)};fb.BATCH="0";
fb.ONE="1";var pc=function(){Eb=new T(Zb);var d=function(a){var k=a.getArrModelList();if(k&&0<k.length)for(var e=0;e<k.length;e++)Kb.push(k[e]);Hb.push(a);if((a=a.getChildren())&&0<a.length)for(e=0;e<a.length;e++)d(a[e])};I.createFacade(function(a){var k=[];a?(Eb.fromJsonObject(a),Eb.setModelGroupName(b.get("rootNode","\u5168\u90e8")),Oa.updateUiWhenRootGroup(!0),U.hideModelNoData(),d(Eb),k=Kb):(Eb.setModelGroupName(b.get("rootNode","\u5168\u90e8")),Eb.setModelGroupId(T.ROOT_NODE_ID),Eb.setModelSetId(n),
Eb.setLevel(0),Oa.updateUiWhenNoGroup(),U.showModelNoData());a=Oa.getModelGroupTree().getJqUi();oa.layoutCtrlWithLRTB(a,0,0,"100%",65,41,"auto");a.appendTo(Oa.getJqUi());U.showModelView(k,!0);return!0}).listAllGroupAndModel(n)},lc=function(d){Ja=[];for(var a=0;a<d.length;a++){var k=d[a];k.getSelected()&&Ja.push(k)}},Sb=function(d,a){a=$.trim(a).toLowerCase();for(var k=[],e,u=0;u<d.length;u++){var g=d[u];e=g.getModelName().toLowerCase();var r=g.getNumber().toLowerCase(),w=g.getDesc().toLowerCase(),
t=g.getLockUserName();t=t?t.toLowerCase():"";var f=g.getCreator().toLowerCase(),p=g.getModifier().toLowerCase();e=-1!=e.indexOf(a)||-1!=r.indexOf(a)||-1!=w.indexOf(a)||-1!=f.indexOf(a)||-1!=p.indexOf(a)||-1!=t.indexOf(a)?!0:!1;if(!e)a:{e=g;r=a;if((w=e.getMetricItems())&&0!=w.length)for(t=0;t<w.length;t++)if(p=w[t],f=p.getName().toLowerCase(),p=p.getDesc().toLowerCase(),-1!=f.indexOf(r)||-1!=p.indexOf(r)){e.setSpreadState(!0);e=!0;break a}e=!1}e&&k.push(g)}return k},fc=function(d){if(!Ab)return!0;
var a=$.trim(U.getToolbar().getSearchText()).toLowerCase(),k=d.getName().toLowerCase();d=d.getDesc().toLowerCase();return-1!=k.indexOf(a)||-1!=d.indexOf(a)},kc=function(){ac(function(){P.occur(P.BUTTON_TYPE,P.SOURCE_MANAGE);ra.getDataSourceManageEntrance()(n,X,L)})},tc=function(){ac(function(){Ja=U.getSelectedModels();0===Ja.length?I.getMessageCurtain().showPrompt(b.get("noDeployTips","\u6682\u65e0\u9700\u8981\u90e8\u7f72\u7684\u6a21\u578b\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u201c\u672a\u90e8\u7f72\u201d\u6216\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u7684\u6a21\u578b\u3002")):
1===Ja.length?Cc():qc()})},uc=function(){ac(function(){qc()})},vc=function(){ac(function(){P.occur(P.BUTTON_TYPE,P.DEPLOY_MANAGE);ra.getDeployManageEntrance()(n,X)})},ec=function(d){ac(function(){P.occur(P.ENTER_DATA_AUTH_MANAGE,P.getEnterDataAuthManege(d));ra.getDataAuthorityEntrance()(n,X)})},ac=function(d){var a=I.createFacade(function(k){k?d():$b()});a.setShowBlocking(!1);a.checkModelSetIsExist(n)},$b=function(){var d=b.get("modelSetNotExist","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\uff0c\u64cd\u4f5c\u5931\u8d25\u3002");
I.getMessageCurtain().showPrompt(d)},rc=function(){var d;Ja=U.getSelectedModels();0===Ja.length?d=b.get("selectEditModel","\u8bf7\u9009\u62e9\u9700\u8981\u7f16\u8f91\u7684\u6a21\u578b\u3002"):1<Ja.length&&(d=b.get("editSingleModel","\u8bf7\u9009\u62e9\u5355\u4e2a\u6a21\u578b\u8fdb\u884c\u7f16\u8f91\u3002"));d?I.getMessageCurtain().showPrompt(d):(d=new Nb(b.get("editModelProp","\u7f16\u8f91\u6a21\u578b\u5c5e\u6027")),d.setModel(Ja[0]),d.showDialog())},sc=function(){Ja=U.getSelectedModels();var d=Ja.length;
if(0===d){var a=b.get("deleteModel","\u8bf7\u9009\u62e9\u9700\u8981\u5220\u9664\u7684\u6a21\u578b\u3002");I.getMessageCurtain().showPrompt(a)}else{for(var k=[],e=0;e<d;e++)k.push(Ja[e].getDeployed());-1!==k.indexOf(bb.DEPLOYED_UPDATE)&&-1!==k.indexOf(bb.DEPLOYED)?a=b.get("deleteArrDeployedModel","\u201c\u5df2\u90e8\u7f72\u201d\u3001\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"):-1!==k.indexOf(bb.DEPLOYED_UPDATE)?a=b.get("deleteDeployedUpdateModel",
"\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"):-1!==k.indexOf(bb.DEPLOYED)&&(a=b.get("deleteDeployedModel","\u201c\u5df2\u90e8\u7f72\u201d\u72b6\u6001\u7684\u6a21\u578b\u65e0\u6cd5\u5220\u9664\u3002"));a?I.getMessageCurtain().showPrompt(a):(k=Ja[0].getModelName(),a=b.get("confirmDeleteModel","\u5220\u9664\u201c#1\u201d\u6a21\u578b\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u5417\uff1f").replace("#1",k),1<d&&(a=b.get("confirmDeleteArrModel",
"\u5220\u9664\u201c#1\u201d\u7b49#2\u4e2a\u6a21\u578b\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u5417\uff1f").replace("#1",k).replace("#2",d)),d=new Xb(!1),d.setConfirmMsg(a),d.setArrDeleteModel(Ja),d.showDialog(),$(".sa-ctrl-dialog-titlebar").removeClass("sa-ctrl-dialog-titlebar"))}},Tb=function(){Hb=[];Kb=[];Ja=[];U.getToolbar().clearSearchStatus();U.getModelCardView().empty();Oa.clearSearchStatus();Oa.resetModelGroupTree();pc()},yc=function(){I.createFacade(function(d){if(d){var a=
new sa;a.fromJsonObject(d);d=[];for(var k=U.getSelectedModels(),e=0;e<k.length;e++)d.push(k[e].getModelId());k=new La;k.setRootNode(a);k.setGlobal(I);k.setModelSetId(n);k.setSelectModelIds(d);k.setMessageCurtain(I.getMessageCurtain());k.showExportDialog()}else I.getMessageCurtain().showPrompt(b.get("noModelForExport","\u6ca1\u6709\u53ef\u4f9b\u5bfc\u51fa\u7684\u6a21\u578b\u3002"))},function(d,a){if(20009001===d)return d=b.get("invalidPermissionForExportModel","\u60a8\u6ca1\u6709\u5bfc\u51fa\u6a21\u578b\u7684\u6743\u9650\u3002"),
I.getMessageCurtain().showPrompt(d),!0}).getAllModelGroupAndModelForExport(n)},wc=function(){Ja=U.getSelectedModels();if(0===Ja.length){var d=b.get("moveModel","\u8bf7\u9009\u62e9\u9700\u8981\u79fb\u52a8\u7684\u6a21\u578b\u3002");I.getMessageCurtain().showPrompt(d)}else d=new Sa,d.setGlobal(I),d.setModelSetId(n),d.setSelectedMoveModel(Ja),d.setSuccessCallback(function(a,k,e){var u=new Qa;u.fromJsonObject(e);var g=[];Oa.getModelGroupTree().getRootGroup().visiting(function(h){g.push(h)});for(e=0;e<
k.length;e++){var r=k[e];r.setModifier(u.getModifier());r.setModifyTime(u.getModifyTime());var w=r.getModelId(),t=r.getGroupId();r.setGroupId(a);for(var f=0;f<g.length;f++){if(g[f].getUserObject().getModelGroupId()===t)for(var p=g[f].getUserObject().getArrModelList(),c=0;c<p.length;c++)p[c].getModelId()===w&&p.splice(c,1);g[f].getUserObject().getModelGroupId()===a&&g[f].getUserObject().getArrModelList().push(r)}}a=I.getSelectedGroup();a=I.getCurrentGroupModel(Bb,a);Ab&&(a=Sb(a,U.getToolbar().getSearchText()));
a.forEach(function(h){h.setSelected(!1)});U.showModelView(a,!1);a=b.get("moveModelSuccess","\u79fb\u52a8\u6a21\u578b\u6210\u529f\u3002");I.getMessageCurtain().showSuccess(a,2E3)}),d.showDialog()},xc=function(){Ja=U.getSelectedModels();var d;0===Ja.length?d=b.get("copyModel","\u8bf7\u9009\u62e9\u9700\u8981\u590d\u5236\u7684\u6a21\u578b\u3002"):1<Ja.length&&(d=b.get("copyModelNum","\u8bf7\u9009\u62e9\u5355\u4e2a\u6a21\u578b\u8fdb\u884c\u590d\u5236\u3002"));if(1!==Ja.length)I.getMessageCurtain().showPrompt(d);
else{d=Ja[0];var a=new Va;a.setCopyModel(d);a.showDialog()}},Cc=function(){Ja=U.getSelectedModels();var d=Ja[0];if(d.getDeployed()===bb.DEPLOYED)I.getMessageCurtain().showPrompt(b.get("noDeployTips","\u6682\u65e0\u9700\u8981\u90e8\u7f72\u7684\u6a21\u578b\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u201c\u672a\u90e8\u7f72\u201d\u6216\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u7684\u6a21\u578b\u3002"));else{var a=I.createFacade(function(k){1==k?Dc(d.getModelId()):(k=new Ka,Ja&&1===Ja.length&&k.setSelectedModel(Ja[0]),
k.showDialog(),k.textFieldFocus())},null,null,ra.getFunGetDeployRemoteImpl()());a.setShowBlocking(!0);a.needDeployRefModel(d.getModelId())}},Dc=function(d){I.createFacade(function(a){var k=new Y;k.fromJsonObject(a);if(0<k.getChildren().length){var e=new Q;e.setRootNode(k);e.setDescConfirmCallback(function(u,g){I.createFacade(function(r){if(r){var w=fb.ONE;0<g.length&&(w=fb.BATCH);var t=new Ia;t.fromJsonObject(r);r=new fb(t,null,w);r.setRefModel(!0);r.show();g.push(d);hc(!1,g)}},function(r,w){if(20008001<=
r&&20008E3>r){switch(r){case 20008001:var t=b.get("duplicateDeployException","\u6a21\u578b\u5df2\u90e8\u7f72\uff0c\u8bf7\u52ff\u91cd\u590d\u90e8\u7f72\u3002");break;case 20008009:t=b.get("modelNotExistException","\u6a21\u578b\u4e0d\u5b58\u5728\u6216\u5df2\u88ab\u5220\u9664\uff0c\u90e8\u7f72\u5931\u8d25\u3002")}return t?(e.destroy(),I.getMessageCurtain().showPrompt(t,2E3),Tb(),!0):!1}},null,ra.getFunGetDeployRemoteImpl()()).deployModelForModelSetSource(n,d,u,g)});e.asyncShowDeployDialog()}else a=new Ka,
Ja&&1===Ja.length&&a.setSelectedModel(Ja[0]),a.showDialog(),a.textFieldFocus();return(new ua(k)).getJqUi()},function(a,k){},null,ra.getFunGetDeployRemoteImpl()()).loadNeedDeployRefModel(d)},qc=function(){Ja=U.getSelectedModels();for(var d=0<Ja.length,a=0;a<Ja.length;a++){var k=Ja[a];if(k.getDeployed()===bb.NONE_DEPLOYED||k.getDeployed()===bb.DEPLOYED_UPDATE){d=!1;break}}if(d)I.getMessageCurtain().showPrompt(b.get("noDeployTips","\u6682\u65e0\u9700\u8981\u90e8\u7f72\u7684\u6a21\u578b\uff0c\u8bf7\u91cd\u65b0\u9009\u62e9\u201c\u672a\u90e8\u7f72\u201d\u6216\u201c\u90e8\u7f72\u540e\u66f4\u6539\u201d\u7684\u6a21\u578b\u3002"));
else if(Ib=new ub,Ib.setGlobal(I),Ib.setModelSetId(n),Ja&&0<Ja.length){var e=[],u={};for(a=0;a<Ja.length;a++)u[Ja[a].getModelId()]=Ja[a];d=I.createFacade(function(g){var r=g.deployableModelIds,w=g.notDeployableModelIds;for(g=0;g<r.length;g++)e.push(u[r[g]]);Ib.setAutoSelectedModel(e);g=I.getSelectedGroup();Ib.setAutoSelectedGroup(g.getModelGroupId());var t={};g=I.createFacade(function(f){for(var p in f)t[p]=f[p];Ib.setMapModelRefJson(t);Bb&&Ib.setAutoCheckedContainChild(Bb);Ib.createDialog().show();
Ib.textFieldFocus();Ib.showNotDeployableModelPrompt(w,Ja)},null,null,ra.getFunGetDeployRemoteImpl()());g.setShowBlocking(!0);g.batchLoadRefDeployModelIds(r)},null,null,ra.getFunGetDeployRemoteImpl()());d.setShowBlocking(!0);d.batchCheckModelCycleReference(Object.keys(u))}else Bb&&Ib.setAutoCheckedContainChild(Bb),Ib.createDialog().show(),Ib.textFieldFocus()};zb.DIALOG_WIDTH=480;zb.DIALOG_HEIGHT=360;zb.WIZARD_PANEL_WIDTH=300;zb.WIZARD_PANEL_HEIGHT=80;zb.WIZARD_PANEL_LEFT_MARGIN=zb.DIALOG_WIDTH-zb.WIZARD_PANEL_WIDTH>>
1};var wa,Da,Na,sb,Aa,pa,Ya,N,E,H,m,R,aa,Z,ea,ya,mb,qb,fa,eb,b,Mb,nb,oa,Ob,Qb,n,X,L,ha,S,ca,C,T,V,W,ra,P,Za,Qa,va,bb,Ia,xa,na,Ha,La,xb,sa,ma,Y,ia;(function(){var B=com.kingdee.bos.qing.ui.component;wa=B.MessageCurtain;Da=B.Dialog;Na=B.Label;sb=B.TextField;Aa=B.TextArea;pa=B.SplitPane;Ya=B.ToolbarButton;N=B.SearchBox;E=B.Button;H=B.CheckBox;m=B.Icons;R=B.MessageDialog;aa=B.WizardDialog;Z=B.DropdownSelector;ea=B.Tree;ya=B.HelpIcon;mb=B.Menu;qb=B.MenuModel;fa=B.MenuItemModel;eb=B.AbstractModalDialog;
B=com.kingdee.bos.qing.modeler.mainpage.imexport;La=B.ExportDialog;xb=B.UploadPane;sa=B.FolderNode;B=com.kingdee.bos.qing.framework.common;b=B.MultilanguageManager.createPackageAccessor(la);Mb=B.WindowResizeObserver;B=com.kingdee.bos.qing.common.ui;nb=B.TableUtil;B=com.kingdee.bos.qing.common;oa=B.DomUtil;Ob=B.Util;Qb=B.DateFormater;n=Ob.decodeParamFromUrl(location.search,"modelSetId");X=Ob.decodeParamFromUrl(location.search,"modelSetName");L="true"==Ob.decodeParamFromUrl(location.search,"isPreset");
B=com.kingdee.bos.qing.modeler.common.ui;ha=B.NoDataContainer;S=B.SearchNoDataContainer;ca=B.ModelGroupPanel;C=B.ModelGroupTree;B=com.kingdee.bos.qing.modeler.common.model;T=B.ModelGroupFolderNode;va=B.ModelType;B=com.kingdee.bos.qing.modeler.mainpage.common;V=B.Facade;W=B.MyIcons;ra=B.Integration;P=B.UserOperationReporter;B=com.kingdee.bos.qing.modeler.mainpage.model;Za=B.ModelGroup;Qa=B.Model;bb=B.ModelDeployStatus;Ia=B.DeployResponse;xa=B.MetricItem;Y=B.DeployFolderNode;ia=B.DeployLeafNode;B=com.kingdee.bos.qing.modeler.designer.metricdesigner;
na=B.MetricsCalculateDialog;B=com.kingdee.bos.qing.modeler;Ha=B.SpecialWordChecker;B=com.kingdee.bos.qing;ma=B.CodeLoader})()})();
//qingVersionTag: 20250415