@ibiz-template/vue3-util 0.5.0 → 0.5.1-beta.2
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.
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/es/common/code-list/code-list.mjs +1 -1
- package/es/common/control-base/control-base.mjs +2 -2
- package/es/common/control-shell/control-shell.mjs +1 -1
- package/es/common/icon/icon.mjs +1 -1
- package/es/control/panel/panel/panel.mjs +1 -1
- package/es/control/panel/view-layout-panel/view-layout-panel.mjs +1 -1
- package/es/panel-component/multi-data-container/multi-data-container.controller.mjs +5 -5
- package/es/panel-component/nav-pos/nav-pos.controller.mjs +2 -2
- package/es/panel-component/panel-container-image/panel-container-image.mjs +3 -3
- package/es/panel-component/panel-ctrl-pos/panel-ctrl-pos.mjs +1 -1
- package/es/panel-component/scroll-container/scroll-container/scroll-container.mjs +1 -1
- package/es/panel-component/single-data-container/single-data-container.controller.mjs +5 -5
- package/es/plugin/plugin-factory/plugin-factory.mjs +8 -8
- package/es/use/control/use-control-controller/use-control-controller.mjs +2 -2
- package/es/use/view/use-view-controller/use-view-controller.mjs +2 -2
- package/es/util/control/prepare-control.mjs +1 -1
- package/es/util/route/route.mjs +7 -7
- package/es/view/common/view.mjs +1 -1
- package/es/view/de-redirect-view/de-redirect-view.d.ts +2 -0
- package/es/view/de-redirect-view/de-redirect-view.d.ts.map +1 -1
- package/es/view/de-redirect-view/de-redirect-view.mjs +15 -9
- package/es/view/de-redirect-view/index.d.ts +1 -0
- package/es/view/de-redirect-view/index.d.ts.map +1 -1
- package/es/view/todo-redirect/todo-redirect.mjs +5 -5
- package/package.json +7 -7
- package/src/view/de-redirect-view/de-redirect-view.tsx +19 -14
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-
|
|
1
|
+
.ibiz-control-shell{position:relative;width:100%;height:100%}.ibiz-code-list__item{display:flex;align-items:center;color:var(--ibiz-code-list-item-color);display:flex;align-items:center;justify-content:flex-start}.ibiz-code-list .ibiz-icon{display:inline-flex;padding-right:var(--ibiz-spacing-tight)}.ibiz-view-shell{position:relative;width:100%;height:100%}.ibiz-view{--ibiz-view-bg-color:var(--ibiz-color-bg-1);--ibiz-view-border-radius:var(--ibiz-border-radius-medium);width:100%;height:100%}.ibiz-view .ibiz-view{background-color:var(--ibiz-view-bg-color);border-radius:var(--ibiz-view-border-radius)}.ibiz-view .ibiz-view-appportalview{background-color:rgba(0,0,0,0)}.ibiz-view.has-top-message,.ibiz-view.has-bottom-message{display:flex;flex-flow:column nowrap}.ibiz-view.has-top-message>.ibiz-view-message,.ibiz-view.has-bottom-message>.ibiz-view-message{flex-grow:0;flex-shrink:0}.ibiz-view.has-top-message>.ibiz-control-viewlayoutpanel,.ibiz-view.has-bottom-message>.ibiz-control-viewlayoutpanel{flex-grow:1;flex-shrink:1}.ibiz-panel-ctrl-pos{width:100%;height:100%}.ibiz-panel-ctrl-pos.is-hidden{display:none}.ibiz-panel-container{width:100%;height:100%}.ibiz-panel-container>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container.is-hidden{display:none}.ibiz-panel-field{--ibiz-form-item-label-color:var(--ibiz-color-text-1);--ibiz-form-item-text-color:var(--ibiz-color-text-2);--ibiz-form-item-hover-color:var(--ibiz-color-text-0);--ibiz-form-item-hover-bg-color:var(--ibiz-color-fill-1);--ibiz-form-item-readonly-color:var(--ibiz-color-disabled-text);--ibiz-form-item-border-color:transparent;--ibiz-form-item-font-size:var(--ibiz-font-size-regular);--ibiz-form-item-placeholder-color:var(--ibiz-color-text-3);--ibiz-form-item-disabled-color:var(--ibiz-color-disabled-text);--ibiz-form-item-disabled-bg-color:var(--ibiz-color-disabled-fill);--ibiz-form-item-disabled-border-color:var(--ibiz-color-disabled-border);--ibiz-form-item-active-bg:var(--ibiz-color-fill-2);--ibiz-form-item-active-border:var(--ibiz-active-bg);--ibiz-form-item-focus-bg:var(--ibiz-color-fill-0);--ibiz-form-item-focus-border:var(--ibiz-color-focus-border);--ibiz-form-item-line-height:var(--ibiz-editor-default-line-height);--ibiz-form-item-font-weight:var(--ibiz-font-weight-regular);width:100%;height:100%}.ibiz-panel-field .ibiz-panel-field-content{line-height:inherit}.ibiz-nav-pos{width:100%;height:100%}.ibiz-panel-rawitem{width:100%;height:100%}.ibiz-panel-rawitem .ibiz-panel-rawitem-content{width:100%}.ibiz-multi-data-container{width:100%;height:100%}.ibiz-scroll-container-item{width:100%;height:100%;overflow:auto}.ibiz-scroll-container-item.is-hidden{display:none}.ibiz-scroll-container{width:100%;height:100%;display:flex;flex-flow:column nowrap}.ibiz-scroll-container.is-hidden{display:none}.ibiz-scroll-container-content{flex-grow:1;overflow:auto;display:flex}.ibiz-scroll-container-content__center{flex-grow:1;overflow:auto}.ibiz-scroll-container-content__left{overflow:auto}.ibiz-scroll-container-content__right{overflow:auto}.ibiz-scroll-container-header{overflow:auto}.ibiz-scroll-container-footer{overflow:auto}.ibiz-single-data-container{width:100%;height:100%}.ibiz-panel-container-image{position:relative;width:100%;height:100%;background-repeat:no-repeat;background-position:center center}.ibiz-panel-container-image>.ibiz-row{height:100%;overflow-x:hidden;overflow-y:auto}.ibiz-panel-container-image.is-hidden{display:none}.ibiz-grid-container{--ibiz-grid-container-bg-color:var(--ibiz-bg-color-overlay);--ibiz-grid-container-padding:var(--ibiz-padding);width:100%;height:100%;overflow:auto}.ibiz-grid-container.is-hidden{display:none}.ibiz-panel-container-group{--ibiz-panel-container-group-bg-color:transparent;--ibiz-panel-container-group-header-bg-color:transparent;--ibiz-panel-container-group-header-padding:var(--ibiz-spacing-base-tight);--ibiz-panel-container-group-header-border-color:var(--ibiz-color-border);--ibiz-panel-container-group-header-height:49px;--ibiz-panel-container-group-caption-text-color:var(--ibiz-color-text-0);--ibiz-panel-container-group-caption-font-size:var(--ibiz-font-size-header-5);--ibiz-panel-container-group-caption-font-weight:var(--ibiz-font-weight-bold);--ibiz-panel-container-group-content-bg-color:transparent;--ibiz-panel-container-group-content-padding:var(--ibiz-spacing-tight)}.ibiz-panel-container-group{height:100%;background-color:var(--ibiz-panel-container-group-bg-color);border-radius:var(--ibiz-border-radius-base)}.ibiz-panel-container-group__caption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--ibiz-panel-container-group-caption-font-size);font-weight:var(--ibiz-panel-container-group-caption-font-weight);color:var(--ibiz-panel-container-group-caption-text-color)}.ibiz-panel-container-group-collapse>.ibiz-panel-container-group-content{display:block}.ibiz-panel-container-group-collapse.is-collapse>.ibiz-panel-container-group-content{display:none}.ibiz-panel-container-group-header{display:flex;height:var(--ibiz-panel-container-group-header-height);padding:var(--ibiz-panel-container-group-header-padding);margin:var(--ibiz-panel-container-group-header-margin);border-bottom:1px solid var(--ibiz-panel-container-group-header-border-color)}.ibiz-panel-container-group-header__left,.ibiz-panel-container-group-header__right{display:inline-block;width:50%}.ibiz-panel-container-group-header__right{text-align:right;display:flex;align-items:center;justify-content:flex-end}.ibiz-panel-container-group-content{width:100%;height:100%}.ibiz-panel-container-group-content>.ibiz-row{width:100%;height:100%}.ibiz-panel-container-group--show-header>.ibiz-panel-container-group-content{height:calc(100% - var(--ibiz-panel-container-group-header-height));padding:var(--ibiz-panel-container-group-content-padding);background-color:var(--ibiz-panel-container-group-content-bg-color)}.ibiz-control-viewlayoutpanel{width:100%;height:100%}.ibiz-control-viewlayoutpanel-content{width:100%;height:100%}.ibiz-control-panel{width:100%;height:100%}.ibiz-control-panel-content{width:100%;height:100%}
|
package/dist/index.system.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia","dayjs","lodash-es"],(function(t){"use strict";var e,n,o,s,a,r,i,l,c,u,d,h,p,m,f,v,g,y,w,C,b,I,P,D,N,E,O,A,x,R,S,z,B,T,j,V,L,M,k,$,_,G,W,q,F,U,K,H,X,Q,Y,J,Z,tt,et,nt,ot,st,at,rt,it,lt,ct,ut,dt,ht,pt,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt;return{setters:[function(t){e=t.watch,n=t.onBeforeUnmount,o=t.createCommentVNode,s=t.getCurrentInstance,a=t.isReactive,r=t.toRaw,i=t.inject,l=t.reactive,c=t.onActivated,u=t.onDeactivated,d=t.ref,h=t.h,p=t.resolveComponent,m=t.computed,f=t.onUnmounted,v=t.provide,g=t.defineComponent,y=t.createVNode,w=t.withDirectives,C=t.resolveDirective,b=t.isVNode,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,N=t.NOOP,E=t.listenJSEvent,O=t.Namespace,A=t.RuntimeError,x=t.isBase64Image,R=t.isSvg,S=t.ModelError,z=t.RuntimeModelError,B=t.IBizContext},function(t){T=t.isNil,j=t.isNotNil,V=t.mergeLeft},function(t){L=t.isFunc,M=t.notNilEmpty,k=t.QXEvent,$=t.clearAll,_=t.createUUID},function(t){G=t.useRoute,W=t.useRouter},function(t){q=t.default},function(t){F=t.ViewType,U=t.getMatchResPath,K=t.calcDeCodeNameById,H=t.getControlProvider,X=t.getViewProvider,Q=t.PanelItemState,Y=t.PanelItemController,J=t.registerPanelItemProvider,Z=t.Modal,tt=t.ViewMode,et=t.OpenAppViewCommand,nt=t.getEditorProvider,ot=t.PanelItemEventName,st=t.getAllPanelField,at=t.isDataContainer,rt=t.getPanelItemProvider,it=t.PanelData,lt=t.PanelNotifyState,ct=t.execDELogicById,ut=t.toLocalOpenWFRedirectView,dt=t.ViewController,ht=t.getControlsByView,pt=t.registerViewProvider,mt=t.getDERedirectToView,ft=t.ViewLayoutPanelController,vt=t.registerControlProvider,gt=t.ControlType,yt=t.PanelController,wt=t.RemotePluginItem},function(t){Ct=t.defineStore,bt=t.createPinia},function(t){It=t.default},function(t){Pt=t.isNumber}],execute:function(){function Dt(t,o,s={}){let a=N,r=N,i=N;const l=()=>{a(),a=N,r=N,i=N};return e(t,((t,e)=>{if(t!==e)if(T(t))l();else{const e=D((null==t?void 0:t.$el)||t,o,s);a=e.stop,r=e.pause,i=e.proceed}}),{immediate:!0}),n((()=>{a!==N&&l()})),{stop:()=>a(),pause:()=>r(),proceed:()=>i()}}function Nt(){return s().proxy.$props}function Et(t){return a(t)?r(t):t}function Ot(){const t=s().proxy;return e=>{t.$forceUpdate(),e&&L(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:Lt,createOverlayView:Gt,generateRoutePath:async function(t,e,n,o){const s=Bt(e);let a=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(a=n.toRouteDepth,delete n.toRouteDepth):ibiz.env.isMob&&(s.pathNodes[0]={viewName:"home"});if(s.pathNodes.splice(a-1,s.pathNodes.length-a+1),n.currentSrfNav){const t=s.pathNodes[s.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,delete n.currentSrfNav}e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(s.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):s.pathNodes[0].viewName="index");if(s.pathNodes.push({viewName:t.codeName.toLowerCase(),context:jt(n),params:o}),2===a&&(await Lt(s,n,t.appDataEntityId,t.appId),Vt.includes(t.viewType))){const e=K(t.appDataEntityId);delete s.pathNodes[0].context[e]}return{path:Tt(s)}},getArrayProps:kn,getAutoCompleteProps:jn,getCascaderProps:$n,getCheckboxListProps:bn,getCheckboxProps:In,getCodeProps:Vn,getColorPickerProps:_n,getDataPickerProps:Pn,getDatePickerProps:Dn,getDateRangeProps:Nn,getDrawerPlacement:function(t){return Wt[t]||"right"},getDropdownProps:Cn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:mn,getGridArrayProps:function(){return{...kn(),...fn()}},getGridAutoCompleteProps:function(){return{...jn(),...fn()}},getGridCascaderProps:function(){return{...$n(),...fn()}},getGridCheckboxListProps:function(){return{...bn(),...fn()}},getGridCheckboxProps:function(){return{...In(),...fn()}},getGridCodeProps:function(){return{...Vn(),...fn()}},getGridColorPickerProps:function(){return{..._n(),...fn()}},getGridDataPickerProps:function(){return{...Pn(),...fn()}},getGridDatePickerProps:function(){return{...Dn(),...fn()}},getGridDateRangeProps:function(){return{...Nn(),...fn()}},getGridDropdownProps:function(){return{...Cn(),...fn()}},getGridEditorCommonProps:fn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Ln(),...fn()}},getGridInputIpProps:function(){return{...yn(),...fn()}},getGridInputNumberProps:function(){return{...gn(),...fn()}},getGridInputProps:function(){return{...vn(),...fn()}},getGridListBoxProps:function(){return{...En(),...fn()}},getGridMarkDownProps:function(){return{...Mn(),...fn()}},getGridNumberRangeProps:function(){return{...On(),...fn()}},getGridRadioProps:function(){return{...An(),...fn()}},getGridRateProps:function(){return{...xn(),...fn()}},getGridRawProps:function(){return{...Rn(),...fn()}},getGridSliderProps:function(){return{...Sn(),...fn()}},getGridSpanProps:function(){return{...wn(),...fn()}},getGridStepperProps:function(){return{...zn(),...fn()}},getGridSwitchProps:function(){return{...Bn(),...fn()}},getGridUploadProps:function(){return{...Tn(),...fn()}},getHtmlProps:Ln,getInputIpProps:yn,getInputNumberProps:gn,getInputProps:vn,getListBoxProps:En,getMarkDownProps:Mn,getNestedRoutePath:Mt,getNumberRangeProps:On,getOrigin:Et,getOwnRouteContext:jt,getRadioProps:An,getRateProps:xn,getRawProps:Rn,getSliderProps:Sn,getSpanProps:wn,getStepperProps:zn,getSwitchProps:Bn,getUploadProps:Tn,isEmptyVNode:function(t){if(!Array.isArray(t))return t===At;return 1===t.length&&t[0]===At},onRouteChange:function(t,n){const o=G();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=Mt(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Gt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Gt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Gt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Gt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e){var n;const o=Bt(t);let s=o.pathNodes[e-1].viewName;if(!s)throw new A(`第${e}级路由不存在视图标识`);"index"===s&&(s=ibiz.hub.defaultAppIndexViewName);const a=await ibiz.hub.getAppView(s);if(!a)throw new A(`找不到视图${s}`);const r={};(null==(n=ibiz.appData)?void 0:n.context)&&Object.assign(r,ibiz.appData.context);o.appContext&&Object.assign(r,o.appContext);if(1!==e)for(let t=0;t<e;t++){const e=o.pathNodes[t];M(e.context)&&Object.assign(r,e.context)}const{params:i,srfnav:l}=o.pathNodes[e-1];return{viewModel:a,context:r,params:i,srfnav:l}},prepareControl:function(t){const e=zt("control"),{controlType:n,sysCss:o,codeName:s}=t.model,a=n.toLowerCase(),r=null==o?void 0:o.cssName,i=zt(`control-${a}`),l=[e.b(),e.b(a),e.m(s)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(T(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Bt,routePath2string:Tt,useClickOutside:Dt,useControlController:Rt,useController:function(t){t.force=Ot()},useCtx:xt,useEventListener:St,useFocusAndBlur:function(t,e){const n=d(),o=d(!1);let s;const a=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),s.stop(),o.value=!1};return St(n,"click",(e=>{o.value||(s=Dt(n,(()=>{a()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:a,pause:()=>{s&&s.pause()},stop:()=>{s&&s.stop()}}},useForce:Ot,useForceTogether:function(t,e){const n=e.force,o=Ot();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:zt,useProps:Nt,usePropsWatch:function(t,n,o){const s=Nt();Object.prototype.hasOwnProperty.call(s,t)&&(e((()=>s[t]),((t,e)=>{n(Et(t),Et(e))}),o),n(Et(s[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const s=new kt(n);return e(t,((t,e)=>{t!==e&&s.nextChange((()=>{o.value=t}))})),o},useRouterQuery:function(){const t=G(),{query:e}=t;return e},useViewController:Ut});const At=t("EmptyVNode",o("EmptyVNode"));function xt(){return i("ctx")}function Rt(t,o){const a=xt(),r=Nt();a.evt.emit("onForecast",r.modelData.name);const i=r.provider;let d;d=(null==i?void 0:i.createController)?i.createController(r.modelData,r.context,r.params,a):t(r.modelData,r.context,r.params,a),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.updateContextParams({...t}),ibiz.log.debug(`${n.model.id}的上下文或视图参数变更:`,t)}))}(r,d),function(t,n,o=[]){const s=["context","params","modelData",...o];e((()=>{const e={};return Object.keys(t).forEach((n=>{s.includes(n)||(e[n]=t[n])})),e}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug(`部件 [${n.model.name}] state 变更`,o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(n.state[t]=o[t])}))}),{immediate:!0})}(r,d,null==o?void 0:o.excludePropsKeys),d.state=l(d.state),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=Ot();const h=s().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),h.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function St(t,o,s,a={}){let r=N;return e(t,((t,e)=>{t!==e&&(T(t)?(r(),r=N):r=E((null==t?void 0:t.$el)||t,o,s,a))}),{immediate:!0}),n((()=>{r!==N&&r()})),()=>{r()}}function zt(t){return new O(t,ibiz.env.namespace)}function Bt(t){const e=t.matched.length,n=[];for(let o=1;o<=e;o++){const e=t.path.split("/")[2*o],s=t.params[`params${o}`];let a,r,i;a=s&&s!==ibiz.env.routePlaceholder?q.parse(s,{strictNullHandling:!0,delimiter:";"}):void 0,a&&(1===o?(r=a,a=void 0):(a.srfnavctx&&(r=JSON.parse(decodeURIComponent(a.srfnavctx)),delete a.srfnavctx),a.srfnav&&(i=a.srfnav,delete a.srfnav))),n.push({viewName:e,context:r,params:a,srfnav:i})}let o;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(o=q.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:o,pathNodes:n}}function Tt(t){let e="";return t.appContext?e+=`/${q.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})}`:e+=`/${ibiz.env.routePlaceholder}`,t.pathNodes.forEach(((t,n)=>{e+=`/${t.viewName}/`;let o={};if(0===n)M(t.context)&&(o=t.context);else{if(o=M(t.params)?t.params:{},M(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const s=q.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});M(s)?e+=s:e+=ibiz.env.routePlaceholder})),e}function jt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Vt=t("excludeViewTypes",[F.DE_GRID_VIEW,F.DE_GRID_EXP_VIEW,F.DE_LIST_VIEW,F.DE_LIST_EXP_VIEW,F.DE_DATA_VIEW,F.DE_DATAVIEW_EXP_VIEW,F.DE_CALENDAR_VIEW,F.DE_CALENDAR_EXP_VIEW,F.DE_CHART_VIEW,F.DE_CHART_EXP_VIEW,F.DE_KANBAN_VIEW]);async function Lt(t,e,n,o){if(n){const s=await ibiz.hub.getAppDataEntity(n,o);let a=U(e,s);if(a||(a={path:"",keys:[s.codeName.toLowerCase()]}),a){const n=t.pathNodes[1].context,o={};a.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Mt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Bt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,Tt(o))}class kt{constructor(t,n){this.callbacks=[],this.timers=[],this.wait=500,n&&(this.wait=n),e((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",kt);const $t=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class _t{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new k,this.init()}static createVueApp(t,e){throw new A("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const s=_t.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>h(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,s.unmount()}},{default:e})});ibiz.plugin.register(s),s.mount(o),this.vm=s}async present(){return this.modal.present()}async dismiss(t){this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",_t);function Gt(t){return e=>{const n=p("IBizViewShell");return h(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends _t{present(t){return this.modal.present(t)}});const Wt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class qt{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e){const n=t.currentRoute.value.fullPath;t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const s=new qt(n,o);return this.map.set(o,s),this.scheduledDestruction(s),s.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),1e4)}});function Ft(){const t=d([]),e=d(0),n=m((()=>t.value.filter(((t,n)=>n<e.value)))),o=n=>{if(!n.data||"ASYNCACTION"!==n.subtype)return;const o=(s=n.data,["begintime","endtime","createdate","updatedate"].forEach((t=>{Pt(s[t])&&(s[t]=It(s[t]).format("YYYY-MM-DD HH:mm:ss"))})),s);var s;const a=t.value.findIndex((t=>t.asyncacitonid===o.asyncacitonid));if(-1!==a)t.value.unshift(o),e.value+=1;else{a>=e.value?(t.value.splice(a,1),t.value.unshift(o),e.value+=1):t.value.splice(a,1,o)}};return(async()=>{const e=await ibiz.asyncAction.fetch();t.value=e.data})(),ibiz.mc.command.asyncAction.on(o),f((()=>{ibiz.mc.command.asyncAction.off(o)})),{allAsyncActions:t,recentAsyncActions:n}}t("useAppStore",Ct("appStore",(()=>{const{allAsyncActions:t,recentAsyncActions:e}=Ft();return{appStore:l({allAsyncActions:t,get recentAsyncActions(){return e.value}})}})));t("useUIStore",Ct("uiStore",(()=>{const t=function(){const t=d(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:l({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",bt());function Ut(t){const o=Nt(),a=i("ctx",void 0);null==a||a.evt.emit("onForecast",o.modelData.name);const r=o.provider;let d;d=(null==r?void 0:r.createController)?r.createController(o.modelData,o.context,o.params,a):t(o.modelData,o.context,o.params,a),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.context.reset({},t.context),$(n.params),Object.assign(n.params,t.params),n.handleContextParams(),ibiz.log.debug(`${n.model.id}的上下文或视图参数变更:`,t)}))}(o,d),function(t,n){e((()=>t.state?{...t.state}:{}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug(`视图 [${n.model.name}] state 变更`,o),Object.keys(o).forEach((t=>{n.state[t]=o[t]}))}),{immediate:!0})}(o,d),v("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=Ot();const h=s().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),d.created(),n((()=>d.destroyed())),d}t("IBizIcon",g({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=zt("icon"),n=`${ibiz.env.assetsUrl}/${t.baseDir}/`;const o=m((()=>function(t){if(t){if(t.htmlStr)return y("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?y("i",{class:[e.b(),t.cssClass]},null):y("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?y("img",{class:e.b(),src:t.imagePath},null):R(t.imagePath)?y("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return R(t.rawContent)?y("div",{class:e.b(),innerHTML:t.rawContent},null):y("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",g({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:n}){const o={};let s=!0;e((()=>t.manualKey),((t,e)=>{j(t)&&t!==e&&(s=!0)}));return{renderComp:(e,a)=>{if(!s)return o.vNode;if(s=!1,e){const s={...e.props};delete s.onVnodeUnmounted,delete s.ref;const a=h(e.type,{...s,...n,key:t.manualKey});return o.vNode=a,a}}}},render(){return y(p("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",g({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=zt("control"),{controlType:n,sysCss:o,codeName:s}=t.controller.model,a=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,c=t.controller.model.controls,u=l({});return!1===i.controlType.endsWith("EXPBAR")&&(T(i.width)||(u.width=`${i.width}px`),T(i.height)||(u.height=`${i.height}px`)),{ns:e,typeClass:a,sysCssName:r,inlineStyle:u,codeName:s,controls:c,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:s,providers:a}=this.controller;let r=null;if(o.isCreated&&s){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},s=e[n];e[n]=s?()=>s(o):()=>{const e=p("IBizControlShell");return h(e,{modelData:t,...o})}}));const n=a[s.name];r=h(p(n.component),{modelData:s,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return y("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",g({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){i("ctx").evt.emit("onForecast",t.modelData.name);const e=d(!1),n=d(""),o=d();H(t.modelData).then((t=>{t?o.value=t:n.value="未找到对应部件的适配器",e.value=!0})).catch((t=>{ibiz.log.error(t),n.value=t.message,e.value=!0}));return{ns:zt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizViewShell",g({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=zt("view-shell"),n=d(!1),o=d(""),s=d(),a=d();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new A("未找到视图模型");a.value=e;try{s.value=await X(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:a,provider:s}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizCodeList",g({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:n}){var o,s;const a=zt("code-list"),r=d([]),i=(null==(o=t.codeList)?void 0:o.textSeparator)||"、",l=(null==(s=t.codeList)?void 0:s.valueSeparator)||",";e(r,(t=>{let e="";t.length>0&&(e=t.map((t=>t.text)).join(i)),n("infoTextChange",e)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};e((()=>t.value),((e,n)=>{if(e!==n)if(T(e)||""===e)r.value=[];else{let n;n="string"==typeof e?e.split(l):[e],r.value=n.map((e=>{const n=c(t.codeListItems,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:r,ns:a,emptyText:u,textSeparator:i}},render(){return y("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,y("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":`${t.color}`}):null},[t.sysImage&&y(p("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",g({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(i("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null}));class Kt extends Q{}t("PanelContainerState",Kt);class Ht extends Y{createState(){var t;return new Kt(null==(t=this.parent)?void 0:t.state)}}function Xt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerController",Ht);const Qt=g({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ht,required:!0}},setup(t){const e=zt("panel-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],s=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Xt(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Xt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,s])}});class Yt{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Ht(t,e,n);return await o.init(),o}}t("IBizPanelContainer",$t(Qt,(function(t){t.component(Qt.name,Qt),J("CONTAINER",(()=>new Yt)),J("CONTAINER_DEFAULT",(()=>new Yt))})));const Jt=g({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){i("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:zt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?`未提供${this.modelData.id}插槽`:"")])}});class Zt extends Y{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",Zt);class te{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new Zt(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",$t(Jt,(function(t){t.component(Jt.name,Jt),J("CTRLPOS",(()=>new te))})));class ee extends Y{}function ne(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("ScrollContainerItemController",ee);const oe=t("ScrollContainerItem",g({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ee,required:!0}},setup(t){const e=zt("scroll-container-item"),{id:n}=t.modelData,o=m((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return y(p("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},ne(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ne(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class se{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ee(t,e,n);return await o.init(),o}}class ae extends Y{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",ae);const re=t("ScrollContainer",g({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:ae,required:!0}},setup(t){const e=zt("scroll-container"),{id:n}=t.modelData,o=m((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,s=null,a=null,r=null;const i={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,i.left={width:l};break;case"EAST":s=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":a=t,i.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug(`未适配的布局占位${e.modelData.layoutPos.layoutPos}`)}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return y("div",{class:this.classArr},[y("div",{class:[this.ns.e("header")],style:i.top},[o]),y("div",{class:[this.ns.b("content")]},[y("div",{class:this.ns.be("content","left"),style:i.left},[n]),y("div",{class:this.ns.be("content","center")},[r]),y("div",{class:this.ns.be("content","right"),style:i.right},[s])]),y("div",{class:[this.ns.e("footer")],style:i.bottom},[a])])}}));class ie{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new ae(t,e,n);return await o.init(),o}}t("IBizScrollContainer",$t(re,(function(t){t.component(re.name,re),t.component(oe.name,oe),J("CONTAINER_CONTAINER_SCROLL",(()=>new ie)),J("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new se)),J("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new se)),J("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new se)),J("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new se)),J("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new se))})));class le extends Q{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",le);const ce=["is404","isRoutePushed"];class ue extends Y{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode;"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new le(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?`${t.viewId}___${t.key}`:""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(V(this.state.navViewMsgs[e],t),ce.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Z({mode:this.routeDepth?tt.ROUTE:tt.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Mt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){const e=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=e,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const t=Mt(this.route,this.routeDepth,!1);this.router.push(`${t}/404`)}else if(this.state.navViewMsgs[e].fullPath&&this.getExpItemIsCache(t))this.router.push(this.state.navViewMsgs[e].fullPath);else{const n=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),ibiz.commands.execute(et.TAG,t.viewId,n,t.params,{openMode:"INDEXVIEWTAB"})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;M(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function de(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("NavPosController",ue);const he=g({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const n=t.controller,o=zt("nav-pos"),s=W(),a=G();if(n.setRouter(s),n.routeDepth){const t=Mt(a,n.routeDepth);e((()=>a.fullPath),(()=>{const e=Mt(a,n.routeDepth);t===e&&a.matched.length>n.routeDepth&&n.onRouteChange(a)}),{immediate:!0})}return{ns:o,c:n,onViewCreated:t=>{n.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:s,cache:a}=e;let r=null;if(e.routeOpen)r=y(p("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?y(t,null,null):null;return a?y(p("keepAlive"),{include:o,max:30,isKey:!0},de(e)?e:{default:()=>[e]}):e}});else{const t=n?h(p("IBizViewShell"),{context:s[n].context,params:s[n].params,key:s[n].key,viewId:s[n].viewId,onCreated:this.onViewCreated}):null;r=a?y(p("keepAlive"),{include:o,max:30,isKey:!0},de(t)?t:{default:()=>[t]}):t}return y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class pe{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}t("IBizNavPos",$t(he,(function(t){t.component(he.name,he),J("RAWITEM_NAV_POS",(()=>new pe))})));class me extends Q{}class fe extends Y{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new me(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await nt(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.ENTER,event:t})}}t("PanelFieldController",fe);const ve=g({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:fe,required:!0}},setup(t){const e=zt("panel-field"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.model.editor.readOnly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t)};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=p(this.controller.editorProvider.formEditor);t=h(n,{...e})}else t=y(p("not-supported-editor"),{modelData:this.modelData.editor},null)}return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class ge{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new fe(t,e,n);return await o.init(),o}}t("IBizPanelField",$t(ve,(function(t){t.component(ve.name,ve),J("FIELD",(()=>new ge))})));class ye extends Y{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",ye);const we=g({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:ye,required:!0}},setup(t){const e=zt("panel-rawitem"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){if(this.controller.state.visible)return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[y(p("iBizRawItem"),{rawItem:this.modelData},null)])}});class Ce{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new ye(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",$t(we,(function(t){t.component(we.name,we),J("RAWITEM",(()=>new Ce)),J("RAWITEM_STATIC_IMAGE",(()=>new Ce)),J("RAWITEM_STATIC_LABEL",(()=>new Ce)),J("RAWITEM_STATIC_TEXT",(()=>new Ce))})));class be extends Q{constructor(){super(...arguments),this.data={}}}class Ie{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new be,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const s=st(this.model).map((t=>t.id));o._evt.on("change",(t=>{s.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,s;const a=this.parent.providers[t.id];if(!a)return;const r=await a.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!at(t)?await this.initChildrenController(t.panelItems,e,r):(null==(s=t.panelTabPages)?void 0:s.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class Pe extends Q{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Pe);class De extends Y{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Pe(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await rt(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!at(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new S(this.model,`数据源类型${t}暂未支持`)}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=st(this.model),n=t.map((t=>new it(e,t)));this.dataItems=n.map((t=>new Ie(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(lt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await ct(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A(`实体逻辑${e}没有返回值`);this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(`全局变量里没有${t}属性`)}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new z(this.model,"没有配置实体行为");if(!e)throw new z(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(`绑定视图的会话不存在${e}`);const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(`视图state里没有${e}属性`)};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",De);const Ne=g({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:De,required:!0}},setup(t){const n=zt("multi-data-container"),{id:o}=t.modelData;e((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=l(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=l(n.state)}))}))}),{immediate:!0});const s=i("renderPanelItem"),a=m((()=>[n.b(),n.m(o),...t.controller.containerClass]));return{ns:n,classArr:a,renderPanelItem:s}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return y(p("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return y(p("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(s=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(s)&&!b(s)?e:{default:()=>[e]});var s}))]}})})),y("div",{class:this.classArr},[t])}});class Ee{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new De(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",$t(Ne,(function(t){t.component(Ne.name,Ne),J("CONTAINER_CONTAINER_MULTIDATA",(()=>new Ee))})));class Oe extends Q{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Oe);class Ae extends Y{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Oe(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,s;const a=await rt(t);if(!a)return;this.providers[t.id]=a;const r=await a.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!at(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(s=t.panelTabPages)?void 0:s.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new S(this.model,`数据源类型${t}暂未支持`)}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=st(this.model),s=o.map((t=>t.id)),a=new it(o,t);a._evt.on("change",(t=>{s.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=a,this.childrenStateNotify(lt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await ct(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A(`实体逻辑${e}没有返回值`);this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error(`全局变量里没有${t}属性`)}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new z(this.model,"没有配置实体行为");if(!e)throw new z(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error(`绑定视图的会话不存在${e}`);const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error(`视图state里没有${e}属性`)};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",Ae);const xe=g({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ae,required:!0}},setup(t){const e=zt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=l(n.state)}));const o=i("renderPanelItem"),s=m((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:s,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():y(p("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o}))]}}),y("div",{class:this.classArr},[t])}});class Re{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Ae(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",$t(xe,(function(t){t.component(xe.name,xe),J("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Re))})));class Se extends Q{}t("GridContainerState",Se);class ze extends Y{createState(){var t;return new Se(null==(t=this.parent)?void 0:t.state)}}function Be(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("GridContainerController",ze);const Te=g({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:ze,required:!0}},setup(t){const e=zt("grid-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),s=m((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),a=d(void 0),r=d(12);return{ns:e,classArr:o,layoutModel:s,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return y(p("iBizRow"),{class:this.classArr,layout:this.layoutModel},Be(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Be(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class je{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new ze(t,e,n);return await o.init(),o}}t("IBizGridContainer",$t(Te,(function(t){t.component(Te.name,Te),J("CONTAINER_CONTAINER_GRID",(()=>new je))})));class Ve extends Q{}t("PanelContainerImageState",Ve);class Le extends Y{createState(){var t;return new Ve(null==(t=this.parent)?void 0:t.state)}}function Me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerImageController",Le);const ke=g({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=zt("panel-container-image"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),s=m((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=R(e.rawContent)?`url(data:image/svg+xml;base64,${btoa(e.rawContent)})`:`url(${e.rawContent})`:(null==e?void 0:e.imagePath)&&(o=`url(${e.imagePath})`),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:s}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],s=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Me(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Me(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,s])}});class $e{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",$t(ke,(function(t){t.component(ke.name,ke),J("CONTAINER_CONTAINER_IMAGE",(()=>new $e))})));class _e extends Q{}t("PanelContainerGroupState",_e);class Ge extends Y{createState(){var t;return new _e(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",Ge);class We{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new Ge(t,e,n);return await o.init(),o}}function qe(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Fe=g({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:Ge,required:!0}},setup(t){const e=zt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:m((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let s=n;return o&&(s=ibiz.i18n.t(o.lanResTag,n)),s})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const s=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},qe(n=s.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},qe(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=y("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[y("div",{class:[this.ns.be("header","left")]},[y("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),y("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?y("ion-icon",{name:"caret-forward-sharp"},null):y("ion-icon",{name:"caret-down-sharp"},null))])])),y("div",{class:o},[r,y("div",{class:[this.ns.b("content")]},[a])])}});t("IBizPanelContainerGroup",$t(Fe,(function(t){t.component(Fe.name,Fe),J("CONTAINER_CONTAINER_GROUP",(()=>new We))})));function Ue(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Ke=g({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:Y,required:!0}},setup(t){const e=zt("panel-tab-page"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return y(p("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Ue(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return y(p("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Ue(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class He{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new Y(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",$t(Ke,(function(t){t.component(Ke.name,Ke),J("TABPAGE",(()=>new He))}))),t("AppRedirectView",g({setup(){var t;const e=B.create((null==(t=ibiz.appData)?void 0:t.context)||{});f((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await ut(e,n)}()},render:()=>y("div",null,[P("重定向跳转中")])}));class Xe{constructor(){this.component="IBizView"}}const Qe=g({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(){const t=zt("view"),e=Ut(((...t)=>new dt(...t))),n=ht(e.model),{viewType:o,sysCss:s,codeName:a}=e.model,r=o.toLowerCase(),i=null==s?void 0:s.cssName,l=m((()=>[t.b(),t.b(r),t.m(a),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""])),c=d(null),u=_(),h=window.devtool;I((()=>{h&&h.registerView(u,e,c)})),f((()=>{h&&h.unRegisterView(u)}));return{c:e,controls:n,viewClassNames:l,container:c,onLayoutPanelCreated:t=>{e.setLayoutPanel(t)},renderViewMessage:n=>{if(e.state.isCreated){const o=e.state.viewMessages[n];if(null==o?void 0:o.length)return y(p("view-message"),{class:[t.e(`${n.toLowerCase()}-message`)],messages:o},null)}return null}}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};if((null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const s=n[e];if(s)return void(n[e]=()=>s(o));const a=this.c.providers[e];a&&(n[e]=()=>{const e=p(a.component);return h(e,{modelData:t,...o,provider:a})})})),0===this.c.engines.length)e=y("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=h(p(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return w(y("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[C("loading"),this.c.state.isLoading]])}});t("IBizView",$t(Qe,(function(t){t.component(Qe.name,Qe),pt("DEFAULT",(()=>new Xe))}))),t("TodoRedirect",g({setup(){const t=W(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const s=q.parse(o,{delimiter:";"}),{apptype:a,todotype:r,todoid:i}=s,l={srfapptype:"pc",srfapp:""};a||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post(`/systodos/${i}/getlinkurl`,l)).data.linkurl;a?window.location.href=e:(0!==e.indexOf("/")&&(e=`/${e}`),e+=`;srfwf=${r}`,t.push(`/index${e}`))}()},render:()=>y("div",null,[P("待办列表重定向")])}));class Ye{constructor(){this.component="IBizPortalView"}}const Je=g({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=zt("view"),n=Ut(((...t)=>new dt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:s,sysCss:a,codeName:r}=n.model,i=s.toLowerCase(),l=null==a?void 0:a.cssName,c=[e.b(),e.b(i),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const s=n[e];if(s)return void(n[e]=()=>s(o));const a=this.c.providers[e];a&&(n[e]=()=>{const e=p(a.component);return h(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return y("div",{class:this.viewClassNames},[e])}}),Ze=(t("IBizPortalView",$t(Je,(function(t){t.component(Je.name,Je),pt(F.APP_PORTAL_VIEW,(()=>new Ye)),pt(F.DE_PORTAL_VIEW,(()=>new Ye)),pt(F.DE_PORTAL_VIEW9,(()=>new Ye))}))),g({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=d(),n=d(),o=d();return mt(r(t.modelData),r(t.context),r(t.params)).then((async t=>{if("view"!==t.type)throw new A("嵌入重定向视图不支持url跳转");e.value=t.viewId,n.value=t.context,o.value=t.params})),{toViewId:e,toViewContext:n,toViewParams:o}},render(){return this.toViewId?h(p("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):w(y("div",{style:"width: 100%; height: 100%;"},null),[[C("loading"),!this.toViewId]])}}));class tn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",$t(Ze,(function(t){t.component(Ze.name,Ze);const e=new tn;pt(F.DE_REDIRECT_VIEW,(()=>e))})));const en=g({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:n}){const o=Rt(((...e)=>new ft(...e,t.container))),s=zt(`control-${o.model.controlType.toLowerCase()}`);e((()=>t.data),(t=>{t&&(o.setInputData(t),o.load())}),{immediate:!0}),o.evt.on("onCreated",(()=>{Object.keys(o.panelItems).forEach((t=>{const e=o.panelItems[t];e.state=l(e.state)}))}));const a=(t,e)=>{var s,r;if(t.hidden)return null;const{providers:i,panelItems:l}=e||o,c=i[t.id];if(!c)return y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=p(c.component);let d;return"CTRLPOS"===t.itemType&&n[t.id]?d=()=>n[t.id]():"TABPANEL"===t.itemType&&(null==(s=t.panelTabPages)?void 0:s.length)?d=()=>t.panelTabPages.map((t=>a(t,e))):at(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>a(t,e)))),h(u,{modelData:t,controller:l[t.id],key:t.id},d)};return v("renderPanelItem",a),{c:o,ns:s,renderPanelItem:a}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class nn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",$t(en,(function(t){t.component(en.name,en),vt(gt.VIEW_LAYOUT_PANEL,(()=>new nn))})));function on(t,e,n){var o,s;if(t.hidden)return;const{providers:a,panelItems:r}=e,i=a[t.id];if(!i)return y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=p(i.component);let c;return"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>on(t,e,n))):(null==(s=t.panelItems)?void 0:s.length)&&(c=()=>t.panelItems.map((t=>on(t,e,n)))),h(l,{modelData:t,controller:r[t.id],key:t.id},c)}const sn=g({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const n=Rt(((...e)=>new yt(...e,t.container))),o=zt(`control-${n.model.controlType.toLowerCase()}`);return e((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=l(e.state)}))})),{c:n,ns:o}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=on(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class an{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",$t(sn,(function(t){t.component(sn.name,sn),vt(gt.PANEL,(()=>new an))})));function rn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ln(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function cn(t,e){for(var n,o="",s=0,a=-1,r=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(a===i-1||1===r);else if(a!==i-1&&2===r){if(o.length<2||2!==s||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",s=0):s=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),a=i,r=0;continue}}else if(2===o.length||1===o.length){o="",s=0,a=i,r=0;continue}e&&(o.length>0?o+="/..":o="..",s=2)}else o.length>0?o+="/"+t.slice(a+1,i):o=t.slice(a+1,i),s=i-a-1;a=i,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var un={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var s;o>=0?s=arguments[o]:(void 0===t&&(t=process.cwd()),s=t),ln(s),0!==s.length&&(e=s+"/"+e,n=47===s.charCodeAt(0))}return e=cn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(ln(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=cn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return ln(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];ln(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":un.normalize(t)},relative:function(t,e){if(ln(t),ln(e),t===e)return"";if((t=un.resolve(t))===(e=un.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,s=o-n,a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var r=e.length-a,i=s<r?s:r,l=-1,c=0;c<=i;++c){if(c===i){if(r>i){if(47===e.charCodeAt(a+c))return e.slice(a+c+1);if(0===c)return e.slice(a+c)}else s>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(a+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(a+l):(a+=l,47===e.charCodeAt(a)&&++a,e.slice(a))},_makeLong:function(t){return t},dirname:function(t){if(ln(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,s=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!s){o=a;break}}else s=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');ln(t);var n,o=0,s=-1,a=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!a){o=n+1;break}}else-1===i&&(a=!1,i=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(s=n):(r=-1,s=i))}return o===s?s=i:-1===s&&(s=t.length),t.slice(o,s)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!a){o=n+1;break}}else-1===s&&(a=!1,s=n+1);return-1===s?"":t.slice(o,s)},extname:function(t){ln(t);for(var e=-1,n=0,o=-1,s=!0,a=0,r=t.length-1;r>=0;--r){var i=t.charCodeAt(r);if(47!==i)-1===o&&(s=!1,o=r+1),46===i?-1===e?e=r:1!==a&&(a=1):-1!==e&&(a=-1);else if(!s){n=r+1;break}}return-1===e||-1===o||0===a||1===a&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){ln(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),s=47===o;s?(e.root="/",n=1):n=0;for(var a=-1,r=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===a?a=c:1!==u&&(u=1):-1!==a&&(u=-1);else if(!l){r=c+1;break}return-1===a||-1===i||0===u||1===u&&a===i-1&&a===r+1?-1!==i&&(e.base=e.name=0===r&&s?t.slice(1,i):t.slice(r,i)):(0===r&&s?(e.name=t.slice(1,a),e.base=t.slice(1,i)):(e.name=t.slice(r,a),e.base=t.slice(r,i)),e.ext=t.slice(a,i)),r>0?e.dir=t.slice(0,r-1):s&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};un.posix=un;var dn=un,hn=rn(dn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),window.vueInstances.forEach((e=>{e.use(t)}))}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new z(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?`${t}/package.json`:`${ibiz.env.pluginBaseUrl}/${dn.join(t,"package.json")}`,s=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==s.status)throw new Error("配置加载失败");n=s.data}const o=new wt(t,e,n);if(o)try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:s=[]}=t.config;let a="";if(a=dn.join(e,o),a){if(this.cache.has(a))return;let t=null;const o=this.parseUrl(a),r=("string"==typeof s?[s]:s).map((t=>this.parseUrl(hn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new A("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new A("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),this.cache.set(a,!0)}}parseUrl(t){if(this.urlReg.test(t))return t;let e="";e=this.urlReg.test(ibiz.env.pluginBaseUrl)?t.startsWith("/")?ibiz.env.pluginBaseUrl+t:`${ibiz.env.pluginBaseUrl}/${t}`:`${dn.join(ibiz.env.pluginBaseUrl,t)}`;const{origin:n,pathname:o}=window.location;return o.endsWith("/")&&e.startsWith("/")&&(e=e.substring(1)),!1===this.urlReg.test(e)&&(e=`${n}${o}${e}`),e}});class pn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function mn(){return{value:String,controller:new pn(Object),data:new pn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function fn(){return{hasError:{type:Boolean}}}function vn(){return{...mn(),value:[String,Number]}}function gn(){return{...mn(),value:Number}}function yn(){return{...mn(),value:String}}function wn(){return{...mn(),value:[String,Number,Object,Array]}}function Cn(){return{...mn(),value:[String,Number]}}function bn(){return{...mn(),value:[String,Number]}}function In(){return{...mn(),value:[String,Number]}}function Pn(){return{...mn(),value:[String,Array,Object,Number]}}function Dn(){return{...mn(),value:[String,Number]}}function Nn(){return{...mn(),value:[String,Number]}}function En(){return{...mn(),value:[String,Number]}}function On(){return{...mn(),value:[String,Number]}}function An(){return{...mn(),value:[String,Number]}}function xn(){return{...mn(),value:[String,Number]}}function Rn(){return{...mn(),value:[String,Number,Array]}}function Sn(){return{...mn(),value:[String,Number]}}function zn(){return{...mn(),value:[String,Number]}}function Bn(){return{...mn(),value:[String,Number]}}function Tn(){return{...mn(),value:String}}function jn(){return{...mn(),value:[String,Number]}}function Vn(){return{...mn(),value:String,language:{type:String},theme:{type:String}}}function Ln(){return{...mn(),value:String}}function Mn(){return{...mn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function kn(){return{...mn(),value:[Array,Array]}}function $n(){return{...mn(),value:String}}function _n(){return{...mn(),value:String}}t("RequiredProp",pn)}}}));
|
|
1
|
+
System.register(["vue","@ibiz-template/core","ramda","qx-util","vue-router","qs","@ibiz-template/runtime","pinia","dayjs","lodash-es"],(function(t){"use strict";var e,n,o,a,s,r,i,l,c,u,d,h,p,m,f,v,g,y,w,C,b,I,P,D,N,E,O,A,x,R,S,z,B,T,j,V,L,M,k,_,G,W,q,$,F,U,K,H,X,Q,Y,J,Z,tt,et,nt,ot,at,st,rt,it,lt,ct,ut,dt,ht,pt,mt,ft,vt,gt,yt,wt,Ct,bt,It,Pt;return{setters:[function(t){e=t.watch,n=t.onBeforeUnmount,o=t.createCommentVNode,a=t.getCurrentInstance,s=t.isReactive,r=t.toRaw,i=t.inject,l=t.reactive,c=t.onActivated,u=t.onDeactivated,d=t.ref,h=t.h,p=t.resolveComponent,m=t.computed,f=t.onUnmounted,v=t.provide,g=t.defineComponent,y=t.createVNode,w=t.withDirectives,C=t.resolveDirective,b=t.isVNode,I=t.onMounted,P=t.createTextVNode},function(t){D=t.onClickOutside,N=t.NOOP,E=t.listenJSEvent,O=t.Namespace,A=t.RuntimeError,x=t.isBase64Image,R=t.isSvg,S=t.ModelError,z=t.RuntimeModelError,B=t.IBizContext},function(t){T=t.isNil,j=t.isNotNil,V=t.mergeLeft},function(t){L=t.isFunc,M=t.notNilEmpty,k=t.QXEvent,_=t.clearAll,G=t.createUUID},function(t){W=t.useRoute,q=t.useRouter},function(t){$=t.default},function(t){F=t.ViewType,U=t.getMatchResPath,K=t.calcDeCodeNameById,H=t.getControlProvider,X=t.getViewProvider,Q=t.PanelItemState,Y=t.PanelItemController,J=t.registerPanelItemProvider,Z=t.Modal,tt=t.ViewMode,et=t.OpenAppViewCommand,nt=t.getEditorProvider,ot=t.PanelItemEventName,at=t.getAllPanelField,st=t.isDataContainer,rt=t.getPanelItemProvider,it=t.PanelData,lt=t.PanelNotifyState,ct=t.execDELogicById,ut=t.toLocalOpenWFRedirectView,dt=t.ViewController,ht=t.getControlsByView,pt=t.registerViewProvider,mt=t.getDERedirectToView,ft=t.ViewLayoutPanelController,vt=t.registerControlProvider,gt=t.ControlType,yt=t.PanelController,wt=t.RemotePluginItem},function(t){Ct=t.defineStore,bt=t.createPinia},function(t){It=t.default},function(t){Pt=t.isNumber}],execute:function(){function Dt(t,o,a={}){let s=N,r=N,i=N;const l=()=>{s(),s=N,r=N,i=N};return e(t,((t,e)=>{if(t!==e)if(T(t))l();else{const e=D((null==t?void 0:t.$el)||t,o,a);s=e.stop,r=e.pause,i=e.proceed}}),{immediate:!0}),n((()=>{s!==N&&l()})),{stop:()=>s(),pause:()=>r(),proceed:()=>i()}}function Nt(){return a().proxy.$props}function Et(t){return s(t)?r(t):t}function Ot(){const t=a().proxy;return e=>{t.$forceUpdate(),e&&L(e)&&t.$nextTick((()=>{e()}))}}t({calcResRoutePath:Lt,createOverlayView:Wt,generateRoutePath:async function(t,e,n,o){const a=Bt(e);let s=n.srfdefaulttoroutedepth||2;n.toRouteDepth?(s=n.toRouteDepth,delete n.toRouteDepth):ibiz.env.isMob&&(a.pathNodes[0]={viewName:"home"});if(a.pathNodes.splice(s-1,a.pathNodes.length-s+1),n.currentSrfNav){const t=a.pathNodes[a.pathNodes.length-1];t.params=t.params||{},t.srfnav=n.currentSrfNav,delete n.currentSrfNav}e.fullPath.startsWith("/appredirectview")&&((null==o?void 0:o.srfindexname)?(a.pathNodes[0].viewName=o.srfindexname,delete o.srfindexname):a.pathNodes[0].viewName="index");if(a.pathNodes.push({viewName:t.codeName.toLowerCase(),context:jt(n),params:o}),2===s&&(await Lt(a,n,t.appDataEntityId,t.appId),Vt.includes(t.viewType))){const e=K(t.appDataEntityId);delete a.pathNodes[0].context[e]}return{path:Tt(a)}},getArrayProps:kn,getAutoCompleteProps:jn,getCascaderProps:_n,getCheckboxListProps:bn,getCheckboxProps:In,getCodeProps:Vn,getColorPickerProps:Gn,getDataPickerProps:Pn,getDatePickerProps:Dn,getDateRangeProps:Nn,getDrawerPlacement:function(t){return qt[t]||"right"},getDropdownProps:Cn,getEditorEmits:function(){return{change:(t,e)=>!0,blur:t=>!0,focus:t=>!0,enter:t=>!0,infoTextChange:t=>!0}},getEditorProps:mn,getGridArrayProps:function(){return{...kn(),...fn()}},getGridAutoCompleteProps:function(){return{...jn(),...fn()}},getGridCascaderProps:function(){return{..._n(),...fn()}},getGridCheckboxListProps:function(){return{...bn(),...fn()}},getGridCheckboxProps:function(){return{...In(),...fn()}},getGridCodeProps:function(){return{...Vn(),...fn()}},getGridColorPickerProps:function(){return{...Gn(),...fn()}},getGridDataPickerProps:function(){return{...Pn(),...fn()}},getGridDatePickerProps:function(){return{...Dn(),...fn()}},getGridDateRangeProps:function(){return{...Nn(),...fn()}},getGridDropdownProps:function(){return{...Cn(),...fn()}},getGridEditorCommonProps:fn,getGridEditorEmits:function(){return{change:(t,e)=>!0,rowSave:()=>!0}},getGridHtmlProps:function(){return{...Ln(),...fn()}},getGridInputIpProps:function(){return{...yn(),...fn()}},getGridInputNumberProps:function(){return{...gn(),...fn()}},getGridInputProps:function(){return{...vn(),...fn()}},getGridListBoxProps:function(){return{...En(),...fn()}},getGridMarkDownProps:function(){return{...Mn(),...fn()}},getGridNumberRangeProps:function(){return{...On(),...fn()}},getGridRadioProps:function(){return{...An(),...fn()}},getGridRateProps:function(){return{...xn(),...fn()}},getGridRawProps:function(){return{...Rn(),...fn()}},getGridSliderProps:function(){return{...Sn(),...fn()}},getGridSpanProps:function(){return{...wn(),...fn()}},getGridStepperProps:function(){return{...zn(),...fn()}},getGridSwitchProps:function(){return{...Bn(),...fn()}},getGridUploadProps:function(){return{...Tn(),...fn()}},getHtmlProps:Ln,getInputIpProps:yn,getInputNumberProps:gn,getInputProps:vn,getListBoxProps:En,getMarkDownProps:Mn,getNestedRoutePath:Mt,getNumberRangeProps:On,getOrigin:Et,getOwnRouteContext:jt,getRadioProps:An,getRateProps:xn,getRawProps:Rn,getSliderProps:Sn,getSpanProps:wn,getStepperProps:zn,getSwitchProps:Bn,getUploadProps:Tn,isEmptyVNode:function(t){if(!Array.isArray(t))return t===At;return 1===t.length&&t[0]===At},onRouteChange:function(t,n){const o=W();if(!o)throw new A("无法正确获取route,可能是依赖问题");e((()=>null==o?void 0:o.path),(()=>{const e=Mt(o,n);t({currentKey:e,fullPath:o.fullPath})}),{immediate:!0})},openViewDrawer:async function(t,e){const n=ibiz.overlay.createDrawer(Wt(t),void 0,e);await n.present();return await n.onWillDismiss()||{ok:!1}},openViewFloatWindow:async function(t,e){const n=ibiz.overlay.createFloatWindow(Wt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewModal:async function(t,e){const n=ibiz.overlay.createModal(Wt(t),void 0,e);n.present();return await n.onWillDismiss()||{ok:!1}},openViewPopover:async function(t,e,n){const o=ibiz.overlay.createPopover(Wt(e),void 0,n);o.present(t.target);return await o.onWillDismiss()||{ok:!1}},parseRouteViewData:async function(t,e){var n;const o=Bt(t);let a=o.pathNodes[e-1].viewName;if(!a)throw new A("第".concat(e,"级路由不存在视图标识"));"index"===a&&(a=ibiz.hub.defaultAppIndexViewName);const s=await ibiz.hub.getAppView(a);if(!s)throw new A("找不到视图".concat(a));const r={};(null==(n=ibiz.appData)?void 0:n.context)&&Object.assign(r,ibiz.appData.context);o.appContext&&Object.assign(r,o.appContext);if(1!==e)for(let t=0;t<e;t++){const e=o.pathNodes[t];M(e.context)&&Object.assign(r,e.context)}const{params:i,srfnav:l}=o.pathNodes[e-1];return{viewModel:s,context:r,params:i,srfnav:l}},prepareControl:function(t){const e=zt("control"),{controlType:n,sysCss:o,codeName:a}=t.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=zt("control-".concat(s)),l=[e.b(),e.b(s),e.m(a)];r&&l.push(r);return{controlClass:l,ns:i}},renderString:function(t){if(T(t))return"";if("string"==typeof t)return t;try{return t.toString()}catch(e){ibiz.log.error(t,"转换成字符串失败",e)}return""},route2routePath:Bt,routePath2string:Tt,useClickOutside:Dt,useControlController:Rt,useController:function(t){t.force=Ot()},useCtx:xt,useEventListener:St,useFocusAndBlur:function(t,e){const n=d(),o=d(!1);let a;const s=()=>{o.value||ibiz.log.debug("没有聚焦,不触发失焦"),e(),a.stop(),o.value=!1};return St(n,"click",(e=>{o.value||(a=Dt(n,(()=>{s()})),o.value=!0,t())}),{capture:!0}),{componentRef:n,isFocus:o,doBlur:s,pause:()=>{a&&a.pause()},stop:()=>{a&&a.stop()}}},useForce:Ot,useForceTogether:function(t,e){const n=e.force,o=Ot();e.force=t=>{n(t),o()}},useMobCtx:function(){return i("ctx")},useNamespace:zt,useProps:Nt,usePropsWatch:function(t,n,o){const a=Nt();Object.prototype.hasOwnProperty.call(a,t)&&(e((()=>a[t]),((t,e)=>{n(Et(t),Et(e))}),o),n(Et(a[t]),void 0))},useRouteKey:function(t,n,o){o||(o=d(""));o.value=t.value;const a=new kt(n);return e(t,((t,e)=>{t!==e&&a.nextChange((()=>{o.value=t}))})),o},useRouterQuery:function(){const t=W(),{query:e}=t;return e},useViewController:Ut});const At=t("EmptyVNode",o("EmptyVNode"));function xt(){return i("ctx")}function Rt(t,o){const s=xt(),r=Nt();s.evt.emit("onForecast",r.modelData.name);const i=r.provider;let d;d=(null==i?void 0:i.createController)?i.createController(r.modelData,r.context,r.params,s):t(r.modelData,r.context,r.params,s),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.updateContextParams({...t}),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(r,d),function(t,n,o=[]){const a=["context","params","modelData",...o];e((()=>{const e={};return Object.keys(t).forEach((n=>{a.includes(n)||(e[n]=t[n])})),e}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("部件 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{void 0!==o[t]&&(n.state[t]=o[t])}))}),{immediate:!0})}(r,d,null==o?void 0:o.excludePropsKeys),d.state=l(d.state),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=Ot();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),h.$emit("controllerAppear",d),d.created(),n((()=>d.destroyed())),d}function St(t,o,a,s={}){let r=N;return e(t,((t,e)=>{t!==e&&(T(t)?(r(),r=N):r=E((null==t?void 0:t.$el)||t,o,a,s))}),{immediate:!0}),n((()=>{r!==N&&r()})),()=>{r()}}function zt(t){return new O(t,ibiz.env.namespace)}function Bt(t){const e=t.matched.length,n=[];for(let o=1;o<=e;o++){const e=t.path.split("/")[2*o],a=t.params["params".concat(o)];let s,r,i;s=a&&a!==ibiz.env.routePlaceholder?$.parse(a,{strictNullHandling:!0,delimiter:";"}):void 0,s&&(1===o?(r=s,s=void 0):(s.srfnavctx&&(r=JSON.parse(decodeURIComponent(s.srfnavctx)),delete s.srfnavctx),s.srfnav&&(i=s.srfnav,delete s.srfnav))),n.push({viewName:e,context:r,params:s,srfnav:i})}let o;return t.params.appContext&&t.params.appContext!==ibiz.env.routePlaceholder&&(o=$.parse(t.params.appContext,{strictNullHandling:!0,delimiter:";"})),{appContext:o,pathNodes:n}}function Tt(t){let e="";return t.appContext?e+="/".concat($.stringify(t.appContext,{delimiter:";",strictNullHandling:!0})):e+="/".concat(ibiz.env.routePlaceholder),t.pathNodes.forEach(((t,n)=>{e+="/".concat(t.viewName,"/");let o={};if(0===n)M(t.context)&&(o=t.context);else{if(o=M(t.params)?t.params:{},M(t.context)){const e=JSON.stringify(t.context);"{}"!==e&&(o.srfnavctx=encodeURIComponent(e))}t.srfnav&&(o.srfnav=t.srfnav)}const a=$.stringify(o,{delimiter:";",strictNullHandling:!0,skipNulls:!0});M(a)?e+=a:e+=ibiz.env.routePlaceholder})),e}function jt(t){const e=t.getOwnContext(),n=["srfsessionid","srfappid"];return Object.keys(e).forEach((t=>{n.includes(t)&&delete e[t]})),e}const Vt=t("excludeViewTypes",[F.DE_GRID_VIEW,F.DE_GRID_EXP_VIEW,F.DE_LIST_VIEW,F.DE_LIST_EXP_VIEW,F.DE_DATA_VIEW,F.DE_DATAVIEW_EXP_VIEW,F.DE_CALENDAR_VIEW,F.DE_CALENDAR_EXP_VIEW,F.DE_CHART_VIEW,F.DE_CHART_EXP_VIEW,F.DE_KANBAN_VIEW]);async function Lt(t,e,n,o){if(n){const a=await ibiz.hub.getAppDataEntity(n,o);let s=U(e,a);if(s||(s={path:"",keys:[a.codeName.toLowerCase()]}),s){const n=t.pathNodes[1].context,o={};s.keys.forEach((t=>{e&&Object.prototype.hasOwnProperty.call(e,t)&&(o[t]=e[t],n&&delete n[t])})),t.pathNodes[0].context=o}}else t.pathNodes[0].context=void 0}function Mt(t,e,n=!0){if(t.matched.length<e)return"";if(t.matched.length===e&&t.name)return t.path;const o=Bt(t);return o.pathNodes.length<e?t.path:(o.pathNodes.length>e&&(o.pathNodes=o.pathNodes.slice(0,e)),n&&delete o.pathNodes[e-1].srfnav,Tt(o))}class kt{constructor(t,n){this.callbacks=[],this.timers=[],this.wait=500,n&&(this.wait=n),e((()=>t.path),((t,e)=>{if(t!==e){if(this.callbacks.length)for(let t=0;t<this.callbacks.length;t++){(0,this.callbacks[t])()}if(this.callbacks=[],this.timers.length)for(let t=0;t<this.timers.length;t++){const e=this.timers[t];clearTimeout(e)}this.timers=[]}}))}nextChange(t){t&&(this.timers.push(setTimeout((()=>{t();const e=this.callbacks.findIndex((e=>e===t));this.callbacks.splice(e,1)}),this.wait)),this.callbacks.push(t))}}t("RouteListener",kt);const _t=t("withInstall",((t,e)=>(t.install=t=>{e(t)},t)));class Gt{constructor(t,e,n){this.component=t,this.render=e,this.opts=n,this.evt=new k,this.init()}static createVueApp(t,e){throw new A("没有注入createVueApp方法")}init(){const t=this,{render:e,opts:n}=this,o=document.createElement("div");document.body.appendChild(o);const a=Gt.createVueApp({mounted(){t.modal=this.$refs.root},unmounted(){document.body.removeChild(o),t.evt.emit("dismiss",t.result)},render:()=>h(t.component,{ref:"root",opts:n,onDismiss(e){t.result=e,a.unmount()}},{default:e})});ibiz.plugin.register(a),a.mount(o),this.vm=a}async present(){return this.modal.present()}async dismiss(t){this.modal.dismiss(t)}async onWillDismiss(){return new Promise((t=>{const e=n=>{t(n),this.evt.off("dismiss",e)};this.evt.on("dismiss",e)}))}}t("OverlayContainer",Gt);function Wt(t){return e=>{const n=p("IBizViewShell");return h(n,{...t,modal:e})}}t("OverlayPopoverContainer",class extends Gt{present(t){return this.modal.present(t)}});const qt={DRAWER_LEFT:"left",DRAWER_RIGHT:"right",DRAWER_TOP:"top",DRAWER_BOTTOM:"bottom"};class $t{constructor(t,e){this.from=t,this.to=e,this.isActivated=!1,ibiz.log.debug("openRouter: ",t,e)}onWillDismiss(){return this.promise||(this.promise=new Promise((t=>{this.resolve=t}))),this.promise.then((t=>(ibiz.log.debug("onWillDismiss: ",this.from,this.to,t),t)))}close(t){ibiz.log.debug("closeRouter: ",this.from,this.to,t),this.resolve&&(this.resolve(t),this.resolve=void 0)}active(){ibiz.log.debug("activeRouter: ",this.from,this.to),this.isActivated=!0}destroy(){ibiz.log.debug("destroyRouter: ",this.from,this.to),this.resolve&&(this.resolve({ok:!1}),this.resolve=void 0)}}t("routerCallback",new class{constructor(){this.map=new Map}async open(t,e){const n=t.currentRoute.value.fullPath;t.push({path:e});const o=e;if(this.map.has(o)){return this.map.get(o).onWillDismiss()}const a=new $t(n,o);return this.map.set(o,a),this.scheduledDestruction(a),a.onWillDismiss()}close(t,e){const n=this.map.get(t);n&&(n.close(e),this.map.delete(t))}active(t){const e=this.map.get(t);e&&(window.clearTimeout(e.timeout),e.timeout=void 0,e.active())}scheduledDestruction(t){t.timeout=window.setTimeout((()=>{t.timeout=void 0,t.destroy(),this.map.delete(t.to)}),1e4)}});function Ft(){const t=d([]),e=d(0),n=m((()=>t.value.filter(((t,n)=>n<e.value)))),o=n=>{if(!n.data||"ASYNCACTION"!==n.subtype)return;const o=(a=n.data,["begintime","endtime","createdate","updatedate"].forEach((t=>{Pt(a[t])&&(a[t]=It(a[t]).format("YYYY-MM-DD HH:mm:ss"))})),a);var a;const s=t.value.findIndex((t=>t.asyncacitonid===o.asyncacitonid));if(-1!==s)t.value.unshift(o),e.value+=1;else{s>=e.value?(t.value.splice(s,1),t.value.unshift(o),e.value+=1):t.value.splice(s,1,o)}};return(async()=>{const e=await ibiz.asyncAction.fetch();t.value=e.data})(),ibiz.mc.command.asyncAction.on(o),f((()=>{ibiz.mc.command.asyncAction.off(o)})),{allAsyncActions:t,recentAsyncActions:n}}t("useAppStore",Ct("appStore",(()=>{const{allAsyncActions:t,recentAsyncActions:e}=Ft();return{appStore:l({allAsyncActions:t,get recentAsyncActions(){return e.value}})}})));t("useUIStore",Ct("uiStore",(()=>{const t=function(){const t=d(500);return{zIndex:t,increment:function(){return t.value+=1,t.value},decrement:function(){t.value-=1}}}();return{UIStore:l({zIndex:t.zIndex,theme:"light"}),zIndex:t}}))),t("piniaInstance",bt());function Ut(t){const o=Nt(),s=i("ctx",void 0);null==s||s.evt.emit("onForecast",o.modelData.name);const r=o.provider;let d;d=(null==r?void 0:r.createController)?r.createController(o.modelData,o.context,o.params,s):t(o.modelData,o.context,o.params,s),function(t,n){e((()=>({context:t.context,params:t.params})),(t=>{n.context.reset({},t.context),_(n.params),Object.assign(n.params,t.params),n.handleContextParams(),ibiz.log.debug("".concat(n.model.id,"的上下文或视图参数变更:"),t)}))}(o,d),function(t,n){e((()=>t.state?{...t.state}:{}),((t,e)=>{const o={};Object.keys(t).forEach((n=>{t[n]!==(e||{})[n]&&(o[n]=t[n])})),ibiz.log.debug("视图 [".concat(n.model.name,"] state 变更"),o),Object.keys(o).forEach((t=>{n.state[t]=o[t]}))}),{immediate:!0})}(o,d),v("ctx",d.ctx),d.state=l(d.state),d.slotProps=l(d.slotProps),o.modal&&(d.modal=o.modal),c((()=>d.onActivated())),u((()=>d.onDeactivated())),d.force=Ot();const h=a().proxy;return d.evt.onAll(((t,e)=>{h.$emit(t.slice(2),e)})),d.created(),n((()=>d.destroyed())),d}t("IBizIcon",g({name:"IBizIcon",props:{icon:{type:Object},size:{type:String},baseDir:{type:String,default:"images"}},setup(t){const e=zt("icon"),n="".concat(ibiz.env.assetsUrl,"/").concat(t.baseDir,"/");const o=m((()=>function(t){if(t){if(t.htmlStr)return y("span",{class:e.b(),innerHTML:t.htmlStr},null);if(t.cssClass)return-1!==t.cssClass.indexOf("fa-")?y("i",{class:[e.b(),t.cssClass]},null):y("ion-icon",{class:e.b(),name:t.cssClass},null);if(t.imagePath)return x(t.imagePath)?y("img",{class:e.b(),src:t.imagePath},null):R(t.imagePath)?y("div",{class:e.b(),innerHTML:t.imagePath},null):t.imagePath.endsWith("svg")?t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("ion-icon",{src:n+t.imagePath,class:e.b()},null):t.imagePath.startsWith("http")?y("img",{class:e.b(),src:t.imagePath},null):y("img",{class:e.b(),src:n+t.imagePath},null);if(t.rawContent)return R(t.rawContent)?y("div",{class:e.b(),innerHTML:t.rawContent},null):y("img",{class:e.b(),src:t.rawContent},null)}return null}(t.icon)));return()=>o.value}})),t("IBizRouterView",g({name:"IBizRouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object,manualKey:{type:String}},setup(t,{attrs:n}){const o={};let a=!0;e((()=>t.manualKey),((t,e)=>{j(t)&&t!==e&&(a=!0)}));return{renderComp:(e,s)=>{if(!a)return o.vNode;if(a=!1,e){const a={...e.props};delete a.onVnodeUnmounted,delete a.ref;const s=h(e.type,{...a,...n,key:t.manualKey});return o.vNode=s,s}}}},render(){return y(p("router-view"),{name:this.name,route:this.route},{default:({Component:t,route:e})=>{const n=this.renderComp(t,e);return this.$slots.default?this.$slots.default({Component:n,route:e}):n}})}})),t("IBizControlBase",g({name:"IBizControlBase",props:{controller:{type:Object,required:!0}},setup(t){const e=zt("control"),{controlType:n,sysCss:o,codeName:a}=t.controller.model,s=n.toLowerCase(),r=null==o?void 0:o.cssName,i=t.controller.model,c=t.controller.model.controls,u=l({});return!1===i.controlType.endsWith("EXPBAR")&&(T(i.width)||(u.width="".concat(i.width,"px")),T(i.height)||(u.height="".concat(i.height,"px"))),{ns:e,typeClass:s,sysCssName:r,inlineStyle:u,codeName:a,controls:c,onLayoutPanelCreated:e=>{t.controller.setLayoutPanel(e)}}},render(){var t,e,n;const{state:o,controlPanel:a,providers:s}=this.controller;let r=null;if(o.isCreated&&a){const e={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const n=t.name,o={context:this.controller.context,params:this.controller.params},a=e[n];e[n]=a?()=>a(o):()=>{const e=p("IBizControlShell");return h(e,{modelData:t,...o})}}));const n=s[a.name];r=h(p(n.component),{modelData:a,context:this.controller.context,params:this.controller.params,provider:n,container:this.controller,onControllerAppear:this.onLayoutPanelCreated},e)}return y("div",{class:[this.ns.b(),this.ns.b(this.typeClass),this.ns.m(this.codeName),this.sysCssName],style:this.inlineStyle},[r||(null==(n=(e=this.$slots).default)?void 0:n.call(e))])}})),t("IBizControlShell",g({name:"IBizControlShell",props:{modelData:{type:Object,required:!0}},setup(t){i("ctx").evt.emit("onForecast",t.modelData.name);const e=d(!1),n=d(""),o=d();H(t.modelData).then((t=>{t?o.value=t:n.value="未找到对应部件的适配器",e.value=!0})).catch((t=>{ibiz.log.error(t),n.value=t.message,e.value=!0}));return{ns:zt("control-shell"),isComplete:e,errMsg:n,provider:o}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{provider:this.provider,...this.$props,...this.$attrs},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizViewShell",g({name:"IBizViewShell",props:{context:{type:Object,required:!0},params:{type:Object},modelData:{type:Object},viewId:{type:String}},setup(t){const e=zt("view-shell"),n=d(!1),o=d(""),a=d(),s=d();return(async()=>{let e;if(e=t.modelData?t.modelData:await ibiz.hub.getAppView(t.viewId),!e)throw new A("未找到视图模型");s.value=e;try{a.value=await X(e)}catch(t){ibiz.log.error(t),o.value=t.message}finally{n.value=!0}})(),{ns:e,isComplete:n,errMsg:o,viewModelData:s,provider:a}},render(){return this.isComplete&&this.provider?h(p(this.provider.component),{context:this.$props.context,params:this.$props.params,modelData:this.viewModelData,...this.$attrs,provider:this.provider},this.$slots):w(y("div",{class:this.ns.b()},[this.isComplete?this.errMsg:null]),[[C("loading"),!this.isComplete]])}})),t("IBizCodeList",g({name:"IBizCodeList",props:{codeListItems:{type:Array},codeList:{type:Object,required:!0},value:{type:[String,Number]}},emits:{infoTextChange:t=>!0},setup(t,{emit:n}){var o,a;const s=zt("code-list"),r=d([]),i=(null==(o=t.codeList)?void 0:o.textSeparator)||"、",l=(null==(a=t.codeList)?void 0:a.valueSeparator)||",";e(r,(t=>{let e="";t.length>0&&(e=t.map((t=>t.text)).join(i)),n("infoTextChange",e)}));const c=(t,e)=>{if(t){const n=t.find((t=>t.value==e));if(n)return n;for(let n=0;n<t.length;n++){const o=c(t[n].children,e);if(o)return o}}};e((()=>t.value),((e,n)=>{if(e!==n)if(T(e)||""===e)r.value=[];else{let n;n="string"==typeof e?e.split(l):[e],r.value=n.map((e=>{const n=c(t.codeListItems,e);return{text:(null==n?void 0:n.text)||e,color:null==n?void 0:n.color,textCls:null==n?void 0:n.textCls,sysImage:null==n?void 0:n.sysImage}}))}}),{immediate:!0});const u="未定义"===t.codeList.emptyText?"- - -":t.codeList.emptyText;return{items:r,ns:s,emptyText:u,textSeparator:i}},render(){return y("span",{class:this.ns.b()},[0===this.items.length?this.emptyText:this.items.map(((t,e)=>[0!==e?this.textSeparator:null,y("span",{class:[this.ns.e("item"),t.textCls?t.textCls:null],style:t.color?this.ns.cssVarBlock({"item-color":"".concat(t.color)}):null},[t.sysImage&&y(p("iBizIcon"),{icon:t.sysImage},null),t.text])]))])}})),t("ControlLoadingPlaceholder",g({name:"ControlLoadingPlaceholder",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})}},setup:t=>(i("ctx").evt.emit("onForecast",t.modelData.name),{}),render:()=>null}));class Kt extends Q{}t("PanelContainerState",Kt);class Ht extends Y{createState(){var t;return new Kt(null==(t=this.parent)?void 0:t.state)}}function Xt(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerController",Ht);const Qt=g({name:"IBizPanelContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ht,required:!0}},setup(t){const e=zt("panel-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o}));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Xt(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Xt(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class Yt{constructor(){this.component="IBizPanelContainer"}async createController(t,e,n){const o=new Ht(t,e,n);return await o.init(),o}}t("IBizPanelContainer",_t(Qt,(function(t){t.component(Qt.name,Qt),J("CONTAINER",(()=>new Yt)),J("CONTAINER_DEFAULT",(()=>new Yt))})));const Jt=g({name:"IBizPanelCtrlPos",props:{modelData:{type:Object,required:!0},controller:{type:Object,required:!0}},setup(t){i("ctx").evt.on("onRegister",((e,n)=>{e===t.modelData.id&&t.controller.bindControl(n)}));return{ns:zt("panel-ctrl-pos")}},render(){const{state:t}=this.controller;let e;return this.$slots.default&&(e=this.$slots.default()),y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!t.visible)]},[e||(ibiz.env.dev?"未提供".concat(this.modelData.id,"插槽"):"")])}});class Zt extends Y{bindControl(t){this.control=t,t.evt.onAll(((t,e)=>{this.panel.evt.emit("onControlEvent",{triggerControlName:this.model.id,triggerEventName:t,triggerEvent:e})}))}}t("PanelCtrlPosController",Zt);class te{constructor(){this.component="IBizPanelCtrlPos"}async createController(t,e,n){const o=new Zt(t,e,n);return await o.init(),o}}t("IBizPanelCtrlPos",_t(Jt,(function(t){t.component(Jt.name,Jt),J("CTRLPOS",(()=>new te))})));class ee extends Y{}function ne(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("ScrollContainerItemController",ee);const oe=t("ScrollContainerItem",g({name:"IBizScrollContainerItem",props:{modelData:{type:Object,required:!0},controller:{type:ee,required:!0}},setup(t){const e=zt("scroll-container-item"),{id:n}=t.modelData,o=m((()=>[e.b(),e.m(n),e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return y(p("iBizRow"),{class:this.classArr,layout:{layout:"FLEX"}},ne(n=o.map((t=>{const e=t.props;return e&&e.controller?(e.modelData.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},ne(t)?t:{default:()=>[t]})):t})))?n:{default:()=>[n]})}}));class ae{constructor(){this.component="IBizScrollContainerItem"}async createController(t,e,n){const o=new ee(t,e,n);return await o.init(),o}}class se extends Y{async onInit(){await super.onInit(),this.state.layout.width="100%",this.state.layout.height="100%"}}t("ScrollContainerController",se);const re=t("ScrollContainer",g({name:"IBizScrollContainer",props:{modelData:{type:Object,required:!0},controller:{type:se,required:!0}},setup(t){const e=zt("scroll-container"),{id:n}=t.modelData,o=m((()=>[e.b(),e.m(n),...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)]));return{ns:e,classArr:o}},render(){var t,e;let n=null,o=null,a=null,s=null,r=null;const i={};((null==(e=(t=this.$slots).default)?void 0:e.call(t))||[]).forEach((t=>{const e=t.props;if(!e||!e.controller)return;const{width:l,height:c}=e.controller.state.layout;switch(e.modelData.layoutPos.layoutPos){case"WEST":n=t,i.left={width:l};break;case"EAST":a=t,i.right={width:l};break;case"NORTH":o=t,i.top={height:c};break;case"SOUTH":s=t,i.bottom={height:c};break;case"CENTER":r=t;break;default:ibiz.log.debug("未适配的布局占位".concat(e.modelData.layoutPos.layoutPos))}}));for(const t in i)(i[t].width||i[t].height)&&(i[t].flexShrink=0);return y("div",{class:this.classArr},[y("div",{class:[this.ns.e("header")],style:i.top},[o]),y("div",{class:[this.ns.b("content")]},[y("div",{class:this.ns.be("content","left"),style:i.left},[n]),y("div",{class:this.ns.be("content","center")},[r]),y("div",{class:this.ns.be("content","right"),style:i.right},[a])]),y("div",{class:[this.ns.e("footer")],style:i.bottom},[s])])}}));class ie{constructor(){this.component="IBizScrollContainer"}async createController(t,e,n){const o=new se(t,e,n);return await o.init(),o}}t("IBizScrollContainer",_t(re,(function(t){t.component(re.name,re),t.component(oe.name,oe),J("CONTAINER_CONTAINER_SCROLL",(()=>new ie)),J("CONTAINER_CONTAINER_SCROLL_LEFT",(()=>new ae)),J("CONTAINER_CONTAINER_SCROLL_HEADER",(()=>new ae)),J("CONTAINER_CONTAINER_SCROLL_RIGHT",(()=>new ae)),J("CONTAINER_CONTAINER_SCROLL_BOTTOM",(()=>new ae)),J("CONTAINER_CONTAINER_SCROLL_MAIN",(()=>new ae))})));class le extends Q{constructor(){super(...arguments),this.cache=!0,this.routeOpen=!0,this.currentKey="",this.cacheKeys=["RouterShell"],this.navViewMsgs={}}}t("NavPosState",le);const ce=["is404","isRoutePushed"];class ue extends Y{constructor(){super(...arguments),this.viewModals={},this.refCtrlKeys=[],this.rawItemParams={}}get route(){return this.router.currentRoute.value}getExpItemIsCache(t){return"CACHE"===this.rawItemParams.expcache||"NO_CACHE"!==this.rawItemParams.expcache&&t.isCache}setRouter(t){this.router=t}async onInit(){var t;await super.onInit(),this.handleRawItemParams(),(null==(t=this.model.rawItem)?void 0:t.rawItemParams)&&this.model.rawItem.rawItemParams.find((t=>!("REFCTRL"!==t.key||!t.value)&&(this.refCtrlKeys=t.value.split(";").map((t=>t.toLowerCase())),!0))),this.panel.evt.on("onControlEvent",(t=>{if((0===this.refCtrlKeys.length||this.refCtrlKeys.includes(t.triggerControlName))&&"onNavViewChange"===t.triggerEventName){const e=t.triggerEvent;this.openView(e.navViewMsg)}}));const e=this.rawItemParams.expmode||this.panel.view.params.expmode;"ROUTE"===e&&this.routeDepth?this.state.routeOpen=!0:this.state.routeOpen="NO_ROUTE"!==e&&!!this.routeDepth,this.panel.view.params.expmode&&delete this.panel.view.params.expmode}createState(){var t;return new le(null==(t=this.parent)?void 0:t.state)}get routeDepth(){return this.panel.view.modal.routeDepth}calcCacheKey(t){return t?"".concat(t.viewId,"___").concat(t.key):""}onRouteChange(t){if(this.curNavViewMsg){const e=this.calcCacheKey(this.curNavViewMsg);this.state.currentKey=e,this.state.navViewMsgs[e].fullPath=t.fullPath}}setNavViewMsgs(t){t.isRoutePushed=!0===t.isRoutePushed;const e=this.calcCacheKey(t);this.state.navViewMsgs[e]?(V(this.state.navViewMsgs[e],t),ce.forEach((n=>{Object.prototype.hasOwnProperty.call(t,n)&&(this.state.navViewMsgs[e][n]=void 0)}))):(this.state.navViewMsgs[e]=t,this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),this.viewModals[e]=new Z({mode:this.routeDepth?tt.ROUTE:tt.EMBED,routeDepth:this.routeDepth?this.routeDepth+1:void 0,dismiss:()=>{this.dismiss(e)}})),this.curNavViewMsg=this.state.navViewMsgs[e]}dismiss(t){ibiz.log.debug(this.constructor.name,"dismiss",t)}onViewCreated(t){ibiz.log.debug(this.constructor.name,"onViewCreated",t)}toBlankRoute(){const t=Mt(this.route,this.routeDepth);this.router.push(t)}openView(t){if(!t.key)return this.state.currentKey=this.calcCacheKey(t),void(this.routeDepth&&this.state.routeOpen&&this.toBlankRoute());this.routeDepth&&this.state.routeOpen?this.openViewByPath(t):this.openViewByModel(t)}openViewByPath(t){const e=this.calcCacheKey(t);this.setNavViewMsgs(t);if(!0===t.isRoutePushed)return this.state.currentKey=e,void(this.state.navViewMsgs[this.calcCacheKey(this.curNavViewMsg)].fullPath=this.route.fullPath);if(t.is404){const t=Mt(this.route,this.routeDepth,!1);this.router.push("".concat(t,"/404"))}else if(this.state.navViewMsgs[e].fullPath&&this.getExpItemIsCache(t))this.router.push(this.state.navViewMsgs[e].fullPath);else{const n=Object.assign(t.context.clone(),{toRouteDepth:this.routeDepth+1});this.getExpItemIsCache(t)&&this.state.cacheKeys.push(e),ibiz.commands.execute(et.TAG,t.viewId,n,t.params,{openMode:"INDEXVIEWTAB"})}}openViewByModel(t){this.setNavViewMsgs(t),this.state.currentKey=this.calcCacheKey(t)}handleRawItemParams(){var t;let e={};const n=null==(t=this.model.rawItem)?void 0:t.rawItemParams;M(n)&&(e=n.reduce(((t,e)=>(t[e.key.toLowerCase()]=e.value,t)),{})),Object.assign(this.rawItemParams,e)}}function de(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("NavPosController",ue);const he=g({name:"IBizNavPos",props:{modelData:{type:Object,required:!0},controller:{type:ue,required:!0}},setup(t){const n=t.controller,o=zt("nav-pos"),a=q(),s=W();if(n.setRouter(a),n.routeDepth){const t=Mt(s,n.routeDepth);e((()=>s.fullPath),(()=>{const e=Mt(s,n.routeDepth);t===e&&s.matched.length>n.routeDepth&&n.onRouteChange(s)}),{immediate:!0})}return{ns:o,c:n,onViewCreated:t=>{n.onViewCreated(t)}}},render(){const{viewModals:t,state:e}=this.c,{currentKey:n,cacheKeys:o,navViewMsgs:a,cache:s}=e;let r=null;if(e.routeOpen)r=y(p("iBizRouterView"),{manualKey:n,modal:t[n],onCreated:this.onViewCreated},{default:({Component:t})=>{const e=""!==n&&t?y(t,null,null):null;return s?y(p("keepAlive"),{include:o,max:30,isKey:!0},de(e)?e:{default:()=>[e]}):e}});else{const t=n?h(p("IBizViewShell"),{context:a[n].context,params:a[n].params,key:a[n].key,viewId:a[n].viewId,onCreated:this.onViewCreated}):null;r=s?y(p("keepAlive"),{include:o,max:30,isKey:!0},de(t)?t:{default:()=>[t]}):t}return y("div",{class:[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass]},[r])}});class pe{constructor(){this.component="IBizNavPos"}async createController(t,e,n){const o=new ue(t,e,n);return await o.init(),o}}t("IBizNavPos",_t(he,(function(t){t.component(he.name,he),J("RAWITEM_NAV_POS",(()=>new pe))})));class me extends Q{}class fe extends Y{constructor(){super(...arguments),this.unitName=void 0}get valueFormat(){return this.model.valueFormat}get dataType(){}get context(){return this.panel.context}get params(){return this.panel.params}get data(){return this.dataParent.data}get value(){return this.data[this.model.id]}createState(){var t;return new me(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),this.state.required=!this.model.allowEmpty,this.model.editor&&"HIDDEN"!==this.model.editor.editorType&&(this.editorProvider=await nt(this.model.editor),this.editorProvider&&(this.editor=await this.editorProvider.createController(this.model.editor,this)))}async setDataValue(t,e){const{id:n}=this.model;e=e||n,this.dataParent.setDataValue&&await this.dataParent.setDataValue(e,t),this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.CHANGE})}onFocus(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.FOCUS,event:t})}onBlur(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.BLUR,event:t})}onEnter(t){this.panel.evt.emit("onPanelItemEvent",{panelItemName:this.model.id,panelItemEventName:ot.ENTER,event:t})}}t("PanelFieldController",fe);const ve=g({name:"IBizPanelField",props:{modelData:{type:Object,required:!0},controller:{type:fe,required:!0}},setup(t){const e=zt("panel-field"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n,onValueChange:(e,n)=>{t.controller.setDataValue(e,n)}}},render(){let t=null;if(this.controller.data){const e={value:this.controller.value,data:this.controller.data,controller:this.controller.editor,disabled:this.controller.state.disabled,class:this.ns.b("content"),readonly:this.controller.model.editor.readOnly,onChange:this.onValueChange,onFocus:t=>this.controller.onFocus(t),onBlur:t=>this.controller.onBlur(t),onEnter:t=>this.controller.onEnter(t)};if(this.$slots.default)t=this.$slots.default(e);else if(this.controller.editorProvider){const n=p(this.controller.editorProvider.formEditor);t=h(n,{...e})}else t=y(p("not-supported-editor"),{modelData:this.modelData.editor},null)}return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[t])}});class ge{constructor(){this.component="IBizPanelField"}async createController(t,e,n){const o=new fe(t,e,n);return await o.init(),o}}t("IBizPanelField",_t(ve,(function(t){t.component(ve.name,ve),J("FIELD",(()=>new ge))})));class ye extends Y{get data(){return this.dataParent.data}async onInit(){await super.onInit()}}t("PanelRawItemController",ye);const we=g({name:"IBizPanelRawItem",props:{modelData:{type:Object,required:!0},controller:{type:ye,required:!0}},setup(t){const e=zt("panel-rawitem"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){if(this.controller.state.visible)return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()}},[y(p("iBizRawItem"),{rawItem:this.modelData},null)])}});class Ce{constructor(){this.component="IBizPanelRawItem"}async createController(t,e,n){const o=new ye(t,e,n);return await o.init(),o}}t("IBizPanelRawItem",_t(we,(function(t){t.component(we.name,we),J("RAWITEM",(()=>new Ce)),J("RAWITEM_STATIC_IMAGE",(()=>new Ce)),J("RAWITEM_STATIC_LABEL",(()=>new Ce)),J("RAWITEM_STATIC_TEXT",(()=>new Ce))})));class be extends Q{constructor(){super(...arguments),this.data={}}}class Ie{constructor(t,e,n,o){this.model=t,this.panel=e,this.parent=n,this.state=new be,this.isDataContainer=!0,this.panelItems={},this.state.data=o;const a=at(this.model).map((t=>t.id));o._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])}))}get data(){return this.state.data}async init(){await this.initChildrenController()}async initChildrenController(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=this.parent.providers[t.id];if(!s)return;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!st(t)?await this.initChildrenController(t.panelItems,e,r):(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initChildrenController(t.panelTabPages,e,r)})))}async dataChangeNotify(t){}async childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async panelStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e,this.childDataChangeNotify([t]))}destroy(){var t,e;null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}class Pe extends Q{constructor(){super(...arguments),this.items=[]}}t("MultiDataContainerState",Pe);class De extends Y{constructor(){super(...arguments),this.isDataContainer=!0,this.dataItems=[],this.providers={}}get data(){return this.state.items}createState(){var t;return new Pe(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemProviders(),this.initContainerData()}async initPanelItemProviders(t=this.model.panelItems){t&&await Promise.all(t.map((async t=>{var e,n;const o=await rt(t);o&&(this.providers[t.id]=o,(null==(e=t.panelItems)?void 0:e.length)&&!st(t)&&await this.initPanelItemProviders(t.panelItems),(null==(n=t.panelTabPages)?void 0:n.length)&&await this.initPanelItemProviders(t.panelTabPages))})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new S(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){this.dataItems.forEach((e=>{e.panelStateNotify(t)}))}async setData(t){const e=at(this.model),n=t.map((t=>new it(e,t)));this.dataItems=n.map((t=>new Ie(this.model,this.panel,this,t))),this.dataItems.length&&await Promise.all(this.dataItems.map((t=>t.init()))),this.state.items=n,this.childrenStateNotify(lt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await ct(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new z(this.model,"没有配置实体行为");if(!e)throw new z(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}setDataValue(t,e){throw new Error("Method not implemented.")}destroy(){super.destroy(),this.dataItems.forEach((t=>{t.destroy()}))}}t("MultiDataContainerController",De);const Ne=g({name:"IBizMultiDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:De,required:!0}},setup(t){const n=zt("multi-data-container"),{id:o}=t.modelData;e((()=>t.controller.state.items),(()=>{t.controller.dataItems.forEach((t=>{t.state=l(t.state);Object.keys(t.panelItems).forEach((e=>{const n=t.panelItems[e];n.state=l(n.state)}))}))}),{immediate:!0});const a=i("renderPanelItem"),s=m((()=>[n.b(),n.m(o),...t.controller.containerClass]));return{ns:n,classArr:s,renderPanelItem:a}},render(){let t;return t=this.$slots.default?this.$slots.default():this.controller.state.items.map(((t,e)=>{const n=this.controller.dataItems[e];return y(p("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const o=n.panelItems[t.id];return y(p("iBizCol"),{layoutPos:t.layoutPos,state:o.state},"function"==typeof(a=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:n.panelItems}))||"[object Object]"===Object.prototype.toString.call(a)&&!b(a)?e:{default:()=>[e]});var a}))]}})})),y("div",{class:this.classArr},[t])}});class Ee{constructor(){this.component="IBizMultiDataContainer"}async createController(t,e,n){const o=new De(t,e,n);return await o.init(),o}}t("IBizMultiDataContainer",_t(Ne,(function(t){t.component(Ne.name,Ne),J("CONTAINER_CONTAINER_MULTIDATA",(()=>new Ee))})));class Oe extends Q{constructor(){super(...arguments),this.data={}}}t("SingleDataContainerState",Oe);class Ae extends Y{constructor(){super(...arguments),this.isDataContainer=!0,this.panelItems={},this.providers={}}get data(){return this.state.data}createState(){var t;return new Oe(null==(t=this.parent)?void 0:t.state)}async onInit(){await super.onInit(),await this.initPanelItemControllers(),this.initContainerData()}async initPanelItemControllers(t=this.model.panelItems,e=this.panel,n=this){t&&await Promise.all(t.map((async t=>{var o,a;const s=await rt(t);if(!s)return;this.providers[t.id]=s;const r=await s.createController(t,e,n);this.panelItems[t.id]=r,(null==(o=t.panelItems)?void 0:o.length)&&!st(t)&&await this.initPanelItemControllers(t.panelItems,e,r),(null==(a=t.panelTabPages)?void 0:a.length)&&await this.initPanelItemControllers(t.panelTabPages,e,r)})))}initContainerData(){const{dataSourceType:t,dataName:e}=this.model;switch(t){case"DEACTION":case"DEDATASET":this.setDataByDeMethod();break;case"APPGLOBALPARAM":this.setDataByAppGlobalParam();break;case"DELOGIC":this.setDataByDeLogic();break;case"TOPVIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.getTopView(),e);break;case"VIEWSESSIONPARAM":if(!e)throw new z(this.model,"没有配置数据对象名称");this.bindViewData(this.panel.view,e);break;default:throw new S(this.model,"数据源类型".concat(t,"暂未支持"))}}childrenStateNotify(t){Object.values(this.panelItems).forEach((e=>{e.panelStateNotify(t)}))}async setData(t){var e,n;const o=at(this.model),a=o.map((t=>t.id)),s=new it(o,t);s._evt.on("change",(t=>{a.includes(t)&&this.childDataChangeNotify([t])})),null==(n=(e=this.data).destroy)||n.call(e),this.state.data=s,this.childrenStateNotify(lt.LOAD)}async setDataByDeLogic(){const{appDataEntityId:t,appDELogicId:e}=this.model;if(!e)throw new z(this.model,"没有配置实体逻辑");if(!t)throw new z(this.model,"没有配置实体");const n=await ct(e,t,this.panel.context,[],this.panel.params);if(!n)throw new A("实体逻辑".concat(e,"没有返回值"));this.setData(n)}setDataByAppGlobalParam(){const{dataName:t}=this.model,e=t?ibiz.appData[t]:ibiz.appData;e?this.setData(e):ibiz.log.error("全局变量里没有".concat(t,"属性"))}async setDataByDeMethod(){const{appDEMethodId:t,appDataEntityId:e}=this.model;if(!t)throw new z(this.model,"没有配置实体行为");if(!e)throw new z(this.model,"没有配置实体");const n=ibiz.hub.getApp(this.panel.context.srfappid),o=await n.deService.exec(e,t,this.panel.context,[],this.panel.params);o.ok&&o.data&&this.setData(o.data)}bindViewData(t,e){if(!Object.prototype.hasOwnProperty.call(t.state,e))return void ibiz.log.error("绑定视图的会话不存在".concat(e));const n=()=>{const n=t.state[e];n?this.setData(n):ibiz.log.error("视图state里没有".concat(e,"属性"))};n(),t.evt.on("onDataChange",(()=>{n()}))}childDataChangeNotify(t){Object.values(this.panelItems).forEach((e=>{e.dataChangeNotify(t)}))}async setDataValue(t,e){Object.prototype.hasOwnProperty.call(this.state.data,t)&&this.state.data[t]===e||(this.state.data[t]=e)}destroy(){var t,e;super.destroy(),null==(e=(t=this.data).destroy)||e.call(t),Object.values(this.panelItems).forEach((t=>{t.destroy()}))}}t("SingleDataContainerController",Ae);const xe=g({name:"IBizSingleDataContainer",props:{modelData:{type:Object,required:!0},controller:{type:Ae,required:!0}},setup(t){const e=zt("single-data-container"),{id:n}=t.modelData;Object.keys(t.controller.panelItems).forEach((e=>{const n=t.controller.panelItems[e];n.state=l(n.state)}));const o=i("renderPanelItem"),a=m((()=>[e.b(),e.m(n),...t.controller.containerClass]));return{ns:e,classArr:a,renderPanelItem:o}},render(){let t;return t=this.$slots.default?this.$slots.default():y(p("iBizRow"),{class:this.ns.b("content"),layout:this.modelData.layout},{default:()=>{var t;return[null==(t=this.modelData.panelItems)?void 0:t.map((t=>{let e;const n=this.controller.panelItems[t.id];return y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t,{providers:this.controller.providers,panelItems:this.controller.panelItems}))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o}))]}}),y("div",{class:this.classArr},[t])}});class Re{constructor(){this.component="IBizSingleDataContainer"}async createController(t,e,n){const o=new Ae(t,e,n);return await o.init(),o}}t("IBizSingleDataContainer",_t(xe,(function(t){t.component(xe.name,xe),J("CONTAINER_CONTAINER_SINGLEDATA",(()=>new Re))})));class Se extends Q{}t("GridContainerState",Se);class ze extends Y{createState(){var t;return new Se(null==(t=this.parent)?void 0:t.state)}}function Be(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("GridContainerController",ze);const Te=g({name:"IBizGridContainer",props:{modelData:{type:Object,required:!0},controller:{type:ze,required:!0}},setup(t){const e=zt("grid-container"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>({...t.modelData.layout,layout:"TABLE_12COL"}))),s=d(void 0),r=d(12);return{ns:e,classArr:o,layoutModel:a,convertLayoutPos:(t,e)=>{const n={...t,layout:"TABLE_12COL",colXS:t.grow||e,colSM:t.grow||e,colMD:t.grow||e,colLG:t.grow||e};return delete n.grow,n},adaptGrow:r,adaptCols:s}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];if(void 0===this.adaptCols){let t=0,e=0;o.forEach((n=>{const o=n.props;o&&o.modelData&&o.modelData.layoutPos&&("number"==typeof o.modelData.layoutPos.grow?t+=o.modelData.layoutPos.grow:void 0===o.modelData.layoutPos.grow&&(e+=1))}));let n=12;e>0&&(n=(12-t)/e),this.adaptCols=e,this.adaptGrow=n}return y(p("iBizRow"),{class:this.classArr,layout:this.layoutModel},Be(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:this.convertLayoutPos(e.modelData.layoutPos,this.adaptGrow),state:e.controller.state},Be(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]})}});class je{constructor(){this.component="IBizGridContainer"}async createController(t,e,n){const o=new ze(t,e,n);return await o.init(),o}}t("IBizGridContainer",_t(Te,(function(t){t.component(Te.name,Te),J("CONTAINER_CONTAINER_GRID",(()=>new je))})));class Ve extends Q{}t("PanelContainerImageState",Ve);class Le extends Y{createState(){var t;return new Ve(null==(t=this.parent)?void 0:t.state)}}function Me(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}t("PanelContainerImageController",Le);const ke=g({name:"IBizPanelContainerImage",props:{modelData:{type:Object,required:!0},controller:{type:Le,required:!0}},setup(t){const e=zt("panel-container-image"),{id:n}=t.modelData,o=m((()=>{let o=[e.b(),e.m(n)];return o=[...o,...t.controller.containerClass,e.is("hidden",!t.controller.state.visible)],o})),a=m((()=>{const e=t.controller.model.sysImage,n={};let o="";return(null==e?void 0:e.rawContent)?o=R(e.rawContent)?"url(data:image/svg+xml;base64,".concat(btoa(e.rawContent),")"):"url(".concat(e.rawContent,")"):(null==e?void 0:e.imagePath)&&(o="url(".concat(e.imagePath,")")),o&&Object.assign(n,{backgroundImage:o}),n}));return{ns:e,classArr:o,backgroundStyle:a}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],a=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},Me(n=o.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},Me(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});return y("div",{class:this.classArr,onClick:()=>{this.controller.onClick()},style:this.backgroundStyle},[this.controller.model.cssStyle?y("style",{type:"text/css"},[this.controller.model.cssStyle]):null,a])}});class _e{constructor(){this.component="IBizPanelContainerImage"}async createController(t,e,n){const o=new Le(t,e,n);return await o.init(),o}}t("IBizPanelContainerImage",_t(ke,(function(t){t.component(ke.name,ke),J("CONTAINER_CONTAINER_IMAGE",(()=>new _e))})));class Ge extends Q{}t("PanelContainerGroupState",Ge);class We extends Y{createState(){var t;return new Ge(null==(t=this.parent)?void 0:t.state)}get disableClose(){const{titleBarCloseMode:t}=this.model;return 0===t||void 0===t}get defaultExpansion(){const{titleBarCloseMode:t}=this.model;return this.disableClose||1===t}}t("PanelContainerGroupController",We);class qe{constructor(){this.component="IBizPanelContainerGroup"}async createController(t,e,n){const o=new We(t,e,n);return await o.init(),o}}function $e(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Fe=g({name:"IBizPanelContainerGroup",props:{modelData:{type:Object,required:!0},controller:{type:We,required:!0}},setup(t){const e=zt("panel-container-group"),n=d(!t.controller.defaultExpansion);return{ns:e,captionText:m((()=>{const{captionItemName:e,caption:n,capLanguageRes:o}=t.modelData;if(e)return t.controller.data[e];let a=n;return o&&(a=ibiz.i18n.t(o.lanResTag,n)),a})),changeCollapse:()=>{t.controller.disableClose||(n.value=!n.value)},isCollapse:n}},render(){var t,e;let n;const o=[this.ns.b(),this.ns.m(this.modelData.id),...this.controller.containerClass,this.ns.is("hidden",!this.controller.state.visible)];!0===this.modelData.showCaption&&(o.push(this.ns.m("show-header")),o.push(this.ns.b("collapse")),o.push(this.ns.is("collapse",this.isCollapse)),this.controller.disableClose&&o.push(this.ns.bm("collapse","disable-close")));const a=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[],s=y(p("iBizRow"),{slot:"content",layout:this.modelData.layout},$e(n=a.map((t=>{const e=t.props;return e&&e.controller?y(p("iBizCol"),{layoutPos:e.modelData.layoutPos,state:e.controller.state},$e(t)?t:{default:()=>[t]}):t})))?n:{default:()=>[n]});let r=null;return this.modelData.showCaption&&(r=y("div",{class:[this.ns.b("header")],onClick:this.changeCollapse},[y("div",{class:[this.ns.be("header","left")]},[y("div",{class:[this.ns.e("caption"),...this.controller.labelClass]},[this.captionText])]),y("div",{class:[this.ns.be("header","right")]},[void 0!==this.modelData.titleBarCloseMode&&0!==this.modelData.titleBarCloseMode&&(this.isCollapse?y("ion-icon",{name:"caret-forward-sharp"},null):y("ion-icon",{name:"caret-down-sharp"},null))])])),y("div",{class:o},[r,y("div",{class:[this.ns.b("content")]},[s])])}});t("IBizPanelContainerGroup",_t(Fe,(function(t){t.component(Fe.name,Fe),J("CONTAINER_CONTAINER_GROUP",(()=>new qe))})));function Ue(t){return"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!b(t)}const Ke=g({name:"IBizPanelTabPage",props:{modelData:{type:Object,required:!0},controller:{type:Y,required:!0}},setup(t){const e=zt("panel-tab-page"),n=m((()=>{const{id:n}=t.modelData,o=[e.b(),e.m(n)];return o.push(...t.controller.containerClass),o}));return{ns:e,classArr:n}},render(){var t,e;let n;const o=(null==(e=(t=this.$slots).default)?void 0:e.call(t))||[];return y(p("iBizRow"),{class:[this.ns.b(),this.ns.m(this.modelData.codeName),this.classArr],layout:this.modelData.layout},Ue(n=o.map((t=>{const e=t.props;if(!e||!e.controller)return t;const n=e.controller;return y(p("iBizCol"),{layoutPos:n.model.layoutPos,state:n.state},Ue(t)?t:{default:()=>[t]})})))?n:{default:()=>[n]})}});class He{constructor(){this.component="IBizPanelTabPage"}async createController(t,e,n){const o=new Y(t,e,n);return await o.init(),o}}t("IBizPanelTabPage",_t(Ke,(function(t){t.component(Ke.name,Ke),J("TABPAGE",(()=>new He))}))),t("AppRedirectView",g({setup(){var t;const e=B.create((null==(t=ibiz.appData)?void 0:t.context)||{});f((()=>{e.destroy()}));const{href:n}=window.location;I((()=>ibiz.util.hiddenAppLoading())),async function(){await ut(e,n)}()},render:()=>y("div",null,[P("重定向跳转中")])}));class Xe{constructor(){this.component="IBizView"}}const Qe=g({name:"IBizView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object},provider:{type:Object}},setup(){const t=zt("view"),e=Ut(((...t)=>new dt(...t))),n=ht(e.model),{viewType:o,sysCss:a,codeName:s}=e.model,r=o.toLowerCase(),i=null==a?void 0:a.cssName,l=m((()=>[t.b(),t.b(r),t.m(s),i,e.state.viewMessages.TOP?"has-top-message":"",e.state.viewMessages.BOTTOM?"has-bottom-message":""])),c=d(null),u=G(),h=window.devtool;I((()=>{h&&h.registerView(u,e,c)})),f((()=>{h&&h.unRegisterView(u)}));return{c:e,controls:n,viewClassNames:l,container:c,onLayoutPanelCreated:t=>{e.setLayoutPanel(t)},renderViewMessage:n=>{if(e.state.isCreated){const o=e.state.viewMessages[n];if(null==o?void 0:o.length)return y(p("view-message"),{class:[t.e("".concat(n.toLowerCase(),"-message"))],messages:o},null)}return null}}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};if((null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=p(s.component);return h(e,{modelData:t,...o,provider:s})})})),0===this.c.engines.length)e=y("span",{style:"color:red;"},[P("视图类型"),this.modelData.viewType,P("暂未支持")]);else{const t=this.c.model.viewLayoutPanel,o=this.c.providers[t.name];e=h(p(o.component),{modelData:t,context:this.c.context,params:this.c.params,provider:o,container:this.c,onControllerAppear:this.onLayoutPanelCreated},n)}}return w(y("div",{ref:"container",class:this.viewClassNames},[this.renderViewMessage("TOP"),e,this.renderViewMessage("BOTTOM")]),[[C("loading"),this.c.state.isLoading]])}});t("IBizView",_t(Qe,(function(t){t.component(Qe.name,Qe),pt("DEFAULT",(()=>new Xe))}))),t("TodoRedirect",g({setup(){const t=q(),{href:e}=window.location,n=e.lastIndexOf("?"),o=decodeURIComponent(e.substring(n+1,e.length));if(!o)throw new Error("重定向参数不足无法跳转");const a=$.parse(o,{delimiter:";"}),{apptype:s,todotype:r,todoid:i}=a,l={srfapptype:"pc",srfapp:""};s||(l.todourltype="RouterUrl"),async function(){let e=(await ibiz.net.post("/systodos/".concat(i,"/getlinkurl"),l)).data.linkurl;s?window.location.href=e:(0!==e.indexOf("/")&&(e="/".concat(e)),e+=";srfwf=".concat(r),t.push("/index".concat(e)))}()},render:()=>y("div",null,[P("待办列表重定向")])}));class Ye{constructor(){this.component="IBizPortalView"}}const Je=g({name:"IBizPortalView",props:{context:Object,params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0},modal:{type:Object},state:{type:Object}},setup(){var t;const e=zt("view"),n=Ut(((...t)=>new dt(...t))),o=(null==(t=n.model.viewLayoutPanel)?void 0:t.controls)||n.model.controls,{viewType:a,sysCss:s,codeName:r}=n.model,i=a.toLowerCase(),l=null==s?void 0:s.cssName,c=[e.b(),e.b(i),e.m(r),l];return{c:n,ns:e,controls:o,viewClassNames:c}},render(){var t;let e=null;if(this.c.state.isCreated){const n={...this.$slots};(null==(t=this.controls)?void 0:t.length)&&this.controls.forEach((t=>{const e=t.name||t.id,o={context:this.c.context,params:this.c.params};this.c.slotProps[e]&&Object.assign(o,this.c.slotProps[e]);const a=n[e];if(a)return void(n[e]=()=>a(o));const s=this.c.providers[e];s&&(n[e]=()=>{const e=p(s.component);return h(e,{modelData:t,...o})})})),n.dashboard&&(e=n.dashboard())}return y("div",{class:this.viewClassNames},[e])}}),Ze=(t("IBizPortalView",_t(Je,(function(t){t.component(Je.name,Je),pt(F.APP_PORTAL_VIEW,(()=>new Ye)),pt(F.DE_PORTAL_VIEW,(()=>new Ye)),pt(F.DE_PORTAL_VIEW9,(()=>new Ye))}))),g({name:"IBizDeRedirectView",props:{context:{type:Object,required:!0},params:{type:Object,default:()=>({})},modelData:{type:Object,required:!0}},setup(t){const e=Ut(((...t)=>new dt(...t))),n=d(),o=d(),a=d();return e.evt.on("onCreated",(()=>{mt(r(t.modelData),r(e.context),r(e.params)).then((async t=>{if("view"!==t.type)throw new A("嵌入重定向视图不支持url跳转");n.value=t.viewId,o.value=t.context,a.value=t.params}))})),{c:e,toViewId:n,toViewContext:o,toViewParams:a}},render(){return this.toViewId?h(p("IBizViewShell"),{context:this.toViewContext,params:this.toViewParams,viewId:this.toViewId,...this.$attrs},this.$slots):w(y("div",{style:"width: 100%; height: 100%;"},null),[[C("loading"),!this.toViewId]])}}));class tn{constructor(){this.component="IBizDeRedirectView"}}t("IBizDeRedirectView",_t(Ze,(function(t){t.component(Ze.name,Ze);const e=new tn;pt(F.DE_REDIRECT_VIEW,(()=>e))})));const en=g({name:"IBizViewLayoutPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object},setup(t,{slots:n}){const o=Rt(((...e)=>new ft(...e,t.container))),a=zt("control-".concat(o.model.controlType.toLowerCase()));e((()=>t.data),(t=>{t&&(o.setInputData(t),o.load())}),{immediate:!0}),o.evt.on("onCreated",(()=>{Object.keys(o.panelItems).forEach((t=>{const e=o.panelItems[t];e.state=l(e.state)}))}));const s=(t,e)=>{var a,r;if(t.hidden)return null;const{providers:i,panelItems:l}=e||o,c=i[t.id];if(!c)return y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const u=p(c.component);let d;return"CTRLPOS"===t.itemType&&n[t.id]?d=()=>n[t.id]():"TABPANEL"===t.itemType&&(null==(a=t.panelTabPages)?void 0:a.length)?d=()=>t.panelTabPages.map((t=>s(t,e))):st(t)?d=void 0:(null==(r=t.panelItems)?void 0:r.length)&&(d=()=>t.panelItems.map((t=>s(t,e)))),h(u,{modelData:t,controller:l[t.id],key:t.id},d)};return v("renderPanelItem",s),{c:o,ns:a,renderPanelItem:s}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=this.renderPanelItem(t))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class nn{constructor(){this.component="IBizViewLayoutPanelControl"}}t("IBizViewLayoutPanelControl",_t(en,(function(t){t.component(en.name,en),vt(gt.VIEW_LAYOUT_PANEL,(()=>new nn))})));function on(t,e,n){var o,a;if(t.hidden)return;const{providers:s,panelItems:r}=e,i=s[t.id];if(!i)return y("div",null,[P("暂未支持的面板项: "),t.id,P(" - "),t.itemType]);const l=p(i.component);let c;return"CTRLPOS"===t.itemType&&n.$slots[t.id]?c=()=>n.$slots[t.id]():"TABPANEL"===t.itemType&&(null==(o=t.panelTabPages)?void 0:o.length)?c=()=>t.panelTabPages.map((t=>on(t,e,n))):(null==(a=t.panelItems)?void 0:a.length)&&(c=()=>t.panelItems.map((t=>on(t,e,n)))),h(l,{modelData:t,controller:r[t.id],key:t.id},c)}const an=g({name:"IBizPanelControl",props:{modelData:{type:Object,required:!0},context:{type:Object,required:!0},params:{type:Object,default:()=>({})},provider:{type:Object},container:{type:Object},data:Object,loadDefault:{type:Boolean,default:!0}},setup(t){const n=Rt(((...e)=>new yt(...e,t.container))),o=zt("control-".concat(n.model.controlType.toLowerCase()));return e((()=>t.data),(t=>{t&&(n.setInputData(t),n.load())}),{immediate:!0}),n.evt.on("onCreated",(()=>{Object.keys(n.panelItems).forEach((t=>{const e=n.panelItems[t];e.state=l(e.state)}))})),{c:n,ns:o}},render(){const{state:t,model:e}=this.c;return y(p("iBizControlBase"),{controller:this.c},{default:()=>[y(p("iBizRow"),{class:this.ns.b("content"),layout:{layout:"FLEX"}},{default:()=>{var n;return[t.isCreated&&(this.$slots.default?this.$slots.default({panelItems:this.c.panelItems}):null==(n=e.rootPanelItems)?void 0:n.map((t=>{let e;const n=this.c.panelItems[t.id];return t.layoutPos.layout="FLEX",y(p("iBizCol"),{layoutPos:t.layoutPos,state:n.state},"function"==typeof(o=e=on(t,this.c,this))||"[object Object]"===Object.prototype.toString.call(o)&&!b(o)?e:{default:()=>[e]});var o})))]}})]})}});class sn{constructor(){this.component="IBizPanelControl"}}t("IBizPanelControl",_t(an,(function(t){t.component(an.name,an),vt(gt.PANEL,(()=>new sn))})));function rn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ln(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function cn(t,e){for(var n,o="",a=0,s=-1,r=0,i=0;i<=t.length;++i){if(i<t.length)n=t.charCodeAt(i);else{if(47===n)break;n=47}if(47===n){if(s===i-1||1===r);else if(s!==i-1&&2===r){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2))if(o.length>2){var l=o.lastIndexOf("/");if(l!==o.length-1){-1===l?(o="",a=0):a=(o=o.slice(0,l)).length-1-o.lastIndexOf("/"),s=i,r=0;continue}}else if(2===o.length||1===o.length){o="",a=0,s=i,r=0;continue}e&&(o.length>0?o+="/..":o="..",a=2)}else o.length>0?o+="/"+t.slice(s+1,i):o=t.slice(s+1,i),a=i-s-1;s=i,r=0}else 46===n&&-1!==r?++r:r=-1}return o}var un={resolve:function(){for(var t,e="",n=!1,o=arguments.length-1;o>=-1&&!n;o--){var a;o>=0?a=arguments[o]:(void 0===t&&(t=process.cwd()),a=t),ln(a),0!==a.length&&(e=a+"/"+e,n=47===a.charCodeAt(0))}return e=cn(e,!n),n?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(t){if(ln(t),0===t.length)return".";var e=47===t.charCodeAt(0),n=47===t.charCodeAt(t.length-1);return 0!==(t=cn(t,!e)).length||e||(t="."),t.length>0&&n&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return ln(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e<arguments.length;++e){var n=arguments[e];ln(n),n.length>0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":un.normalize(t)},relative:function(t,e){if(ln(t),ln(e),t===e)return"";if((t=un.resolve(t))===(e=un.resolve(e)))return"";for(var n=1;n<t.length&&47===t.charCodeAt(n);++n);for(var o=t.length,a=o-n,s=1;s<e.length&&47===e.charCodeAt(s);++s);for(var r=e.length-s,i=a<r?a:r,l=-1,c=0;c<=i;++c){if(c===i){if(r>i){if(47===e.charCodeAt(s+c))return e.slice(s+c+1);if(0===c)return e.slice(s+c)}else a>i&&(47===t.charCodeAt(n+c)?l=c:0===c&&(l=0));break}var u=t.charCodeAt(n+c);if(u!==e.charCodeAt(s+c))break;47===u&&(l=c)}var d="";for(c=n+l+1;c<=o;++c)c!==o&&47!==t.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+e.slice(s+l):(s+=l,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(ln(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,o=-1,a=!0,s=t.length-1;s>=1;--s)if(47===(e=t.charCodeAt(s))){if(!a){o=s;break}}else a=!1;return-1===o?n?"/":".":n&&1===o?"//":t.slice(0,o)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');ln(t);var n,o=0,a=-1,s=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var r=e.length-1,i=-1;for(n=t.length-1;n>=0;--n){var l=t.charCodeAt(n);if(47===l){if(!s){o=n+1;break}}else-1===i&&(s=!1,i=n+1),r>=0&&(l===e.charCodeAt(r)?-1==--r&&(a=n):(r=-1,a=i))}return o===a?a=i:-1===a&&(a=t.length),t.slice(o,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!s){o=n+1;break}}else-1===a&&(s=!1,a=n+1);return-1===a?"":t.slice(o,a)},extname:function(t){ln(t);for(var e=-1,n=0,o=-1,a=!0,s=0,r=t.length-1;r>=0;--r){var i=t.charCodeAt(r);if(47!==i)-1===o&&(a=!1,o=r+1),46===i?-1===e?e=r:1!==s&&(s=1):-1!==e&&(s=-1);else if(!a){n=r+1;break}}return-1===e||-1===o||0===s||1===s&&e===o-1&&e===n+1?"":t.slice(e,o)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+o:n+t+o:o}("/",t)},parse:function(t){ln(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,o=t.charCodeAt(0),a=47===o;a?(e.root="/",n=1):n=0;for(var s=-1,r=0,i=-1,l=!0,c=t.length-1,u=0;c>=n;--c)if(47!==(o=t.charCodeAt(c)))-1===i&&(l=!1,i=c+1),46===o?-1===s?s=c:1!==u&&(u=1):-1!==s&&(u=-1);else if(!l){r=c+1;break}return-1===s||-1===i||0===u||1===u&&s===i-1&&s===r+1?-1!==i&&(e.base=e.name=0===r&&a?t.slice(1,i):t.slice(r,i)):(0===r&&a?(e.name=t.slice(1,s),e.base=t.slice(1,i)):(e.name=t.slice(r,s),e.base=t.slice(r,i)),e.ext=t.slice(s,i)),r>0?e.dir=t.slice(0,r-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};un.posix=un;var dn=un,hn=rn(dn);t("PluginFactory",class{constructor(){this.urlReg=/^http[s]?:\/\/[^\s]*/,this.cache=new Map,this.pluginCache=new Map,this.pluginCodes=[],this.predefinedPlugins=new Map,this.ignoreRules=[],this.loadQueue=new Map}isIgnore(t){return this.ignoreRules.some((e=>"string"==typeof e?t===e:e.test(t)))}setDevIgnore(t){this.ignoreRules.push(t)}registerPredefinedPlugin(t){this.predefinedPlugins.set(t.name,t)}register(t){this.pluginCodes.forEach((e=>{t.use(e)}))}async loadPredefinedPlugin(t){if(this.predefinedPlugins.has(t)){const e=this.predefinedPlugins.get(t);e&&await this.loadPluginRef(e.name,e.path)}}setPluginCode(t){this.pluginCodes.push(t),window.vueInstances.forEach((e=>{e.use(t)}))}async loadPlugin(t){if(!0===t.runtimeObject){const e=t;if(e){const t=e.rtobjectName,n=e.rtobjectRepo;if(this.isIgnore(n))return!0;if(this.pluginCache.has(t))return!0;if(this.loadQueue.has(n)){const t=await this.loadQueue.get(n);try{return await t}catch(t){return!1}}try{const t=this.loadPluginRef(e.rtobjectName,e.rtobjectRepo);this.loadQueue.set(n,t);return await t}catch(t){throw new z(e,"配置加载失败")}finally{this.loadQueue.delete(n)}}}return!1}async loadPluginRef(t,e){if(this.isIgnore(e))return!0;if(this.pluginCache.has(t))return!0;let n=null;{const t=e,o=this.urlReg.test(t)?"".concat(t,"/package.json"):"".concat(ibiz.env.pluginBaseUrl,"/").concat(dn.join(t,"package.json")),a=await ibiz.net.axios({method:"get",headers:{"Access-Control-Allow-Origin":"*"},url:o});if(200!==a.status)throw new Error("配置加载失败");n=a.data}const o=new wt(t,e,n);if(o)try{return await this.loadScript(o),this.pluginCache.set(t,o),!0}catch(t){ibiz.log.error(t)}return!1}async loadScript(t){const e=t.repo,{name:n,system:o,styles:a=[]}=t.config;let s="";if(s=dn.join(e,o),s){if(this.cache.has(s))return;let t=null;const o=this.parseUrl(s),r=("string"==typeof a?[a]:a).map((t=>this.parseUrl(hn.join(e,t))));if(System.addImportMap({imports:{[n]:o},styles:{[n]:r}}),t=await System.import(n),!t)throw new A("远程插件加载失败, 未找到文件或文件内容格式不正确");if(!t.default)throw new A("远程插件加载失败, 远程插件未找到[default]默认导出");this.setPluginCode(t.default),this.cache.set(s,!0)}}parseUrl(t){if(this.urlReg.test(t))return t;let e="";e=this.urlReg.test(ibiz.env.pluginBaseUrl)?t.startsWith("/")?ibiz.env.pluginBaseUrl+t:"".concat(ibiz.env.pluginBaseUrl,"/").concat(t):"".concat(dn.join(ibiz.env.pluginBaseUrl,t));const{origin:n,pathname:o}=window.location;return o.endsWith("/")&&e.startsWith("/")&&(e=e.substring(1)),!1===this.urlReg.test(e)&&(e="".concat(n).concat(o).concat(e)),e}});class pn{constructor(t,e,n){this.required=!0,e&&(this.default=e),n&&(this.validator=n),this.type=t}}function mn(){return{value:String,controller:new pn(Object),data:new pn(Object),disabled:{type:Boolean},readonly:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},overflowMode:{type:String},controlParams:{type:Object,required:!1}}}function fn(){return{hasError:{type:Boolean}}}function vn(){return{...mn(),value:[String,Number]}}function gn(){return{...mn(),value:Number}}function yn(){return{...mn(),value:String}}function wn(){return{...mn(),value:[String,Number,Object,Array]}}function Cn(){return{...mn(),value:[String,Number]}}function bn(){return{...mn(),value:[String,Number]}}function In(){return{...mn(),value:[String,Number]}}function Pn(){return{...mn(),value:[String,Array,Object,Number]}}function Dn(){return{...mn(),value:[String,Number]}}function Nn(){return{...mn(),value:[String,Number]}}function En(){return{...mn(),value:[String,Number]}}function On(){return{...mn(),value:[String,Number]}}function An(){return{...mn(),value:[String,Number]}}function xn(){return{...mn(),value:[String,Number]}}function Rn(){return{...mn(),value:[String,Number,Array]}}function Sn(){return{...mn(),value:[String,Number]}}function zn(){return{...mn(),value:[String,Number]}}function Bn(){return{...mn(),value:[String,Number]}}function Tn(){return{...mn(),value:String}}function jn(){return{...mn(),value:[String,Number]}}function Vn(){return{...mn(),value:String,language:{type:String},theme:{type:String}}}function Ln(){return{...mn(),value:String}}function Mn(){return{...mn(),data:{type:Object,required:!1},controller:{type:Object,required:!1},disabled:{type:Boolean,required:!1}}}function kn(){return{...mn(),value:[Array,Array]}}function _n(){return{...mn(),value:String}}function Gn(){return{...mn(),value:String}}t("RequiredProp",pn)}}}));
|
|
@@ -91,7 +91,7 @@ const IBizCodeList = /* @__PURE__ */ defineComponent({
|
|
|
91
91
|
return [index !== 0 ? this.textSeparator : null, createVNode("span", {
|
|
92
92
|
"class": [this.ns.e("item"), item.textCls ? item.textCls : null],
|
|
93
93
|
"style": item.color ? this.ns.cssVarBlock({
|
|
94
|
-
"item-color":
|
|
94
|
+
"item-color": "".concat(item.color)
|
|
95
95
|
}) : null
|
|
96
96
|
}, [item.sysImage && createVNode(resolveComponent("iBizIcon"), {
|
|
97
97
|
"icon": item.sysImage
|
|
@@ -29,10 +29,10 @@ const IBizControlBase = /* @__PURE__ */ defineComponent({
|
|
|
29
29
|
const inlineStyle = reactive({});
|
|
30
30
|
if (model.controlType.endsWith("EXPBAR") === false) {
|
|
31
31
|
if (!isNil(model.width)) {
|
|
32
|
-
inlineStyle.width =
|
|
32
|
+
inlineStyle.width = "".concat(model.width, "px");
|
|
33
33
|
}
|
|
34
34
|
if (!isNil(model.height)) {
|
|
35
|
-
inlineStyle.height =
|
|
35
|
+
inlineStyle.height = "".concat(model.height, "px");
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
return {
|
|
@@ -21,7 +21,7 @@ const IBizControlShell = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
const provider = ref();
|
|
22
22
|
getControlProvider(props.modelData).then((item) => {
|
|
23
23
|
if (!item) {
|
|
24
|
-
errMsg.value =
|
|
24
|
+
errMsg.value = "\u672A\u627E\u5230\u5BF9\u5E94\u90E8\u4EF6\u7684\u9002\u914D\u5668";
|
|
25
25
|
} else {
|
|
26
26
|
provider.value = item;
|
|
27
27
|
}
|
package/es/common/icon/icon.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const IBizIcon = /* @__PURE__ */ defineComponent({
|
|
|
20
20
|
},
|
|
21
21
|
setup(props) {
|
|
22
22
|
const ns = useNamespace("icon");
|
|
23
|
-
const BaseUrl =
|
|
23
|
+
const BaseUrl = "".concat(ibiz.env.assetsUrl, "/").concat(props.baseDir, "/");
|
|
24
24
|
function getContent(icon) {
|
|
25
25
|
if (icon) {
|
|
26
26
|
if (icon.htmlStr) {
|
|
@@ -76,7 +76,7 @@ const PanelControl = /* @__PURE__ */ defineComponent({
|
|
|
76
76
|
},
|
|
77
77
|
setup(props) {
|
|
78
78
|
const c = useControlController((...args) => new PanelController(...args, props.container));
|
|
79
|
-
const ns = useNamespace(
|
|
79
|
+
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
80
80
|
watch(() => props.data, (newVal) => {
|
|
81
81
|
if (newVal) {
|
|
82
82
|
c.setInputData(newVal);
|
|
@@ -36,7 +36,7 @@ const ViewLayoutPanelControl = /* @__PURE__ */ defineComponent({
|
|
|
36
36
|
slots
|
|
37
37
|
}) {
|
|
38
38
|
const c = useControlController((...args) => new ViewLayoutPanelController(...args, props.container));
|
|
39
|
-
const ns = useNamespace(
|
|
39
|
+
const ns = useNamespace("control-".concat(c.model.controlType.toLowerCase()));
|
|
40
40
|
watch(() => props.data, (newVal) => {
|
|
41
41
|
if (newVal) {
|
|
42
42
|
c.setInputData(newVal);
|
|
@@ -110,7 +110,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
112
|
default:
|
|
113
|
-
throw new ModelError(this.model,
|
|
113
|
+
throw new ModelError(this.model, "\u6570\u636E\u6E90\u7C7B\u578B".concat(dataSourceType, "\u6682\u672A\u652F\u6301"));
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
/**
|
|
@@ -174,7 +174,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
174
174
|
this.panel.params
|
|
175
175
|
);
|
|
176
176
|
if (!data) {
|
|
177
|
-
throw new RuntimeError(
|
|
177
|
+
throw new RuntimeError("\u5B9E\u4F53\u903B\u8F91".concat(appDELogicId, "\u6CA1\u6709\u8FD4\u56DE\u503C"));
|
|
178
178
|
}
|
|
179
179
|
this.setData(data);
|
|
180
180
|
}
|
|
@@ -190,7 +190,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
190
190
|
if (originData) {
|
|
191
191
|
this.setData(originData);
|
|
192
192
|
} else {
|
|
193
|
-
ibiz.log.error(
|
|
193
|
+
ibiz.log.error("\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
@@ -230,7 +230,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
230
230
|
*/
|
|
231
231
|
bindViewData(view, dataName) {
|
|
232
232
|
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
233
|
-
ibiz.log.error(
|
|
233
|
+
ibiz.log.error("\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728".concat(dataName));
|
|
234
234
|
return;
|
|
235
235
|
}
|
|
236
236
|
const updateData = () => {
|
|
@@ -238,7 +238,7 @@ class MultiDataContainerController extends PanelItemController {
|
|
|
238
238
|
if (originData) {
|
|
239
239
|
this.setData(originData);
|
|
240
240
|
} else {
|
|
241
|
-
ibiz.log.error(
|
|
241
|
+
ibiz.log.error("\u89C6\u56FEstate\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
244
|
updateData();
|
|
@@ -136,7 +136,7 @@ class NavPosController extends PanelItemController {
|
|
|
136
136
|
*/
|
|
137
137
|
calcCacheKey(msg) {
|
|
138
138
|
if (msg) {
|
|
139
|
-
return
|
|
139
|
+
return "".concat(msg.viewId, "___").concat(msg.key);
|
|
140
140
|
}
|
|
141
141
|
return "";
|
|
142
142
|
}
|
|
@@ -244,7 +244,7 @@ class NavPosController extends PanelItemController {
|
|
|
244
244
|
}
|
|
245
245
|
if (openViewMsg.is404) {
|
|
246
246
|
const selfPath = getNestedRoutePath(this.route, this.routeDepth, false);
|
|
247
|
-
this.router.push(
|
|
247
|
+
this.router.push("".concat(selfPath, "/404"));
|
|
248
248
|
} else if (
|
|
249
249
|
// 如果启用缓存并且有之前存过的fullPath则push回fullPath。
|
|
250
250
|
this.state.navViewMsgs[cacheKey].fullPath && this.getExpItemIsCache(openViewMsg)
|
|
@@ -37,12 +37,12 @@ const PanelContainerImage = /* @__PURE__ */ defineComponent({
|
|
|
37
37
|
let imgStr = "";
|
|
38
38
|
if (image == null ? void 0 : image.rawContent) {
|
|
39
39
|
if (isSvg(image.rawContent)) {
|
|
40
|
-
imgStr =
|
|
40
|
+
imgStr = "url(data:image/svg+xml;base64,".concat(btoa(image.rawContent), ")");
|
|
41
41
|
} else {
|
|
42
|
-
imgStr =
|
|
42
|
+
imgStr = "url(".concat(image.rawContent, ")");
|
|
43
43
|
}
|
|
44
44
|
} else if (image == null ? void 0 : image.imagePath) {
|
|
45
|
-
imgStr =
|
|
45
|
+
imgStr = "url(".concat(image.imagePath, ")");
|
|
46
46
|
}
|
|
47
47
|
if (imgStr) {
|
|
48
48
|
Object.assign(styles, {
|
|
@@ -38,7 +38,7 @@ const PanelCtrlPos = /* @__PURE__ */ defineComponent({
|
|
|
38
38
|
}
|
|
39
39
|
return createVNode("div", {
|
|
40
40
|
"class": [this.ns.b(), this.ns.m(this.modelData.id), ...this.controller.containerClass, this.ns.is("hidden", !state.visible)]
|
|
41
|
-
}, [content || (ibiz.env.dev ?
|
|
41
|
+
}, [content || (ibiz.env.dev ? "\u672A\u63D0\u4F9B".concat(this.modelData.id, "\u63D2\u69FD") : "")]);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
|
|
@@ -78,7 +78,7 @@ const ScrollContainer = /* @__PURE__ */ defineComponent({
|
|
|
78
78
|
center = slot;
|
|
79
79
|
break;
|
|
80
80
|
default:
|
|
81
|
-
ibiz.log.debug(
|
|
81
|
+
ibiz.log.debug("\u672A\u9002\u914D\u7684\u5E03\u5C40\u5360\u4F4D".concat(props.modelData.layoutPos.layoutPos));
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
84
|
});
|
|
@@ -119,7 +119,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
119
119
|
break;
|
|
120
120
|
}
|
|
121
121
|
default:
|
|
122
|
-
throw new ModelError(this.model,
|
|
122
|
+
throw new ModelError(this.model, "\u6570\u636E\u6E90\u7C7B\u578B".concat(dataSourceType, "\u6682\u672A\u652F\u6301"));
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
/**
|
|
@@ -176,7 +176,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
176
176
|
this.panel.params
|
|
177
177
|
);
|
|
178
178
|
if (!data) {
|
|
179
|
-
throw new RuntimeError(
|
|
179
|
+
throw new RuntimeError("\u5B9E\u4F53\u903B\u8F91".concat(appDELogicId, "\u6CA1\u6709\u8FD4\u56DE\u503C"));
|
|
180
180
|
}
|
|
181
181
|
this.setData(data);
|
|
182
182
|
}
|
|
@@ -192,7 +192,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
192
192
|
if (originData) {
|
|
193
193
|
this.setData(originData);
|
|
194
194
|
} else {
|
|
195
|
-
ibiz.log.error(
|
|
195
|
+
ibiz.log.error("\u5168\u5C40\u53D8\u91CF\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
@@ -232,7 +232,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
232
232
|
*/
|
|
233
233
|
bindViewData(view, dataName) {
|
|
234
234
|
if (!Object.prototype.hasOwnProperty.call(view.state, dataName)) {
|
|
235
|
-
ibiz.log.error(
|
|
235
|
+
ibiz.log.error("\u7ED1\u5B9A\u89C6\u56FE\u7684\u4F1A\u8BDD\u4E0D\u5B58\u5728".concat(dataName));
|
|
236
236
|
return;
|
|
237
237
|
}
|
|
238
238
|
const updateData = () => {
|
|
@@ -240,7 +240,7 @@ class SingleDataContainerController extends PanelItemController {
|
|
|
240
240
|
if (originData) {
|
|
241
241
|
this.setData(originData);
|
|
242
242
|
} else {
|
|
243
|
-
ibiz.log.error(
|
|
243
|
+
ibiz.log.error("\u89C6\u56FEstate\u91CC\u6CA1\u6709".concat(dataName, "\u5C5E\u6027"));
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
246
|
updateData();
|
|
@@ -185,7 +185,7 @@ class PluginFactory {
|
|
|
185
185
|
const result = await p;
|
|
186
186
|
return result;
|
|
187
187
|
} catch (error) {
|
|
188
|
-
throw new RuntimeModelError(pluginRef,
|
|
188
|
+
throw new RuntimeModelError(pluginRef, "\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");
|
|
189
189
|
} finally {
|
|
190
190
|
this.loadQueue.delete(rtObjectRepo);
|
|
191
191
|
}
|
|
@@ -211,14 +211,14 @@ class PluginFactory {
|
|
|
211
211
|
let configData = null;
|
|
212
212
|
{
|
|
213
213
|
const pluginPath = rtObjectRepo;
|
|
214
|
-
const configUrl = this.urlReg.test(pluginPath) ?
|
|
214
|
+
const configUrl = this.urlReg.test(pluginPath) ? "".concat(pluginPath, "/package.json") : "".concat(ibiz.env.pluginBaseUrl, "/").concat(pathBrowserify.join(pluginPath, "package.json"));
|
|
215
215
|
const res = await ibiz.net.axios({
|
|
216
216
|
method: "get",
|
|
217
217
|
headers: { "Access-Control-Allow-Origin": "*" },
|
|
218
218
|
url: configUrl
|
|
219
219
|
});
|
|
220
220
|
if (res.status !== 200) {
|
|
221
|
-
throw new Error(
|
|
221
|
+
throw new Error("\u914D\u7F6E\u52A0\u8F7D\u5931\u8D25");
|
|
222
222
|
}
|
|
223
223
|
configData = res.data;
|
|
224
224
|
}
|
|
@@ -276,13 +276,13 @@ class PluginFactory {
|
|
|
276
276
|
this.setPluginCode(data.default);
|
|
277
277
|
} else {
|
|
278
278
|
throw new RuntimeError(
|
|
279
|
-
|
|
279
|
+
"\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u8FDC\u7A0B\u63D2\u4EF6\u672A\u627E\u5230[default]\u9ED8\u8BA4\u5BFC\u51FA"
|
|
280
280
|
);
|
|
281
281
|
}
|
|
282
282
|
this.cache.set(scriptUrl, true);
|
|
283
283
|
} else {
|
|
284
284
|
throw new RuntimeError(
|
|
285
|
-
|
|
285
|
+
"\u8FDC\u7A0B\u63D2\u4EF6\u52A0\u8F7D\u5931\u8D25, \u672A\u627E\u5230\u6587\u4EF6\u6216\u6587\u4EF6\u5185\u5BB9\u683C\u5F0F\u4E0D\u6B63\u786E"
|
|
286
286
|
);
|
|
287
287
|
}
|
|
288
288
|
}
|
|
@@ -305,17 +305,17 @@ class PluginFactory {
|
|
|
305
305
|
if (script.startsWith("/")) {
|
|
306
306
|
url = ibiz.env.pluginBaseUrl + script;
|
|
307
307
|
} else {
|
|
308
|
-
url =
|
|
308
|
+
url = "".concat(ibiz.env.pluginBaseUrl, "/").concat(script);
|
|
309
309
|
}
|
|
310
310
|
} else {
|
|
311
|
-
url =
|
|
311
|
+
url = "".concat(pathBrowserify.join(ibiz.env.pluginBaseUrl, script));
|
|
312
312
|
}
|
|
313
313
|
const { origin, pathname } = window.location;
|
|
314
314
|
if (pathname.endsWith("/") && url.startsWith("/")) {
|
|
315
315
|
url = url.substring(1);
|
|
316
316
|
}
|
|
317
317
|
if (this.urlReg.test(url) === false) {
|
|
318
|
-
url =
|
|
318
|
+
url = "".concat(origin).concat(pathname).concat(url);
|
|
319
319
|
}
|
|
320
320
|
return url;
|
|
321
321
|
}
|
|
@@ -8,7 +8,7 @@ function watchAndUpdateContextParams(props, control) {
|
|
|
8
8
|
() => ({ context: props.context, params: props.params }),
|
|
9
9
|
(newVal) => {
|
|
10
10
|
control.updateContextParams({ ...newVal });
|
|
11
|
-
ibiz.log.debug(
|
|
11
|
+
ibiz.log.debug("".concat(control.model.id, "\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A"), newVal);
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
}
|
|
@@ -31,7 +31,7 @@ function watchAndUpdateState(props, control, excludeFields = []) {
|
|
|
31
31
|
changeProps[key] = newVal[key];
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
|
-
ibiz.log.debug(
|
|
34
|
+
ibiz.log.debug("\u90E8\u4EF6 [".concat(control.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
35
35
|
Object.keys(changeProps).forEach((key) => {
|
|
36
36
|
if (changeProps[key] !== void 0) {
|
|
37
37
|
control.state[key] = changeProps[key];
|
|
@@ -11,7 +11,7 @@ function watchAndUpdateContextParams(props, view) {
|
|
|
11
11
|
clearAll(view.params);
|
|
12
12
|
Object.assign(view.params, newVal.params);
|
|
13
13
|
view.handleContextParams();
|
|
14
|
-
ibiz.log.debug(
|
|
14
|
+
ibiz.log.debug("".concat(view.model.id, "\u7684\u4E0A\u4E0B\u6587\u6216\u89C6\u56FE\u53C2\u6570\u53D8\u66F4\uFF1A"), newVal);
|
|
15
15
|
}
|
|
16
16
|
);
|
|
17
17
|
}
|
|
@@ -27,7 +27,7 @@ function watchAndUpdateState(props, view) {
|
|
|
27
27
|
changeProps[key] = newVal[key];
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
ibiz.log.debug(
|
|
30
|
+
ibiz.log.debug("\u89C6\u56FE [".concat(view.model.name, "] state \u53D8\u66F4"), changeProps);
|
|
31
31
|
Object.keys(changeProps).forEach((key) => {
|
|
32
32
|
view.state[key] = changeProps[key];
|
|
33
33
|
});
|
|
@@ -7,7 +7,7 @@ function prepareControl(c) {
|
|
|
7
7
|
const { controlType, sysCss, codeName } = c.model;
|
|
8
8
|
const typeClass = controlType.toLowerCase();
|
|
9
9
|
const sysCssName = sysCss == null ? void 0 : sysCss.cssName;
|
|
10
|
-
const ns = useNamespace(
|
|
10
|
+
const ns = useNamespace("control-".concat(typeClass));
|
|
11
11
|
const controlClass = [
|
|
12
12
|
commonNs.b(),
|
|
13
13
|
commonNs.b(typeClass),
|
package/es/util/route/route.mjs
CHANGED
|
@@ -11,7 +11,7 @@ function route2routePath(route) {
|
|
|
11
11
|
const pathNodes = [];
|
|
12
12
|
for (let index = 1; index <= depth; index++) {
|
|
13
13
|
const viewName = route.path.split("/")[index * 2];
|
|
14
|
-
const paramsStr = route.params[
|
|
14
|
+
const paramsStr = route.params["params".concat(index)];
|
|
15
15
|
let params;
|
|
16
16
|
let context;
|
|
17
17
|
let srfnav;
|
|
@@ -52,15 +52,15 @@ function route2routePath(route) {
|
|
|
52
52
|
function routePath2string(routePath) {
|
|
53
53
|
let pathStr = "";
|
|
54
54
|
if (routePath.appContext) {
|
|
55
|
-
pathStr +=
|
|
55
|
+
pathStr += "/".concat(qs.stringify(routePath.appContext, {
|
|
56
56
|
delimiter: ";",
|
|
57
57
|
strictNullHandling: true
|
|
58
|
-
})
|
|
58
|
+
}));
|
|
59
59
|
} else {
|
|
60
|
-
pathStr +=
|
|
60
|
+
pathStr += "/".concat(ibiz.env.routePlaceholder);
|
|
61
61
|
}
|
|
62
62
|
routePath.pathNodes.forEach((pathNode, index) => {
|
|
63
|
-
pathStr +=
|
|
63
|
+
pathStr += "/".concat(pathNode.viewName, "/");
|
|
64
64
|
let routeParams = {};
|
|
65
65
|
if (index === 0) {
|
|
66
66
|
if (notNilEmpty(pathNode.context)) {
|
|
@@ -188,14 +188,14 @@ async function parseRouteViewData(route, depth) {
|
|
|
188
188
|
const routePath = route2routePath(route);
|
|
189
189
|
let viewCodeName = routePath.pathNodes[depth - 1].viewName;
|
|
190
190
|
if (!viewCodeName) {
|
|
191
|
-
throw new RuntimeError(
|
|
191
|
+
throw new RuntimeError("\u7B2C".concat(depth, "\u7EA7\u8DEF\u7531\u4E0D\u5B58\u5728\u89C6\u56FE\u6807\u8BC6"));
|
|
192
192
|
}
|
|
193
193
|
if (viewCodeName === "index") {
|
|
194
194
|
viewCodeName = ibiz.hub.defaultAppIndexViewName;
|
|
195
195
|
}
|
|
196
196
|
const viewModel = await ibiz.hub.getAppView(viewCodeName);
|
|
197
197
|
if (!viewModel) {
|
|
198
|
-
throw new RuntimeError(
|
|
198
|
+
throw new RuntimeError("\u627E\u4E0D\u5230\u89C6\u56FE".concat(viewCodeName));
|
|
199
199
|
}
|
|
200
200
|
const context = {};
|
|
201
201
|
if ((_a = ibiz.appData) == null ? void 0 : _a.context) {
|
package/es/view/common/view.mjs
CHANGED
|
@@ -62,7 +62,7 @@ const View = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
const viewMessages = c.state.viewMessages[position];
|
|
63
63
|
if (viewMessages == null ? void 0 : viewMessages.length) {
|
|
64
64
|
return createVNode(resolveComponent("view-message"), {
|
|
65
|
-
"class": [ns.e(
|
|
65
|
+
"class": [ns.e("".concat(position.toLowerCase(), "-message"))],
|
|
66
66
|
"messages": viewMessages
|
|
67
67
|
}, null);
|
|
68
68
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ViewController } from '@ibiz-template/runtime';
|
|
1
2
|
import { IAppDERedirectView } from '@ibiz/model-core';
|
|
2
3
|
import { PropType } from 'vue';
|
|
3
4
|
export declare const DeRedirectView: import("vue").DefineComponent<{
|
|
@@ -14,6 +15,7 @@ export declare const DeRedirectView: import("vue").DefineComponent<{
|
|
|
14
15
|
required: true;
|
|
15
16
|
};
|
|
16
17
|
}, {
|
|
18
|
+
c: ViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
17
19
|
toViewId: import("vue").Ref<string | undefined>;
|
|
18
20
|
toViewContext: import("vue").Ref<IContext | undefined>;
|
|
19
21
|
toViewParams: import("vue").Ref<IParams | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"de-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/view/de-redirect-view/de-redirect-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"de-redirect-view.d.ts","sourceRoot":"","sources":["../../../src/view/de-redirect-view/de-redirect-view.tsx"],"names":[],"mappings":"AACA,OAAO,EAAuB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAGL,QAAQ,EAIT,MAAM,KAAK,CAAC;AAGb,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAgDzB,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ref, toRaw, resolveComponent, h, createVNode, resolveDirective, withDirectives, defineComponent } from 'vue';
|
|
2
2
|
import { RuntimeError } from '@ibiz-template/core';
|
|
3
|
-
import { getDERedirectToView } from '@ibiz-template/runtime';
|
|
3
|
+
import { ViewController, getDERedirectToView } from '@ibiz-template/runtime';
|
|
4
|
+
import '../../use/index.mjs';
|
|
5
|
+
import { useViewController } from '../../use/view/use-view-controller/use-view-controller.mjs';
|
|
4
6
|
|
|
5
7
|
"use strict";
|
|
6
8
|
const DeRedirectView = /* @__PURE__ */ defineComponent({
|
|
@@ -20,19 +22,23 @@ const DeRedirectView = /* @__PURE__ */ defineComponent({
|
|
|
20
22
|
}
|
|
21
23
|
},
|
|
22
24
|
setup(props) {
|
|
25
|
+
const c = useViewController((...args) => new ViewController(...args));
|
|
23
26
|
const toViewId = ref();
|
|
24
27
|
const toViewContext = ref();
|
|
25
28
|
const toViewParams = ref();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
c.evt.on("onCreated", () => {
|
|
30
|
+
getDERedirectToView(toRaw(props.modelData), toRaw(c.context), toRaw(c.params)).then(async (result) => {
|
|
31
|
+
if (result.type === "view") {
|
|
32
|
+
toViewId.value = result.viewId;
|
|
33
|
+
toViewContext.value = result.context;
|
|
34
|
+
toViewParams.value = result.params;
|
|
35
|
+
} else {
|
|
36
|
+
throw new RuntimeError("\u5D4C\u5165\u91CD\u5B9A\u5411\u89C6\u56FE\u4E0D\u652F\u6301url\u8DF3\u8F6C");
|
|
37
|
+
}
|
|
38
|
+
});
|
|
34
39
|
});
|
|
35
40
|
return {
|
|
41
|
+
c,
|
|
36
42
|
toViewId,
|
|
37
43
|
toViewContext,
|
|
38
44
|
toViewParams
|
|
@@ -12,6 +12,7 @@ export declare const IBizDeRedirectView: import("../../util").TypeWithInstall<im
|
|
|
12
12
|
required: true;
|
|
13
13
|
};
|
|
14
14
|
}, {
|
|
15
|
+
c: import("@ibiz-template/runtime").ViewController<import("@ibiz/model-core").IAppView, import("@ibiz-template/runtime").IViewState, import("@ibiz-template/runtime").IViewEvent>;
|
|
15
16
|
toViewId: import("vue").Ref<string | undefined>;
|
|
16
17
|
toViewContext: import("vue").Ref<IContext | undefined>;
|
|
17
18
|
toViewParams: import("vue").Ref<IParams | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/de-redirect-view/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/view/de-redirect-view/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAU9B,CAAC"}
|
|
@@ -12,7 +12,7 @@ const TodoRedirect = /* @__PURE__ */ defineComponent({
|
|
|
12
12
|
const i = href.lastIndexOf("?");
|
|
13
13
|
const queryStr = decodeURIComponent(href.substring(i + 1, href.length));
|
|
14
14
|
if (!queryStr) {
|
|
15
|
-
throw new Error(
|
|
15
|
+
throw new Error("\u91CD\u5B9A\u5411\u53C2\u6570\u4E0D\u8DB3\u65E0\u6CD5\u8DF3\u8F6C");
|
|
16
16
|
}
|
|
17
17
|
const params = qs.parse(queryStr, {
|
|
18
18
|
delimiter: ";"
|
|
@@ -30,16 +30,16 @@ const TodoRedirect = /* @__PURE__ */ defineComponent({
|
|
|
30
30
|
data.todourltype = "RouterUrl";
|
|
31
31
|
}
|
|
32
32
|
async function getLinkUrl() {
|
|
33
|
-
const res = await ibiz.net.post(
|
|
33
|
+
const res = await ibiz.net.post("/systodos/".concat(todoid, "/getlinkurl"), data);
|
|
34
34
|
let url = res.data.linkurl;
|
|
35
35
|
if (apptype) {
|
|
36
36
|
window.location.href = url;
|
|
37
37
|
} else {
|
|
38
38
|
if (url.indexOf("/") !== 0) {
|
|
39
|
-
url =
|
|
39
|
+
url = "/".concat(url);
|
|
40
40
|
}
|
|
41
|
-
url +=
|
|
42
|
-
router.push(
|
|
41
|
+
url += ";srfwf=".concat(todotype);
|
|
42
|
+
router.push("/index".concat(url));
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
getLinkUrl();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ibiz-template/vue3-util",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1-beta.2",
|
|
4
4
|
"description": "vue3 工具包",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"author": "chitanda",
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@ibiz-template/cli": "^0.3.
|
|
34
|
-
"@ibiz-template/core": "^0.5.
|
|
35
|
-
"@ibiz-template/runtime": "^0.5.
|
|
33
|
+
"@ibiz-template/cli": "^0.3.10",
|
|
34
|
+
"@ibiz-template/core": "^0.5.1-beta.2",
|
|
35
|
+
"@ibiz-template/runtime": "^0.5.1-beta.2",
|
|
36
36
|
"@ibiz-template/theme": "^0.5.0",
|
|
37
|
-
"@ibiz/model-core": "^0.1.
|
|
37
|
+
"@ibiz/model-core": "^0.1.1",
|
|
38
38
|
"@types/path-browserify": "^1.0.2",
|
|
39
39
|
"@types/qs": "^6.9.11",
|
|
40
40
|
"@types/systemjs": "^6.13.5",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@ibiz-template/core": "^0.5.0-beta.0",
|
|
53
53
|
"@ibiz-template/runtime": "^0.5.0-beta.0",
|
|
54
|
-
"@ibiz/model-core": "^0.1.
|
|
54
|
+
"@ibiz/model-core": "^0.1.1",
|
|
55
55
|
"dayjs": "^1.11.10",
|
|
56
56
|
"path-browserify": "^1.0.1",
|
|
57
57
|
"pinia": "^2.1.7",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"vue": "^3.3.4",
|
|
62
62
|
"vue-router": "^4.2.4"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "322c526eb9b9e20e44714164911542d0851ebfa1"
|
|
65
65
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RuntimeError } from '@ibiz-template/core';
|
|
2
|
-
import { getDERedirectToView } from '@ibiz-template/runtime';
|
|
2
|
+
import { getDERedirectToView, ViewController } from '@ibiz-template/runtime';
|
|
3
3
|
import { IAppDERedirectView } from '@ibiz/model-core';
|
|
4
4
|
import {
|
|
5
5
|
defineComponent,
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
resolveComponent,
|
|
10
10
|
toRaw,
|
|
11
11
|
} from 'vue';
|
|
12
|
+
import { useViewController } from '../../use';
|
|
12
13
|
|
|
13
14
|
export const DeRedirectView = defineComponent({
|
|
14
15
|
name: 'IBizDeRedirectView',
|
|
@@ -18,24 +19,28 @@ export const DeRedirectView = defineComponent({
|
|
|
18
19
|
modelData: { type: Object as PropType<IAppDERedirectView>, required: true },
|
|
19
20
|
},
|
|
20
21
|
setup(props) {
|
|
22
|
+
const c = useViewController((...args) => new ViewController(...args));
|
|
21
23
|
const toViewId = ref<string>();
|
|
22
24
|
const toViewContext = ref<IContext>();
|
|
23
25
|
const toViewParams = ref<IParams>();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
26
|
+
|
|
27
|
+
c.evt.on('onCreated', () => {
|
|
28
|
+
getDERedirectToView(
|
|
29
|
+
toRaw(props.modelData),
|
|
30
|
+
toRaw(c.context),
|
|
31
|
+
toRaw(c.params),
|
|
32
|
+
).then(async result => {
|
|
33
|
+
if (result.type === 'view') {
|
|
34
|
+
toViewId.value = result.viewId;
|
|
35
|
+
toViewContext.value = result.context;
|
|
36
|
+
toViewParams.value = result.params;
|
|
37
|
+
} else {
|
|
38
|
+
throw new RuntimeError('嵌入重定向视图不支持url跳转');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
36
41
|
});
|
|
37
42
|
|
|
38
|
-
return { toViewId, toViewContext, toViewParams };
|
|
43
|
+
return { c, toViewId, toViewContext, toViewParams };
|
|
39
44
|
},
|
|
40
45
|
render() {
|
|
41
46
|
if (this.toViewId) {
|