@ibiz-template/runtime 0.0.1-alpha.35 → 0.0.1-alpha.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- System.register(["@ibiz-template/service","@ibiz-template/command","@ibiz-template/core","qx-util","@ibiz-template/model"],(function(e){"use strict";var t,n,r,i,o,a,c,u,s;return{setters:[null,function(e){t=e.commands},function(e){n=e.RuntimeError,r=e.IBizContext},function(e){i=e.notNilEmpty,o=e.isNilOrEmpty},function(e){a=e.UnsupportedModelError,c=e.DefectModelError,u=e.getPSUIActionByModelObject,s=e.AppEntityModel}],execute:function(){e({convertNavData:A,convertNavDataByArray:P,convertNavDataByObject:b,executeNewDataAppUILogic:k,executeOpenDataAppUILogic:L,executeViewLogic:function(e,t,n,r,i){void 0===i&&(i={});return f(this,void 0,void 0,(function(){var o;return d(this,(function(a){switch(a.label){case 0:return"opendata"===e.name&&e.getPSAppUILogic()?[2,L(e.getPSAppUILogic(),t,n,r,i)]:"newdata"===e.name&&e.getPSAppUILogic()?[2,k(e.getPSAppUILogic(),t,n,r,i)]:[4,u(e.getPSAppViewUIAction())];case 1:if(!(o=a.sent()))throw new Error("找不到界面行为");return[2,m.exec(o,t,n,r,i)]}}))}))},install:function(){var e=window.ibiz;e.commands=t,e.register=new y,U(),M()},installCommand:U,openRedirectView:V,presetUIActionProvider:M});var l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)};function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function w(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function h(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var g=e("RegisterBase",function(){function e(){this.providers=new Map}return e.prototype.register=function(e,t){this.providers.set(e,t)},e.prototype.unRegister=function(e){this.providers.delete(e)},e.prototype.getByKey=function(e){return this.providers.get(e)},e}()),S=e("UIActionRegister",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.get=function(e){return f(this,void 0,void 0,(function(){var t,r,i,o,a,c;return d(this,(function(u){switch(u.label){case 0:return e.getPSSysPFPlugin()?[4,ibiz.plugin.loadPlugin(e.getPSSysPFPlugin())]:[3,2];case 1:if(u.sent(),t=e.getPSSysPFPlugin(),r=t.pluginType,i=t.pluginCode,c="".concat(r,"_").concat(i),this.providers.has(c))return[2,this.providers.get(c)];throw new n("找不到插件标识".concat(c,"对应的适配器"));case 2:if(o=e.uIActionMode,a=e.uIActionTag,"SYS"===o){if(c="".concat(o,"_").concat(a),this.providers.has(c))return[2,this.providers.get(c)];throw new n("找不到系统预置界面行为".concat(a,"对应的适配器"))}if(this.providers.has(o))return[2,this.providers.get(o)];throw new n("找不界面行为模式".concat(o,"对应的适配器"))}}))}))},t}(g)),y=e("RegisterCenter",(function(){this.uiAction=new S}));function A(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return"[object Array]"===Object.prototype.toString.call(e)?P.apply(void 0,h([e],v(t),!1)):"[object Object]"===Object.prototype.toString.call(e)?b.apply(void 0,h([e],v(t),!1)):{}}function P(e){for(var t,n,r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var c={},u=function(e){if(i(e.value)&&!e.rawValue){var t=r.find((function(t){return!o(t)&&(t[e.value]||Object.prototype.hasOwnProperty.call(t,e.value))}));t&&(c[e.key]=t[e.value])}else c[e.key]=e.value};try{for(var s=w(e),l=s.next();!l.done;l=s.next()){var p=l.value;u(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return c}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={},o=/^%(.+)%$/,a=function(n){if(i(e[n])&&o.test(e[n])){var a=e[n].substring(1,e[n].length-1),c=t.find((function(e){return Object.prototype.hasOwnProperty.call(e,a)}));c&&(r[n]=c[a])}else r[n]=e[n]};for(var c in e)a(c);return r}var m=e("AppDEUIActionUtil",function(){function e(){}return e.exec=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){return d(this,(function(o){switch(o.label){case 0:return[4,ibiz.register.uiAction.get(e)];case 1:return[4,o.sent().getHandler()];case 2:return[2,o.sent().exec(e,t,n,r,i)]}}))}))},e}()),E=e("UIActionHandler",function(){function e(){}return e.prototype.exec=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var o,a,c;return d(this,(function(u){switch(u.label){case 0:return[4,this.isConfirm(e)];case 1:return u.sent()?(o=i.neuron,a={refresh:e.reloadData,closeView:e.closeEditView},[4,this.execAction(e,t,n,r,i)]):[2,{}];case 2:return c=u.sent(),Object.assign(a,c),[4,this.doNextAction(e,t,n,r,i)];case 3:return u.sent(),[4,this.handleResult(a,o)];case 4:return u.sent(),[2,a]}}))}))},e.prototype.isConfirm=function(e){return f(this,void 0,void 0,(function(){return d(this,(function(t){return e.enableConfirm&&e.confirmMsg?[2,ibiz.modal.confirm({title:e.confirmMsg})]:[2,!0]}))}))},e.prototype.doNextAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var o;return d(this,(function(a){switch(a.label){case 0:return(o=e.getNextPSUIAction())?[4,m.exec(o,t,n,r,i)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))},e.prototype.handleResult=function(e,t){return f(this,void 0,void 0,(function(){return d(this,(function(r){switch(r.label){case 0:if(!e.closeView)return[3,2];if(!t.call.closeView)throw new n("该视图不存在关闭视图能力");return[4,t.call.closeView()];case 1:return r.sent(),[2];case 2:if(!e.refresh)return[3,4];if(!t.call.refresh)throw new n("该视图不存在刷新能力");return[4,t.call.refresh()];case 3:r.sent(),r.label=4;case 4:return[2]}}))}))},e.handleParams=function(e,t,n,o){return f(this,void 0,void 0,(function(){var a,c,u,s,l,p,f,w,v;return d(this,(function(d){switch(d.label){case 0:if(a=n||[],-1!==["SINGLEDATA","MULTIDATA","MULTIKEY"].indexOf(e.actionTarget))throw new Error("数据类型".concat(e.actionTarget,"暂未支持,请配置无数据或单项数据主键"));return"NONE"===e.actionTarget&&(a=[]),c={},u=e.getPSNavigateContexts()||[],(s=e.getPSAppDataEntity())&&"SINGLEKEY"===e.actionTarget?[4,null==s?void 0:s.fill(!0)]:[3,2];case 1:d.sent(),l=s.codeName.toLowerCase(),p=e.valueItem,u.unshift({key:l,value:p||"srfkey",rawValue:!1}),d.label=2;case 2:return i(u)&&(c=A(u,t,o,(null==n?void 0:n[0])||{})),f=new r(c,t),w={},v=e.getPSNavigateParams(),i(v)&&(w=A(v,t,o,(null==n?void 0:n[0])||{})),[2,{resultContext:f,resultData:a,resultParams:w}]}}))}))},e}()),x=e("CommonSysUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var t,r,o,a,c;return d(this,(function(u){switch(u.label){case 0:if(r=(t=i).neuron,o=t.event,a=e.uIActionTag,c={},"New"!==a)return[3,2];if(!r.call.newData)throw new Error("该视图不存在newData能力");return[4,r.call.newData(o)];case 1:u.sent(),u.label=2;case 2:if("Edit"!==a)return[3,4];if(!r.call.openData)throw new Error("该视图不存在openData能力");return[4,r.call.openData(null==n?void 0:n[0],o)];case 3:u.sent(),u.label=4;case 4:if(-1===["SaveAndExit","Save","SaveRow"].indexOf(a))return[3,6];if(!r.call.save)throw new Error("该视图不存在save能力");return[4,r.call.save()];case 5:u.sent(),u.label=6;case 6:if("SaveAndNew"!==a)return[3,8];if(!r.call.saveAndNew)throw new Error("该视图不存在saveAndNew能力");return[4,r.call.saveAndNew()];case 7:u.sent(),u.label=8;case 8:if("Remove"!==a&&"RemoveAndExit"!==a)return[3,10];if(!r.call.remove)throw new Error("该视图不存在remove能力");return[4,r.call.remove()];case 9:u.sent(),u.label=10;case 10:if("NewRow"!==a)return[3,12];if(!r.call.newRow)throw new Error("该视图不存在newRow能力");return[4,r.call.newRow()];case 11:u.sent(),u.label=12;case 12:if("ToggleFilter"===a){if(!r.call.toggleFilter)throw new Error("该视图不存在ToggleFilter能力");r.call.toggleFilter()}if("SaveAndStart"!==a)return[3,14];if(!r.call.wfStart)throw new Error("该视图不存在SaveAndStart能力");return[4,r.call.wfStart()];case 13:u.sent(),u.label=14;case 14:if("ViewWFStep"!==a)return[3,16];if(!r.call.wfSubmit)throw new Error("该视图不存在ViewWFStep能力");return[4,r.call.wfSubmit()];case 15:u.sent(),u.label=16;case 16:return-1!==["SaveAndExit","Exit","RemoveAndExit"].indexOf(a)&&(c.closeView=!0),-1!==["Refresh"].indexOf(a)&&(c.refresh=!0),[2,c]}}))}))},t}(E)),D=e("BackendUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){var o,a;return f(this,void 0,void 0,(function(){var n,i;return d(this,(function(c){switch(c.label){case 0:if(n=null===(o=e.getPSAppDataEntity())||void 0===o?void 0:o.codeName,i=null===(a=e.getPSAppDEMethod())||void 0===a?void 0:a.codeName,!n||!i)throw new Error("找不到实体或实体行为");return[4,ibiz.entityService.getService(n)];case 1:return[4,c.sent().exec(i,t,r)];case 2:return c.sent(),[2,{}]}}))}))},t}(E)),N=e("FrontUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var n;return d(this,(function(o){switch(o.label){case 0:if(!(n=e.getFrontPSAppView()))throw new Error("未配置打开视图");return[4,n.fill(!0)];case 1:return o.sent(),[4,ibiz.commands.execute(T.TAG,n,t,r,i)];case 2:return o.sent(),[2,{}]}}))}))},t}(E));function V(e,t,n,i){return void 0===t&&(t=new r),void 0===n&&(n={}),void 0===i&&(i=[]),f(this,void 0,void 0,(function(){return d(this,(function(r){if(e.instanceof("app.view.IPSAppDERedirectView"))return[2,O(e,t,n,i)];throw new a(e,"未支持的重定向视图类型: ".concat(e.viewType))}))}))}function O(e,t,n,i){return void 0===t&&(t=new r),void 0===n&&(n={}),void 0===i&&(i=[]),f(this,void 0,void 0,(function(){var o,a,u,s,l,p,f,w,v,h,g,S,y,P,b,m,E;return d(this,(function(d){switch(d.label){case 0:return o=e.getPSAppViewNavContexts()||[],a=A(o,t,n),t=new r(a,t),u=e.getPSAppViewNavParams()||[],s=A(u,t,n),Object.assign(n,s),[4,(l=e.getPSAppDataEntity()).fill(!0)];case 1:return d.sent(),p=l.codeName.toLowerCase(),f=i[0]||{},t[p]=f[p]||t[p]||n[p],w=e.getGetDataPSAppDEAction(),[4,ibiz.entityService.getService(l.codeName)];case 2:return v=d.sent(),ibiz.loading.showRedirect(),[4,v.exec(w?w.codeName:"Get",t,n)];case 3:return h=d.sent(),ibiz.loading.hideRedirect(),h.ok&&(f=h.data,g=f.linkurl)?g.startsWith("http://")||g.startsWith("https://")?(window.open(g,"_blank"),[2,{ok:!0,data:[]}]):[2,{ok:!1,data:[]}]:[4,R(l,e,n.srfwf,f)];case 4:return S=d.sent(),y="".concat(l.name.toUpperCase(),":").concat(S),P=e.getRedirectPSAppViewRefs(),b=null==P?void 0:P.find((function(e){return e.name===y||e.name===S})),b?(m=b.getRefPSAppView())?[4,ibiz.commands.execute(T.TAG,m,t,n,{data:[f]})]:[3,6]:[3,7];case 5:return(E=d.sent())?[2,E]:[3,7];case 6:throw new c(b,"未配置实际引用视图");case 7:return[2,{ok:!0,data:[]}]}}))}))}function R(e,t,n,r){return f(this,void 0,void 0,(function(){var a,c,u,s,l;return d(this,(function(p){return"",(a=t.getTypePSAppDEField())&&(c=r[a.codeName.toLowerCase()],i(c))?[2,"RDITEM:".concat(c)]:i(n)?[2,"EDITVIEW:".concat(n.toUpperCase())]:(u="",(s=e.getIndexTypePSAppDEField())&&(u=r[s.codeName.toLowerCase()]),o(u)&&(l=e.getFormTypePSAppDEField())&&(u=r[l.codeName.toLowerCase()]),[2,i(u)?"EDITVIEW:".concat(u):"EDITVIEW"])}))}))}var T=e("OpenAppViewCommand",function(){function e(){ibiz.commands.register(e.TAG,this.exec.bind(this))}return e.prototype.exec=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),f(this,void 0,void 0,(function(){var i;return d(this,(function(o){switch(o.label){case 0:return[4,e.fill(!0)];case 1:if(o.sent(),e.redirectView)return[2,V(e,t,n,r.data)];switch(i=e.openMode,void 0===i?"INDEXVIEWTAB":i){case"INDEXVIEWTAB":default:return[2,this.openIndexViewTab(e,t,n)];case"POPUP":throw new Error("未支持的视图打开模式: POPUP");case"POPUPMODAL":return[2,this.openModal(e,t,n)];case"POPUPAPP":throw new Error("未支持的视图打开模式: POPUPAPP");case"POPOVER":return[2,this.openPopover(e,t,n)];case"DRAWER_LEFT":case"DRAWER_RIGHT":case"DRAWER_TOP":case"DRAWER_BOTTOM":return[2,this.openDrawer(e,t,n)];case"USER":return[2,this.openUserCustom(e,t,n)]}return[2]}}))}))},e.prototype.openIndexViewTab=function(e,t,n){return void 0===n&&(n={}),ibiz.openView.root(e,t,n)},e.prototype.openModal=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.modal(e,t,n)]}))}))},e.prototype.openPopover=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.popover(e,t,n)]}))}))},e.prototype.openDrawer=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.drawer(e,t,n)]}))}))},e.prototype.openUserCustom=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.custom(e,t,n)]}))}))},e.TAG="ibiz.app-view.open",e}()),I=e("AppFuncCommand",function(){function e(){ibiz.commands.register(e.TAG,this.exec.bind(this))}return e.prototype.exec=function(e,t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),f(this,void 0,void 0,(function(){var o,a;return d(this,(function(c){switch((o=e.getPSNavigateContexts())&&(t?Object.assign(t,o):t=new r(o)),(a=e.getPSNavigateParams())&&Object.assign(n,a),e.appFuncType){case"APPVIEW":return[2,this.openAppView(e,t,n,i)];case"OPENHTMLPAGE":return[2,this.openHtmlPage(e)];case"PDTAPPFUNC":return[2,this.openPdAppFunc(e,t,n)];case"JAVASCRIPT":return[2,this.executeJavaScript(e,t,n)];case"CUSTOM":return[2,this.custom(e,t,n)];default:throw new Error("未知的应用功能类型: ".concat(e.appFuncType))}}))}))},e.prototype.openAppView=function(e,t,n,r){var i=e.getPSAppView();if(!i)throw new Error("应用视图不存在");return ibiz.commands.execute(T.TAG,i,t,n,r)},e.prototype.openHtmlPage=function(e){var t=e.htmlPageUrl;window.open(t,"_blank")},e.prototype.openPdAppFunc=function(e,t,n){throw console.log("openPdAppFunc",e,t,n),new Error("未实现")},e.prototype.executeJavaScript=function(e,t,n){throw console.log("executeJavaScript",e,t,n),new Error("未实现")},e.prototype.custom=function(e,t,n){throw console.log("custom",e,t,n),new Error("未实现")},e.TAG="ibiz.app-func.exec",e}());function U(){new I,new T}var C,_=e("BackendUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new D),[2,this.handler]}))}))},e}()),z=e("CommonSysUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new x),[2,this.handler]}))}))},e}()),F=e("FrontUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new N),[2,this.handler]}))}))},e}());function M(){var e=ibiz.register.uiAction;e&&(e.register("FRONT",new F),e.register("BACKEND",new _),e.register("SYS_New",new z),e.register("SYS_New",new z),e.register("SYS_Edit",new z),e.register("SYS_Save",new z),e.register("SYS_SaveAndExit",new z),e.register("SYS_SaveRow",new z),e.register("SYS_SaveAndNew",new z),e.register("SYS_Remove",new z),e.register("SYS_RemoveAndExit",new z),e.register("SYS_NewRow",new z),e.register("SYS_SaveAndStart",new z),e.register("SYS_ViewWFStep",new z),e.register("SYS_ToggleFilter",new z),e.register("SYS_Exit",new z),e.register("SYS_Refresh",new z))}function L(e,t,n,o,a){return void 0===a&&(a={}),f(this,void 0,void 0,(function(){var c,u,l,p,f,w,v,h;return d(this,(function(d){switch(d.label){case 0:if(!(null==n?void 0:n[0]))throw Error("没有选中数据!");if(!(c=e.getOpenDataPSAppView()))throw new Error("getOpenDataPSAppView为空");if(!(u=c.getRefPSAppView()))throw new Error("openView为空");return[4,u.fill(!0)];case 1:return d.sent(),[4,(l=new s(u.getPSAppDataEntity())).init()];case 2:return d.sent(),p=c.getPSNavigateContexts()||[],f=l.deName.toLowerCase(),-1===p.findIndex((function(e){return e.key===f}))&&p.push({key:f,value:f,rawValue:!1}),w=new r(A(p,t,o,n[0]),t),v={},h=c.getPSNavigateParams(),i(h)&&(v=A(h,o,t,n[0])),[4,ibiz.commands.execute(T.TAG,u,w,v,a)];case 3:return d.sent(),a.neuron.call.refresh(),[2,{}]}}))}))}function k(e,t,n,o,a){return void 0===a&&(a={}),f(this,void 0,void 0,(function(){var c,u,l,p,f,w,v,h;return d(this,(function(d){switch(d.label){case 0:if(!(c=e.getNewDataPSAppView()))throw new Error("getNewDataPSAppView为空");if(!(u=c.getRefPSAppView()))throw new Error("newView为空");return[4,u.fill(!0)];case 1:return d.sent(),[4,(l=new s(u.getPSAppDataEntity())).init()];case 2:return d.sent(),p={},f={},w=(null==n?void 0:n[0])||{},v=c.getPSNavigateContexts(),i(v)&&(p=A(v,t,o,w)),delete(p=new r(p,t))[l.deName.toLowerCase()],p[l.deName.toLowerCase()]=void 0,h=c.getPSNavigateParams(),i(h)&&(f=A(h,o,t,w)),e.enableWizardAdd||e.enableBatchAdd||e.batchAddOnly,[4,ibiz.commands.execute(T.TAG,u,p,f,a)];case 3:return d.sent(),a.neuron.call.refresh(),[2,{}]}}))}))}e("ViewMode",C),function(e){e.ROUTE="ROUTE",e.MODAL="MODAL",e.DRAWER="DRAWER",e.EMBED="EMBED",e.POPOVER="POPOVER"}(C||e("ViewMode",C={}))}}}));
1
+ System.register(["@ibiz-template/service","@ibiz-template/command","@ibiz-template/core","qx-util","@ibiz-template/model"],(function(e){"use strict";var t,n,r,i,o,a,c,u,s;return{setters:[null,function(e){t=e.commands},function(e){n=e.RuntimeError,r=e.IBizContext},function(e){i=e.notNilEmpty,o=e.isNilOrEmpty},function(e){a=e.UnsupportedModelError,c=e.DefectModelError,u=e.getPSUIActionByModelObject,s=e.AppEntityModel}],execute:function(){e({convertNavData:A,convertNavDataByArray:P,convertNavDataByObject:b,executeNewDataAppUILogic:k,executeOpenDataAppUILogic:M,executeViewLogic:function(e,t,n,r,i){void 0===i&&(i={});return f(this,void 0,void 0,(function(){var o;return d(this,(function(a){switch(a.label){case 0:return"opendata"===e.name&&e.getPSAppUILogic()?[2,M(e.getPSAppUILogic(),t,n,r,i)]:"newdata"===e.name&&e.getPSAppUILogic()?[2,k(e.getPSAppUILogic(),t,n,r,i)]:[4,u(e.getPSAppViewUIAction())];case 1:if(!(o=a.sent()))throw new Error("找不到界面行为");return[2,m.exec(o,t,n,r,i)]}}))}))},install:function(){var e=window.ibiz;e.commands=t,e.register=new y,U(),L()},installCommand:U,openRedirectView:V,presetUIActionProvider:L});var l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},l(e,t)};function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function f(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function c(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function w(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function h(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}var g=e("RegisterBase",function(){function e(){this.providers=new Map}return e.prototype.register=function(e,t){this.providers.set(e,t)},e.prototype.unRegister=function(e){this.providers.delete(e)},e.prototype.getByKey=function(e){return this.providers.get(e)},e}()),S=e("UIActionRegister",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.get=function(e){return f(this,void 0,void 0,(function(){var t,r,i,o,a,c;return d(this,(function(u){switch(u.label){case 0:return e.getPSSysPFPlugin()?[4,ibiz.plugin.loadPlugin(e.getPSSysPFPlugin())]:[3,2];case 1:if(u.sent(),t=e.getPSSysPFPlugin(),r=t.pluginType,i=t.pluginCode,c="".concat(r,"_").concat(i),this.providers.has(c))return[2,this.providers.get(c)];throw new n("找不到插件标识".concat(c,"对应的适配器"));case 2:if(o=e.uIActionMode,a=e.uIActionTag,"SYS"===o){if(c="".concat(o,"_").concat(a),this.providers.has(c))return[2,this.providers.get(c)];throw new n("找不到系统预置界面行为".concat(a,"对应的适配器"))}if(this.providers.has(o))return[2,this.providers.get(o)];throw new n("找不界面行为模式".concat(o,"对应的适配器"))}}))}))},t}(g)),y=e("RegisterCenter",(function(){this.uiAction=new S}));function A(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return"[object Array]"===Object.prototype.toString.call(e)?P.apply(void 0,h([e],v(t),!1)):"[object Object]"===Object.prototype.toString.call(e)?b.apply(void 0,h([e],v(t),!1)):{}}function P(e){for(var t,n,r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];var c={},u=function(e){if(i(e.value)&&!e.rawValue){var t=r.find((function(t){return!o(t)&&(t[e.value]||Object.prototype.hasOwnProperty.call(t,e.value))}));t&&(c[e.key]=t[e.value])}else c[e.key]=e.value};try{for(var s=w(e),l=s.next();!l.done;l=s.next()){var p=l.value;u(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return c}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r={},o=/^%(.+)%$/,a=function(n){if(i(e[n])&&o.test(e[n])){var a=e[n].substring(1,e[n].length-1),c=t.find((function(e){return Object.prototype.hasOwnProperty.call(e,a)}));c&&(r[n]=c[a])}else r[n]=e[n]};for(var c in e)a(c);return r}var m=e("AppDEUIActionUtil",function(){function e(){}return e.exec=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){return d(this,(function(o){switch(o.label){case 0:return[4,ibiz.register.uiAction.get(e)];case 1:return[4,o.sent().getHandler()];case 2:return[2,o.sent().exec(e,t,n,r,i)]}}))}))},e}()),E=e("UIActionHandler",function(){function e(){}return e.prototype.exec=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var o,a,c;return d(this,(function(u){switch(u.label){case 0:return[4,this.isConfirm(e)];case 1:return u.sent()?(o=i.neuron,a={refresh:e.reloadData,closeView:e.closeEditView},[4,this.execAction(e,t,n,r,i)]):[2,{}];case 2:return c=u.sent(),Object.assign(a,c),[4,this.doNextAction(e,t,n,r,i)];case 3:return u.sent(),[4,this.handleResult(a,o)];case 4:return u.sent(),[2,a]}}))}))},e.prototype.isConfirm=function(e){return f(this,void 0,void 0,(function(){return d(this,(function(t){return e.enableConfirm&&e.confirmMsg?[2,ibiz.modal.confirm({title:e.confirmMsg})]:[2,!0]}))}))},e.prototype.doNextAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var o;return d(this,(function(a){switch(a.label){case 0:return(o=e.getNextPSUIAction())?[4,m.exec(o,t,n,r,i)]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}}))}))},e.prototype.handleResult=function(e,t){return f(this,void 0,void 0,(function(){return d(this,(function(r){switch(r.label){case 0:if(!e.closeView)return[3,2];if(!t.call.closeView)throw new n("该视图不存在关闭视图能力");return[4,t.call.closeView()];case 1:return r.sent(),[2];case 2:if(!e.refresh)return[3,4];if(!t.call.refresh)throw new n("该视图不存在刷新能力");return[4,t.call.refresh()];case 3:r.sent(),r.label=4;case 4:return[2]}}))}))},e.handleParams=function(e,t,n,o){return f(this,void 0,void 0,(function(){var a,c,u,s,l,p,f,w,v;return d(this,(function(d){switch(d.label){case 0:if(a=n||[],-1!==["SINGLEDATA","MULTIDATA","MULTIKEY"].indexOf(e.actionTarget))throw new Error("数据类型".concat(e.actionTarget,"暂未支持,请配置无数据或单项数据主键"));return"NONE"===e.actionTarget&&(a=[]),c={},u=e.getPSNavigateContexts()||[],(s=e.getPSAppDataEntity())&&"SINGLEKEY"===e.actionTarget?[4,null==s?void 0:s.fill(!0)]:[3,2];case 1:d.sent(),l=s.codeName.toLowerCase(),p=e.valueItem,u.unshift({key:l,value:p||"srfkey",rawValue:!1}),d.label=2;case 2:return i(u)&&(c=A(u,t,o,(null==n?void 0:n[0])||{})),f=new r(c,t),w={},v=e.getPSNavigateParams(),i(v)&&(w=A(v,t,o,(null==n?void 0:n[0])||{})),[2,{resultContext:f,resultData:a,resultParams:w}]}}))}))},e}()),x=e("CommonSysUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var t,r,o,a,c;return d(this,(function(u){switch(u.label){case 0:if(r=(t=i).neuron,o=t.event,a=e.uIActionTag,c={},"New"!==a)return[3,2];if(!r.call.newData)throw new Error("该视图不存在newData能力");return[4,r.call.newData(o)];case 1:u.sent(),u.label=2;case 2:if("Edit"!==a)return[3,4];if(!r.call.openData)throw new Error("该视图不存在openData能力");return[4,r.call.openData(null==n?void 0:n[0],o)];case 3:u.sent(),u.label=4;case 4:if(-1===["SaveAndExit","Save","SaveRow"].indexOf(a))return[3,6];if(!r.call.save)throw new Error("该视图不存在save能力");return[4,r.call.save()];case 5:u.sent(),u.label=6;case 6:if("SaveAndNew"!==a)return[3,8];if(!r.call.saveAndNew)throw new Error("该视图不存在saveAndNew能力");return[4,r.call.saveAndNew()];case 7:u.sent(),u.label=8;case 8:if("Remove"!==a&&"RemoveAndExit"!==a)return[3,10];if(!r.call.remove)throw new Error("该视图不存在remove能力");return[4,r.call.remove()];case 9:u.sent(),u.label=10;case 10:if("NewRow"!==a)return[3,12];if(!r.call.newRow)throw new Error("该视图不存在newRow能力");return[4,r.call.newRow()];case 11:u.sent(),u.label=12;case 12:if("ToggleFilter"===a){if(!r.call.toggleFilter)throw new Error("该视图不存在ToggleFilter能力");r.call.toggleFilter()}if("SaveAndStart"!==a)return[3,14];if(!r.call.wfStart)throw new Error("该视图不存在SaveAndStart能力");return[4,r.call.wfStart()];case 13:u.sent(),u.label=14;case 14:if("ViewWFStep"!==a)return[3,16];if(!r.call.wfSubmit)throw new Error("该视图不存在ViewWFStep能力");return[4,r.call.wfSubmit()];case 15:u.sent(),u.label=16;case 16:return-1!==["SaveAndExit","Exit","RemoveAndExit"].indexOf(a)&&(c.closeView=!0),-1!==["Refresh"].indexOf(a)&&(c.refresh=!0),[2,c]}}))}))},t}(E)),D=e("BackendUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){var o,a;return f(this,void 0,void 0,(function(){var n,i;return d(this,(function(c){switch(c.label){case 0:if(n=null===(o=e.getPSAppDataEntity())||void 0===o?void 0:o.codeName,i=null===(a=e.getPSAppDEMethod())||void 0===a?void 0:a.codeName,!n||!i)throw new Error("找不到实体或实体行为");return[4,ibiz.entityService.getService(n)];case 1:return[4,c.sent().exec(i,t,r)];case 2:return c.sent(),[2,{}]}}))}))},t}(E)),N=e("FrontUIActionHandler",function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return p(t,e),t.prototype.execAction=function(e,t,n,r,i){return f(this,void 0,void 0,(function(){var n;return d(this,(function(o){switch(o.label){case 0:if(!(n=e.getFrontPSAppView()))throw new Error("未配置打开视图");return[4,n.fill(!0)];case 1:return o.sent(),[4,ibiz.commands.execute(T.TAG,n,t,r,i)];case 2:return o.sent(),[2,{}]}}))}))},t}(E));function V(e,t,n,i){return void 0===t&&(t=new r),void 0===n&&(n={}),void 0===i&&(i=[]),f(this,void 0,void 0,(function(){return d(this,(function(r){if(e.instanceof("app.view.IPSAppDERedirectView"))return[2,O(e,t,n,i)];throw new a(e,"未支持的重定向视图类型: ".concat(e.viewType))}))}))}function O(e,t,n,i){return void 0===t&&(t=new r),void 0===n&&(n={}),void 0===i&&(i=[]),f(this,void 0,void 0,(function(){var o,a,u,s,l,p,f,w,v,h,g,S,y,P,b,m,E;return d(this,(function(d){switch(d.label){case 0:return o=e.getPSAppViewNavContexts()||[],a=A(o,t,n),t=new r(a,t),u=e.getPSAppViewNavParams()||[],s=A(u,t,n),Object.assign(n,s),[4,(l=e.getPSAppDataEntity()).fill(!0)];case 1:return d.sent(),p=l.codeName.toLowerCase(),f=i[0]||{},t[p]=f[p]||t[p]||n[p],w=e.getGetDataPSAppDEAction(),[4,ibiz.entityService.getService(l.codeName)];case 2:return v=d.sent(),ibiz.loading.showRedirect(),[4,v.exec(w?w.codeName:"Get",t,n)];case 3:return h=d.sent(),ibiz.loading.hideRedirect(),h.ok&&(f=h.data,g=f.linkurl)?g.startsWith("http://")||g.startsWith("https://")?(window.open(g,"_blank"),[2,{ok:!0,data:[]}]):[2,{ok:!1,data:[]}]:[4,R(l,e,n.srfwf,f)];case 4:return S=d.sent(),y="".concat(l.name.toUpperCase(),":").concat(S),P=e.getRedirectPSAppViewRefs(),b=null==P?void 0:P.find((function(e){return e.name===y||e.name===S})),b?(m=b.getRefPSAppView())?[4,ibiz.commands.execute(T.TAG,m,t,n,{data:[f]})]:[3,6]:[3,7];case 5:return(E=d.sent())?[2,E]:[3,7];case 6:throw new c(b,"未配置实际引用视图");case 7:return[2,{ok:!0,data:[]}]}}))}))}function R(e,t,n,r){return f(this,void 0,void 0,(function(){var a,c,u,s,l;return d(this,(function(p){return"",(a=t.getTypePSAppDEField())&&(c=r[a.codeName.toLowerCase()],i(c))?[2,c]:i(n)?[2,"EDITVIEW:".concat(n.toUpperCase())]:(u="",(s=e.getIndexTypePSAppDEField())&&(u=r[s.codeName.toLowerCase()]),o(u)&&(l=e.getFormTypePSAppDEField())&&(u=r[l.codeName.toLowerCase()]),[2,i(u)?"EDITVIEW:".concat(u):"EDITVIEW"])}))}))}var T=e("OpenAppViewCommand",function(){function e(){ibiz.commands.register(e.TAG,this.exec.bind(this))}return e.prototype.exec=function(e,t,n,r){return void 0===n&&(n={}),void 0===r&&(r={}),f(this,void 0,void 0,(function(){var i;return d(this,(function(o){switch(o.label){case 0:return[4,e.fill(!0)];case 1:if(o.sent(),e.redirectView)return[2,V(e,t,n,r.data)];switch(i=e.openMode,void 0===i?"INDEXVIEWTAB":i){case"INDEXVIEWTAB":default:return[2,this.openIndexViewTab(e,t,n)];case"POPUP":throw new Error("未支持的视图打开模式: POPUP");case"POPUPMODAL":return[2,this.openModal(e,t,n)];case"POPUPAPP":throw new Error("未支持的视图打开模式: POPUPAPP");case"POPOVER":return[2,this.openPopover(e,t,n)];case"DRAWER_LEFT":case"DRAWER_RIGHT":case"DRAWER_TOP":case"DRAWER_BOTTOM":return[2,this.openDrawer(e,t,n)];case"USER":return[2,this.openUserCustom(e,t,n)]}return[2]}}))}))},e.prototype.openIndexViewTab=function(e,t,n){return void 0===n&&(n={}),ibiz.openView.root(e,t,n)},e.prototype.openModal=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.modal(e,t,n)]}))}))},e.prototype.openPopover=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.popover(e,t,n)]}))}))},e.prototype.openDrawer=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.drawer(e,t,n)]}))}))},e.prototype.openUserCustom=function(e,t,n){return void 0===n&&(n={}),f(this,void 0,void 0,(function(){return d(this,(function(r){return[2,ibiz.openView.custom(e,t,n)]}))}))},e.TAG="ibiz.app-view.open",e}()),I=e("AppFuncCommand",function(){function e(){ibiz.commands.register(e.TAG,this.exec.bind(this))}return e.prototype.exec=function(e,t,n,i){return void 0===n&&(n={}),void 0===i&&(i={}),f(this,void 0,void 0,(function(){var o,a;return d(this,(function(c){switch((o=e.getPSNavigateContexts())&&(t?Object.assign(t,o):t=new r(o)),(a=e.getPSNavigateParams())&&Object.assign(n,a),e.appFuncType){case"APPVIEW":return[2,this.openAppView(e,t,n,i)];case"OPENHTMLPAGE":return[2,this.openHtmlPage(e)];case"PDTAPPFUNC":return[2,this.openPdAppFunc(e,t,n)];case"JAVASCRIPT":return[2,this.executeJavaScript(e,t,n)];case"CUSTOM":return[2,this.custom(e,t,n)];default:throw new Error("未知的应用功能类型: ".concat(e.appFuncType))}}))}))},e.prototype.openAppView=function(e,t,n,r){var i=e.getPSAppView();if(!i)throw new Error("应用视图不存在");return ibiz.commands.execute(T.TAG,i,t,n,r)},e.prototype.openHtmlPage=function(e){var t=e.htmlPageUrl;window.open(t,"_blank")},e.prototype.openPdAppFunc=function(e,t,n){throw console.log("openPdAppFunc",e,t,n),new Error("未实现")},e.prototype.executeJavaScript=function(e,t,n){throw console.log("executeJavaScript",e,t,n),new Error("未实现")},e.prototype.custom=function(e,t,n){throw console.log("custom",e,t,n),new Error("未实现")},e.TAG="ibiz.app-func.exec",e}());function U(){new I,new T}var C,_=e("BackendUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new D),[2,this.handler]}))}))},e}()),z=e("CommonSysUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new x),[2,this.handler]}))}))},e}()),F=e("FrontUIActionProvider",function(){function e(){}return e.prototype.getHandler=function(){return f(this,void 0,void 0,(function(){return d(this,(function(e){return this.handler||(this.handler=new N),[2,this.handler]}))}))},e}());function L(){var e=ibiz.register.uiAction;e&&(e.register("FRONT",new F),e.register("BACKEND",new _),e.register("SYS_New",new z),e.register("SYS_New",new z),e.register("SYS_Edit",new z),e.register("SYS_Save",new z),e.register("SYS_SaveAndExit",new z),e.register("SYS_SaveRow",new z),e.register("SYS_SaveAndNew",new z),e.register("SYS_Remove",new z),e.register("SYS_RemoveAndExit",new z),e.register("SYS_NewRow",new z),e.register("SYS_SaveAndStart",new z),e.register("SYS_ViewWFStep",new z),e.register("SYS_ToggleFilter",new z),e.register("SYS_Exit",new z),e.register("SYS_Refresh",new z))}function M(e,t,n,o,a){return void 0===a&&(a={}),f(this,void 0,void 0,(function(){var c,u,l,p,f,w,v,h;return d(this,(function(d){switch(d.label){case 0:if(!(null==n?void 0:n[0]))throw Error("没有选中数据!");if(!(c=e.getOpenDataPSAppView()))throw new Error("getOpenDataPSAppView为空");if(!(u=c.getRefPSAppView()))throw new Error("openView为空");return[4,u.fill(!0)];case 1:return d.sent(),[4,(l=new s(u.getPSAppDataEntity())).init()];case 2:return d.sent(),p=c.getPSNavigateContexts()||[],f=l.deName.toLowerCase(),-1===p.findIndex((function(e){return e.key===f}))&&p.push({key:f,value:f,rawValue:!1}),w=new r(A(p,t,o,n[0]),t),v={},h=c.getPSNavigateParams(),i(h)&&(v=A(h,o,t,n[0])),[4,ibiz.commands.execute(T.TAG,u,w,v,a)];case 3:return d.sent(),a.neuron.call.refresh(),[2,{}]}}))}))}function k(e,t,n,o,a){return void 0===a&&(a={}),f(this,void 0,void 0,(function(){var c,u,l,p,f,w,v,h;return d(this,(function(d){switch(d.label){case 0:if(!(c=e.getNewDataPSAppView()))throw new Error("getNewDataPSAppView为空");if(!(u=c.getRefPSAppView()))throw new Error("newView为空");return[4,u.fill(!0)];case 1:return d.sent(),[4,(l=new s(u.getPSAppDataEntity())).init()];case 2:return d.sent(),p={},f={},w=(null==n?void 0:n[0])||{},v=c.getPSNavigateContexts(),i(v)&&(p=A(v,t,o,w)),delete(p=new r(p,t))[l.deName.toLowerCase()],p[l.deName.toLowerCase()]=void 0,h=c.getPSNavigateParams(),i(h)&&(f=A(h,o,t,w)),e.enableWizardAdd||e.enableBatchAdd||e.batchAddOnly,[4,ibiz.commands.execute(T.TAG,u,p,f,a)];case 3:return d.sent(),a.neuron.call.refresh(),[2,{}]}}))}))}e("ViewMode",C),function(e){e.ROUTE="ROUTE",e.MODAL="MODAL",e.DRAWER="DRAWER",e.EMBED="EMBED",e.POPOVER="POPOVER"}(C||e("ViewMode",C={}))}}}));
@@ -14,8 +14,8 @@ export interface IPluginFactory {
14
14
  * @author chitanda
15
15
  * @date 2022-10-21 16:10:27
16
16
  * @param {IPSSysPFPlugin} plugin
17
- * @return {*} {Promise<void>}
17
+ * @return {*} {Promise<boolean>}
18
18
  */
19
- loadPlugin(plugin: IPSSysPFPlugin): Promise<void>;
19
+ loadPlugin(plugin: IPSSysPFPlugin): Promise<boolean>;
20
20
  }
