var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(D){var ca=0;return function(){return ca<D.length?{done:!1,value:D[ca++]}:{done:!0}}};$jscomp.arrayIterator=function(D){return{next:$jscomp.arrayIteratorImpl(D)}};$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(D,ca,X){if(D==Array.prototype||D==Object.prototype)return D;D[ca]=X.value;return D};$jscomp.getGlobal=function(D){D=["object"==typeof globalThis&&globalThis,D,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var ca=0;ca<D.length;++ca){var X=D[ca];if(X&&X.Math==Math)return X}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(D,ca){var X=$jscomp.propertyToPolyfillSymbol[ca];if(null==X)return D[ca];X=D[X];return void 0!==X?X:D[ca]};
$jscomp.polyfill=function(D,ca,X,ba){ca&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(D,ca,X,ba):$jscomp.polyfillUnisolated(D,ca,X,ba))};$jscomp.polyfillUnisolated=function(D,ca,X,ba){X=$jscomp.global;D=D.split(".");for(ba=0;ba<D.length-1;ba++){var ia=D[ba];if(!(ia in X))return;X=X[ia]}D=D[D.length-1];ba=X[D];ca=ca(ba);ca!=ba&&null!=ca&&$jscomp.defineProperty(X,D,{configurable:!0,writable:!0,value:ca})};
$jscomp.polyfillIsolated=function(D,ca,X,ba){var ia=D.split(".");D=1===ia.length;ba=ia[0];ba=!D&&ba in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var ka=0;ka<ia.length-1;ka++){var oa=ia[ka];if(!(oa in ba))return;ba=ba[oa]}ia=ia[ia.length-1];X=$jscomp.IS_SYMBOL_NATIVE&&"es6"===X?ba[ia]:null;ca=ca(X);null!=ca&&(D?$jscomp.defineProperty($jscomp.polyfills,ia,{configurable:!0,writable:!0,value:ca}):ca!==X&&(void 0===$jscomp.propertyToPolyfillSymbol[ia]&&(X=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[ia]=
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(ia):$jscomp.POLYFILL_PREFIX+X+"$"+ia),$jscomp.defineProperty(ba,$jscomp.propertyToPolyfillSymbol[ia],{configurable:!0,writable:!0,value:ca})))};$jscomp.initSymbol=function(){};
$jscomp.polyfill("Symbol",function(D){if(D)return D;var ca=function(ka,oa){this.$jscomp$symbol$id_=ka;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:oa})};ca.prototype.toString=function(){return this.$jscomp$symbol$id_};var X="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",ba=0,ia=function(ka){if(this instanceof ia)throw new TypeError("Symbol is not a constructor");return new ca(X+(ka||"")+"_"+ba++,ka)};return ia},"es6","es3");
$jscomp.polyfill("Symbol.iterator",function(D){if(D)return D;D=Symbol("Symbol.iterator");for(var ca="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),X=0;X<ca.length;X++){var ba=$jscomp.global[ca[X]];"function"===typeof ba&&"function"!=typeof ba.prototype[D]&&$jscomp.defineProperty(ba.prototype,D,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return D},
"es6","es3");$jscomp.iteratorPrototype=function(D){D={next:D};D[Symbol.iterator]=function(){return this};return D};$jscomp.iteratorFromArray=function(D,ca){D instanceof String&&(D+="");var X=0,ba=!1,ia={next:function(){if(!ba&&X<D.length){var ka=X++;return{value:ca(ka,D[ka]),done:!1}}ba=!0;return{done:!0,value:void 0}}};ia[Symbol.iterator]=function(){return ia};return ia};
$jscomp.polyfill("Array.prototype.keys",function(D){return D?D:function(){return $jscomp.iteratorFromArray(this,function(ca){return ca})}},"es6","es3");$jscomp.findInternal=function(D,ca,X){D instanceof String&&(D=String(D));for(var ba=D.length,ia=0;ia<ba;ia++){var ka=D[ia];if(ca.call(X,ka,ia,D))return{i:ia,v:ka}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.find",function(D){return D?D:function(ca,X){return $jscomp.findInternal(this,ca,X).v}},"es6","es3");
(function(){function D(){ba.call(this);var da;this.getRemoteUrl=function(){return da};this.setRemoteUrl=function(na){da=na}}"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.modelset&&(com.kingdee.bos.qing.modeler.modelset=
{});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.common&&(com.kingdee.bos.qing.modeler.modelset.common={});var ca=com.kingdee.bos.qing.modeler.modelset.common;ca.Facade=function(da,na,G,ta){X.call(this,da,na,G,ta);var m=this.protectedMethod;this.checkQingModelerPermission=function(){m.remote("checkQingModelerPermission",{})};this.checkQingModelerPresetPermission=function(){m.remote("checkQingModelerPresetPermission",{})};this.loadAllModelSetInfo=function(){m.remote("loadAllModelSetInfo",
{})};this.loadCoopInfoDetails=function(u){u={modelSet:JSON.stringify(u.toJsonObject())};m.remote("loadCoopInfoDetails",u)};this.previewCoopInfo=function(u,ya){u={valueTextPairs:JSON.stringify(u),type:ya};m.remote("previewCoopInfo",u)};this.saveOrUpdateModelSet=function(u){u={modelSet:JSON.stringify(u.toJsonObject())};m.remote("saveOrUpdateModelSet",u)};this.deleteModelSet=function(u){m.remote("deleteModelSet",{modelSetId:u})};this.saveOrUpdateCoopModelSetInfo=function(u){u={modelSet:JSON.stringify(u.toJsonObject())};
m.remote("saveOrUpdateCoopModelSetInfo",u)};this.updateModelSetEnabledStatus=function(u,ya){m.remote("updateModelSetEnabledStatus",{modelSetId:u,enableStatus:ya})};this.loadSingleModelSetInfo=function(u){m.remote("loadSingleModelSetInfo",{modelSetId:u})};this.getAllModelSetForExport=function(){m.remote("getAllModelSetForExport",{})};this.confirmExportModelSet=function(u){u={modelSetIdList:JSON.stringify(u.modelSetList)};m.remote("confirmExportModelSet",u)};this.getExportedData=function(u){var ya=
oa.formatDate("yyyyMMdd_HHmmss");ka.downloadFile("Qing-"+ya+".qing-mds",u)};this.getEnableImportModelSet=function(u){m.remote("getEnableImportModelSet",{fileName:u})};this.importSelectedModelSet=function(u,ya,La,Ga){u={fileName:u,modelSetList:JSON.stringify({importModelSets:ya}),firstTimeImport:La,cacheIdKey:Ga};m.remote("importSelectedModelSet",u)};this.getAllDWResourceInfoList=function(u,ya,La,Ga,J){m.remote("getAllDWResourceInfoList",{targetPage:u,pageSize:ya,sortField:La,sortOrder:Ga,searchText:J})};
this.getAllScheduleResourceInfoList=function(u,ya,La,Ga,J){m.remote("getAllScheduleResourceInfoList",{targetPage:u,pageSize:ya,sortField:La,sortOrder:Ga,searchText:J})};this.hasResourceManager=function(){m.remote("hasResourceManager",{})};this.loadExceptionLog=function(u){m.remote("loadExceptionLog",{id:u})};this.checkDataWarehouseConfig=function(){m.remote("checkDataWarehouseConfig",{})}};var X,ba,ia,ka,oa;(function(){var da=com.kingdee.bos.qing.framework.common;X=da.AbstractFacade;ba=da.AbstractRemoteCall;
ia=da.AbstractIcons;ka=da.RemoteFramework;da=com.kingdee.bos.qing.common;oa=da.Util})();ca.Integration=new function(){var da=new D,na,G,ta;this.getRemoteImpl=function(){return da};this.setRemoteUrl=function(m){da.setRemoteUrl(m)};this.setModelSetMainPageEntrance=function(m){na=m};this.getModelSetMainPageEntrance=function(){return na};this.setModelDesignerPageEntrance=function(m){G=m};this.getModelDesignerPageEntrance=function(){return G};this.setDeployModelDesignerPageEntrance=function(m){ta=m};this.getDeployModelDesignerPageEntrance=
function(){return ta}};ca.ModelSetSubscribeHelper=new function(){var da={},na=com.kingdee.bos.qing.framework.common.RemoteFramework;this.putSubscribe=function(G,ta){da[G+""]=ta;na.subscribeChannel(G+"",ta)};this.clear=function(){for(var G=Object.keys(da),ta=0;ta<G.length;ta++){var m=G[ta];na.unsubscribeChannel(m,da[m])}da={}};this.getCurrentPageClientId=function(){return na.getClientID()}};ca.Icons=new function(){ia.call(this);var da=this.protectedMethod;this.protectedInit=function(ta,m){ta=com.kingdee.bos.qing.modeler.modelset.ComboIcon;
if(!ta)throw Error("com.kingdee.bos.qing.theme.ComboIcon not found.");ta.define(m,"model-common");m.setStartPosition(1,62);m.setIconSize(20,20);G(0,1,"icon-enable");G(0,0,"icon-disabled");G(0,2,"icon-modelset");m.setStartPosition(0,81);m.setIconSize(18,18);G(0,4,"icon-right");G(1,4,"icon_down");m.setStartPosition(280,220);m.setIconSize(50,50);G(0,0,"user-not-exist");m.setGap(1);m.setStartPosition(9,-3);m.setIconSize(16,16);G(5,5,"icon-tablemodel");m.setStartPosition(12,-2);G(5,6,"icon-relationmodel");
m.setStartPosition(11,-2);G(5,7,"icon-entitymodel");G(5,8,"icon-metricmodel");m.setStartPosition(0,117);m.setIconSize(16,16);na(0,1,"btn-delete");na(0,2,"btn-edit");na(0,3,"icon_export");na(0,4,"icon-coorperation");m.setStartPosition(1,247);m.setIconSize(36,36);G(0,0,"icon-card-subject");m.setStartPosition(0,151);m.setIconSize(170,98);G(0,0,"icon-empty");m.setStartPosition(0,285);m.setIconSize(52,52);G(0,0,"btn-new-image");G(0,1,"btn-new-image-hover");m.setStartPosition(0,337);m.setIconSize(56,56);
G(0,0,"add-user-image");m.setStartPosition(56,337);m.setIconSize(50,50);G(0,0,"icon-preset-big");m.setStartPosition(0,500);m.setIconSize(16,16);na(0,0,"btn-copy");m.setStartPosition(169,229);m.setIconSize(13,13);G(0,0,"icon-sort");G(0,1,"icon-sort-desc");G(0,2,"icon-sort-asc");m.setStartPosition(0,400);m.setIconSize(138,84);G(0,0,"icon-search-none");ta.define(m,"no-data.png");m.setStartPosition(0,0);m.setGap(0);m.setIconSize(220,220);G(0,0,"no-data");ta.define(m,"model-common2x");m.setGap(1);m.setStartPosition(0,
0);m.setIconSize(32,32);na(0,0,"auth");na(0,1,"disable");na(0,2,"enable");na(0,3,"btn-copy")};var na=function(ta,m,u){G(ta+1,m,u);G(ta,m,u+"_hover")},G=function(ta,m,u){da.registIcon(ta,m,u)}};var Ba=new function(){var da;this.hookCollector=function(na){da=na};this.occur=function(na,G){try{da&&da(na,G)}catch(ta){window.console&&console.warn(ta)}};this.getModelSetType=function(na){var G=com.kingdee.bos.qing.modeler.modelset.ui.ModelSetCard;switch(na){case G.CREATE:return Ba.CREATE_MODELSET;case G.COOPERATION:return Ba.COOPERATION_MODELSET;
case G.PRESET:return Ba.PRESET_MODELSET}};this.getEnableStatus=function(na){var G=com.kingdee.bos.qing.modeler.modelset.ui.ModelSetCard;switch(na){case G.DISABLED:return Ba.DISABLED;case G.ENABLED:return Ba.ENABLED}}};Ba.MODELSET_TYPE_WHEN_ENTER_MAIN_PAGE="modelset-type-when-enter-main-page";Ba.MODELSET_IS_ENABLE_OR_DISABLE="modelset-is-enable-or-disable";Ba.CREATE_MODELSET="\u6211\u521b\u5efa\u7684\u6a21\u578b\u96c6";Ba.COOPERATION_MODELSET="\u6211\u53c2\u4e0e\u534f\u4f5c\u7684\u6a21\u578b\u96c6";
Ba.PRESET_MODELSET="\u7cfb\u7edf\u9884\u7f6e\u7684\u6a21\u578b\u96c6";Ba.DISABLED="\u7981\u7528";Ba.ENABLED="\u542f\u7528";ca.UserOperationReporter=Ba})();(function(){function D(){var ba=this,ia,ka,oa,Ba,da,na,G,ta,m,u,ya,La,Ga,J=[],x=[];this.setFId=function(g){ia=g};this.getFId=function(){return ia};this.setCreatorName=function(g){ya=g};this.getCreatorName=function(){return ya};this.getCreateTime=function(){return La};this.setCreateTime=function(g){La=g};this.getUpdateTime=function(){return Ga};this.setUpdateTime=function(g){Ga=g};this.setCreatorId=function(g){u=g};this.getCreatorId=function(){return u};this.getUsers=function(){return J};this.setUsers=
function(g){J=g};this.getRoles=function(){return x};this.setRoles=function(g){x=g};this.setModelSetName=function(g){ka=g};this.getModelSetName=function(){return ka};this.setDescription=function(g){oa=g};this.getDescription=function(){return oa};this.setDisabled=function(g){Ba=g};this.getDisabled=function(){return Ba};this.setPermission=function(g){da=g};this.getPermission=function(){return da};this.setTableModelNum=function(g){na=g};this.getTableModelNum=function(){return na};this.setEntityModelNum=
function(g){G=g};this.getEntityModelNum=function(){return G};this.setRelationModelNum=function(g){ta=g};this.getRelationModelNum=function(){return ta};this.setMetricModelNum=function(g){m=g};this.getMetricModelNum=function(){return m};this.copy=function(){var g=new D;g.setFId(ia);g.setModelSetName(ka);g.setDescription(oa);g.setTableModelNum(na);g.setEntityModelNum(G);g.setRelationModelNum(ta);g.setMetricModelNum(m);g.setDisabled(Ba);g.setPermission(da);g.setUsers(J);g.setRoles(x);g.setCreatorId(u);
g.setCreatorName(ya);return g};this.fromJsonObject=function(g){ba.setFId(g.modelSetId);ba.setModelSetName(g.modelSetName);ba.setDescription(g.description);ba.setTableModelNum(g.tableModelNum);ba.setEntityModelNum(g.entityModelNum);ba.setRelationModelNum(g.relationModelNum);ba.setMetricModelNum(g.metricModelNum);ba.setDisabled(g.disabled);ba.setPermission(g.permission);ba.setCreatorId(g.creatorId);ba.setCreatorName(g.creatorName);ba.setCreateTime(g.createTime);ba.setUpdateTime(g.modifyTime);ba.setUsers(Oa(g.users));
ba.setRoles(Oa(g.roles))};this.toJsonObject=function(){var g={};g.modelSetId=ia;g.modelSetName=ka;g.description=oa;g.tableModelNum=na;g.entityModelNum=G;g.relationModelNum=ta;g.metricModelNum=m;g.disabled=Ba;g.permission=da;g.creatorId=u;g.createTime=La;g.modifyTime=Ga;g.users=za(J);g.roles=za(x);return g};var za=function(g){var V=[];if(g)for(var z=0;z<g.length;z++)V.push(g[z].toJsonObject());return V},Oa=function(g){var V=[];if(g)for(var z=0;z<g.length;z++){var la=new ca;la.fromJsonObject(g[z]);
V.push(la)}return V}}function ca(){var ba=this,ia,ka,oa,Ba,da,na;this.setPermission=function(G){da=G};this.getPermission=function(){return da};this.getValue=function(){return ia};this.setValue=function(G){ia=G};this.setJobId=function(G){oa=G};this.getJobId=function(){return oa};this.getText=function(){return ka};this.setText=function(G){ka=G};this.getColor=function(){return Ba};this.setColor=function(G){Ba=G};this.setAvailable=function(G){na=G};this.isAvailable=function(){return na};this.toJsonObject=
function(){var G={};G.value=ia;G.text=ka;G.jobId=oa;G.color=Ba;G.permission=da;G.isAvailable=na;return G};this.fromJsonObject=function(G){G&&(G.value&&ba.setValue(G.value),G.text&&ba.setText(G.text),G.jobId&&ba.setJobId(G.jobId),G.color&&ba.setColor(G.color),ba.setAvailable(G.isAvailable),ba.setPermission(G.permission))}}"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.modelset&&(com.kingdee.bos.qing.modeler.modelset={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.model&&(com.kingdee.bos.qing.modeler.modelset.model={});var X=com.kingdee.bos.qing.modeler.modelset.model;X.ModelSetInfo=D;X.ValueTextPair=ca;ca.ADMIN_PERM=0;ca.MEM_PERM=1;ca.CREATOR_PERM=2;D.NAMEEXIST="modelSetNameExist"})();(function(){function D(){Ga.call(this);var l=this,H=this.protectedMethod,r,k,v,t,n,B;this.setGlobal=function(W){r=W};this.setRootNode=function(W){v=W};this.setMessageCurtain=function(W){t=W};this.showExportDialog=function(){l.setSize(640,480);l.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);H.setTitle(J.get("exportModelSet","\u5bfc\u51fa\u6a21\u578b\u96c6"));H.setContentPaneCreator(ea);H.setClosingChecker(l.isValidToAccepted,!0);H.setClosingAction(T);l.showDialog()};var T=function(W){if(W){W=
k.getCheckedModelSetNodes();var R={},ja=[];for(i=0;i<W.length;i++)ja.push(W[i].getId());R[D.MODEL_SET_LIST]=ja;ha(R)}},ea=function(){var W=$("<div>"),R=W.append;n=new La;n.addSearchListener(ua);n.setSearchListenerDelay(400);n.setPlaceholder(J.get("searchModelSet","\u641c\u7d22\u6a21\u578b\u96c6\u540d\u79f0"));n.setShowSearchIcon(!0);var ja=n.getJqUi();ja.addClass("modelset-imexport-search-box");R.call(W,ja);R=W.append;ja=new Oa;ja.setChecked(!1);ja.addCheckedListener(ra);ja.setText(J.get("showOnlyChecked",
"\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));ja=ja.getJqUi();ja.addClass("modelset-export-show-only-checked-box");x.layoutCtrl(ja,250,2,200,23);R.call(W,ja);k=new ca(v);R=k.getJqUi();W.append(R);return W},ua=function(W){B=n.getText().trim();k.searchKey(B)},ra=function(W,R){R&&(k.setShowOnlyChecked(W.isChecked()),k.searchKey(B))};this.isValidToAccepted=function(W){0===k.getCheckedModelSetNodes().length?(H.getMessageCurtain().showPrompt(J.get("selectNone","\u672a\u9009\u4e2d\u6a21\u578b\u96c6\u3002")),
W(!1)):W(!0)};var ha=function(W){r.createFacade(function(R){r.createFacade().getExportedData(R)},function(R,ja){return 20009002===R?(t.showPrompt(J.get("publicSourceException","\u5bfc\u51fa\u5931\u8d25\uff0c\u516c\u5171\u6570\u636e\u6e90\u5f02\u5e38\u3002"),2E3),!0):20009001===R?(t.showPrompt(J.get("invalidPermissionException","\u6743\u9650\u68c0\u67e5\u5931\u8d25\u3002"),2E3),!0):20009008===R?(R=J.get("exportModelSetCorruptionException","\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",
ja),t.showPrompt(R,2E3),!0):!1}).confirmExportModelSet(W)}}function ca(l){function H(){KTDefaultCellRender.call(this,ra);var d=this;this.paintCellUI=function(b,e){var c=d.getCurrentRow().getUserObject(),f=c.getName();b=$("<div>");b.addClass("modelset-export-area-list-item");var p=new Oa,h=p.getJqUi(),C=$("<div>");h.addClass("modelset-export-area-list-item-checkbox");C.addClass("modelset-export-area-list-item-text");b.append(h);b.append(C);p.setChecked(c.isChecked());p.setUserObject(c);p.addCheckedListener(E);
ea[c.getId()]=p;if(0===c.getSubNodeLevel())C.text(f);else if(f=c.getName(),ua&&f){p=ua.toUpperCase();h=f.toUpperCase();var N=h.split(p),y=p.length,w;for(w in N){var K=h.indexOf(N[w]),fa=f.substr(Z,N[w].length);K+=N[w].length;var O=h.length-K;h=h.substr(K,O);f=f.substr(K,O);K=$("<span>");K.text(fa);K.appendTo(C);if(w!==N.length-1&&1<N.length){var Z=h.indexOf(p);fa=f.substr(Z,y);K=Z+y;O=h.length-K;h=h.substr(K,O);f=f.substr(K,O);K=$("<span>");K.text(fa);K.css("color","red");K.clone().appendTo(C)}}}else C.text(f);
c instanceof da||(C.addClass("modelset-export-model-name-label"),b.append(la.createIcon(c.getModelSetType(),"modelset-export-model-icon")));e?(e=$(e),e.css("overflow","visible"),b.appendTo(e)):b.appendTo(jqDiv);x.layoutCtrlWithLRTB(b,0,0,null,0,0,null)}}var r=this,k,v=[],t=[],n=[],B=!1,T=!1,ea,ua,ra,ha,W,R;this.setShowOnlyChecked=function(d){T=d};this.getCheckedModelSetNodes=function(){var d,b=[];for(d=0;d<n.length;d++){var e=n[d];e.isChecked()&&b.push(e)}return b};this.getJqUi=function(){k||(ja(),
k=$("<div>"),k.addClass("modelset-export-area"),k.addClass("modelset-export-tree-selection-area"),W=$("<div>"),W.addClass("modelset-export-tree-selection-area-checked-prompt"),W.css("color","#666"),x.layoutCtrlWithLRTB(W,0,null,200,0,null,23),W.prependTo(k),ha=Ca(),k.append(ha),A(),F());return k};var ja=function(){var d=function(c){v.push(c);if(c instanceof G)n.push(c);else if(t.push(c),(c=c.getChildren())&&0<c.length)for(var f=0;f<c.length;f++)d(c[f])},b=l.getChildren();if(b&&0<b.length)for(var e=
0;e<b.length;e++)d(b[e])},Ca=function(){ra=new KTable;var d=$(ra.getUI());d.children().css("overflow-x","hidden");var b=new H;ra.setCellRender(b);ra.setSyncUIWhenModelChanged(!1);ra.addTreeExpandListener(P);ra.addColumn().setWidth(400);x.layoutCtrlWithLRTB(d,0,0,null,23,0,null);return d},P=function(d,b){(d=ra.getRow(b.getRowIdx()).getUserObject())&&d.setExpanded(b.isExpanded())};this.searchKey=function(d){var b;ua=d;B=!!ua;for(b=0;b<n.length;b++){var e=n[b];var c=e.isChecked();if(d){var f=-1<e.getName().toUpperCase().indexOf(ua.toUpperCase());
c=T?f&&c:f}else c=T?e.isChecked():!0;e.setVisible(c)}r.updateUi()};var va=function(){var d=function(b){var e=!0,c=!1;if(b instanceof da){var f=b.getChildren();if(f&&0<f.length)for(var p=0;p<f.length;p++){var h=f[p];d(h);h.isVisible()&&(e=e&&h.isChecked());c=c||h.isVisible()}}else e=e&&b.isChecked(),c=c||b.isVisible();b.setVisible(c);b.setChecked(e)};d(l)};this.updateUi=function(){for(var d=!1,b=0;b<n.length;b++)d=d||n[b].isVisible();d?(R&&R.hide(),ha&&ha.remove(),ha=Ca(),k.append(ha),A()):(R||(R=
$("<div>"),(new z).getJqUi().appendTo(R),k.append(R)),R.show(),ha.hide())};var A=function(){va();ea={};for(var d=0;d<v.length;d++){var b=v[d];if(b.isVisible()){var e=za.createRow(ra,!1),c=e.getCell(0),f=b.getSubNodeLevel();f=new KTCellTreeModel(f);e.setHeight(23);e.setUserObject(b);b instanceof da?(b=B?!0:b.isExpanded(),f.setExpanded(b)):(b=b.getParentNode(),b=B?!0:b.isExpanded(),e.setHide(!b));c.setTreeModel(f)}}ra.updateUI()},F=function(){for(var d=0,b=0;b<n.length;b++)n[b].isChecked()&&d++;d=J.get("checkedNumberPrompt",
"(\u5df2\u9009\u62e9 #1 \u9879)").replace("#1",d);W.text(d)},E=function(d,b){if(b){d.getUserObject().check(d.isChecked(),a);for(d=0;d<v.length;d++)if(b=v[d],b.isVisible()){var e=ea[b.getId()];e&&e.setChecked(b.isChecked())}F()}},a=function(d){for(var b=!0,e=d.getChildren(),c=0;c<e.length;c++){var f=e[c];f.isVisible()&&(b=b&&f.isChecked())}d.setChecked(b);(d=d.getParentNode())&&a(d)}}function X(){function l(v){KTDefaultCellRender.call(this,v);var t=this,n=this.paintCellUI;this.paintCellUI=function(T,
ea){t.getCurrentRowIdx()<za.getHeadRowCount()?n(T,ea):($(T),2===t.getCurrentColIdx()?B(T,t.getCellWidth(),t.getCellHeight(),t.getCurrentRow()):n(T,ea))};var B=function(T,ea,ua,ra){T=za.createCtrlInCell(T,ea,ua,u);T.setSelected(ra.getUserObject().strategy);"otherUserConflict"===ra.getUserObject().conflictType?T.setItemModels(X.RENAME_CONFLICTTYPE):T.setItemModels(X.ALL_CONFLICTTYPE);T.setUserObject(ra);T.setCustomPainter(function(ha,W,R){switch(R){case X.ALL_CONFLICTTYPE[0]:ha=J.get("ignore","\u5ffd\u7565");
break;case X.ALL_CONFLICTTYPE[1]:ha=J.get("overwrite","\u8986\u76d6");break;case X.ALL_CONFLICTTYPE[2]:ha=J.get("rename","\u91cd\u547d\u540d");break;default:ha=""}R=$("<div>");R.text(ha);R.appendTo(W)});T.addSelectedChangedListener(function(ha,W,R){ha.getUserObject().getUserObject().strategy=R})}}var H=this,r,k;this.getConflictModelList=function(){return k};this.getJqUi=function(v){r=za.createTable();za.bindTableListenerForCtrl(r);var t=new l(r);t.setOutsideVisible(!1);r.setCellRender(t);r.addColumns(3);
r.getColumn(0).setWidth(100);r.getColumn(1).setWidth(260);r.getColumn(2).setWidth(180);t=za.createHeadRow(r);t.getCell(0).setValue(J.get("modelSetColName","\u6a21\u578b\u96c6\u540d\u79f0"));t.getCell(1).setValue(J.get("modelSetColDesc","\u6a21\u578b\u96c6\u63cf\u8ff0"));t.getCell(2).setValue(J.get("strategyCol","\u5904\u7406\u7b56\u7565"));k=v;for(var n in v)k[n].strategy=X.ALL_CONFLICTTYPE[2];H.updateUi(v);za.refresh(r);v=$(r.getUI());v.addClass("modelset-import-selection-table");return v};this.updateUi=
function(v){za.clearWithoutHead(r);za.refresh(r);for(var t,n=0;n<v.length;n++){var B=v[n];t=za.createRow(r);t.setUserObject(B);t.getCell(0).setValue(B.modelSetName);t.getCell(1).setValue(B.desc);t.getCell(2).setValue(B.strategy)}za.refresh(r)};this.refresh=function(){za.refresh(r)}}function ba(l){Ga.call(this);var H=this,r=this.protectedMethod,k=[],v,t,n,B,T;this.setGlobal=function(ha){v=ha};this.setFunRefreshModelGroup=function(ha){n=function(){l.showSuccess(J.get("importModelSetSuccess","\u6a21\u578b\u96c6\u5bfc\u5165\u6210\u529f\u3002"));
ha()}};this.addConfirmListener=function(ha){k.push(ha)};this.createUi=function(ha,W){H.setSize(640,480);H.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);r.setTitle(J.get("importModelSet","\u5bfc\u5165\u6a21\u578b\u96c6"));r.setContentPaneCreator(function(){var R=$("<div>"),ja=R.append;B=new La;B.addSearchListener(ea);B.setSearchListenerDelay(400);B.setPlaceholder(J.get("searchModelSet","\u641c\u7d22\u6a21\u578b\u96c6\u540d\u79f0"));B.setShowSearchIcon(!0);var Ca=B.getJqUi();Ca.addClass("modelset-imexport-search-box");
ja.call(R,Ca);ja=R.append;Ca=new Oa;Ca.setChecked(!1);Ca.addCheckedListener(ua);Ca.setText(J.get("showOnlyChecked","\u4ec5\u663e\u793a\u9009\u4e2d\u9879"));Ca=Ca.getJqUi();x.layoutCtrl(Ca,250,2,200,23);ja.call(R,Ca);t=new ca(W);ja=t.getJqUi();ja.addClass("modelset-export-tree-selection-area");R.append(ja);return R});r.setClosingChecker(H.isValidToAccepted,!0);r.setClosingAction(function(R){if(R&&(R=t.getCheckedModelSetNodes(),0!==R.length)){for(var ja=[],Ca=0;Ca<R.length;Ca++)ja.push(R[Ca].toJsonObject());
ra(ha,ja)}});H.showDialog()};var ea=function(){T=B.getText().trim();t.searchKey(T)},ua=function(ha,W){W&&(t.setShowOnlyChecked(ha.isChecked()),t.searchKey(T))};this.isValidToAccepted=function(ha){0===t.getCheckedModelSetNodes().length?(r.getMessageCurtain().showPrompt(J.get("selectNone","\u672a\u9009\u4e2d\u6a21\u578b\u96c6\u3002")),ha(!1)):ha(!0)};var ra=function(ha,W){v.createFacade(function(R){var ja=R.conflictModelSet,Ca=R.numberConflictModel;if(0<ja.length){Ca=W.length-ja.length;var P=new ia;
P.setCacheImportMapIdKey(R.cacheMapIdKey);P.setGlobal(v);P.setFunRefreshModelGroup(n);P.setArrNumberConflictModel(R.numberConflictModel);P.createUi(ha,ja,Ca);P.repaint()}else 0<Ca.length?(R=new ka,R.setFunRefreshModelGroup(n),R.createUi(Ca),R.repaint()):n&&n()},function(R,ja){return 1020101===R||1100021===R?(l.showPrompt(J.get("resourceFileLimit","\u5bfc\u5165\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),2E3),!0):20009004===R?(l.showPrompt(J.get("resourceFileIncomplete","\u5bfc\u5165\u5931\u8d25\uff0c\u6570\u636e\u5305\u4e0d\u5b8c\u6574\u3002"),
2E3),!0):20009008===R?(l.showPrompt(J.get("importModelSetCorruptionException","\u5bfc\u5165\u5931\u8d25\uff0c\u6570\u636e\u6a21\u578b\u635f\u574f\u3002"),2E3),!0):20004001===R?(l.showPrompt(J.get("MaterializedExceptionForImport","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u7269\u5316\u5b58\u50a8\u8bbe\u7f6e\u89e3\u6790\u5f02\u5e38\u3002"),2E3),!0):30001001===R?(l.showPrompt(J.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===R?(l.showPrompt(J.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}).importSelectedModelSet(ha,W,!0,"")}}function ia(){Ga.call(this);var l=this,H=this.protectedMethod,r=[],k,v,t,n,B,T,ea,ua,ra,ha,W=[];this.setCacheImportMapIdKey=function(F){ha=F};this.setGlobal=function(F){k=F};this.setFunRefreshModelGroup=
function(F){ra=F};this.setArrNumberConflictModel=function(F){W=F};this.addConfirmListener=function(F){r.push(F)};this.createUi=function(F,E,a){B=F;T=E;ua=a;l.setSize(640,480);l.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);H.setTitle(J.get("importModelSet","\u5bfc\u5165\u6a21\u578b\u96c6"));H.setContentPaneCreator(function(){var d=$("<div>"),b=J.get("importSuccessPrompt","\u6210\u529f\u5bfc\u5165#1\u4e2a\u6a21\u578b\u96c6\u3002\u4ee5\u4e0b\u6a21\u578b\u96c6\u540d\u79f0\u51b2\u7a81\uff0c\u8bf7\u5904\u7406\u3002").replace("#1",
a);b=new g(b);v=new ya(J.get("allIgnore","\u5168\u90e8\u5ffd\u7565"));t=new ya(J.get("allOverwrite","\u5168\u90e8\u8986\u76d6"));n=new ya(J.get("allRename","\u5168\u90e8\u91cd\u547d\u540d"));v.addActionListener(ja);t.addActionListener(Ca);n.addActionListener(P);b=b.getJqUi();var e=v.getJqUi(),c=t.getJqUi(),f=n.getJqUi();b.addClass("modelset-import-selection-prompt");e.addClass("modelset-import-selection-ignore-btn");c.addClass("modelset-import-selection-overwrite-btn");f.addClass("modelset-import-selection-rename-btn");
d.append(b);d.append(e);d.append(c);d.append(f);ea=new X;d.append(ea.getJqUi(E));return d});H.setClosingChecker2(l.isValidToAccepted,R,!0);H.setClosingAction(function(d){!d&&W&&0<W.length&&A()});l.showDialog()};var R=function(F){F(!0);0<ua&&0==W.length&&ra&&ra()};this.repaint=function(){ea.refresh()};var ja=function(){for(var F in T)T[F].strategy=X.ALL_CONFLICTTYPE[0];ea.updateUi(T)},Ca=function(){for(var F in T)"otherUserConflict"!==T[F].conflictType&&(T[F].strategy=X.ALL_CONFLICTTYPE[1]);ea.updateUi(T)},
P=function(){for(var F in T)T[F].strategy=X.ALL_CONFLICTTYPE[2];ea.updateUi(T)};this.isValidToAccepted=function(F){va(B,T,F)};var va=function(F,E,a){var d=[],b;for(b in E)"ignore"!==E[b].strategy&&(d=d.concat(E[b]));0===d.length?a(!0):k.createFacade(function(e){a(!0);W=W.concat(e.numberConflictModel);0==W.length?ra&&ra():A()},function(e,c){return 1020101===e||1100021===e?(H.getMessageCurtain().showPrompt(J.get("resourceFileLimit","\u5bfc\u5165\u5931\u8d25\uff0c\u8f7b\u5b58\u50a8\u7a7a\u95f4\u4e0d\u8db3\u3002"),
2E3),!0):20009008===e?(H.getMessageCurtain().showPrompt(J.get("importModelSetCorruptionException","\u5bfc\u5165\u5931\u8d25\uff0c\u6570\u636e\u6a21\u578b\u635f\u574f\u3002"),2E3),!0):20004001===e?(H.getMessageCurtain().showPrompt(J.get("MaterializedExceptionForImport","\u5bfc\u5165\u5931\u8d25\uff0c\u6a21\u578b\u7269\u5316\u5b58\u50a8\u8bbe\u7f6e\u89e3\u6790\u5f02\u5e38\u3002"),2E3),!0):30001001===e?(H.getMessageCurtain().showPrompt(J.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===e?(H.getMessageCurtain().showPrompt(J.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}).importSelectedModelSet(F,d,!1,ha)},A=function(){H.destroy();var F=new ka;F.setFunRefreshModelGroup(ra);F.createUi(W);F.repaint()}}function ka(){Ga.call(this);var l=this,H=this.protectedMethod,r,k;this.setFunRefreshModelGroup=
function(v){k=v};this.createUi=function(v){l.setSize(640,480);l.setPosition(window.innerWidth-640>>1,window.innerHeight-480>>1);H.setTitle(J.get("importModelSet","\u5bfc\u5165\u6a21\u578b\u96c6"));H.setContentPaneCreator(function(){var t=$("<div>"),n=J.get("modelNumberConflictPrompt","\u4ee5\u4e0b\u6a21\u578b\u4e0e\u5176\u4ed6\u6a21\u578b\u96c6\u7684\u6a21\u578b\u5b58\u5728\u6a21\u578b\u7f16\u7801\u51b2\u7a81\uff0c\u5df2\u5c06\u6a21\u578b\u7f16\u7801\u91cd\u547d\u540d\u3002");n=(new g(n)).getJqUi();
n.addClass("modelset-import-selection-prompt");t.append(n);r=new oa;t.append(r.getJqUi(v));return t});H.setFooterPaneCreator(function(t){var n=new V(J.get("iSee","\u6211\u77e5\u9053\u4e86"));n.addActionListener(function(B){H.destroy();k&&k()});n=n.getJqUi();n.addClass("sa-ctrl-dialog-footer-cancel");n.css("margin-left","-50px");n.appendTo(t)});H.setClosingAction(function(t){H.destroy();k&&k()});l.showDialog()};this.repaint=function(){r.refresh()}}function oa(){function l(k){KTDefaultCellRender.call(this,
k);var v=this,t=this.paintCellUI;this.paintCellUI=function(n,B){if(v.getCurrentRowIdx()<za.getHeadRowCount())t(n,B);else if(0===v.getCurrentColIdx()){var T=v.getCurrentRow();B=$("<div>");var ea=$("<div>");B.addClass("modelset-export-conflict-item-text");T=T.getUserObject();B.addClass("modelset-export-conflict-model-name-label");B.text(T.modelName);ea.append(la.createModelIcon(T.modelType,"modelset-export-conflict-model-icon"));ea.append(B);ea.appendTo(n)}else t(n,B)}}var H=this,r;this.getJqUi=function(k){r=
za.createTable();za.bindTableListenerForCtrl(r);var v=new l(r);v.setOutsideVisible(!1);r.setCellRender(v);r.addColumns(4);r.getColumn(0).setWidth(150);r.getColumn(1).setWidth(150);r.getColumn(2).setWidth(120);r.getColumn(3).setWidth(120);v=za.createHeadRow(r);v.getCell(0).setValue(J.get("modelName","\u6a21\u578b\u540d\u79f0"));v.getCell(1).setValue(J.get("modelSource","\u6765\u6e90"));v.getCell(2).setValue(J.get("modelNumber","\u6a21\u578b\u7f16\u7801"));v.getCell(3).setValue(J.get("renameModelNumber",
"\u91cd\u547d\u540d\u540e\u7684\u6a21\u578b\u7f16\u7801"));H.updateUi(k);za.refresh(r);k=$(r.getUI());k.addClass("modelset-import-model-number-table");return k};this.refresh=function(){za.refresh(r)};this.updateUi=function(k){za.clearWithoutHead(r);for(var v,t=0;t<k.length;t++){var n=k[t];v=za.createRow(r);v.getCell(1).setValue(n.modelSetName);v.getCell(2).setValue(n.oldModelNumber);v.getCell(3).setValue(n.newModelNumber);v.setUserObject(n)}za.refresh(r)}}function Ba(){var l,H,r,k,v=!1,t=!0;this.setName=
function(n){l=n};this.getName=function(){return l};this.setId=function(n){H=n};this.getId=function(){return H};this.setIsPreset=function(n){r=n};this.isPreset=function(){return r};this.setParentNode=function(n){k=n};this.getParentNode=function(){return k};this.setChecked=function(n){v=n};this.isChecked=function(){return v};this.setVisible=function(n){t=n};this.isVisible=function(){return t};this.getSubNodeLevel=function(){for(var n=-1,B=k;B;)n++,B=B.getParentNode();return n};this.check=function(n){};
this.protectedMethod={fromJsonObject:function(n){},toJsonObject:function(){return{}}}}function da(){Ba.call(this);var l=this,H=this.protectedMethod,r=!0,k=[];this.setExpanded=function(n){r=n};this.isExpanded=function(){return r};this.setChildren=function(n){k=n};this.getChildren=function(){return k};this.setParentId=function(n){_sParentId=n};this.getParentId=function(){return _sParentId};var v=function(n){switch(n){case da.CREATE:return J.get("createdOfModelSet","\u6211\u521b\u5efa\u7684\u6a21\u578b\u96c6");
case da.COOPERATION:return J.get("cooperationOfModelSet","\u6211\u53c2\u4e0e\u534f\u4f5c\u7684\u6a21\u578b\u96c6");case da.PRESET:return J.get("preSetOfModelSet","\u5f53\u524d\u7cfb\u7edf\u9884\u7f6e\u7684\u6a21\u578b\u96c6");case da.ALL:return J.get("allOfModelSet","\u5168\u90e8");default:return n}},t=function(n){switch(n){case da.CREATE:return"1";case da.COOPERATION:return"2";case da.PRESET:return"3";case da.ALL:return"4";default:return n}};this.fromJsonObject=function(n){H.fromJsonObject(n);l.setName(v(n.name));
l.setId(t(n.name));var B=n.modelSetList;if(B&&0<B.length)for(var T=0;T<B.length;T++){var ea=B[T],ua=new G;ua.fromJsonObject(ea);ua.setParentNode(l);k.push(ua)}if((n=n.children)&&0<n.length)for(T=0;T<n.length;T++)B=n[T],ua=new da,ua.fromJsonObject(B),ua.setParentNode(l),k.push(ua)};this.toJsonObject=function(){return H.toJsonObject()};this.check=function(n,B){if(0!==k.length&&n!==l.isChecked()){l.setChecked(n);for(var T=0;T<k.length;T++){var ea=k[T];ea.isVisible()&&ea.check(n,B)}}}}function na(){Ba.call(this);
var l=this,H=this.protectedMethod,r;this.setModelSetType=function(k){r=k};this.getModelSetType=function(){return r};this.protectedMethod={fromJsonObject:function(k){H.fromJsonObject(k);l.setId(k.modelSetId);l.setName(k.modelSetName);l.setModelSetType("")},toJsonObject:function(){var k=H.toJsonObject();l.getParentNode();k.modelSetId=l.getId();k.modelSetName=l.getName();k.modelSetType=r;return k}};this.check=function(k,v){k!==l.isChecked()&&(l.setChecked(k),v&&v(l.getParentNode()))}}function G(){na.call(this);
var l=this.protectedMethod;this.fromJsonObject=function(H){l.fromJsonObject(H)};this.toJsonObject=function(){return l.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.modelset&&(com.kingdee.bos.qing.modeler.modelset=
{});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.imexport&&(com.kingdee.bos.qing.modeler.modelset.imexport={});var ta=com.kingdee.bos.qing.modeler.modelset.imexport;ta.ExportDialog=D;ta.UploadPane=function(){var l,H,r;this.createJqUi=function(B,T,ea){l=ea;ea=$("<div>");ea.addClass("modelset-importing-exporting-main");var ua=$(document.body),ra=$("<div class='sa-ctrl-modallayer'>");ra.appendTo(ua);H=$("<progress value='0' max='100'>");H.addClass("modelset-importing-upload-progress");var ha=
$("<div>");ha.addClass("modelset-importing-exporting-text");ha.text(J.get("uploading","\u6b63\u5728\u4e0a\u4f20\u4e2d\uff0c\u8bf7\u7a0d\u5019"));ea.append(H);ea.append(ha);ua.append(ea);k(B,T,ea,ra)};var k=function(B,T,ea,ua){var ra=new FormData;ra.append("filename",B);B=com.kingdee.bos.qing.framework.common.RemoteFrameworkRegister.getUploadUrl();var ha=new XMLHttpRequest;ha.upload.addEventListener("progress",v,!1);ha.addEventListener("error",t,!1);ha.open("post",B,!0);ha.onload=function(W){200===
this.status&&(W=JSON.parse(this.response),"number"==typeof W.errorCode&&3099003===W.errorCode?l.showError(W.errorMessage):n(W.data,T),ea.remove(),ua.remove())};ha.send(ra)},v=function(B){var T=H.get(0);B.lengthComputable&&(T.max=B.total,T.value=B.loaded)},t=function(B){_funErrorCallbackEvent&&_funErrorCallbackEvent(J.get("uploadFail","\u4e0a\u4f20\u5931\u8d25"))},n=function(B,T){T.createFacade(function(ea){var ua=new da;ua.fromJsonObject(ea);0!==ua.getChildren().length?(ea=new ba(l),ea.setGlobal(T),
ea.setFunRefreshModelGroup(r),ea.createUi(B,ua)):l.showPrompt(J.get("noModelSet","\u627e\u4e0d\u5230\u5bf9\u5e94\u7684\u6a21\u578b\u96c6\u3002"))},function(ea,ua){return!1}).getEnableImportModelSet(B)};this.setFunRefreshModelGroup=function(B){r=B}};ta.FolderNode=da;var m,u,ya,La,Ga,J,x,za,Oa,g,V,z;(function(){var l=com.kingdee.bos.qing.modeler.modelset.common;m=l.Icons;l=com.kingdee.bos.qing.ui.component;u=l.ComboBox;ya=l.WorkButton;g=l.Label;V=l.Button;La=l.SearchBox;Oa=l.CheckBox;Ga=l.AbstractModalDialog;
l=com.kingdee.bos.qing.framework.common;J=l.MultilanguageManager.createPackageAccessor(ta);l=com.kingdee.bos.qing.common.ui;za=l.TableUtil;l=com.kingdee.bos.qing.modeler.common.ui;z=l.SearchNoDataContainer;l=com.kingdee.bos.qing.common;x=l.DomUtil})();D.MODEL_SET_LIST="modelSetList";X.ALL_CONFLICTTYPE=["ignore","overwrite","rename"];X.RENAME_CONFLICTTYPE=["ignore","rename"];X.ALL_PUBLISHCONFLICTTYPE=["noDisposal","overwrite"];da.CREATE="CREATE";da.COOPERATION="COOPERATION";da.PRESET="PRESET";da.ALL=
"ALL";var la=new function(){this.createIcon=function(l,H){l=$("<span>");l.addClass(H);m.background(l,"icon-modelset");return l};this.createModelIcon=function(l,H){var r=$("<span>");r.addClass(H);switch(l){case "1":l="icon-tablemodel";break;case "2":l="icon-entitymodel";break;case "3":l="icon-relationmodel";break;case "4":l="icon-metricmodel";break;default:l=""}m.background(r,l);return r}}})();(function(){function D(g,V,z){G.AbstractTabPane.call(this);var la;this.getTitle=function(){switch(g){case D.TYPE_DW_STORAGE:return u.get("dwStorageDetail","\u8f7b\u6570\u4ed3\u5b58\u50a8\u8be6\u60c5");case D.TYPE_SCHEDULE:return u.get("scheduleDetail","\u8c03\u5ea6\u4efb\u52a1\u8be6\u60c5");default:throw Error("unknown type.");}};this.getJqUi=function(){if(!la){la=$("<div>");if(D.TYPE_DW_STORAGE===g){var l=new ca;l.setGlobal(V);l.setPublic(z);l.getJqUi().appendTo(la)}D.TYPE_SCHEDULE===g&&(l=new X,
l.setGlobal(V),l.getJqUi().appendTo(la))}return la}}function ca(){function g(A,F){KTDefaultCellRender.call(this,A);var E=this,a=this.paintCellUI;this.paintCellUI=function(e,c){var f=E.getCurrentRowIdx(),p=E.getCurrentRow(),h=E.getCurrentColIdx();E.setPaddingHV(8,1);if(1===f)a(e,c),d(f,h,e,F);else if(2<f&&(0===h||1===h)){c=$("<span>");c.css({"padding-right":"8px","padding-left":"8px","line-height":"28px"});var C=p.getCell(h).getValue(),N=P();Oa(c,N,C);c.appendTo(e)}else 2<f&&6===h?b(e,F,f,h):a(e,c);
2<f&&6!==h&&$(e).find("span").attr("title",p.getCell(h).getValue())};var d=function(e,c,f,p){k||4!==c||(k=new ia,k.setFunSortChangeListener(function(h){va(h,p,c)}),k.addDefaultSortingTips($(f),p[c]));k&&3!==c&&6!==c&&k.addSortingTips($(f),p[c])},b=function(e,c,f,p){if(c&&"operation"===c[p]&&(c=z.getRow(f).getUserObject())){var h=c.modelSetId,C=c.modelSetName,N=c.modelId,y=c.modelType,w=c.modelName;e=$(e);c=$("<div>");c.text(u.get("open","\u6253\u5f00"));c.addClass("modelset-resourceinfo-open-link");
c.appendTo(e);c.on("click",function(K){K.stopPropagation();J.getModelDesignerPageEntrance()(h,C,N,y,w)})}}}var V,z,la,l,H,r,k,v,t=new x,n,B=new function(){var A=0,F=0,E="0KB",a=0,d=[];this.getTotalRow=function(){return A};this.getDWStorageSize=function(){return F};this.getTenantUsedSize=function(){return E};this.getTenantUsedSizePercent=function(){return a};this.getDetails=function(){return d};this.fromJsonObject=function(b){A=b.totalRow;F=b.dwStorageSize;E=b.tenantUsedSize;a=b.tenantUsedSizePercent;
d=b.infos}},T=[u.get("modelNumber","\u6a21\u578b\u7f16\u7801"),u.get("modelName","\u6a21\u578b\u540d\u79f0"),u.get("modelType","\u6a21\u578b\u7c7b\u578b"),u.get("path","\u8def\u5f84"),u.get("materializedStorageSize","\u7269\u5316\u5b58\u50a8\u7a7a\u95f4"),u.get("createTime","\u521b\u5efa\u65f6\u95f4"),u.get("operate","\u64cd\u4f5c")],ea="modelNumber modelName modelType path size createTime operation".split(" ");this.getJqUi=function(){V||(V=$("<div>"),V.css({position:"absolute",width:"100%",height:"100%"}),
ua(),ra());return V};this.setGlobal=function(A){la=A};this.setPublic=function(A){n=A};var ua=function(){t.setJumpToPageListener(function(A,F,E){var a=la.createFacade(function(e){W(e,E)},function(e,c){return!1}),d=ja(),b=P();a.setShowBlocking(!0);a.setBlockingJqUi(V);a.getAllDWResourceInfoList(A,F,d.getField(),d.getOrder(),b)});t.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);V.append(t.getJqUi())},ra=function(){var A=la.createFacade(function(a){a&&B.fromJsonObject(a);t.resetPaginationAndJumpToFirstPage(B.getTotalRow());
ha()},function(a,d){return!1}),F=ja(),E=P();A.setShowBlocking(!0);A.setBlockingJqUi(V);A.getAllDWResourceInfoList(1,t.getPageSize(),F.getField(),F.getOrder(),E)},ha=function(){if(!v){v=new ba;v.setSearchListener(Ca);var A=v.getJqUi();m.layoutCtrl(A,575,0,192,25);A.appendTo(V)}if(!z){z=ya.createTable();H=$(z.getUI());z.addColumns(T.length);z.getColumn(0).setWidth(130);z.getColumn(1).setWidth(130);z.getColumn(2).setWidth(110);z.getColumn(3).setWidth(198);z.getColumn(4).setWidth(130);z.getColumn(5).setWidth(132);
z.getColumn(6).setWidth(70);A=ya.createHeadRow(z);for(var F=0;F<T.length;F++)A.getCell(F).setValue(T[F]);A=new g(z,ea);A.setOutsideVisible(!1);z.setCellRender(A);z.setCellAcrossListener(function(d,b,e){k&&k.hideLastShowSortTips();1===b&&3!==e&&6!==e&&(k||(k=new ia,k.setFunSortChangeListener(function(c){va(c,ea,e)})),k.showSortingTips(d,ea[e]))});m.layoutCtrl(H,10,32,910,350);H.appendTo(V)}r||(r=$("<div>"),r.addClass("modelset-resourceinfo-no-search-result"),A=$("<div>"),A.addClass("modelset-resourceinfo-no-search-result-icon"),
Ga.background(A,"icon-search-none"),A.appendTo(r),A=$("<div>"),A.addClass("modelset-resourceinfo-no-search-result-tips"),A.text(u.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")),A.appendTo(r),r.appendTo(V));r.hide();A=B.getDetails();P()&&0===A.length&&r.show();if(!l){l=$("<div>");F=$("<div>");var E=B.getTenantUsedSizePercent(),a=B.getTenantUsedSize();E="<span style='color: "+(.9>E?"#688BF7":"#FB2323")+";'>"+a+"</span>";a=u.get("usedSpaceWithColon","\u5df2\u4f7f\u7528\u7a7a\u95f4\uff1a")+
E;n&&(a=B.getDWStorageSize(),a=u.get("usedSpaceWithColon","\u5df2\u4f7f\u7528\u7a7a\u95f4\uff1a")+E+"/"+a+"GB");F.html(a);F.css("display","inline-block");F.appendTo(l);l.addClass("modelset-resourceinfo-used-label");l.appendTo(V);n&&(E=new Ba,E.setIconType(Ba.ICON_TYPE_QUESTION),E.setTipsSize(250,105),E.setTipsText(u.get("usedSpaceHelpTips","\u8f7b\u6570\u4ed3\u5b58\u50a8\u662f\u5206\u5e03\u5f0f\u6570\u636e\u4ed3\u5e93\u5b58\u50a8\u7cfb\u7edf\u3002\u8f7b\u5efa\u6a21\u9ed8\u8ba4\u4e3a\u6bcf\u4e2a\u79df\u6237\u63d0\u4f9b50GB\u7684\u8f7b\u6570\u4ed3\u5b58\u50a8\u5bb9\u91cf\u3002\u5bb9\u91cf\u4e0d\u8db3\u65f6\u5c06\u65e0\u6cd5\u751f\u6210\u6a21\u578b\u7684\u7269\u5316\u5b58\u50a8\u6570\u636e\uff0c\u53ef\u8054\u7cfb\u7ba1\u7406\u5458\u52a0\u8d2d\u6269\u5bb9\uff0c\u6269\u5bb9\u90e8\u5206\u5728\u5f53\u524d\u79df\u6237\u5185\u5171\u4eab\u3002")),
E=E.getJqUi(),m.layoutCtrl(E,F.width()+3,0,16,16),E.appendTo(l))}R(A,ea)},W=function(A,F){A&&B.fromJsonObject(A);F?F(B.getTotalRow()):t.refreshPagination();A=B.getDetails()?B.getDetails():[];R(A,ea)},R=function(A,F){z.setSyncUIWhenModelChanged(!1);ya.clearWithoutHead(z);for(var E=0;E<A.length;E++)for(var a=ya.createRow(z),d=0;d<F.length;d++){var b=A[E][F[d]];switch(F[d]){case "createTime":b=A[E].displayCreateTime;a.getCell(d).setValue(b);break;case "modelType":a.getCell(d).setValue(za.modelTypeTransformName(b));
break;case "operation":a.setUserObject(A[E]);break;default:a.getCell(d).setValue(b)}}1<z.getRowsCount()&&(A=new KTBorderStyle,A.setLeftBorderWidth(0),z.getRow(1).getCell(0).setBorder(A));z.updateUI(!0);z.setSyncUIWhenModelChanged(!0);H.children(":first-child").children(":first-child").css("width","100%")},ja=function(){var A;k&&(A=k.getShowSortingModel());A||(A=new ka,A.setField(ea[4]),A.setOrder(ka.ORDER_DESC));return A},Ca=function(){ra()},P=function(){return v?v.getInputContent().trim():null},
va=function(A,F,E){var a=P();F=F[E];E=ka.ORDER_DESC;A&&(F=A.getField(),E=A.getOrder());A=la.createFacade(function(d){W(d,t.resetPaginationAndJumpToFirstPage)},function(d,b){return!1});A.setShowBlocking(!0);A.setBlockingJqUi(V);A.getAllDWResourceInfoList(1,t.getPageSize(),F,E,a)}}function X(){function g(P,va){KTDefaultCellRender.call(this,P);var A=this,F=this.paintCellUI;this.paintCellUI=function(e,c){var f=A.getCurrentRowIdx(),p=A.getCurrentRow(),h=A.getCurrentColIdx();A.setPaddingHV(8,1);if(1===
f)F(e,c),E(f,h,e,va);else if(2<f&&(1===h||2===h)){c=$("<span>");c.css({"padding-left":"8px","padding-right":"8px","line-height":"28px"});var C=p.getCell(h).getValue(),N=W();Oa(c,N,C);c.appendTo(e)}else 2<f&&8===h?a(e,va,f,h):2<f&&9===h?d(e,va,f,h):F(e,c);2<f&&8!==h&&9!==h&&$(e).find("span").attr("title",p.getCell(h).getValue())};var E=function(e,c,f,p){r||6!==c||(r=new ia,r.setFunSortChangeListener(function(h){Ca(h,p,c)}),r.addDefaultSortingTips($(f),p[c]));r&&4!==c&&5!==c&&8!==c&&9!==c&&r.addSortingTips($(f),
p[c])},a=function(e,c,f,p){if(c&&9<=c.length&&"executeState"===c[8]){c=z.getRow(f);var h=c.getUserObject();p=c.getCell(p);if(h){p=p.getValue();f="en"===La.getUrlParamValue("language");if(1===p||5===p){c="green";f=f?50:30;var C=u.get("success","\u6210\u529f")}else 0===p?(c="blue",f=f?70:40,C=u.get("inProgress","\u8fdb\u884c\u4e2d")):(c="red",f=30,C=u.get("fail","\u5931\u8d25"));e=$(e);var N=$("<div style='border: solid 1px;text-align:center;height: 16px'>");N.text(C);N.css("color",c);N.css("width",
f+"px");N.css("position","absolute");N.css("left","3px");N.css("top","0");N.css("bottom","0");N.css("margin","auto");N.appendTo(e);2===p&&(c=$("<div style='text-align:left;width:75px;height: 16px'>"),c.text(u.get("insufficientSchedulingTimes","\u8c03\u5ea6\u6b21\u6570\u4e0d\u8db3")),c.css("position","absolute"),c.css("top","0"),c.css("bottom","0"),c.css("left","45px"),c.css("margin","auto"),c.appendTo(e));if(3===p||4===p)c=$("<div>"),c.text(u.get("detail","\u8be6\u60c5")),c.addClass("modelset-resourceinfo-error-detail"),
c.appendTo(e),c.on("click",function(y){b(h.scheduleId)});5===p&&(c=$("<div style='text-align:left;width:86px;height: 16px'>"),c.text(u.get("warningRuleUnMatched","\u4e0d\u6ee1\u8db3\u9884\u8b66\u89c4\u5219")),c.attr("title",u.get("warningRuleUnMatched","\u4e0d\u6ee1\u8db3\u9884\u8b66\u89c4\u5219")),c.css("position","absolute"),c.css("top","0"),c.css("bottom","0"),c.css("left","43px"),c.css("margin","auto"),c.appendTo(e))}}},d=function(e,c,f,p){if(c&&"operation"===c[p]&&(c=z.getRow(f).getUserObject())){var h=
c.modelSetId,C=c.modelId,N=c.modelType,y=c.modelName,w=c.modelDeployId;e=$(e);c=$("<div>");c.text(u.get("open","\u6253\u5f00"));c.addClass("modelset-resourceinfo-open-link");c.appendTo(e);c.on("click",function(K){K.stopPropagation();J.getDeployModelDesignerPageEntrance()(h,C,N,y,w)})}},b=function(e){var c=la.createFacade(function(f){if(f){var p=f.errorCode,h=f.errorMessage,C=new da;C.setOptionType(da.OPTION_OK);p=p&&h?u.get("errorCodeMessage","\u9519\u8bef\u4fe1\u606f\uff1a#1\r\n\u9519\u8bef\u7801\uff1a#2").replace("#1",
h).replace("#2",p):p&&!h?u.get("errorCode","\u9519\u8bef\u7801\uff1a#1\u3002").replace("#1",p):!p&&h?u.get("errorMessage","\u9519\u8bef\u4fe1\u606f\uff1a#1\u3002").replace("#1",h):u.get("noErrorCodeMessage","\u6682\u65e0\u9519\u8bef\u7801\u548c\u9519\u8bef\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b\u8be6\u60c5\u3002");(f=f.errorStackTrace)&&C.setDetail(f);C.setMessage(p);C.showDialog()}else la.getMessageCurtain().showPrompt(u.get("notFindExceptionLog","\u672a\u627e\u5230\u5bf9\u5e94\u7684\u65e5\u5fd7\u3002"),
2E3)},function(f,p){return!1});c.setShowBlocking(!1);c.loadExceptionLog(e)}}var V,z,la,l,H,r,k,v=new x,t=new function(){var P=0,va=[];this.getTotalRow=function(){return P};this.getDetails=function(){return va};this.fromJsonObject=function(A){P=A.totalRow;va=A.infos}},n=[u.get("scheduleName","\u8c03\u5ea6\u540d\u79f0"),u.get("modelNumber","\u6a21\u578b\u7f16\u7801"),u.get("modelName","\u6a21\u578b\u540d\u79f0"),u.get("modelType","\u6a21\u578b\u7c7b\u578b"),u.get("path","\u8def\u5f84"),u.get("scheduleType",
"\u8c03\u5ea6\u7c7b\u578b"),u.get("executeStartTime","\u6267\u884c\u5f00\u59cb\u65f6\u95f4"),u.get("executeTime","\u6267\u884c\u65f6\u957f"),u.get("state","\u72b6\u6001"),u.get("operate","\u64cd\u4f5c")],B="scheduleName modelNumber modelName modelType path scheduleType executeTime consumeTime executeState operation".split(" ");this.getJqUi=function(){V||(V=$("<div>"),V.css({position:"absolute",width:"100%",height:"100%"}),T(),ea());return V};this.setGlobal=function(P){la=P};var T=function(){v.setJumpToPageListener(function(P,
va,A){var F=la.createFacade(function(d){ra(d,A)},function(d,b){return!1}),E=ja(),a=W();F.setShowBlocking(!0);F.setBlockingJqUi(V);F.getAllScheduleResourceInfoList(P,va,E.getField(),E.getOrder(),a)});v.setComboBoxItemModelsAndSelectedItem([5,10,20,50,100,500,1E3],2);V.append(v.getJqUi())},ea=function(){var P=la.createFacade(function(F){F&&t.fromJsonObject(F);v.resetPaginationAndJumpToFirstPage(t.getTotalRow());ua()},function(F,E){return!1}),va=ja(),A=W();P.setShowBlocking(!0);P.setBlockingJqUi(V);
P.getAllScheduleResourceInfoList(1,v.getPageSize(),va.getField(),va.getOrder(),A)},ua=function(){if(!k){k=new ba;k.setSearchListener(ha);var P=k.getJqUi();m.layoutCtrl(P,575,0,192,25);P.appendTo(V)}if(!z){z=ya.createTable();l=$(z.getUI());z.addColumns(n.length);z.getColumn(0).setWidth(80);z.getColumn(1).setWidth(80);z.getColumn(2).setWidth(80);z.getColumn(3).setWidth(80);z.getColumn(4).setWidth(85);z.getColumn(5).setWidth(65);z.getColumn(6).setWidth(132);z.getColumn(7).setWidth(132);z.getColumn(8).setWidth(120);
z.getColumn(9).setWidth(46);P=ya.createHeadRow(z);for(var va=0;va<n.length;va++)P.getCell(va).setValue(n[va]);P=new g(z,B);P.setOutsideVisible(!1);z.setCellRender(P);z.setCellAcrossListener(function(A,F,E){r&&r.hideLastShowSortTips();1===F&&4!==E&&5!==E&&8!==E&&9!==E&&(r||(r=new ia,r.setFunSortChangeListener(function(a){Ca(a,B,E)})),r.showSortingTips(A,B[E]))});m.layoutCtrl(l,10,32,910,350);l.appendTo(V)}H||(H=$("<div>"),H.addClass("modelset-resourceinfo-no-search-result"),P=$("<div>"),P.addClass("modelset-resourceinfo-no-search-result-icon"),
Ga.background(P,"icon-search-none"),P.appendTo(H),P=$("<div>"),P.addClass("modelset-resourceinfo-no-search-result-tips"),P.text(u.get("noSearchResult","\u6ca1\u6709\u7b26\u5408\u641c\u7d22\u6761\u4ef6\u7684\u7ed3\u679c")),P.appendTo(H),H.appendTo(V));H.hide();P=t.getDetails();W()&&0===P.length&&H.show();R(P,B)},ra=function(P,va){P&&t.fromJsonObject(P);va?va(t.getTotalRow()):v.refreshPagination();P=t.getDetails()?t.getDetails():[];R(P,B)},ha=function(){ea()},W=function(){return k?k.getInputContent().trim():
null},R=function(P,va){z.setSyncUIWhenModelChanged(!1);ya.clearWithoutHead(z);for(var A=0;A<P.length;A++)for(var F=ya.createRow(z),E=0;E<va.length;E++){var a=P[A][va[E]];switch(va[E]){case "executeTime":a=P[A].displayExecuteTime;F.getCell(E).setValue(a);break;case "modelType":F.getCell(E).setValue(za.modelTypeTransformName(a));break;case "scheduleType":var d=u.get("fullMaterialize","\u5168\u91cf\u7269\u5316");"incremental"===a&&(d=u.get("incrementalMaterialize","\u589e\u91cf\u7269\u5316"));F.getCell(E).setValue(d);
break;case "executeState":F.setUserObject(P[A]);F.getCell(E).setValue(a);break;case "operation":F.setUserObject(P[A]);break;default:F.getCell(E).setValue(a)}}1<z.getRowsCount()&&(P=new KTBorderStyle,P.setLeftBorderWidth(0),z.getRow(1).getCell(0).setBorder(P));z.updateUI(!0);z.setSyncUIWhenModelChanged(!0);l.children(":first-child").children(":first-child").css("width","100%")},ja=function(){var P;r&&(P=r.getShowSortingModel());P||(P=new ka,P.setField(B[6]),P.setOrder(ka.ORDER_DESC));return P},Ca=
function(P,va,A){va=va[A];A=ka.ORDER_DESC;P&&(va=P.getField(),A=P.getOrder());P=W();var F=la.createFacade(function(E){ra(E,v.resetPaginationAndJumpToFirstPage)},function(E,a){return!1});F.setShowBlocking(!0);F.setBlockingJqUi(V);F.getAllScheduleResourceInfoList(1,v.getPageSize(),va,A,P)}}function ba(){var g,V,z;this.getJqUi=function(){if(!g){g=$("<div>");z=new ta;z.setPlaceholder(u.get("searchModelNumberOrName","\u641c\u7d22\u6a21\u578b\u7f16\u7801/\u540d\u79f0"));z.setSearchListenerDelay(1E3);z.setShowSearchIcon(!0);
z.addSearchListener(V);var la=z.getJqUi();la.css({width:"191px",height:"25px","float":"left",position:"relative"});la.appendTo(g)}return g};this.getInputContent=function(){return z.getText()};this.setSearchListener=function(la){V=la}}function ia(){var g,V,z;this.setShowSortingModel=function(k){V=k};this.getShowSortingModel=function(){return V};this.setFunSortChangeListener=function(k){z=k};this.showSortingTips=function(k,v){var t=k.find(".modelset-resourceinfo-sort-box");0===t.length&&(t=new ka,t.setField(v),
t.setOrder(null),t=l(k,t),k.append(t));t.addClass("modelset-resourceinfo-sort-box_clickable");g=t};this.hideLastShowSortTips=function(){g.removeClass("modelset-resourceinfo-sort-box_clickable");la(g)};this.addSortingTips=function(k,v){if(V&&null!=V.getOrder()&&V.getField()===v){if((v=k.find(".modelset-resourceinfo-sort-box"))&&(v=v.data("sortable-data"))&&V.equals(v))return;v=l(k,V);k.append(v)}};this.addDefaultSortingTips=function(k,v){V=new ka;V.setField(v);V.setOrder(ka.ORDER_DESC);v=l(k,V);k.append(v);
g=v};var la=function(k){var v=k.data("sortable-data");v&&null==v.getOrder()&&k.remove()},l=function(k,v){var t=k.width();k=k.height();t=H(t-15-1,k-15-2);t.data("sortable-data",v);r(t);t.on("click",function(n){n=$(n.currentTarget);var B=n.data("sortable-data");B.getOrder()===ka.ORDER_ASC?B.setOrder(ka.ORDER_DESC):B.getOrder()===ka.ORDER_DESC?"size"===B.getField()||"executeTime"===B.getField()?B.setOrder(ka.ORDER_ASC):B.setOrder(null):B.getOrder()||B.setOrder(ka.ORDER_ASC);n.data("sortable-data",B);
r(n);la(n);V=B;z&&z(V)});return t},H=function(k,v){var t=$("<div>");Ga.background(t,"icon-sort");t.attr("title",u.get("sort","\u6392\u5e8f"));t.addClass("modelset-resourceinfo-sort-box");t.css("left",k);t.css("top",v);t.css("width",13);t.css("height",13);return t},r=function(k){var v=k.data("sortable-data");v.getOrder()===ka.ORDER_ASC?Ga.background(k,"icon-sort-asc"):v.getOrder()===ka.ORDER_DESC?Ga.background(k,"icon-sort-desc"):v.getOrder()||Ga.background(k,"icon-sort")}}function ka(){var g,V;this.setOrder=
function(z){g=z};this.getOrder=function(){return g};this.setField=function(z){V=z};this.getField=function(){return V};this.equals=function(z){return V===z.getField()&&g===z.getOrder()}}"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.modelset&&
(com.kingdee.bos.qing.modeler.modelset={});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.ui&&(com.kingdee.bos.qing.modeler.modelset.ui={});var oa=com.kingdee.bos.qing.modeler.modelset.ui;oa.ResourceDetailDialog=function(){na.call(this);var g=this.protectedMethod,V=this,z,la=!0;(function(){g.setTitle(u.get("resourceUsageInfo","\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5"));V.setSize(960,540);g.setSelectable(!0);g.setContentPaneCreator(function(){l();var H=new G;H.setTabLevel(G.SECOND_LEVEL);var r=
new D(D.TYPE_DW_STORAGE,z,la);H.addTab(r,!0);r=new D(D.TYPE_SCHEDULE,z,la);H.addTab(r,!1);return H.getJqUi()});g.setFooterClosingOnly(!0);g.setClosingChecker2(null,function(){g.destroy();return!0});g.setClosingAction(function(H){})})();this.setGlobal=function(H){z=H};this.setPublic=function(H){la=H};var l=function(){var H=z.createFacade(function(r){},function(r,k){return 30001001===r?(g.getMessageCurtain().showPrompt(u.get("noDataWarehouseConfig","\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===r?(g.getMessageCurtain().showPrompt(u.get("dataWarehouseConfigParseError","\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});H.checkDataWarehouseConfig();H.setShowBlocking(!1)}};var Ba,da,na,G,ta,m,u,ya,La,Ga,J,x,za;(function(){var g=com.kingdee.bos.qing.ui.component;Ba=g.HelpIcon;da=g.MessageDialog;na=g.AbstractModalDialog;G=g.TabContainer;ta=
g.SearchBox;g=com.kingdee.bos.qing.common;m=g.DomUtil;g=com.kingdee.bos.qing.framework.common;u=g.MultilanguageManager.createPackageAccessor(oa);g=com.kingdee.bos.qing.common.ui;ya=g.TableUtil;g=com.kingdee.bos.qing;La=g.Seer;g=com.kingdee.bos.qing.modeler.common.model;za=g.ModelType;g=com.kingdee.bos.qing.modeler.modelset.common;Ga=g.Icons;J=g.Integration;g=com.kingdee.bos.qing.biz.common;x=g.SimplePaginationBar})();D.TYPE_DW_STORAGE="dwStorage";D.TYPE_SCHEDULE="schedule";ka.ORDER_DESC="DESC";ka.ORDER_ASC=
"ASC";var Oa=function(g,V,z){if(V&&z){V=V.toUpperCase();var la=z.toUpperCase(),l=la.split(V),H=V.length,r;for(r in l){var k=la.indexOf(l[r]),v=z.substr(n,l[r].length);k+=l[r].length;var t=la.length-k;la=la.substr(k,t);z=z.substr(k,t);k=$("<span>");k.text(v);k.appendTo(g);if(r!=l.length-1&&1<l.length){var n=la.indexOf(V);v=z.substr(n,H);k=n+H;t=la.length-k;la=la.substr(k,t);z=z.substr(k,t);k=$("<span>");k.text(v);k.css("color","red");k.clone().appendTo(g)}}}else g.text(z)}})();(function(){function D(){var a=350,d=250,b=6,e=!1,c,f;this.setDuration=function(p,h){a=p;d=h};this.setTimes=function(p,h){b=2*p+(h?1:0);e=h};this.setAction=function(p){c=p};this.blink=function(p,h,C){if(0>=b)throw Error("Illegal usage");clearTimeout(f);var N=function(){if(0==b)c&&c();else{if(b%2==(e?0:1)){p.addClass(h);var y=a}else p.removeClass(h),p.addClass(C),y=d;f=setTimeout(N,y);b--}};N()}}function ca(){var a,d=[],b,e,c,f;this.getJqUi=function(){a||p();return a};this.setFunCloseSearchResultPanel=
function(y){e=y};this.refresh=function(){var y=a.find(".sa-ctrl-list-owner");y.empty();y.css("top","40px");for(var w=$(document.createDocumentFragment()),K=C,fa=0;fa<d.length;fa++){var O=$("<div>");O.addClass("sa-ctrl-list-item");O.addClass("sa-ctrl-list-item_enabled");O.addClass("sa-ctrl-list-item-defaultlayout");var Z=d[fa];O.data("model",Z);K(O,Z);w.append(O)}y.append(w);0==d.length&&(w=y.append,K=new R,K.setIsShortTip(!0),K=K.getJqUi(),w.call(y,K))};var p=function(){a=$("<div>");a.addClass("modelset-search-lists");
a.css({"float":"right",right:"0px",height:"100%",width:"300px",position:"absolute",top:"56px",background:"white","z-index":"99999"});c||(c=new ea,c.scrollSelectedToVisible(),c.setCustomItemPainter(C),c.addSelectedChangedListener(h),c.setUserObject(d),c.setItemModels(d));var y=c.getJqUi();y.find(".sa-ctrl-list-owner").css({top:"40px",bottom:"100px","overflow-x":"hidden"});a.append(y);y=$("<div>");y.addClass("modelset-search-close");y.css({width:"100px",height:"28px",left:"0",right:"0",bottom:"24px",
margin:"auto",position:"absolute","font-size":"14px",color:"white","text-align":"center","line-height":"28px","border-radius":"2px","margin-bottom":"45px",cursor:"pointer"});var w=$("<div>");w.text(x.get("close","\u5173\u95ed"));w.appendTo(y);y.on("click",function(){e&&e()});a.append(y)};this.setSearchText=function(y){b=y};this.setFunItemSelectedListener=function(y){f=y};this.setArrItemModel=function(y){d=y};var h=function(y,w,K){K&&0<K.length&&(y=K[0],f&&f(y))},C=function(y,w){y.addClass("modelset-search-item");
y.css({width:"270px",height:"75px","border-bottom":"1px solid #E2E7EF",left:"6px",top:"0px"});var K=$("<span class='modelset-search-item-type'>");J.background(K,"icon-card-subject");K.css({position:"absolute",width:"36px",height:"36px",transform:"scale(0.5, 0.5)","transform-origin":"top",top:"5px",left:"-3px"});var fa=$("<span>");fa.addClass("modelset-search-item-name");fa.css({position:"absolute","font-size":"14px",color:"black",width:"250px",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis",
top:"5px","margin-left":"27px"});fa.attr("title",w.getModelSetName());var O=$("<div class='modelset-search-item-creator'>"),Z=$("<span>");Z.text(x.get("creatorWithColon","\u521b\u5efa\u4eba\uff1a"));var wa=$("<span>");O.append(Z);O.append(wa);Z=w.getCreatorName();"100000"==w.getCreatorId()&&(Z=x.get("systemPreset","\u7cfb\u7edf\u9884\u7f6e"));O.css({position:"absolute",top:"28px"});var qa=$("<div class='modelset-search-item-description'>"),L=$("<span>");L.text(x.get("descriptionWithColon","\u63cf\u8ff0\uff1a"));
L.css({top:"22px"});var S=$("<span>"),ma=w.getDescription().trim();S.addClass("modelset-search-item-desc");S.css({width:"240px",position:"absolute","white-space":"nowrap",height:"20px",overflow:"hidden","text-overflow":"ellipsis"});S.attr("title",w.getDescription());qa.css({position:"absolute",top:"50px"});qa.append(L);qa.append(S);y.append(K);y.append(fa);y.append(O);ma&&0<ma.length&&y.append(qa);b&&(N(fa,w.getModelSetName(),b),N(S,ma,b),N(wa,Z,b));y.on("click",function(Aa){c.setSelecteds([])})},
N=function(y,w,K){if(y&&w&&K){K=K.toUpperCase();var fa=w.toUpperCase(),O=fa.split(K),Z=K.length,wa;for(wa in O){var qa=fa.indexOf(O[wa]),L=w.substr(0,O[wa].length);qa+=O[wa].length;var S=fa.length-qa;fa=fa.substr(qa,S);w=w.substr(qa,S);qa=$("<span>");qa.text(L);qa.appendTo(y);wa!=O.length-1&&1<O.length&&(qa=fa.indexOf(K),L=w.substr(qa,Z),qa+=Z,S=fa.length-qa,fa=fa.substr(qa,S),w=w.substr(qa,S),qa=$("<span>"),qa.text(L),qa.css("color","red"),qa.appendTo(y))}}}}function X(){var a=this,d,b;this.getIsConfirmMsg=
function(){return!1};this.setSuggestSize=function(e){};this.getTitle=function(){};this.showDialog=function(){var e=g.createFeedbackDialog();e.setOptionType(g.OPTION_OK_CANCEL);a.getIsConfirmMsg()?e.setMsgImageType(g.MSG_CONFIRM):e.setMsgImageType(g.MSG_DELETE);e.setMessage(b);e.setClosingChecker(function(c){c==g.RETURN_OK&&a.doConfirmListener();return!0});e.showDialog()};this.doConfirmListener=function(){};this.setGlobal=function(e){d=e};this.getGlobal=function(){return d};this.setConfirmContent=
function(e){b=e};this.protectedMethod={getGlobal:function(){return d}}}function ba(a){X.call(this);var d=this,b=[],e;this.addSuccessCallback=function(f){b.push(f)};this.doConfirmListener=function(){c()};var c=function(){var f=function(h){h=0;for(var C=b.length;h<C;h++){var N=b[h];N&&N(a)}};e=d.getGlobal();var p=e.createFacade(f,function(h,C){C=h.toString();return 20005001==h?(e.getMessageCurtain().showPrompt(x.get("deleteModelTips","\u8bf7\u5148\u5220\u9664\u6a21\u578b\u96c6\u4e0b\u7684\u6a21\u578b\uff0c\u518d\u5220\u9664\u8be5\u6a21\u578b\u96c6\u3002")),
!0):20005002==h?(e.getMessageCurtain().showPrompt(x.get("modelSetDeleted","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\u6216\u65e0\u6743\u9650\u3002")),!0):"10"==C.substr(0,2)&&7==C.length&&1010004==h?(f(null),!0):!1});p.setShowBlocking(!0);p.deleteModelSet(a.getFId())};this.protectedCustomLayout=function(f,p,h){l.layoutCtrl(p,140,20,98,80);l.layoutCtrl(h,0,125,370,23)}}function ia(a){X.call(this);var d;this.getIsConfirmMsg=function(){return!0};this.setEnableListener=function(b){d=b};this.doConfirmListener=
function(){d&&d()}}function ka(a){var d=this,b=a,e=b.copy(),c=[910,600],f=[],p,h,C,N,y;this.addSuccessCallback=function(O){f.push(O)};this.createJqPanel=function(){var O=$("<div>"),Z=$("<div class='modelset-cooper-content-container'>");h=new k;h.addTabChangedListener(fa);h.setTabLevel(k.SECOND_LEVEL);C=new oa(p,oa.USER,b);C.setCooperDetailUpdater(K);N=new oa(p,oa.ROLE,b);N.setCooperDetailUpdater(K);h.addTab(C,!0);h.addTab(N);var wa=h.getJqUi();Z.append(wa);y=new B;y.addSearchListener(w);y.setSearchListenerDelay(0);
y.setPlaceholder(x.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));y.setShowSearchIcon(!0);wa=y.getJqUi();l.layoutCtrl(wa,665,5,206,22);O.append(Z);O.append(wa);return O};var w=function(){var O=y.getText(),Z=h.getCurrentTabPane();O&&O.trim()?(O=O.trim().toUpperCase(),Z.setSearchStatus(!0,O)):Z.setSearchStatus(!1,null)};this.setGlobal=function(O){p=O};var K=function(O,Z){for(var wa=[],qa=0;qa<O.length;qa++)wa.push(O[qa].toJsonObject());O=h.getCurrentTabPane();p.createFacade(function(L){for(var S=
[],ma=0;ma<L.length;ma++){var Aa=new n;Aa.fromJsonObject(L[ma]);S.push(Aa)}Z&&Z(S)},function(){return!1}).previewCoopInfo(wa,O.getType())},fa=function(){w()};this.createDialog=function(){var O=$(document.body),Z=$("<div class='sa-ctrl-common-modallayer'>");Z.appendTo(O);var wa=new Oa(Z);a.getPermission()!=m.COOPERATION_ADMIN&&wa.setFooterClosingOnly(!0);wa.setTitle(x.get("cooperManager","\u534f\u4f5c\u6210\u5458\u7ba1\u7406"));var qa=c[0],L=c[1],S=$(window).width(),ma=$(window).height();wa.setBounds(S-
qa>>1,ma-L>>1,qa,L);wa.setToolbarVisible(!1);wa.setContent(d.createJqPanel());wa.addClosingListener(function(Aa,Y){Y?p.createFacade(function(U){if(U)for(b.fromJsonObject(U),e=b.copy(),U=0;U<f.length;U++)f[U]&&f[U](e);else for(U=0;U<f.length;U++)f[U]&&f[U]()},function(U,pa){b=e;return 20005002==U?(p.getMessageCurtain().showPrompt(x.get("modelSetDeleted","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\u6216\u65e0\u6743\u9650\u3002")),!0):!1}).saveOrUpdateCoopModelSetInfo(b):b=e;Aa.destroy();Z.remove()});
wa.showFooterPane();Z.appendTo(O);return wa}}function oa(a,d,b){k.AbstractTabPane.call(this);var e,c=this,f,p,h,C,N=!1,y=!1,w,K=!1,fa,O,Z={};d==oa.USER?p=new G:d==oa.ROLE&&(p=new ta);this.getTitle=function(){return d==oa.USER?x.get("CurrentSystemUser","\u5f53\u524d\u7cfb\u7edf\u7528\u6237"):x.get("CurrentSystemRole","\u5f53\u524d\u7cfb\u7edf\u89d2\u8272")};this.setSearchStatus=function(Y,U){f||(f=d==oa.USER?b.getUsers():b.getRoles());y=Y;w=U;y?c.updateSearchUI():(K=!1,c.updateUi(f))};this.getModel=
function(){return f};this.setCooperDetailUpdater=function(Y){h=Y};this.getType=function(){return d};this.updateSearchUI=function(){C.hide();fa.hide();O.hide();var Y=[];if(f&&0<f.length){for(var U=0;U<f.length;U++)if(f[U].isAvailable()){var pa=f[U].getText().trim().toUpperCase();d==oa.USER?f[U].getJobId()?(-1<f[U].getJobId().trim().toUpperCase().indexOf(w)||-1<pa.indexOf(w))&&Y.push(f[U]):-1<pa.indexOf(w)&&Y.push(f[U]):-1<pa.indexOf(w)&&Y.push(f[U])}K=0==Y.length?!0:!1}else K=!0;c.updateUi(Y)};this.updateUi=
function(Y){e.find(".cooper-container-card").remove();e.find(".cooper-container-card-Searching").remove();K?fa.show():fa.hide();if(Y){0==b.getPermission()?(N=!0,!y&&C.show()):(C&&C.hide(),y||0!=Y.length||d==oa.ROLE&&O.show());for(var U=0;U<Y.length;U++){var pa=new da(Y[U]);pa.isAddOperation(N);d==oa.USER&&Y[U].getPermission()==n.CREATOR_PERM&&pa.setIsCreator(!0);pa.setDeleteCardListener(wa);pa.setType(d);pa.updateCardSearchingStatus(y,w);pa=pa.getJqUi();y&&pa.addClass("cooper-container-card-Searching");
e.append(pa)}}};var wa=function(Y){Y=Y.getValue();for(var U=0;U<f.length;U++)if(f[U].getValue()==Y){f.splice(U,1);break}d==oa.USER?b.setUsers(f):b.setRoles(f);p.setSelectedValue(f)};this.getJqUi=function(){if(!e){p.setSelectedListener(L);e=$("<div class='cooper-container'>");var Y=new da;Y.setType(d);C=Y.getJqUi();C.on("click",qa);e.append(C);fa=(new R).getJqUi();e.append(fa);Y=$("<div>");var U=$("<div>"),pa=$("<div>");J.background(pa,"icon-empty");pa.css({position:"absolute",margin:"auto",top:"-50px",
"text-align":"center",width:"168px",height:"96px",bottom:"0",left:"0",right:"0"});U.text(x.get("noRoleDataResult","\u6682\u672a\u6dfb\u52a0\u5f53\u524d\u7cfb\u7edf\u89d2\u8272"));U.css({position:"absolute",margin:"auto",width:"auto",height:"16px","font-size":"14px",color:"#999999",top:"100px","text-align":"center",left:"0",bottom:"0",right:"0"});Y.append(pa);Y.append(U);O=Y;e.append(O);O.hide();fa.hide();C.hide()}return e};var qa=function(){p.setSelectedValue(f);p.protectedClickEvent()},L=function(Y){ma(Y);
if(Aa(Y))h&&h(Y,function(Ea){Ea=f=Ea;for(var Ma=0;Ma<Ea.length;Ma++){var Qa=Ea[Ma],Sa=Qa.getValue();Z[Sa]||(Z[Sa]=Qa.toJsonObject())}d==oa.USER?b.setUsers(f):b.setRoles(f);S();c.updateUi(f)});else{for(var U=0;U<Y.length;U++){var pa=Y[U],xa=Z[pa.getValue()];pa.fromJsonObject(xa)}f=Y;d==oa.USER?b.setUsers(f):b.setRoles(f);S();c.updateUi(f)}},S=function(){for(var Y=[],U=[],pa=[],xa=[],Ea=0;Ea<f.length;Ea++){var Ma=f[Ea];Ma.getPermission()==n.CREATOR_PERM?Y.push(Ma):Ma.getPermission()==n.ADMIN_PERM?U.push(Ma):
pa.push(Ma)}Y&&0<Y.length&&xa.push(Y[0]);for(Ea=0;Ea<U.length;Ea++)xa.push(U[Ea]);for(Ea=0;Ea<pa.length;Ea++)xa.push(pa[Ea]);f=xa},ma=function(Y){var U=d==oa.USER?b.getUsers():b.getRoles();for(var pa={},xa=0;xa<U.length;xa++){var Ea=U[xa];pa[Ea.getValue()]=Ea.getPermission()}for(xa=0;xa<Y.length;xa++)U=Y[xa],pa[U.getValue()]&&U.setPermission(pa[U.getValue()])},Aa=function(Y){for(var U=0;U<Y.length;U++)if(!Z[Y[U].getValue()])return!0;return!1}}function Ba(a){var d=[400,300],b,e,c,f,p;this.setGlobal=
function(y){c=y};this.setSaveOrUpdateSuccessCallback=function(y){p=y};this.showDialog=function(){var y=$(document.body),w=$("<div class='sa-ctrl-common-modallayer'>");w.appendTo(y);f=new Oa(w);f.setSelectable(!0);var K=void 0!=a.getFId()?x.get("editDataModelSet","\u7f16\u8f91\u6a21\u578b\u96c6"):x.get("createDataModelSet","\u65b0\u5efa\u6a21\u578b\u96c6");f.setTitle(K);K=d[0];var fa=d[1],O=$(window).width(),Z=$(window).height();f.setBounds(O-K>>1,Z-fa>>1,K,fa);f.setToolbarVisible(!1);f.setContent(N());
f.showFooterPane();w.appendTo(y);var wa=function(){f.destroy();w.remove()};f.addClosingListener(function(qa,L){if(L){if(qa=$.trim(b.getText()),L=$.trim(e.getText()),C(qa,L)){var S=a.copy();S.setModelSetName(qa);S.setDescription(L);h(S,wa,f.getMessageCurtain())}}else wa()});f.show()};var h=function(y,w,K){var fa=c.createFacade(function(O){y.fromJsonObject(O);p&&p(y);w()},function(O,Z){return 20005E3==O?(O=x.get("modelSetNameSameWithOther","\u8be5\u540d\u79f0\u5df2\u88ab\u5176\u4ed6\u7528\u6237\u4f7f\u7528\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002"),
"true"==Z&&(O=x.get("modelSetNameSameWithMe","\u8be5\u540d\u79f0\u5df2\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u3002")),K.showPrompt(O),!0):20005002==O?(c.getMessageCurtain().showPrompt(x.get("modelSetDeleted","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\u6216\u65e0\u6743\u9650\u3002")),w(),!0):!1});fa.setShowBlocking(!0);fa.saveOrUpdateModelSet(y)},C=function(y,w){return""==y?(f.getMessageCurtain().showPrompt(x.get("pleaseInputModelSetName","\u8bf7\u8f93\u5165\u540d\u79f0\u3002")),!1):50<
y.length?(f.getMessageCurtain().showPrompt(x.get("modelSetNameLengthTip","\u540d\u79f0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc750\u4e2a\u5b57\u7b26\u3002")),!1):500<w.length?(f.getMessageCurtain().showPrompt(x.get("descriptionLengthTip","\u63cf\u8ff0\u957f\u5ea6\u4e0d\u80fd\u8d85\u8fc7500\u4e2a\u5b57\u7b26\u3002")),!1):!0},N=function(){var y=$("<div>"),w=new V;w.setRequired(!0);w.setText(x.get("modelSetName","\u540d\u79f0"));w=w.getJqUi();b=new z;b.setText(a?a.getModelSetName():"");var K=b.getJqUi(),fa=
new V;fa.setText(x.get("description","\u63cf\u8ff0"));fa=fa.getJqUi();e=new la;e.setText(a?a.getDescription():"");var O=e.getJqUi();w.appendTo(y);K.appendTo(y);fa.appendTo(y);O.appendTo(y);l.layoutCtrl(w,8,0,70,23);l.layoutCtrl(K,76,0,280,23);l.layoutCtrl(fa,8,48,70,23);l.layoutCtrl(O,76,54,280,120);return y}}function da(a){function d(){X.call(this);var L;this.setDeleteListener=function(S){L=S};this.doConfirmListener=function(){L&&L()};this.protectedCustomLayout=function(S,ma,Aa){l.layoutCtrl(ma,
140,20,98,80);l.layoutCtrl(Aa,0,125,370,23)}}var b,e,c,f,p,h,C=!1,N,y,w,K=function(){if(a)if(a.isAvailable()){b=$("<div class='cooper-container-card'>");var L=a.getText();f=v.createHeadImg(L,a.getColor());a.setColor(f[1]);var S=f[0],ma=$("<img class='cooper-container-card-content-headImg'>");ma.attr("src",S);b.append(ma);y=$("<div class='cooper-container-card-content-item'>");y.text(L);b.append(y);var Aa=$("<span>");Aa.text(" \u25cf ");Aa.css({color:"#1BA854"});Aa.hide();var Y=[x.get("admin","\u7ba1\u7406\u5458"),
x.get("member","\u6210\u5458")];w=new T;w.setItemModels(Y);a.getPermission()==n.ADMIN_PERM?(Aa.show(),w.setSelected(Y[0])):a.getPermission()==n.MEM_PERM&&w.setSelected(Y[1]);w.addSelectedChangedListener(function(U,pa,xa){U=Y.indexOf(xa);-1!=U&&(a.setPermission(U),0==U?Aa.show():Aa.hide())});L=w.getJqUi();L.css({position:"absolute","float":"right",top:"137px",width:"62px",height:"17px","text-align":"right",color:"#212121",left:"27px"});L.removeClass("sa-ctrl-common-singlelineborder");L.removeClass("sa-ctrl-common-singlelineborder_disabled");
S=$("<span class='cooper-container-card-line'>");S.text("|");ma=$("<span class='cooper-container-card-delete-icon'>");ma.attr("title",x.get("delete","\u5220\u9664"));ma.on("click",Z);ma.text(x.get("delete","\u5220\u9664"));c?(L=$("<div class='cooper-container-card-status'>"),S=$("<span>"),S.text(" \u25cf "),S.css({color:"#FF991C"}),ma=$("<span>"),ma.text(x.get("creator","\u521b\u5efa\u8005")),L.append(S),L.append(ma),b.append(L)):p?(Aa.css({position:"absolute",left:"16px",bottom:"14px","font-size":"12px"}),
b.append(Aa),b.append(L),b.append(S),b.append(ma)):(L=fa(Aa),b.append(L));qa()}else wa();else b=$("<div class='cooper-container-card-creator'>"),L=$("<div class='cooper-container-card-creator-icon'>"),J.background(L,"add-user-image"),S=$("<div>"),e==oa.USER?S.text(x.get("addUsers","\u6dfb\u52a0\u7528\u6237")):S.text(x.get("addRoles","\u6dfb\u52a0\u89d2\u8272")),b.append(L),b.append(S)},fa=function(L){var S=$("<div>"),ma=$("<span>");ma.text(w.getSelected());ma.css({color:"#212121"});S.append(L);S.append(ma);
S.css({position:"absolute","float":"right",top:"137px",height:"17px",margin:"auto","text-align":"center",left:"0px",right:"0px"});return S};this.updateCardSearchingStatus=function(L,S){C=L;N=S};var O=function(L,S,ma){if(L&&S&&ma){L.text("");ma=ma.toUpperCase();var Aa=S.toUpperCase(),Y=Aa.split(ma),U=ma.length,pa;for(pa in Y){var xa=Aa.indexOf(Y[pa]),Ea=S.substr(0,Y[pa].length);xa+=Y[pa].length;var Ma=Aa.length-xa;Aa=Aa.substr(xa,Ma);S=S.substr(xa,Ma);xa=$("<span>");xa.text(Ea);xa.appendTo(L);pa!=
Y.length-1&&1<Y.length&&(xa=Aa.indexOf(ma),Ea=S.substr(xa,U),xa+=U,Ma=Aa.length-xa,Aa=Aa.substr(xa,Ma),S=S.substr(xa,Ma),xa=$("<span>"),xa.text(Ea),xa.css("color","red"),xa.clone().appendTo(L))}}};this.setDeleteCardListener=function(L){h=L};var Z=function(){var L=x.get("ConfirmDelCoopCard","\u786e\u5b9a\u8981\u79fb\u9664\u201c#1\u201d\u5417\uff1f");L=a.getText()?L.replace("#1",a.getText()):L.replace("\u201c#1\u201d","");var S=new d;S.setConfirmContent(L);S.setDeleteListener(function(){h&&h(a);b.remove()});
S.showDialog()};this.isAddOperation=function(L){p=L};this.setType=function(L){e=L};this.setIsCreator=function(L){c=L};this.getJqUi=function(){b||K();return b};var wa=function(){b=$("<div class='cooper-container-card'>");var L=$("<div class='cooper-container-card-content-headImg'>");J.background(L,"user-not-exist");L.appendTo(b);L=x.get("userNotExist","\u627e\u4e0d\u5230\u8be5\u7528\u6237");e==oa.ROLE&&(L=x.get("roleNotExist","\u627e\u4e0d\u5230\u8be5\u89d2\u8272"));var S=$("<div class='cooper-container-card-content-item-exception'>");
S.attr("title",L);l.layoutCtrlCenterAlign(S,120);var ma=$("<span class='cooper-container-card-content-item-exception-prompt'>");ma.text("!");ma.appendTo(S);ma=$("<span>");ma.text(L);ma.appendTo(S);S.appendTo(b);L=$("<span class='cooper-container-card-delete-icon'>");L.attr("title",x.get("delete","\u5220\u9664"));L.on("click",Z);L.text(x.get("delete","\u5220\u9664"));l.layoutCtrlCenterAlign(L,24);p&&b.append(L)},qa=function(){if(e==oa.USER){var L=$("<div class='cooper-container-card-content-item-subtitle'>"),
S=a.getJobId();L.text(S);b.append(L)}C&&O(y,a.getText(),N);C&&e==oa.USER&&O(L,a.getJobId(),N)}}function na(){var a=this,d,b;this.getJqUi=function(){if(!d){d=$("<div>");b=$("<input readonly=readonly>");b.on("click",a.protectedClickEvent);var e=$("<span>");e.appendTo(d);b.appendTo(d);e.on("click",a.protectedClickEvent)}return d};this.setSelectedValue=function(){throw Error("override me");};this.getSelectedValue=function(){throw Error("override me");};this.protectedClickEvent=function(){throw Error("override me");
}}function G(){na.call(this);var a=[],d=!1,b,e;this.setSelectedListener=function(h){e=h};var c=this.getJqUi;this.getJqUi=function(){b||(b=c());return b};this.setSelectedValue=function(h){a=h};this.getSelectedValue=function(){return a};this.protectedClickEvent=function(){d||f()};var f=function(){d=!0;var h=t;h.setCallBack(function(C){for(var N={},y={},w=0;w<a.length;w++){var K=a[w].getValue();N[K]=a[w].getColor();y[K]=a[w].getPermission()}d=!1;if(C&&C.content&&(w=C.content,C=w.selecteds,"cancel"!=
w.operation&&"undefined"!=C)){var fa=Object.keys(C);a=[];for(w=0;w<fa.length;w++){K=fa[w];var O=C[K],Z=new n;Z.setValue(K);Z.setText(O);Z.setColor(N[K]);0==y[K]?Z.setPermission(0):Z.setPermission(1);a.push(Z)}e&&e(a)}});h.openUserForm(p())},p=function(){for(var h=[],C=0;C<a.length;C++){var N=a[C].getValue();h.push(N)}return h}}function ta(){na.call(this);var a=[],d=!1,b,e;this.setSelectedListener=function(h){e=h};var c=this.getJqUi;this.getJqUi=function(){b||(b=c());return b};this.protectedClickEvent=
function(){d||f()};this.setSelectedValue=function(h){a=h};this.getSelectedValue=function(){return a};var f=function(){d=!0;var h=t;h.setCallBack(function(C){for(var N={},y={},w=0;w<a.length;w++){var K=a[w].getValue();N[K]=a[w].getColor();y[K]=a[w].getPermission()}d=!1;if(C&&C.content&&(w=C.content,C=w.selecteds,"cancel"!=w.operation&&"undefined"!=C)){var fa=Object.keys(C);a=[];for(w=0;w<fa.length;w++){K=fa[w];var O=C[K],Z=new n;Z.setValue(K);Z.setText(O);Z.setColor(N[K]);0==y[K]?Z.setPermission(0):
Z.setPermission(1);a.push(Z)}e&&e(a)}});h.openRoleForm(p())},p=function(){for(var h=[],C=0;C<a.length;C++){var N=a[C].getValue();h.push(N)}return h}}function m(a){var d,b,e,c=this,f,p=!1,h,C,N,y,w,K,fa,O,Z;this.setGlobal=function(I){e=I};this.setType=function(I){b=I};this.getType=function(){return b};this.setIsPreset=function(I){p=I};this.getJqUi=function(){d||wa();return d};this.setCardSelectedListener=function(I){y=I};this.setSelected=function(I){(fa=I)?d.addClass("modelset-card-selected"):d.removeClass("modelset-card-selected")};
this.isSelected=function(){return fa};var wa=function(){d=$("<div>");d.addClass("modelset-card");d.on("mousedown",L);d.attr("id",a.getFId());d.on("mouseover",function(){Aa(!0)});d.on("mouseout",function(){Aa(!1)});var I=$("<div>");I.addClass("modelset-detail-container");var aa=$("<span class='modelset-icon'>");J.background(aa,"icon-card-subject");I.append(aa);h=$("<span class='modelset-name'>");l.makeSelectable(h);h.css("cursor","pointer");p&&h.css("width","190px");h.on("click",function(Ja){u.PermChecker.check(function(){Ja.stopPropagation();
A.occur(A.MODELSET_TYPE_WHEN_ENTER_MAIN_PAGE,A.getModelSetType(b));var Ka=a.getFId(),q=a.getModelSetName(),M=p;La.getModelSetMainPageEntrance()(Ka,q,M)},p)});I.append(h);N=$("<div>");N.addClass("manage-icon-container");U(N);I.append(N);d.append(I);p&&pa(I);I=$("<div class='dataModel-detail-container'>");w=Y(a.getTableModelNum(),"icon-tablemodel",x.get("tableModel","\u6570\u636e\u8868\u6a21\u578b"));l.layoutCtrlWithLRTB(w,30,null,103,0,null,60);w.find(".dataModel-icon").css({left:"8px"});w.find(".dataModel-name").css({left:"8px"});
I.append(w);K=Y(a.getMetricModelNum(),"icon-metricmodel",x.get("metricModel","\u6307\u6807\u6a21\u578b"));l.layoutCtrlWithLRTB(K,null,30,103,0,null,60);I.append(K);l.makeSelectable(I,!1);d.append(I);I=$("<div>");I.addClass("icon-container");Z=new ha;Z.setIconType(ha.ICON_TYPE_INFO);Z.setTipsSize(250,130);Z.setTipsHtml(qa());O=Z.getJqUi();l.layoutCtrlWithLRTB(O,null,72,16,9,null,16);p&&l.layoutCtrlWithLRTB(O,null,10,16,9,null,16);I.append(O);C=$("<span class='modelset-card-card-pic'>");C.on("click",
function(){u.PermChecker.check(Qa,p)});J.backgroundWithHover(C,a.getDisabled()==m.DISABLED?"disable":"enable");!p&&I.append(C);C.css({cursor:"pointer"});l.layoutCtrlWithLRTB(C,null,33,34,0,null,34);d.append(I);aa=$("<span class='modelset-card-card-pic'>");aa.css({cursor:"pointer"});J.backgroundWithHover(aa,"auth");aa.attr("title",x.get("cooperManager","\u534f\u4f5c\u6210\u5458\u7ba1\u7406"));aa.on("click",function(){u.PermChecker.check(Sa,p)});!p&&I.append(aa);l.layoutCtrlWithLRTB(aa,null,4,34,0,
null,34);I=$("<span>");I.css({cursor:"pointer"});J.backgroundWithHover(I,"btn-copy");I.attr("title","\u590d\u5236");I.on("click",Ua);ma()},qa=function(){function I(Q,sa){var Da;this.getJqUi=function(){if(!Da){Da=$("<div class='modelset-info-tips'>");var Fa=$("<span>");Fa.text(Q);Fa.css("font-weight","bold");var Ha=$("<span>");sa&&Ha.text(sa);Da.append(Fa);Da.append(Ha)}return Da}}var aa=$("<div>"),Ja=a.getCreatorName();p&&(Ja=x.get("systemPreset","\u7cfb\u7edf\u9884\u7f6e"));Ja=(new I(x.get("creatorWithColon",
"\u521b\u5efa\u4eba\uff1a"),Ja)).getJqUi();var Ka=new W;Ka.setFormatString("yyyy/MM/dd HH:mm:ss");Ka=Ka.format(a.getCreateTime());Ka=(new I(x.get("createTimeWithColon","\u521b\u5efa\u65f6\u95f4\uff1a"),Ka)).getJqUi();var q=(new I(x.get("modelSetNameWithColon","\u540d\u79f0\uff1a"),a.getModelSetName())).getJqUi(),M=(new I(x.get("descriptionWithColon","\u63cf\u8ff0\uff1a"),a.getDescription())).getJqUi();aa.append(Ja);aa.append(Ka);aa.append(q);aa.append(M);return aa},L=function(I){y&&y(c)},S=function(){var I=
a.getFId(),aa=m.DISABLED;a.getDisabled()==m.DISABLED&&(aa=m.ENABLED);var Ja=e.createFacade(function(){a.setDisabled(aa);J.backgroundWithHover(C,a.getDisabled()==m.DISABLED?"disable":"enable");ma();var Ka=x.get("modelDisableTipsCallBack","\u6a21\u578b\u96c6\u201c#1\u201d\u7981\u7528\u6210\u529f\u3002");a.getDisabled()!=m.DISABLED&&(Ka=x.get("modelEnableTipsCallBack","\u6a21\u578b\u96c6\u201c#1\u201d\u542f\u7528\u6210\u529f\u3002"));Ka=Ka.replace("#1",a.getModelSetName());e.getMessageCurtain().showSuccess(Ka);
A.occur(A.MODELSET_IS_ENABLE_OR_DISABLE,A.getEnableStatus(aa))},function(Ka,q){return 20005002==Ka?(e.getMessageCurtain().showPrompt(x.get("modelSetDeleted","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\u6216\u65e0\u6743\u9650\u3002")),!0):!1});Ja.setShowBlocking(!0);Ja.updateModelSetEnabledStatus(I,aa)},ma=function(){Z&&Z.setTipsHtml(qa());var I=a.getModelSetName();h.text(I);h.attr("title",I);I=a.getDisabled()==m.DISABLED?x.get("enable","\u70b9\u51fb\u542f\u7528"):x.get("disabled","\u70b9\u51fb\u7981\u7528");
C.attr("title",I);b==m.COOPERATION&&a.getPermission()!=m.COOPERATION_ADMIN||p?N.hide():N.show()};this.updateModelNum=function(){w.find(".dataModel-number").text(a.getTableModelNum());K.find(".dataModel-number").text(a.getMetricModelNum())};var Aa=function(I){p||b==m.COOPERATION&&a.getPermission()!=m.COOPERATION_ADMIN||(I?(h.css("width","170px"),d.find(".edit-icon").css("display","block"),d.find(".delete-icon").css("display","block")):(h.css("width","230px"),d.find(".edit-icon").css("display","none"),
d.find(".delete-icon").css("display","none")))},Y=function(I,aa,Ja){var Ka=$("<div>");Ka.addClass("dataModel-Info-container");var q=$("<div>");q.addClass("dataModel-number");q.text(I);Ka.append(q);l.layoutCtrlCenterAlign(q,103);I=$("<div>");I.addClass(aa+"-dataModel-mark");q=$("<span class='dataModel-icon'>");J.background(q,aa);I.append(q);aa=$("<span class='dataModel-name'>");aa.text(Ja);I.append(aa);Ka.append(I);Ka.attr("title",Ja);return Ka},U=function(I){if(!p){var aa=$("<span>");aa.addClass("edit-icon icon");
aa.attr("title",x.get("edit","\u7f16\u8f91"));J.backgroundWithHover(aa,"btn-edit");aa.on("click",function(){u.PermChecker.check(xa)});aa.appendTo(I);aa=$("<span>");aa.addClass("delete-icon icon");aa.attr("title",x.get("delete","\u5220\u9664"));aa.on("click",function(){u.PermChecker.check(Ma)});J.backgroundWithHover(aa,"btn-delete");aa.appendTo(I)}},pa=function(I){var aa=$("<div>");l.makeSelectable(aa);aa.addClass("modelset-card-preset-text");aa.text(x.get("presetTag","\u9884 \u7f6e"));var Ja=$("<div>");
Ja.addClass("modelset-card-preset-icon");J.background(Ja,"icon-preset-big");aa.appendTo(I);Ja.appendTo(I)},xa=function(){var I=new Ba(a);I.setGlobal(e);I.setSaveOrUpdateSuccessCallback(function(aa){a.setModelSetName(aa.getModelSetName());a.setDescription(aa.getDescription());ma();e.getMessageCurtain().showSuccess(x.get("editDataModelSetTips","\u7f16\u8f91\u6a21\u578b\u96c6\u6210\u529f\u3002"))});I.showDialog()},Ea=function(){c.getJqUi().remove();f&&f(a,b)},Ma=function(){if(0<a.getTableModelNum()||
0<a.getMetricModelNum()){var I=x.get("deleteModelTips","\u8bf7\u5148\u5220\u9664\u6a21\u578b\u96c6\u4e0b\u7684\u6a21\u578b\uff0c\u518d\u5220\u9664\u8be5\u6a21\u578b\u96c6\u3002");e.getMessageCurtain().showPrompt(I)}else{I=x.get("confirmToDeleteModelSet","\u5220\u9664\u6a21\u578b\u96c6\u201c#1\u201d\u540e\u5c06\u65e0\u6cd5\u6062\u590d\uff0c\u786e\u5b9a\u5220\u9664\u8be5\u6a21\u578b\u96c6\u5417\uff1f");I=I.replace("#1",a.getModelSetName());var aa=new ba(a);aa.setConfirmContent(I);aa.setGlobal(e);aa.addSuccessCallback(function(){Ea();
e.getMessageCurtain().showSuccess(x.get("deleteSuccess","\u5220\u9664\u6a21\u578b\u96c6\u6210\u529f\u3002"))});aa.showDialog()}},Qa=function(){if(b==m.COOPERATION&&a.getPermission()!=m.COOPERATION_ADMIN){var I=x.get("noPermissionDisableTips","\u60a8\u6ca1\u6709\u7981\u7528\u8be5\u6a21\u578b\u96c6\u7684\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u6a21\u578b\u96c6\u521b\u5efa\u8005\u6216\u7ba1\u7406\u5458\u7981\u7528\u3002");a.getDisabled()==m.DISABLED&&(I=x.get("noPermissionEnableTips","\u60a8\u6ca1\u6709\u542f\u7528\u8be5\u6a21\u578b\u96c6\u7684\u6743\u9650\uff0c\u8bf7\u8054\u7cfb\u6a21\u578b\u96c6\u521b\u5efa\u8005\u6216\u7ba1\u7406\u5458\u542f\u7528\u3002"));
e.getMessageCurtain().showPrompt(I)}else if(a.getDisabled()==m.DISABLED)S();else{I=x.get("modelDisableTips","\u7981\u7528\u540e\uff0c\u8be5\u6a21\u578b\u96c6\u4e0b\u6240\u6709\u5df2\u90e8\u7f72\u7684\u6a21\u578b\u5c06\u65e0\u6cd5\u4f7f\u7528\uff0c\u786e\u5b9a\u7981\u7528\u5417\uff1f");var aa=new ia(a);aa.setGlobal(e);aa.setConfirmContent(I);aa.setEnableListener(S);aa.showDialog()}},Sa=function(){e.createFacade(function(I){var aa=new za;aa.fromJsonObject(I);a.setPermission(aa.getPermission());a.setUsers(aa.getUsers());
a.setRoles(aa.getRoles());I=new ka(a);I.setGlobal(e);I.addSuccessCallback(function(Ja){Ja?(a.setUsers(Ja.getUsers()),a.setRoles(Ja.getRoles()),a.setPermission(Ja.getPermission()),a.setCreatorName(Ja.getCreatorName()),ma()):Ea();e.getMessageCurtain().showSuccess(x.get("setSuccess","\u8bbe\u7f6e\u6210\u529f\u3002"))});I.createDialog().show()},function(I){return 20005002==I?(e.getMessageCurtain().showPrompt(x.get("modelSetDeleted","\u6a21\u578b\u96c6\u5df2\u88ab\u5220\u9664\u6216\u65e0\u6743\u9650\u3002")),
!0):!1}).loadCoopInfoDetails(a)},Ua=function(){console&&console.log("--copy ModelSet--")};this.setDelModelSetCallBack=function(I){f=I}}"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.modelset&&(com.kingdee.bos.qing.modeler.modelset=
{});"undefined"==typeof com.kingdee.bos.qing.modeler.modelset.ui&&(com.kingdee.bos.qing.modeler.modelset.ui={});var u=com.kingdee.bos.qing.modeler.modelset.ui;u.Main=function(){var a,d,b={},e={},c,f,p,h,C,N,y,w,K,fa=0;this.setMessageResize=function(q){K=q};this.setMessageWidth=function(q){fa=q};E=new function(){var q;this.getMessageCurtain=function(){q||(q=new H,q.getJqUi().appendTo($("body")));return q};this.createFacade=function(M,Q,sa){var Da=La.getRemoteImpl();return new ya(Da,M,function(Fa,Ha){return Q?
Q(Fa,Ha):!1},sa)}};this.createJqUi=function(){var q=Ga.decodeParamFromUrl(location.search,"path");com.kingdee.bos.qing.modeler.modelset.common.Integration.setRemoteUrl((q?q:"/ierp")+"/qingmodeler/modelSetManage.do");a=$("<div class='modelset-manage'>");Z(a);wa();return a};var O=function(){document.body.style.height=document.documentElement.clientHeight+"px"},Z=function(q){c=$("<div class='modelset-manage-toolbar'>");var M=$("<input type='file' id='uploadBtn'>");M.addClass("import-model-file");M.css("display",
"none");M.attr("accept",[".qing-mds"]);M.on("change",function(Q){if(Q=a.find("#uploadBtn").get(0).files[0]){var sa=Q.name,Da=Q.size,Fa=sa.lastIndexOf(".");sa=sa.substring(Fa+1,sa.length).toLowerCase();a.find("#uploadBtn").val("");"qing-mds"!=sa?E.getMessageCurtain().showPrompt(x.get("fileTypeIncorrect","\u6587\u4ef6\u7c7b\u578b\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3):0==Da?E.getMessageCurtain().showPrompt(x.get("uploadFileIsNull","\u4e0a\u4f20\u7684\u6587\u4ef6\u4e3a\u7a7a\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),
2E3):104857600<=Da?E.getMessageCurtain().showPrompt(x.get("fileTooLarge","\u6587\u4ef6\u592a\u5927\uff0c\u8bf7\u91cd\u65b0\u4e0a\u4f20\u3002"),2E3):(Da=new va,Da.createJqUi(Q,E,E.getMessageCurtain()),Da.setFunRefreshModelGroup(wa))}M.val("")});M.appendTo(a);pa(c,!1,function(){M.click()},"import",x.get("import","\u5bfc\u5165"),x.get("import","\u5bfc\u5165"));pa(c,!1,Ja,"export",x.get("export","\u5bfc\u51fa"),x.get("export","\u5bfc\u51fa"));pa(c,!1,Ka,"resourceLimit",x.get("resources","\u8d44\u6e90\u9650\u989d"),
x.get("resources","\u8d44\u6e90\u9650\u989d"));pa(c,!1,wa,"refresh",x.get("refresh","\u5237\u65b0"),x.get("refresh","\u5237\u65b0"));y=qa();c.append(y);q.append(c)},wa=function(){N&&N.remove();N=$("<div class='modelset-manage-container'>");xa(N);a.append(N);O();var q=new ua;q.setCallbackImmediately(function(){O();N&&N&&N.css({width:U()+"px"});K&&K()});q.setDelay(250);q.observe()},qa=function(){f=new B;f.addSearchListener(S);f.setSearchListenerDelay(0);f.setPlaceholder(x.get("searchContent","\u8bf7\u8f93\u5165\u641c\u7d22\u5185\u5bb9"));
f.setShowSearchIcon(!0);var q=f.getJqUi();q.addClass("modelset-manage-toolbar-searchBox");q.css("right",20+fa+"px");q.find(":input").on("keydown",function(M){13==(M.keyCode||M.which||M.charCode)&&S()});f.setFoucs();document.body.addEventListener("mousedown",L,!0);return q},L=function(q){for(q=q.target;q!=document.body;){if(q==y[0]||N&&q==N[0]||h&&q==h.getJqUi()[0])return;q=q.parentNode}h&&Y(!1);document.body.removeEventListener("mousedown",L,!0)},S=function(){p=f.getText();var q=0;h||(h=new ca,h.setFunCloseSearchResultPanel(function(){h&&
Y(!1)}),h.setFunItemSelectedListener(ma),h.getJqUi().appendTo(a));C||(C=$("<div>"),C.addClass("modelset-search-total-records"),C.text(x.get("searchTotalRecords","\u5171\u627e\u5230\u201c#1\u201d\u4e2a\u7ed3\u679c").replace("#1",q)),C.css({"margin-top":"16px","margin-left":"10px",height:"20px",width:"300px","border-bottom":"2px solid rgb(226, 231, 239)"}),C.appendTo(h.getJqUi()));document.body.addEventListener("mousedown",L,!0);Y(!0);var M=[];p&&p.trim()?(p=p.trim().toUpperCase(),h.setSearchText(p),
M=[],$.each(b,function(Q,sa){for(Q=0;Q<sa.length;Q++){var Da=sa[Q],Fa=Da.getModelSetName().toUpperCase(),Ha=Da.getDescription().toUpperCase(),Ia=Da.getCreatorName().toUpperCase();(-1<Fa.indexOf(p)||-1<Ha.indexOf(p)||-1<Ia.indexOf(p))&&M.push(Da)}}),h.setArrItemModel(M),q=M.length,C.text(x.get("searchTotalRecords","\u5171\u627e\u5230#1\u4e2a\u7ed3\u679c").replace("#1",q)),h.refresh()):Y(!1)},ma=function(q){var M=$("#"+q.getFId()),Q=e[q.getFId()];if(Q){var sa=N.find(".modelset-create").height();Q.getType()==
m.CREATE?sa=0:Q.getType()==m.PRESET&&(sa=N.find(".modelset-cooperation").height()+sa);Aa("modelset-manage-container",M,sa);Q=new D;Q.setTimes(2,!0);Q.blink(M,"modelset-twinkle-high-light","modelset-card-selected");Q.setAction(function(){var Da=e[q.getFId()];Ma&&Ma(Da);M.addClass("modelset-card-selected")})}},Aa=function(q,M,Q){document.querySelector("."+q).scrollTop=M.prop("offsetTop")+Q},Y=function(q){q?h.getJqUi().show():h.getJqUi().hide();q=U(q);N.css("width",q+"px")},U=function(q){var M=document.documentElement.clientWidth-
20;h&&(q||"block"==h.getJqUi().css("display"))&&(M-=h.getJqUi().width());return M},pa=function(q,M,Q,sa,Da,Fa){var Ha=function(Na,Pa,Va,Ta){var Ra=Na.data("menu");if(Ra&&Ra.isShowing())Na.data("menu",null),Ra.hide();else{Ra=new com.kingdee.bos.qing.ui.component.Menu;Ra.setModel(Va());Ra.setHideListener(function(){Na.data("menu",null)});Na.data("menu",Ra);Va=null==Ta?_jqCorePane:Ta;Ta=Na.prop("offsetLeft");var Wa=Na.prop("offsetHeight")+Na.prop("offsetTop");Ra.show(Va,Ta,Wa,Pa,!0)}},Ia=new r;Ia.setIconSetter(function(Na,
Pa){J.background(Na,Pa)});Ia.setIconName(sa);Ia.setText(Da);Ia.setTooltips(Fa);M&&Ia.setShowDropdownArrow(!0);Ia.addActionListener(function(Na,Pa){M?Ha(Na.getJqUi(),Pa,Q,q):Q(Na)});Ia.getJqUi().appendTo(q);return Ia},xa=function(q){E.createFacade(function(M){ra.unsubscribeChannel("modelSetCard",Ea);$.each(M,function(Q,sa){var Da=$("<div>");Da.append(I(Q));Da.addClass(d);var Fa=$("<div>");Q==m.CREATE?Fa.addClass("create-modelset-card-container"):Q==m.COOPERATION?Fa.addClass("cooperation-modelset-card-container"):
Fa.addClass("preset-modelset-card-container");Fa.css("display","block");Q==m.CREATE&&Fa.append(Sa());var Ha=[];if(0<sa.length)for(var Ia=0;Ia<sa.length;Ia++){var Na=sa[Ia],Pa=new za;Pa.fromJsonObject(Na);Ha.push(Pa);Na=new m(Pa);Na.setType(Q);Na.setGlobal(E);Na.setCardSelectedListener(Ma);Na.setDelModelSetCallBack(aa);Na.setIsPreset(Q===m.PRESET);Fa.append(Na.getJqUi());e[Pa.getFId()]=Na}else Q!=m.COOPERATION&&Q!=m.PRESET||Fa.append(Qa(Q));b[Q]=Ha;Da.append(Fa);q.append(Da)});ra.subscribeChannel("modelSetCard",
Ea)}).loadAllModelSetInfo()},Ea=function(q){q=JSON.parse(q);var M=q.id,Q=q[ja.DATA_TABLE_MODEL]?Number(q[ja.DATA_TABLE_MODEL]):0,sa=q[ja.ENTITY_MODEL]?Number(q[ja.ENTITY_MODEL]):0,Da=q[ja.RELATION_MODEL]?Number(q[ja.RELATION_MODEL]):0,Fa=q[ja.METRICS_MODEL]?Number(q[ja.METRICS_MODEL]):0;$.each(b,function(Ha,Ia){for(Ha=0;Ha<Ia.length;Ha++)if(M==Ia[Ha].getFId()){Ia[Ha].setTableModelNum(Q);Ia[Ha].setEntityModelNum(sa);Ia[Ha].setRelationModelNum(Da);Ia[Ha].setMetricModelNum(Fa);e[M]&&e[M].updateModelNum();
break}})},Ma=function(q){w!=q&&(q.setSelected(!0),w&&w.setSelected(!1),w=q)},Qa=function(q){var M=$("<div>");M.addClass("no-modelset-display-container");var Q=$("<div>");Q.addClass("no-modelset-display-icon");J.background(Q,"icon-empty");M.append(Q);Q=$("<div>");Q.addClass("no-modelset-display-text");q==m.COOPERATION?Q.text(x.get("noCooperationModelSet","\u6682\u65e0\u53c2\u4e0e\u534f\u4f5c\u7684\u6a21\u578b\u96c6")):Q.text(x.get("noPreSetModelSet","\u6682\u65e0\u9884\u7f6e\u7684\u6a21\u578b\u96c6"));
M.append(Q);return M},Sa=function(){var q=$("<div>");q.addClass("modelset-create-card");var M=$("<div>");M.addClass("new-modelset-detail-container");M.on("click",Ua);var Q=$("<div>");Q.addClass("new-modelset-icon");J.background(Q,"btn-new-image");M.append(Q);l.layoutCtrlCenterAlign(Q,50);var sa=$("<div>");sa.addClass("new-modelset-text");sa.text(x.get("newModelSet","\u521b\u5efa\u6a21\u578b\u96c6"));sa.attr("title",x.get("newModelSet","\u521b\u5efa\u6a21\u578b\u96c6"));M.append(sa);q.append(M);q.on("mouseover",
function(){sa.css("color","#276FF5");J.background(Q,"btn-new-image-hover")});q.on("mouseout",function(){sa.css("color","#999999");J.background(Q,"btn-new-image")});return q},Ua=function(){var q=new Ba(new za);q.setGlobal(E);q.setSaveOrUpdateSuccessCallback(function(M){b[m.CREATE].unshift(M);var Q=new m(M);Q.setType(m.CREATE);Q.setGlobal(E);Q.setCardSelectedListener(Ma);Q.setDelModelSetCallBack(aa);M.setTableModelNum(0);M.setEntityModelNum(0);M.setRelationModelNum(0);e[M.getFId()]=Q;M=Q.getJqUi();
Q=$(".modelset-create .create-modelset-card-container");Q.children()[1]?M.insertBefore(Q.children()[1]):Q.append(M);E.getMessageCurtain().showSuccess(x.get("createDataModelSetTips","\u521b\u5efa\u6a21\u578b\u96c6\u6210\u529f\u3002"))});q.showDialog()},I=function(q){var M=$("<div>");M.addClass("title-container");var Q=$("<span class='title-icon'>");J.background(Q,"icon_down");Q.on("click",function(){var Ha=$;a:{switch(q){case m.CREATE:var Ia="modelset-create";break a;case m.COOPERATION:Ia="modelset-cooperation";
break a;case m.PRESET:Ia="modelset-preset";break a}Ia=void 0}(Ha=Ha("."+Ia).find("."+q.toLowerCase()+"-modelset-card-container"))&&"block"==Ha.css("display")?(Ha.hide(),J.background(Q,"icon-right")):(Ha.show(),J.background(Q,"icon_down"))});M.append(Q);var sa=$("<span class='title-name'>"),Da=sa.text;a:{switch(q){case m.CREATE:d="modelset-create modelset-title";var Fa=x.get("createdOfModelSet","\u6211\u521b\u5efa\u7684\u6a21\u578b\u96c6");break a;case m.COOPERATION:d="modelset-cooperation modelset-title";
Fa=x.get("cooperationOfModelSet","\u6211\u53c2\u4e0e\u534f\u4f5c\u7684\u6a21\u578b\u96c6");break a;case m.PRESET:d="modelset-preset modelset-title";Fa=x.get("preSetOfModelSet","\u5f53\u524d\u7cfb\u7edf\u9884\u7f6e\u7684\u6a21\u578b\u96c6");break a}Fa=void 0}Da.call(sa,Fa);M.append(sa);return M},aa=function(q,M){var Q=b[M],sa=Q.indexOf(q);e[q.getFId()]=void 0;-1<sa&&(Q.splice(sa,1),0==Q.length&&(M==m.COOPERATION?N.find(".cooperation-modelset-card-container").append(Qa(M)):M==m.PRESET&&N.find(".preset-modelset-card-container").append(Qa(M))))},
Ja=function(){E.createFacade(function(q){var M=new Ca;q?(M.fromJsonObject(q),q=new P,q.setRootNode(M),q.setGlobal(E),q.setMessageCurtain(E.getMessageCurtain()),q.showExportDialog()):E.getMessageCurtain().showPrompt(x.get("noModelSetForExport","\u6ca1\u6709\u53ef\u4f9b\u5bfc\u51fa\u7684\u6a21\u578b\u96c6\u3002"),2E3)},function(q,M){if(20009001===q)return q=x.get("invalidPermissionForExport","\u65e0\u5bfc\u51fa\u6743\u9650\u3002"),E.getMessageCurtain().showPrompt(q,2E3),!0}).getAllModelSetForExport()},
Ka=function(){E.createFacade(function(q){var M=new F;M.setGlobal(E);M.setPublic(q);M.showDialog()},function(q,M){return!1}).hasResourceManager()}};var ya,La,Ga,J,x,za,Oa,g,V,z,la,l,H,r,k,v,t,n,B,T,ea,ua,ra,ha,W,R,ja,Ca,P,va,A,F;(function(){var a=com.kingdee.bos.qing.modeler.modelset.common;ya=a.Facade;La=a.Integration;J=a.Icons;A=a.UserOperationReporter;a=com.kingdee.bos.qing.modeler.common.model;ja=a.ModelType;a=com.kingdee.bos.qing.modeler.common.ui;v=a.HeadImgGenerator;R=a.SearchNoDataContainer;
a=com.kingdee.bos.qing.common;Ga=a.Util;l=a.DomUtil;W=a.DateFormater;a=com.kingdee.bos.qing.framework.common;x=a.MultilanguageManager.createPackageAccessor(u);ua=a.WindowResizeObserver;ra=a.RemoteFramework;a=com.kingdee.bos.qing.modeler.modelset.model;za=a.ModelSetInfo;n=a.ValueTextPair;a=com.kingdee.bos.qing.ui.component;Oa=a.Dialog;g=a.MessageDialog;V=a.Label;z=a.TextField;la=a.TextArea;H=a.MessageCurtain;r=a.ToolbarButton;k=a.TabContainer;B=a.SearchBox;T=a.ComboBox;ea=a.List;ha=a.HelpIcon;a=com.kingdee.bos.qing.modeler.modelset.imexport;
P=a.ExportDialog;va=a.UploadPane;Ca=a.FolderNode;a=com.kingdee.bos.qing.integration;t=a.UserAndRoleForm;F=u.ResourceDetailDialog})();var E;u.PermChecker=new function(){this.check=function(d,b){var e=La.getRemoteImpl();(new ya(e,function(c){c?b?a(d):d&&d():E.getMessageCurtain().showPrompt(x.get("noMenuPermission","\u60a8\u6ca1\u6709\u5f53\u524d\u83dc\u5355\u6743\u9650\u3002"))},function(c){E.getMessageCurtain().showPrompt(x.get("noMenuPermission","\u60a8\u6ca1\u6709\u5f53\u524d\u83dc\u5355\u6743\u9650\u3002"));
return!1})).checkQingModelerPermission()};var a=function(d){var b=La.getRemoteImpl();(new ya(b,function(e){e?d&&d():E.getMessageCurtain().showPrompt(x.get("noPermissionViewPreset","\u60a8\u6ca1\u6709\u201c\u9884\u7f6e\u6a21\u578b\u96c6\u67e5\u8be2\u201d\u7684\u83dc\u5355\u6743\u9650\u3002"))},function(e){E.getMessageCurtain().showPrompt(x.get("noPermissionViewPreset","\u60a8\u6ca1\u6709\u201c\u9884\u7f6e\u6a21\u578b\u96c6\u67e5\u8be2\u201d\u7684\u83dc\u5355\u6743\u9650\u3002"));return!1})).checkQingModelerPresetPermission()}};
oa.USER="0";oa.ROLE="1";u.ModelSetCard=m;m.CREATE="CREATE";m.COOPERATION="COOPERATION";m.PRESET="PRESET";m.COOPERATION_ADMIN="0";m.DISABLED="1";m.ENABLED="0"})();
//qingVersionTag: 20250415