!function(){functiont(e){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(e)}functione(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functionr(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}functionn(t,e,n){returne&&r(t.prototype,e),n&&r(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}functiono(t,e,r){returneint?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}functioni(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){returne};vare={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeofSymbol?Symbol:{},s=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";functionl(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(T){l=function(t,e,r){returnt[e]=r}}functionp(t,e,r,n){vari=e&&e.prototypeinstanceofh?e:h,a=Object.create(i.prototype),s=newE(n||[]);returno(a,"_invoke",{value:L(t,r,s)}),a}functionf(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}e.wrap=p;vard={};functionh(){}functionv(){}functionm(){}varg={};l(g,s,(function(){returnthis}));vary=Object.getPrototypeOf,b=y&&y(y(O([])));b&&b!==r&&n.call(b,s)&&(g=b);varw=m.prototype=h.prototype=Object.create(g);functionx(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){returnthis._invoke(e,t)}))}))}functionk(e,r){functioni(o,a,s,c){varu=f(e[o],e,a);if("throw"!==u.type){varl=u.arg,p=l.value;returnp&&"object"==t(p)&&n.call(p,"__await")?r.resolve(p.__await).then((function(t){i("next",t,s,c)}),(function(t){i("throw",t,s,c)})):r.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){returni("throw",t,s,c)}))}c(u.arg)}vara;o(this,"_invoke",{value:function(t,e){functionn(){returnnewr((function(r,n){i(t,e,r,n)}))}returna=a?a.then(n,n):n()}})}functionL(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnI()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){vars=P(a,r);if(s){if(s===d)continue;returns}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";varc=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}functionP(t,e){varr=t.iterator[e.method];if(void0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void0,P(t,e),"throw"===e.method))returnd;e.method="throw",e.arg=newTypeError("The iterator does not provide a 'throw' method")}returnd}varn=f(r,t.iterator,e.arg);if("throw"===n.type)returne.method="throw",e.arg=n.arg,e.delegate=null,d;varo=n.arg;returno?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,d):o:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,d)}functionD(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionS(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionE(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}functionO(t){if(t){vare=t[s];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,o=functione(){for(;++r<t.length;)if(n.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returno.next=o}}return{next:I}}functionI(){return{value:void0,done:!0}}returnv.prototype=m,o(w,"constructor",{value:m,configurable:!0}),o(m,"constructor",{value:v,configurable:!0}),v.displayName=l(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(k.prototype),l(k.prototype,c,(function(){returnthis})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void0===i&&(i=Promise);vara=newk(p(t,r,n,o),i);returne.isGeneratorFunction(r)?a:a.next().then((function(t){returnt.done?t.value:a.next()}))},x(w),l(w,u,"Generator"),l(w,s,(function(){returnthis})),l(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},e.values=O,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(S),!t)for(vareinthis)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varo=this.tryEntries.length-1;o>=0;--o){vari=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){vars=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(s){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!c)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varo=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){vari=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),S(r),d}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;S(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:O(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),d}},e}functiona(t,e,r,n,o,i,a){try{vars=t[i](a),c=s.value}catch(u){returnvoidr(u)}s.done?e(c):Promise.resolve(c).then(n,o)}functions(t){returnfunction(){vare=this,r=arguments;returnnewPromise((function(n,o){vari=t.apply(e,r);functions(t){a(i,n,o,s,c,"next",t)}functionc(t){a(i,n,o,s,c,"throw",t)}s(void0)}))}}System.register(["@ibiz-template/runtime","@ibiz-template/controller","@ibiz-template/model","@ibiz-template/vue-util","vue","view-design","@ibiz-template/service"],(function(t,r){"use strict";vara,c,u,l,p,f,d,h,v,m,g,y,b,w,x,k,L,P,D,S;return{setters:[function(t){a=t.PluginStaticResource,c=t.AppFuncCommand},function(t){u=t.ListPortletController,l=t.AppMenuPortletController},function(t){p=t.ListPortletModel,f=t.AppMenuPortletModel,d=t.DefectModelError},function(t){h=t.useNamespace,v=t.useListController},function(t){m=t.defineComponent,g=t.ref,y=t.getCurrentInstance,b=t.onMounted,w=t.h,x=t.watch,k=t.onUnmounted},function(t){L=t.Tooltip,P=t.Button,D=t.Icon},function(t){S=t.CounterService}],execute:function(){varE=newa(r.meta.url),O=m({name:"AppPortalListPortlet",props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){vare=h("app-portal-list-portlet"),r=g([]),n=Array.from({length:3}).map((function(t,e){returnE.dir("/assets/img/app-portal-list-".concat(e,".svg"))})),o=y();if(o&&t.modelData.list){vara=v(o.proxy,t.modelData.list,t.controller.context);b((function(){a.nerve.self.evt.on("mounted",s(i().mark((functiont(){vare;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,a.load();case2:e=t.sent,r.value=e.slice(0,3);case4:case"end":returnt.stop()}}),t)}))))}))}return{ns:e,appPortalList:r,appPortalImgList:n,openPage:function(t){t&&window.open(t)}}},render:function(){vart=this;returnw("div",{class:this.ns.b()},[this.appPortalList.map((function(e,r){returnw("div",{class:[t.ns.b("item"),e.url?"":t.ns.bm("item","disabled")],key:e.srfkey,on:{click:function(){returnt.openPage(e.url)}}},[w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.srfmajortext])]),w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:t.appPortalImgList[r]}})])])}))])}}),I=function(){functiont(){e(this,t),o(this,"component",O)}varr;returnn(t,[{key:"createController",value:(r=s(i().mark((functiont(e,r,n){varo;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returno=newu(e,r,n),t.next=3,o.init();case3:returnt.abrupt("return",o);case4:case"end":returnt.stop()}}),t)}))),function(t,e,n){returnr.apply(this,arguments)})}]),t}(),T=m({name:"FuncDrawer",props:{isShowDrawer:{type:Boolean,required:!0,default:!1}},emits:{"on-close":function(){return!0}},setup:function(t,e){varr,n=e.emit,o=h("func-drawer"),i=E.dir("/assets/img/placeholder.svg"),a=g([]),s=g([]),c=g(!1),u=null===(r=y())||void0===r?void0:r.proxy,l=function(){ibiz.net.post("/appfuncs/fetchpersonfuncsetting",{page:0,size:1e3,sort:"showorder,asc"}).then((function(t){if(t.ok&&t.data&&t.data.length){vare={};s.value=t.data.filter((function(t){if(t.ispersonal||(t.ispersonal=0),t.pssystemappid){varr=t.pssystemappname;e[r]?e[r].push(t):e[r]=[t]}elsee["未分类"]?e["未分类"].push(t):e["未分类"]=[t];returnt.ispersonal})),a.value=Object.keys(e).map((function(t){return{name:t,items:e[t]}}))}}))},p=function(){c.value&&(s.value.forEach((function(t,e){t.showorder=e})),ibiz.net.post("/appfuncs/setfuncsetting",{setting:JSON.stringify({list:s.value})}).then((function(t){t.ok&&(null==u||u.$Notice.success({title:"成功",desc:"保存成功"}),l())}))),c.value=!c.value};x((function(){returnt.isShowDrawer}),(function(t){t&&l()}));varf=function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},d=function(t){t.preventDefault()},v=function(t,e,r,n){if(t.stopPropagation(),e.ispersonal=Number(!e.ispersonal),"remove"===n)s.value.splice(r,1);elseif("change"===n){varo=s.value.findIndex((function(t){returnt.pssysappfuncid===e.pssysappfuncid}));-1===o?s.value.push(e):s.value.splice(o,1)}};returnfunction(){returnw("div",{class:[o.b(),t.isShowDrawer?o.m("show"):""]},[w("div",{class:o.b("content")},[w("div",{class:o.b("group")},[w("header",{class:o.b("group-header")},[w("div",{class:o.b("group-header-left")},["常用应用"]),w("div",{class:o.b("group-header-right")},[w(P,{on:{click:p}},[c.value?"保存":"配置"]),w(P,{on:{click:function(){returnn("on-close")}}},["返回"])])]),w("main",{class:o.b("group-content")},[s.value.map((function(t,e){returnw("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){returnf(t.pssysappfuncid)},dragstart:function(t){returnfunction(t,e){varr;c.value&&(null===(r=t.dataTransfer)||void0===r||r.setData("originIndex",e.toString()))}(t,e)},dragover:d,drop:function(t){returnfunction(t,e){if(t.preventDefault(),c.value&&t.dataTransfer){varr=Number(t.dataTransfer.getData("originIndex"));if(r!==e){varn=s.value[r],o=s.value[e];s.value.splice(r,1,o),s.value.splice(e,1,n)}}}(t,e)}},attrs:{draggable:c.value}},[w("div",{class:[o.be("group-item","checkbox"),o.bem("group-item","checkbox","remove"),c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){returnv(r,t,e,"remove")}}},[w(D,{attrs:{type:"md-remove",size:16}})]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])]),a.value.map((function(t,e){returnw("div",{class:o.b("group"),key:e},[w("header",{class:o.b("group-header")},[t.name]),w("main",{class:o.b("group-content")},[t.items.map((function(t){returnw("div",{class:[o.b("group-item"),t.pssysappfuncid?"":o.bm("group-item","disabled")],key:t.pssysappfuncid,on:{click:function(){returnf(t.pssysappfuncid)}}},[w("div",{class:[o.be("group-item","checkbox"),t.ispersonal?o.bem("group-item","checkbox","selected"):"",c.value?o.bem("group-item","checkbox","show"):""],on:{click:function(r){returnv(r,t,e,"change")}}},[t.ispersonal?w(D,{attrs:{type:"md-checkmark",size:16}}):null]),w("div",{class:o.be("group-item","icon")},[w("img",{attrs:{src:t.icon||i,draggable:!1}})]),w(L,{attrs:{content:t.tip,disabled:!t.tip}},[w("div",{class:o.be("group-item","text")},[t.pssysappfuncname])])])}))])])}))])])}}}),C=m({name:"FuncPortalListPortlet",components:{FuncDrawer:T},props:{modelData:{type:p,required:!0},controller:{type:u,required:!0}},setup:function(t){vare=h("func-portal-list-portlet"),r=E.dir("/assets/img/quick-entry.svg"),n=E.dir("/assets/img/editor.svg"),o=E.dir("/assets/img/placeholder.svg"),a=g([]),c=y(),u=null;c&&t.modelData.list&&(u=v(c.proxy,t.modelData.list,t.controller.context),b((function(){vart;null===(t=u)||void0===t||t.nerve.self.evt.on("mounted",s(i().mark((functiont(){vare;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:if(!u){t.next=5;break}returnt.next=3,u.load();case3:e=t.sent,a.value=e;case5:case"end":returnt.stop()}}),t)}))))})));varl=g(!1),p=function(){vart=s(i().mark((functiont(){vare;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:if(l.value=!1,!u){t.next=6;break}returnt.next=4,u.load();case4:e=t.sent,a.value=e;case6:case"end":returnt.stop()}}),t)})));returnfunction(){returnt.apply(this,arguments)}}();return{ns:e,quickEntryImg:r,editorImg:n,placeholderImg:o,funcPortalList:a,openPage:function(t){t&&ibiz.net.get("/appfuncs/".concat(t,"/getfuncurl")).then((function(t){t.ok&&t.data&&t.data.url&&window.open(t.data.url)}))},isShowDrawer:l,isShowDrawerChange:p}},render:function(){vart=this;returnw("div",{class:this.ns.b()},[w("header",{class:this.ns.b("header")},[w("div",{class:this.ns.b("header-left")},[w("div",{class:this.ns.be("header-left","icon")},[w("img",{attrs:{src:this.quickEntryImg}})]),w("div",{class:this.ns.be("header-left","text")},["快速入口"])]),w("div",{class:this.ns.b("header-right"),on:{click:function(){t.isShowDrawer=!0}}},[w("div",{class:this.ns.be("header-right","icon")},[w("img",{attrs:{src:this.editorImg}})]),w("div",{class:this.ns.be("header-right","text")},["更多"])])]),w("div",{class:this.ns.e("divider")}),w("main",{class:this.ns.b("content")},[this.funcPortalList.map((function(e){returnw("div",{class:[t.ns.b("item"),e.pssysappfuncid?"":t.ns.bm("item","disabled")],key:e.pssysappfuncid,on:{click:function(){returnt.openPage(e.pssysappfuncid)}}},[w("div",{class:t.ns.be("item","icon")},[w("img",{attrs:{src:e.icon||t.placeholderImg}})]),w(L,{attrs:{content:e.tip,disabled:!e.tip}},[w("div",{class:t.ns.be("item","text")},[e.pssysappfuncname])])])}))]),w(T,{attrs:{isShowDrawer:this.isShowDrawer},on:{"on-close":this.isShowDrawerChange}})])}}),_=function(){functiont(){e(this,t),o(this,"component",C)}varr;returnn(t,[{key:"createController",value:(r=s(i().mark((functiont(e,r,n){varo;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returno=newu(e,r,n),t.next=3,o.init();case3:returnt.abrupt("return",o);case4:case"end":returnt.stop()}}),t)}))),function(t,e,n){returnr.apply(this,arguments)})}]),t}(),j=m({name:"TodoAppMenuPortlet",props:{modelData:{type:f,required:!0},controller:{type:l,required:!0}},setup:function(t){vare=h("todo-app-menu-portlet"),r=Array.from({length:5}).map((function(t,e){returnE.dir("/assets/img/todo-app-menu-".concat(e,".svg"))})),n=null,o=g({});if(t.modelData.appMenu){vara=t.modelData.appMenu.source.getPSAppCounterRef();a&&(b(s(i().mark((functiont(){returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,S.getCounterByRef(a);case2:(n=t.sent).onChange((function(t){o.value=t}));case4:case"end":returnt.stop()}}),t)})))),k((function(){vart;null===(t=n)||void0===t||t.destroy()})))}varu=function(){vare=s(i().mark((functione(r){varn;returni().wrap((function(e){for(;;)switch(e.prev=e.next){case0:if(n=r.source.getPSAppFunc()){e.next=6;break}if(!t.modelData.appMenu){e.next=4;break}thrownewd(t.modelData.appMenu.source,"未配置界面行为");case4:e.next=8;break;case6:returne.next=8,ibiz.commands.execute(c.TAG,n);case8:case"end":returne.stop()}}),e)})));returnfunction(t){returne.apply(this,arguments)}}();return{ns:e,todoImgList:r,counter:n,counterData:o,onClickMenuItem:u}},render:function(){vart,e=this;returnw("div",{class:this.ns.b()},[null===(t=this.modelData.appMenu)||void0===t?void0:t.items.map((function(t,r){returnw("div",{class:[e.ns.b("item"),t.source.getPSAppFunc()?"":e.ns.bm("item","disabled")],key:t.id,on:{click:function(){returne.onClickMenuItem(t)}}},[w("div",{class:e.ns.b("item-left")},[w("div",{class:e.ns.be("item-left","icon")},[w("img",{attrs:{src:e.todoImgList[r]}})])]),w("div",{class:e.ns.b("item-right")},[w("div",{class:e.ns.be("item-right","count")},[w("span",{class:[(e.counterData[t.counterId]||0)>99?e.ns.be("item-right","add"):""]},[(e.counterData[t.counterId]||0)>99?99:e.counterData[t.counterId]||0]),w("span",["件"])]),w(L,{attrs:{content:t.source.tooltip,disabled:!t.source.tooltip}},[w("div",{class:e.ns.be("item-right","text")},[t.label])])])])}))])}}),M=function(){functiont(){e(this,t),o(this,"component",j)}varr;returnn(t,[{key:"createController",value:(r=s(i().mark((functiont(e,r,n){varo;returni().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returno=newl(e,r,n),t.next=3,o.init();case3:returnt.abrupt("return",o);case4:case"end":returnt.stop()}}),t)}))),function(t,e,n){returnr.apply(this,arguments)})}]),t}();t("default",{mateUrl:r.meta.url,install:function(t){ibiz.register.portletPart.register("PORTLET_CUSTOM_AppPortalList",newI),ibiz.register.portletPart.register("PORTLET_CUSTOM_FuncPortalList",new_),ibiz.register.portletPart.register("PORTLET_CUSTOM_TodoAppMenu",newM)}})}}}))}();
!function(){functiont(e){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(e)}functione(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){returnr};varr={},n=Object.prototype,o=n.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeofSymbol?Symbol:{},c=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";functionl(t,e,r){returnObject.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(T){l=function(t,e,r){returnt[e]=r}}functionf(t,e,r,n){varo=e&&e.prototypeinstanceofm?e:m,a=Object.create(o.prototype),c=newN(n||[]);returni(a,"_invoke",{value:L(t,r,c)}),a}functionh(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(T){return{type:"throw",arg:T}}}r.wrap=f;vard={};functionm(){}functionp(){}functiony(){}varv={};l(v,c,(function(){returnthis}));varb=Object.getPrototypeOf,w=b&&b(b(S([])));w&&w!==n&&o.call(w,c)&&(v=w);varg=y.prototype=m.prototype=Object.create(v);functionx(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){returnthis._invoke(e,t)}))}))}functionk(e,r){functionn(i,a,c,s){varu=h(e[i],e,a);if("throw"!==u.type){varl=u.arg,f=l.value;returnf&&"object"==t(f)&&o.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):r.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){returnn("throw",t,c,s)}))}s(u.arg)}vara;i(this,"_invoke",{value:function(t,e){functiono(){returnnewr((function(r,o){n(t,e,r,o)}))}returna=a?a.then(o,o):o()}})}functionL(t,e,r){varn="suspendedStart";returnfunction(o,i){if("executing"===n)thrownewError("Generator is already running");if("completed"===n){if("throw"===o)throwi;returnC()}for(r.method=o,r.arg=i;;){vara=r.delegate;if(a){varc=O(a,r);if(c){if(c===d)continue;returnc}}if("next"===r.method)r.sent=r._sent=r.arg;elseif("throw"===r.method){if("suspendedStart"===n)thrown="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";vars=h(t,e,r);if("normal"===s.type){if(n=r.done?"completed":"suspendedYield",s.arg===d)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n="completed",r.method="throw",r.arg=s.arg)}}}functionO(t,e){varr=t.iterator[e.method];if(void0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void0,O(t,e),"throw"===e.method))returnd;e.method="throw",e.arg=newTypeError("The iterator does not provide a 'throw' method")}returnd}varn=h(r,t.iterator,e.arg);if("throw"===n.type)returne.method="throw",e.arg=n.arg,e.delegate=null,d;varo=n.arg;returno?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void0),e.delegate=null,d):o:(e.method="throw",e.arg=newTypeError("iterator result is not an object"),e.delegate=null,d)}functionE(t){vare={tryLoc:t[0]};1int&&(e.catchLoc=t[1]),2int&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}functionP(t){vare=t.completion||{};e.type="normal",deletee.arg,t.completion=e}functionN(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}functionS(t){if(t){vare=t[c];if(e)returne.call(t);if("function"==typeoft.next)returnt;if(!isNaN(t.length)){varr=-1,n=functione(){for(;++r<t.length;)if(o.call(t,r))returne.value=t[r],e.done=!1,e;returne.value=void0,e.done=!0,e};returnn.next=n}}return{next:C}}functionC(){return{value:void0,done:!0}}returnp.prototype=y,i(g,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:p,configurable:!0}),p.displayName=l(y,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){vare="function"==typeoft&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,l(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},r.awrap=function(t){return{__await:t}},x(k.prototype),l(k.prototype,s,(function(){returnthis})),r.AsyncIterator=k,r.async=function(t,e,n,o,i){void0===i&&(i=Promise);vara=newk(f(t,e,n,o),i);returnr.isGeneratorFunction(e)?a:a.next().then((function(t){returnt.done?t.value:a.next()}))},x(g),l(g,u,"Generator"),l(g,c,(function(){returnthis})),l(g,"toString",(function(){return"[object Generator]"})),r.keys=function(t){vare=Object(t),r=[];for(varnine)r.push(n);returnr.reverse(),functiont(){for(;r.length;){varn=r.pop();if(nine)returnt.value=n,t.done=!1,t}returnt.done=!0,t}},r.values=S,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void0,this.done=!1,this.delegate=null,this.method="next",this.arg=void0,this.tryEntries.forEach(P),!t)for(vareinthis)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void0)},stop:function(){this.done=!0;vart=this.tryEntries[0].completion;if("throw"===t.type)throwt.arg;returnthis.rval},dispatchException:function(t){if(this.done)throwt;vare=this;functionr(r,n){returna.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void0),!!n}for(varn=this.tryEntries.length-1;n>=0;--n){vari=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)returnr("end");if(i.tryLoc<=this.prev){varc=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0);if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}elseif(c){if(this.prev<i.catchLoc)returnr(i.catchLoc,!0)}else{if(!s)thrownewError("try statement without catch or finally");if(this.prev<i.finallyLoc)returnr(i.finallyLoc)}}}},abrupt:function(t,e){for(varr=this.tryEntries.length-1;r>=0;--r){varn=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){vari=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);vara=i?i.completion:{};returna.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throwt.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.finallyLoc===t)returnthis.complete(r.completion,r.afterLoc),P(r),d}},catch:function(t){for(vare=this.tryEntries.length-1;e>=0;--e){varr=this.tryEntries[e];if(r.tryLoc===t){varn=r.completion;if("throw"===n.type){varo=n.arg;P(r)}returno}}thrownewError("illegal catch attempt")},delegateYield:function(t,e,r){returnthis.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void0),d}},r}functionr(t,e,r,n,o,i,a){try{varc=t[i](a),s=c.value}catch(u){returnvoidr(u)}c.done?e(s):Promise.resolve(s).then(n,o)}functionn(t){returnfunction(){vare=this,n=arguments;returnnewPromise((function(o,i){vara=t.apply(e,n);functionc(t){r(a,o,i,c,s,"next",t)}functions(t){r(a,o,i,c,s,"throw",t)}c(void0)}))}}functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functioni(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}functiona(t,e,r){returne&&i(t.prototype,e),r&&i(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionc(t,e){returnc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){returnt.__proto__=e,t},c(t,e)}functions(t){vare=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();returnfunction(){varr,n=f(t);if(e){varo=f(this).constructor;r=Reflect.construct(n,arguments,o)}elser=n.apply(this,arguments);returnu(this,r)}}functionu(e,r){if(r&&("object"===t(r)||"function"==typeofr))returnr;if(void0!==r)thrownewTypeError("Derived constructors may only return object or undefined");returnl(e)}functionl(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}functionf(t){returnf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){returnt.__proto__||Object.getPrototypeOf(t)},f(t)}functionh(t,e,r){returneint?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}System.register(["@ibiz-template/controller","vue","@ibiz-template/vue-util","@ibiz-template/core","@ibiz-template/model"],(function(t,r){"use strict";vari,u,f,d,m,p,y,v,b,w,g,x,k,L,O,E,P;return{setters:[function(t){i=t.GridFieldColumnController,u=t.GridRowController,f=t.WFStepTraceViewController},function(t){d=t.defineComponent,m=t.computed,p=t.h,y=t.getCurrentInstance,v=t.ref},function(t){b=t.useNamespace,w=t.useViewController,g=t.usePropsWatch,x=t.useWFStepTraceViewController,k=t.useWFDynaEditView3Controller,L=t.useEditView3Controller},function(t){O=t.colorBlend,E=t.IBizContext},function(t){P=t.ViewType}],execute:function(){varN=d({name:"CodeListGridColumn",props:{controller:{type:i,required:!0},row:{type:u,required:!0}},setup:function(t){vare=b("grid-field-column"),r=m((function(){varr;if("FRONT"!==t.controller.model.source.cLConvertMode)return[];varn=t.row.data[t.controller.model.codeName];returnnull!==(r=t.controller.codeListItems)&&void0!==r&&r.length&&n?n.split(",").map((function(r){varn=t.controller.codeListItems.find((function(t){returnt.value===r}));if(n){varo=n.color||"#515a6e";return{text:n.text,colorStyle:e.cssVarBlock({color:o,"border-color":o,"bg-color":O(o,"#fff")})}}})).filter(Boolean):[]})),n=m((function(){varr="";switch(t.controller.model.align){case"LEFT":r="flex-start";break;case"RIGHT":r="flex-end";break;default:r="center"}returne.cssVarBlock({"justify-content":r})}));return{ns:e,alignStyle:n,selectedItems:r,onCellClick:function(e){t.controller.isLinkColumn&&t.controller.openLinkView(t.row,e)}}},render:function(){vart=this,e=this.controller,r=this.row.data[e.model.codeName];returnp("div",{class:[this.ns.b(),e.isLinkColumn&&this.ns.m("link-column")],style:this.alignStyle,on:{click:this.onCellClick}},[this.selectedItems.length>0?this.selectedItems.map((function(e){returnp("span",{class:t.ns.e("code-list-item"),style:e.colorStyle},[e.text])})):p("span",{class:this.ns.e("text")},[r])])}}),S=function(t){!function(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);varr,i=s(u);functionu(){vart;o(this,u);for(vare=arguments.length,r=newArray(e),n=0;n<e;n++)r[n]=arguments[n];returnh(l(t=i.call.apply(i,[this].concat(r))),"imgSrc",void0),t}returna(u,[{key:"getUIData",value:(r=n(e().mark((functiont(){varr,n,o;returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnr=newE(this.params,this.context),t.next=3,this.entityService.wf.getWFProcessDiagram(r);case3:n=t.sent,o=newBlob([n.data]),this.imgSrc=URL.createObjectURL(o);case6:case"end":returnt.stop()}}),t,this)}))),function(){returnr.apply(this,arguments)})}]),u}(f),C=d({name:"PresetWFChartView",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(t){vare=b("preset-wf-chart-view"),r=y().proxy,n=w(r,(function(e,r){returnnewS(t.modelPath,e,r)}));returng(r,"deName",n.setDeName.bind(n)),{c:n,ns:e}},render:function(){returnp("div",{class:this.ns.b()},[p("img",{attrs:{src:this.c.imgSrc}})])}}),T=a((functiont(){o(this,t),h(this,"component",C)})),j=function(){functiont(){o(this,t),h(this,"component",N)}varr;returna(t,[{key:"createController",value:(r=n(e().mark((functiont(r,n){varo;returne().wrap((function(t){for(;;)switch(t.prev=t.next){case0:returno=newi(r,n),t.next=3,o.init();case3:returnt.abrupt("return",o);case4:case"end":returnt.stop()}}),t)}))),function(t,e){returnr.apply(this,arguments)})}]),t}(),_=a((functiont(){o(this,t),h(this,"component","IndexView")})),I=d({name:"WFStepTraceGrid",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object},deName:{type:String,required:!0}},setup:function(t){vare=y().proxy,r=x(e,t.modelPath);g(e,"deName",r.setDeName.bind(r));varn=b("wf-step-trace-grid"),o=v([]);r.nerve.self.evt.on("mounted",(function(){vart;r.data&&(null===(t=r.data.usertasks)||void0===t||t.forEach((function(t){t.identitylinks.length>0||(t.comments.length>0&&t.comments.forEach((function(e){o.value.push({nodeName:t.userTaskName,personName:e.authorName,time:e.time,content:e.type,comment:e.fullMessage})})),o.value.sort((function(t,e){returnDate.parse(e.time)-Date.parse(t.time)})))})))}));vari=v([{title:"处理环节",key:"nodeName",width:180,resizable:!0},{title:"处理人",key:"personName",width:180,resizable:!0},{title:"处理时间",key:"time",width:180,resizable:!0},{title:"处理内容",key:"content",width:180,resizable:!0},{title:"处理意见",key:"comment"}]);return{c:r,ns:n,gridData:o,columns:i}},render:function(){returnp("div",{class:this.ns.b()},[p("div",{class:this.ns.e("title")},["审批信息"]),p("i-table",{attrs:{"disabled-hover":!0,columns:this.columns,data:this.gridData},class:this.ns.e("grid")}),";"])}}),V=d({props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(t){vare=y().proxy,r=k(e,t.modelPath),n=b("view-".concat(P.DE_WF_DYNA_EDIT_VIEW3).toLowerCase()),o=v(["mainForm"]);return{c:r,ns:n,onTabClick:function(t){o.value.includes(t)||o.value.push(t)},lazyList:o}},render:function(t){vare=this,r=[];if(this.c.complete){varn=this.c.activeForm;n&&this.c.providers[n.name]&&r.push(t(this.c.providers[n.name].component,{props:{modelData:n,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit("form")}}))}if(this.c.complete&&this.c.model.drTab.pages[0]){varo=this.c.model.drTab.pages[0],i=this.c.drPages[o.source.name];r.push(t(I,{attrs:{context:i.context,params:i.params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:o.embedView.source.modelPath}}))}returnt("view-base",{attrs:{controller:this.c},scopedSlots:{toolbar:function(){returne.c.complete?[e.c.wfLinks.length>0&&t("wf-toolbar",{attrs:{wfLinks:e.c.wfLinks},on:{"wf-link-click":function(t){e.c.onLinkClick(t)}}})]:null}}},[this.c.complete&&t("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[t("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[r]),this.c.model.drTab.pages.map((function(r){varn=e.c.drPages[r.source.name];returnt("i-tab-pane",{class:e.ns.be("","tab-item"),attrs:{tab:e.c.model.drTab.source.name,disabled:e.c.isNewData,label:r.source.caption,name:r.source.name}},[!e.c.isNewData&&e.lazyList.includes(r.source.name)&&t("ViewShell",{props:{context:n.context,params:n.params,modal:e.modal,modelPath:r.embedView.source.modelPath,deName:e.c.model.appEntity.source.codeName},on:{neuronInit:e.c.nerve.onNeuronInit(r.source.name)},key:n.key})])}))])])}}),D=a((functiont(){o(this,t),h(this,"component",V)})),F=d({name:"SyEditView3",props:{context:Object,params:{type:Object},modelPath:{type:String,required:!0},modal:{type:Object}},setup:function(t){vare=y().proxy,r=L(e,t.modelPath),n=b("view-deeditview3"),o=v(["mainForm"]);return{c:r,ns:n,onTabClick:function(t){o.value.includes(t)||o.value.push(t)},lazyList:o}},render:function(t){vare=this;returnt("view-base",{attrs:{controller:this.c}},[this.c.complete&&t("i-tabs",{class:[this.ns.be("","tab")],attrs:{name:this.c.model.drTab.source.name},on:{"on-click":this.onTabClick}},[t("i-tab-pane",{class:this.ns.be("","tab-item"),attrs:{tab:this.c.model.drTab.source.name,label:this.c.model.drTab.source.editItemCaption,name:"mainForm"}},[t("edit-form-control",{attrs:{modelData:this.c.model.form,context:this.c.context,params:this.c.params},style:{height:"auto"},on:{neuronInit:this.c.nerve.onNeuronInit(this.c.model.form.source.name)}}),t(I,{attrs:{context:this.c.drPages[this.c.model.drTab.pages[0].source.name].context,params:this.c.drPages[this.c.model.drTab.pages[0].source.name].params,deName:this.c.model.appEntity.source.codeName,modal:this.modal,modelPath:this.c.model.drTab.pages[0].embedView.source.modelPath}}),","]),this.c.model.drTab.pages.map((function(r){varn=e.c.drPages[r.source.name];if(n)returnt("i-tab-pane",{class:e.ns.be("","tab-item"),attrs:{tab:e.c.model.drTab.source.name,disabled:e.c.isNewData,label:r.source.caption,name:r.source.name}},[!e.c.isNewData&&e.lazyList.includes(r.source.name)&&t("ViewShell",{props:{context:n.context,params:n.params,modal:e.modal,modelPath:r.embedView.source.modelPath,deName:e.c.model.appEntity.source.codeName},on:{neuronInit:e.c.nerve.onNeuronInit(r.source.name)},key:n.key})])}))])])}}),z=a((functiont(){o(this,t),h(this,"component",F)}));t("default",{mateUrl:r.meta.url,install:function(t){ibiz.register.view.register("VIEW_CUSTOM_SyWebIndexView",new_),ibiz.register.view.register("VIEW_CUSTOM_PresetWFChartView",newT),ibiz.register.gridColumn.register("GRID_COLRENDER_CodeListGridColumn",newj),ibiz.register.view.register("VIEW_CUSTOM_SyWfDynaEditView3",newD),ibiz.register.view.register("VIEW_CUSTOM_SyEditView3",newz)}})}}}))}();