21
21
  //# sourceMappingURL=i-plugin-factory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"i-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/interface/i-plugin-factory/i-plugin-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD"}
1
+ {"version":3,"file":"i-plugin-factory.d.ts","sourceRoot":"","sources":["../../../src/interface/i-plugin-factory/i-plugin-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACtD"}
@@ -109,7 +109,7 @@ export async function calcDERdTag(entity, rdView, wfStep, data) {
109
109
  if (typeField) {
110
110
  const value = data[typeField.codeName.toLowerCase()];
111
111
  if (notNilEmpty(value)) {
112
- return `RDITEM:${value}`;
112
+ return value;
113
113
  }
114
114
  }
115
115
  // 如果流程步骤存在,按照工作流优先
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/runtime",
3
- "version": "0.0.1-alpha.35",
3
+ "version": "0.0.1-alpha.37",
4
4
  "description": "控制器包",
5
5
  "type": "module",
6
6
  "main": "out/index.js",
@@ -28,20 +28,20 @@
28
28
  "author": "chitanda",
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
- "@ibiz-template/command": "^0.0.1-alpha.33"
31
+ "@ibiz-template/command": "^0.0.1-alpha.37"
32
32
  },
33
33
  "devDependencies": {
34
- "@ibiz-template/core": "^0.0.1-alpha.34",
35
- "@ibiz-template/model": "^0.0.1-alpha.35",
36
- "@ibiz-template/service": "^0.0.1-alpha.35",
34
+ "@ibiz-template/core": "^0.0.1-alpha.37",
35
+ "@ibiz-template/model": "^0.0.1-alpha.37",
36
+ "@ibiz-template/service": "^0.0.1-alpha.37",
37
37
  "@types/systemjs": "^6.1.1",
38
- "qx-util": "0.4.3"
38
+ "qx-util": "^0.4.4"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@ibiz-template/core": "^0.0.1-alpha.2",
42
42
  "@ibiz-template/model": "^0.0.1-alpha.2",
43
43
  "@ibiz-template/service": "^0.0.1-alpha.2",
44
- "qx-util": "^0.4.1"
44
+ "qx-util": "^0.4.4"
45
45
  },
46
- "gitHead": "2f24a28135863df067c5decf73ea859bf8204b67"
46
+ "gitHead": "5dc73da226eb8c5863add2ee60a25d0251a26ed3"
47
47
  }
@@ -15,7 +15,7 @@ export interface IPluginFactory {
15
15
  * @author chitanda
16
16
  * @date 2022-10-21 16:10:27
17
17
  * @param {IPSSysPFPlugin} plugin
18
- * @return {*} {Promise<void>}
18
+ * @return {*} {Promise<boolean>}
19
19
  */
20
- loadPlugin(plugin: IPSSysPFPlugin): Promise<void>;
20
+ loadPlugin(plugin: IPSSysPFPlugin): Promise<boolean>;
21
21
  }
@@ -151,7 +151,7 @@ export async function calcDERdTag(
151
151
  if (typeField) {
152
152
  const value = data[typeField.codeName.toLowerCase()];
153
153
  if (notNilEmpty(value)) {
154
- return `RDITEM:${value}`;
154
+ return value;
155
155
  }
156
156
  }
157
157
  // 如果流程步骤存在,按照工作流优先