@ibiz-template/vue3-components 0.7.38-alpha.12 → 0.7.38-alpha.31
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/ibiz-markdown-editor-BZ8j-yda.js +1 -0
- package/dist/{index-B_Fo_3Rt.js → index-CnCC-cC2.js} +1 -1
- package/dist/index-Q4QqDXYJ.js +4 -0
- package/dist/{index-BvI3oZGL.js → index-X3QXftIl.js} +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/wang-editor-Btv6GIhJ.js +1 -0
- package/dist/{xlsx-util-XDKOLzzW.js → xlsx-util-DbA3TyD9.js} +1 -1
- package/es/common/action-toolbar/action-toolbar.css +1 -1
- package/es/common/action-toolbar/action-toolbar.mjs +6 -3
- package/es/common/anchor-container/anchor-bar-list/anchor-bar-list.css +1 -1
- package/es/common/control-navigation/control-navigation.css +1 -0
- package/es/common/control-navigation/control-navigation.d.ts +32 -0
- package/es/common/control-navigation/control-navigation.mjs +116 -0
- package/es/common/control-navigation/provider/calendar-navigation.provider.d.ts +17 -0
- package/es/common/control-navigation/provider/calendar-navigation.provider.mjs +55 -0
- package/es/common/control-navigation/provider/index.d.ts +10 -0
- package/es/common/control-navigation/provider/index.mjs +17 -0
- package/es/common/control-navigation/provider/navigation-base.provider.d.ts +84 -0
- package/es/common/control-navigation/provider/navigation-base.provider.mjs +142 -0
- package/es/common/control-navigation/provider/tree-navigation.provider.d.ts +30 -0
- package/es/common/control-navigation/provider/tree-navigation.provider.mjs +81 -0
- package/es/common/custom-filter-condition/custom-filter-condition.d.ts +2 -0
- package/es/common/custom-theme/custom-theme-model.mjs +5 -13
- package/es/common/data-import2/data-import2.mjs +1 -1
- package/es/common/gantt-setting/gantt-setting.css +1 -0
- package/es/common/gantt-setting/gantt-setting.d.ts +63 -0
- package/es/common/gantt-setting/gantt-setting.mjs +237 -0
- package/es/common/grid-setting/grid-setting.css +1 -1
- package/es/common/grid-setting/grid-setting.d.ts +3 -1
- package/es/common/grid-setting/grid-setting.mjs +21 -5
- package/es/common/index.mjs +6 -0
- package/es/common/nav-split/nav-split.css +1 -0
- package/es/common/nav-split/nav-split.d.ts +57 -0
- package/es/common/nav-split/nav-split.mjs +209 -0
- package/es/common/pql-editor/utils/index.mjs +30 -40
- package/es/common/split/split.css +1 -1
- package/es/common/view-message/view-message.d.ts +2 -0
- package/es/control/app-menu/app-menu.css +1 -1
- package/es/control/app-menu/app-menu.d.ts +3 -0
- package/es/control/app-menu/app-menu.mjs +62 -22
- package/es/control/app-menu/custom-menu-design/custom-menu-design.mjs +12 -3
- package/es/control/app-menu/index.d.ts +3 -0
- package/es/control/calendar/calendar.css +1 -1
- package/es/control/calendar/calendar.d.ts +12 -1
- package/es/control/calendar/calendar.mjs +42 -10
- package/es/control/calendar/index.d.ts +12 -1
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.d.ts +54 -0
- package/es/control/dashboard/custom-dashboard-container/custom-dashboard-container.mjs +10 -3
- package/es/control/dashboard/dashboard-design/dashboard-design.mjs +2 -1
- package/es/control/dashboard/dashboard.mjs +13 -1
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -1
- package/es/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.mjs +9 -4
- package/es/control/data-view/data-view.css +1 -1
- package/es/control/data-view/data-view.d.ts +1 -0
- package/es/control/data-view/data-view.mjs +21 -3
- package/es/control/data-view/index.d.ts +1 -0
- package/es/control/drbar/drbar.controller.mjs +2 -2
- package/es/control/drtab/drtab-control.util.mjs +1 -1
- package/es/control/drtab/drtab.controller.d.ts +28 -8
- package/es/control/drtab/drtab.controller.mjs +62 -11
- package/es/control/drtab/drtab.css +1 -1
- package/es/control/drtab/drtab.d.ts +3 -1
- package/es/control/drtab/drtab.mjs +68 -9
- package/es/control/drtab/index.d.ts +3 -1
- package/es/control/form/form-detail/form-group-panel/form-group-panel.mjs +1 -1
- package/es/control/form/form-detail/form-item/form-item.d.ts +1 -0
- package/es/control/form/form-detail/form-item/form-item.mjs +21 -2
- package/es/control/form/form-detail/form-item/index.d.ts +1 -0
- package/es/control/form/form-detail/form-mdctrl/form-mdctrl-repeater/repeater-grid/repeater-grid.d.ts +104 -0
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/es/control/form/form-detail/form-tab-panel/form-tab-panel.mjs +1 -1
- package/es/control/form/search-form/index.d.ts +9 -0
- package/es/control/form/search-form/search-form.d.ts +9 -0
- package/es/control/form/search-form/search-form.mjs +4 -0
- package/es/control/gantt/gantt.css +1 -1
- package/es/control/gantt/gantt.d.ts +3 -4
- package/es/control/gantt/gantt.mjs +158 -52
- package/es/control/gantt/index.d.ts +3 -4
- package/es/control/grid/grid/grid-control.util.d.ts +2 -0
- package/es/control/grid/grid/grid-control.util.mjs +40 -4
- package/es/control/grid/grid/grid.css +1 -1
- package/es/control/grid/grid/grid.mjs +86 -73
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.d.ts +1 -0
- package/es/control/grid/grid-column/grid-field-column/grid-field-column.mjs +21 -1
- package/es/control/grid/grid-column/grid-field-column/index.d.ts +1 -0
- package/es/control/list/index.d.ts +1 -0
- package/es/control/list/list.css +1 -1
- package/es/control/list/list.d.ts +1 -0
- package/es/control/list/list.mjs +23 -5
- package/es/control/map/map.d.ts +9 -0
- package/es/control/map/map.mjs +4 -0
- package/es/control/search-bar/search-groups/search-groups.mjs +2 -2
- package/es/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/es/control/toolbar/toolbar.mjs +3 -0
- package/es/control/tree/el-tree-util.d.ts +39 -1
- package/es/control/tree/el-tree-util.mjs +70 -2
- package/es/control/tree/index.d.ts +16 -14
- package/es/control/tree/tree.css +1 -1
- package/es/control/tree/tree.d.ts +16 -14
- package/es/control/tree/tree.mjs +60 -31
- package/es/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.mjs +17 -1
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.d.ts +3 -8
- package/es/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.mjs +22 -23
- package/es/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.mjs +1 -0
- package/es/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.mjs +3 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/es/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.mjs +8 -2
- package/es/editor/html/wang-editor/wang-editor.mjs +1 -1
- package/es/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.mjs +1 -1
- package/es/editor/span/span/span.mjs +7 -1
- package/es/editor/span/span-editor.controller.d.ts +7 -0
- package/es/editor/span/span-editor.controller.mjs +10 -0
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/es/editor/text-box/ibiz-input-number/ibiz-input-number.mjs +24 -6
- package/es/editor/text-box/input/input.css +1 -1
- package/es/editor/text-box/input/input.mjs +32 -5
- package/es/editor/text-box/text-box-editor.controller.d.ts +7 -0
- package/es/editor/text-box/text-box-editor.controller.mjs +10 -0
- package/es/editor/upload/use/use-iview-upload.mjs +1 -1
- package/es/locale/en/index.d.ts +33 -0
- package/es/locale/en/index.mjs +27 -2
- package/es/locale/zh-CN/index.d.ts +33 -0
- package/es/locale/zh-CN/index.mjs +27 -2
- package/es/panel-component/auth-sso/auth-sso.css +1 -0
- package/es/panel-component/auth-sso/auth-sso.d.ts +26 -0
- package/es/panel-component/auth-sso/auth-sso.mjs +100 -0
- package/es/panel-component/auth-sso/auth-sso.provider.d.ts +6 -0
- package/es/panel-component/auth-sso/auth-sso.provider.mjs +21 -0
- package/es/panel-component/auth-sso/index.d.ts +23 -0
- package/es/panel-component/auth-sso/index.mjs +12 -0
- package/es/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/es/panel-component/coop-pos/coop-pos.controller.d.ts +46 -1
- package/es/panel-component/coop-pos/coop-pos.controller.mjs +92 -1
- package/es/panel-component/coop-pos/coop-pos.css +1 -1
- package/es/panel-component/coop-pos/coop-pos.d.ts +4 -1
- package/es/panel-component/coop-pos/coop-pos.mjs +23 -3
- package/es/panel-component/coop-pos/index.d.ts +3 -0
- package/es/panel-component/index-actions/index-actions.css +1 -1
- package/es/panel-component/index.mjs +4 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.controller.mjs +8 -31
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.d.ts +1 -1
- package/es/panel-component/nav-breadcrumb/nav-breadcrumb.service.mjs +1 -1
- package/es/panel-component/nav-pos-index/nav-pos-index.controller.mjs +7 -2
- package/es/panel-component/nav-tabs/nav-tabs.controller.d.ts +1 -1
- package/es/panel-component/nav-tabs/nav-tabs.controller.mjs +3 -3
- package/es/panel-component/panel-app-title/index.mjs +4 -0
- package/es/panel-component/panel-app-title/panel-app-title.controller.mjs +8 -0
- package/es/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/es/panel-component/panel-app-title/panel-app-title.mjs +112 -108
- package/es/panel-component/panel-button-list/panel-button-list.controller.mjs +2 -1
- package/es/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/es/panel-component/searchform-buttons/searchform-buttons.mjs +1 -1
- package/es/util/app-popover/app-popover-component.mjs +1 -1
- package/es/util/fullscreen/fullscreen-util.mjs +2 -2
- package/es/util/notification-util/notification-util.d.ts +10 -1
- package/es/util/notification-util/notification-util.mjs +36 -0
- package/es/util/notification-util/upload-manager/file-type.d.ts +8 -0
- package/es/util/notification-util/upload-manager/file-type.mjs +207 -0
- package/es/util/notification-util/upload-manager/upload-manager.css +1 -0
- package/es/util/notification-util/upload-manager/upload-manager.d.ts +64 -0
- package/es/util/notification-util/upload-manager/upload-manager.mjs +159 -0
- package/es/util/pagination/use-pagination.mjs +5 -4
- package/es/view/login-view/login-view.mjs +18 -0
- package/es/view-engine/edit-view.engine.mjs +14 -0
- package/es/view-engine/login-view.engine.mjs +1 -0
- package/es/view-engine/opt-view.engine.d.ts +1 -0
- package/es/view-engine/opt-view.engine.mjs +41 -1
- package/es/view-engine/tab-exp-view.engine.d.ts +9 -0
- package/es/view-engine/tab-exp-view.engine.mjs +20 -1
- package/es/view-engine/tab-search-view.engine.d.ts +9 -1
- package/es/view-engine/tab-search-view.engine.mjs +52 -2
- package/es/web-app/attach-environment-config.mjs +5 -1
- package/es/web-app/guard/auth-guard/auth-guard.d.ts +21 -14
- package/es/web-app/guard/auth-guard/auth-guard.mjs +26 -19
- package/es/web-app/guard/auth-guard/dyna-auth-guard.d.ts +1 -1
- package/es/web-app/guard/auth-guard/dyna-auth-guard.mjs +2 -1
- package/es/web-app/main.mjs +3 -1
- package/es/web-app/router/index.d.ts +3 -2
- package/es/web-app/router/index.mjs +15 -4
- package/lib/common/action-toolbar/action-toolbar.cjs +6 -3
- package/lib/common/action-toolbar/action-toolbar.css +1 -1
- package/lib/common/anchor-container/anchor-bar-list/anchor-bar-list.css +1 -1
- package/lib/common/control-navigation/control-navigation.cjs +118 -0
- package/lib/common/control-navigation/control-navigation.css +1 -0
- package/lib/common/control-navigation/provider/calendar-navigation.provider.cjs +57 -0
- package/lib/common/control-navigation/provider/index.cjs +19 -0
- package/lib/common/control-navigation/provider/navigation-base.provider.cjs +144 -0
- package/lib/common/control-navigation/provider/tree-navigation.provider.cjs +83 -0
- package/lib/common/custom-theme/custom-theme-model.cjs +5 -13
- package/lib/common/data-import2/data-import2.cjs +1 -1
- package/lib/common/gantt-setting/gantt-setting.cjs +239 -0
- package/lib/common/gantt-setting/gantt-setting.css +1 -0
- package/lib/common/grid-setting/grid-setting.cjs +21 -5
- package/lib/common/grid-setting/grid-setting.css +1 -1
- package/lib/common/index.cjs +6 -0
- package/lib/common/nav-split/nav-split.cjs +211 -0
- package/lib/common/nav-split/nav-split.css +1 -0
- package/lib/common/pql-editor/utils/index.cjs +30 -40
- package/lib/common/split/split.css +1 -1
- package/lib/control/app-menu/app-menu.cjs +60 -20
- package/lib/control/app-menu/app-menu.css +1 -1
- package/lib/control/app-menu/custom-menu-design/custom-menu-design.cjs +11 -2
- package/lib/control/calendar/calendar.cjs +42 -10
- package/lib/control/calendar/calendar.css +1 -1
- package/lib/control/dashboard/custom-dashboard-container/custom-dashboard-container.cjs +10 -3
- package/lib/control/dashboard/dashboard-design/dashboard-design.cjs +2 -1
- package/lib/control/dashboard/dashboard.cjs +13 -1
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.cjs +9 -4
- package/lib/control/dashboard/portlet/filter-portlet/filter-portlet-design/filter-portlet-design.css +1 -1
- package/lib/control/data-view/data-view.cjs +21 -3
- package/lib/control/data-view/data-view.css +1 -1
- package/lib/control/drbar/drbar.controller.cjs +2 -2
- package/lib/control/drtab/drtab-control.util.cjs +1 -1
- package/lib/control/drtab/drtab.cjs +67 -8
- package/lib/control/drtab/drtab.controller.cjs +62 -11
- package/lib/control/drtab/drtab.css +1 -1
- package/lib/control/form/form-detail/form-group-panel/form-group-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-item/form-item.cjs +20 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.cjs +1 -1
- package/lib/control/form/form-detail/form-tab-panel/form-tab-panel.css +1 -1
- package/lib/control/form/search-form/search-form.cjs +4 -0
- package/lib/control/gantt/gantt.cjs +156 -50
- package/lib/control/gantt/gantt.css +1 -1
- package/lib/control/grid/grid/grid-control.util.cjs +39 -3
- package/lib/control/grid/grid/grid.cjs +86 -73
- package/lib/control/grid/grid/grid.css +1 -1
- package/lib/control/grid/grid-column/grid-field-column/grid-field-column.cjs +21 -1
- package/lib/control/list/list.cjs +23 -5
- package/lib/control/list/list.css +1 -1
- package/lib/control/map/map.cjs +4 -0
- package/lib/control/search-bar/search-groups/search-groups.cjs +2 -2
- package/lib/control/tab-exp-panel/tab-exp-panel.css +1 -1
- package/lib/control/toolbar/toolbar.cjs +3 -0
- package/lib/control/tree/el-tree-util.cjs +70 -0
- package/lib/control/tree/tree.cjs +58 -29
- package/lib/control/tree/tree.css +1 -1
- package/lib/control/tree-grid-ex/tree-grid-ex-column/tree-grid-ex-field-column/tree-grid-ex-field-column.cjs +17 -1
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.cjs +21 -22
- package/lib/editor/data-picker/ibiz-picker-embed-view/ibiz-picker-embed-view.css +1 -1
- package/lib/editor/data-picker/ibiz-picker-select-view/ibiz-picker-select-view.cjs +1 -0
- package/lib/editor/date-range/ibiz-date-range-picker/ibiz-date-range-picker.cjs +3 -1
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.cjs +8 -2
- package/lib/editor/dropdown-list/ibiz-dropdown/ibiz-dropdown.css +1 -1
- package/lib/editor/html/wang-editor/wang-editor.cjs +1 -1
- package/lib/editor/markdown/ibiz-markdown-editor/ibiz-markdown-editor.cjs +1 -1
- package/lib/editor/span/span/span.cjs +7 -1
- package/lib/editor/span/span-editor.controller.cjs +10 -0
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.cjs +24 -6
- package/lib/editor/text-box/ibiz-input-number/ibiz-input-number.css +1 -1
- package/lib/editor/text-box/input/input.cjs +32 -5
- package/lib/editor/text-box/input/input.css +1 -1
- package/lib/editor/text-box/text-box-editor.controller.cjs +10 -0
- package/lib/editor/upload/use/use-iview-upload.cjs +1 -1
- package/lib/locale/en/index.cjs +27 -2
- package/lib/locale/zh-CN/index.cjs +27 -2
- package/lib/panel-component/auth-sso/auth-sso.cjs +102 -0
- package/lib/panel-component/auth-sso/auth-sso.css +1 -0
- package/lib/panel-component/auth-sso/auth-sso.provider.cjs +23 -0
- package/lib/panel-component/auth-sso/index.cjs +17 -0
- package/lib/panel-component/auth-userinfo/auth-userinfo.css +1 -1
- package/lib/panel-component/coop-pos/coop-pos.cjs +22 -2
- package/lib/panel-component/coop-pos/coop-pos.controller.cjs +91 -0
- package/lib/panel-component/coop-pos/coop-pos.css +1 -1
- package/lib/panel-component/index-actions/index-actions.css +1 -1
- package/lib/panel-component/index.cjs +39 -36
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.controller.cjs +7 -30
- package/lib/panel-component/nav-breadcrumb/nav-breadcrumb.service.cjs +1 -1
- package/lib/panel-component/nav-pos-index/nav-pos-index.controller.cjs +7 -2
- package/lib/panel-component/nav-tabs/nav-tabs.controller.cjs +3 -3
- package/lib/panel-component/panel-app-title/index.cjs +4 -0
- package/lib/panel-component/panel-app-title/panel-app-title.cjs +112 -108
- package/lib/panel-component/panel-app-title/panel-app-title.controller.cjs +8 -0
- package/lib/panel-component/panel-app-title/panel-app-title.css +1 -1
- package/lib/panel-component/panel-button-list/panel-button-list.controller.cjs +2 -1
- package/lib/panel-component/panel-index-view-search/panel-index-view-search.css +1 -1
- package/lib/panel-component/searchform-buttons/searchform-buttons.cjs +1 -1
- package/lib/util/app-popover/app-popover-component.cjs +1 -1
- package/lib/util/fullscreen/fullscreen-util.cjs +2 -2
- package/lib/util/notification-util/notification-util.cjs +36 -0
- package/lib/util/notification-util/upload-manager/file-type.cjs +209 -0
- package/lib/util/notification-util/upload-manager/upload-manager.cjs +161 -0
- package/lib/util/notification-util/upload-manager/upload-manager.css +1 -0
- package/lib/util/pagination/use-pagination.cjs +5 -4
- package/lib/view/login-view/login-view.cjs +18 -0
- package/lib/view-engine/edit-view.engine.cjs +14 -0
- package/lib/view-engine/login-view.engine.cjs +1 -0
- package/lib/view-engine/opt-view.engine.cjs +40 -0
- package/lib/view-engine/tab-exp-view.engine.cjs +19 -0
- package/lib/view-engine/tab-search-view.engine.cjs +52 -2
- package/lib/web-app/attach-environment-config.cjs +5 -1
- package/lib/web-app/guard/auth-guard/auth-guard.cjs +26 -19
- package/lib/web-app/guard/auth-guard/dyna-auth-guard.cjs +2 -1
- package/lib/web-app/main.cjs +3 -1
- package/lib/web-app/router/index.cjs +15 -4
- package/package.json +11 -11
- package/dist/ibiz-markdown-editor-B4c6yGAW.js +0 -1
- package/dist/index-VQ3FT6ih.js +0 -4
- package/dist/wang-editor-BUIAd4uJ.js +0 -1
- /package/es/node_modules/.pnpm/{@ibiz-template_core@0.7.35-alpha.1_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.mjs +0 -0
- /package/lib/node_modules/.pnpm/{@ibiz-template_core@0.7.35-alpha.1_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1 → @ibiz-template_core@0.7.38-alpha.32_axios@1.7.7_lodash-es@4.17.21_qs@6.13.0_qx-util@0.4.8_ramda@0.29.1}/node_modules/@ibiz-template/core/out/utils/namespace/namespace.cjs +0 -0
|
@@ -34,40 +34,44 @@ class AuthGuard {
|
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* 总的入口校验
|
|
37
|
-
*
|
|
38
|
-
* @
|
|
39
|
-
* @
|
|
37
|
+
*
|
|
38
|
+
* @author tony001
|
|
39
|
+
* @date 2024-11-12 14:11:32
|
|
40
|
+
* @param {IParams} context
|
|
41
|
+
* @param {boolean} [notLogin=true]
|
|
40
42
|
* @return {*} {Promise<boolean>}
|
|
41
43
|
*/
|
|
42
|
-
async verify(notLogin = true) {
|
|
44
|
+
async verify(context, notLogin = true) {
|
|
43
45
|
if (notLogin) {
|
|
44
46
|
let result = true;
|
|
45
47
|
try {
|
|
46
48
|
if (ibiz.env.enableAnonymous) {
|
|
47
|
-
await this.anonymousValidate();
|
|
49
|
+
await this.anonymousValidate(context);
|
|
48
50
|
}
|
|
49
|
-
await this.appInit();
|
|
51
|
+
await this.appInit(context);
|
|
50
52
|
} catch (error) {
|
|
51
53
|
result = false;
|
|
52
54
|
ibiz.util.error.handle(error);
|
|
53
55
|
}
|
|
54
56
|
return result;
|
|
55
57
|
}
|
|
56
|
-
await this.initModel(false);
|
|
58
|
+
await this.initModel(context, false);
|
|
57
59
|
return true;
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
62
|
* 匿名登录相关校验逻辑,不通过会抛异常
|
|
61
|
-
*
|
|
62
|
-
* @
|
|
63
|
+
*
|
|
64
|
+
* @author tony001
|
|
65
|
+
* @date 2024-11-12 14:11:27
|
|
66
|
+
* @param {IParams} context
|
|
63
67
|
* @return {*} {Promise<void>}
|
|
64
68
|
*/
|
|
65
|
-
async anonymousValidate() {
|
|
69
|
+
async anonymousValidate(context) {
|
|
66
70
|
const authInfo = ibiz.auth.getAuthInfo();
|
|
67
71
|
if (authInfo && !authInfo.isAnonymous) {
|
|
68
72
|
return;
|
|
69
73
|
}
|
|
70
|
-
await this.initModel(false);
|
|
74
|
+
await this.initModel(context, false);
|
|
71
75
|
const urlPaths = window.location.hash.split("/");
|
|
72
76
|
const viewName = urlPaths[urlPaths.length - 2];
|
|
73
77
|
let viewModel;
|
|
@@ -100,11 +104,12 @@ class AuthGuard {
|
|
|
100
104
|
/**
|
|
101
105
|
* 应用参数初始化
|
|
102
106
|
*
|
|
103
|
-
* @author
|
|
104
|
-
* @date
|
|
107
|
+
* @author tony001
|
|
108
|
+
* @date 2024-11-12 14:11:06
|
|
109
|
+
* @param {IParams} context
|
|
105
110
|
* @return {*} {Promise<void>}
|
|
106
111
|
*/
|
|
107
|
-
async appInit() {
|
|
112
|
+
async appInit(context) {
|
|
108
113
|
try {
|
|
109
114
|
if (ibiz.env.isSaaSMode === true) {
|
|
110
115
|
await this.loadOrgData();
|
|
@@ -128,19 +133,21 @@ class AuthGuard {
|
|
|
128
133
|
throw error;
|
|
129
134
|
}
|
|
130
135
|
}
|
|
131
|
-
await this.initModel();
|
|
136
|
+
await this.initModel(context);
|
|
132
137
|
await ibiz.auth.extendLogin();
|
|
133
138
|
await ibiz.hub.notice.init();
|
|
134
139
|
await ibiz.util.theme.initCustomTheme();
|
|
135
140
|
}
|
|
136
141
|
/**
|
|
137
142
|
* 初始化模型
|
|
138
|
-
*
|
|
139
|
-
* @
|
|
140
|
-
* @
|
|
143
|
+
*
|
|
144
|
+
* @author tony001
|
|
145
|
+
* @date 2024-11-12 14:11:43
|
|
146
|
+
* @param {IParams} context
|
|
147
|
+
* @param {boolean} [_permission=true]
|
|
141
148
|
* @return {*} {Promise<void>}
|
|
142
149
|
*/
|
|
143
|
-
async initModel(_permission = true) {
|
|
150
|
+
async initModel(context, _permission = true) {
|
|
144
151
|
}
|
|
145
152
|
/**
|
|
146
153
|
* 加载应用数据
|
|
@@ -2,5 +2,5 @@ import { AuthGuard } from './auth-guard';
|
|
|
2
2
|
export declare class DynaAuthGuard extends AuthGuard {
|
|
3
3
|
hasModelInit: boolean;
|
|
4
4
|
noPermissionModel: boolean;
|
|
5
|
-
initModel(permission?: boolean): Promise<void>;
|
|
5
|
+
initModel(context: IParams, permission?: boolean): Promise<void>;
|
|
6
6
|
}
|
|
@@ -16,7 +16,7 @@ class DynaAuthGuard extends AuthGuard {
|
|
|
16
16
|
__publicField(this, "hasModelInit", false);
|
|
17
17
|
__publicField(this, "noPermissionModel", false);
|
|
18
18
|
}
|
|
19
|
-
async initModel(permission = true) {
|
|
19
|
+
async initModel(context, permission = true) {
|
|
20
20
|
if (!this.hasModelInit || this.hasModelInit && this.noPermissionModel !== permission) {
|
|
21
21
|
ibiz.hub.reset();
|
|
22
22
|
const helper = new ModelHelper(
|
|
@@ -29,6 +29,7 @@ class DynaAuthGuard extends AuthGuard {
|
|
|
29
29
|
return res.data;
|
|
30
30
|
},
|
|
31
31
|
ibiz.env.appId,
|
|
32
|
+
context,
|
|
32
33
|
permission
|
|
33
34
|
);
|
|
34
35
|
const tempApp = await helper.getAppModel();
|
package/es/web-app/main.mjs
CHANGED
|
@@ -62,7 +62,9 @@ async function runApp(plugins, opts) {
|
|
|
62
62
|
} else {
|
|
63
63
|
authGuard = new DynaAuthGuard();
|
|
64
64
|
}
|
|
65
|
-
AppRouter.setAuthGuard(
|
|
65
|
+
AppRouter.setAuthGuard(
|
|
66
|
+
(context, notLogin) => authGuard.verify(context, notLogin)
|
|
67
|
+
);
|
|
66
68
|
app.use(AppRouter.getRouter());
|
|
67
69
|
ibiz.appUtil = new AppUtil(AppRouter.getRouter());
|
|
68
70
|
ibiz.openView = new OpenViewUtil(AppRouter.getRouter());
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Router } from 'vue-router';
|
|
1
|
+
import { RouteLocationNormalized, Router } from 'vue-router';
|
|
2
2
|
import 'nprogress/nprogress.css';
|
|
3
3
|
export declare class AppRouter {
|
|
4
4
|
private static router?;
|
|
5
5
|
private static authGuard;
|
|
6
|
-
static setAuthGuard(authGuard: (notLogin?: boolean) => Promise<boolean>): void;
|
|
6
|
+
static setAuthGuard(authGuard: (context: IParams, notLogin?: boolean) => Promise<boolean>): void;
|
|
7
|
+
static getAppContext(route: RouteLocationNormalized): IParams;
|
|
7
8
|
static getRouter(): Router;
|
|
8
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createRouter, createWebHashHistory } from 'vue-router';
|
|
2
|
+
import qs from 'qs';
|
|
2
3
|
import { AppRedirectView } from '@ibiz-template/vue3-util';
|
|
3
4
|
import { RouteConst } from '@ibiz-template/runtime';
|
|
4
5
|
import NProgress from '../../node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.mjs';
|
|
@@ -22,6 +23,16 @@ class AppRouter {
|
|
|
22
23
|
static setAuthGuard(authGuard) {
|
|
23
24
|
this.authGuard = authGuard;
|
|
24
25
|
}
|
|
26
|
+
static getAppContext(route) {
|
|
27
|
+
let appContext = {};
|
|
28
|
+
if (route.params.appContext && route.params.appContext !== ibiz.env.routePlaceholder) {
|
|
29
|
+
appContext = qs.parse(route.params.appContext, {
|
|
30
|
+
strictNullHandling: true,
|
|
31
|
+
delimiter: ";"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return appContext;
|
|
35
|
+
}
|
|
25
36
|
static getRouter() {
|
|
26
37
|
const placeholder = ibiz.env.routePlaceholder;
|
|
27
38
|
const paramReg = "[^/]+=[^/]+|".concat(placeholder);
|
|
@@ -39,7 +50,7 @@ class AppRouter {
|
|
|
39
50
|
path: "/login",
|
|
40
51
|
name: "loginView",
|
|
41
52
|
beforeEnter: async (_to, _from, next) => {
|
|
42
|
-
await this.authGuard(false);
|
|
53
|
+
await this.authGuard(this.getAppContext(_to), false);
|
|
43
54
|
next();
|
|
44
55
|
},
|
|
45
56
|
component: LoginView
|
|
@@ -48,7 +59,7 @@ class AppRouter {
|
|
|
48
59
|
path: "/share",
|
|
49
60
|
name: "shareView",
|
|
50
61
|
beforeEnter: async (_to, _from, next) => {
|
|
51
|
-
const authority = await this.authGuard();
|
|
62
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
52
63
|
if (authority) {
|
|
53
64
|
next();
|
|
54
65
|
} else {
|
|
@@ -66,7 +77,7 @@ class AppRouter {
|
|
|
66
77
|
path: "/appredirectview",
|
|
67
78
|
name: "appRedirectView",
|
|
68
79
|
beforeEnter: async (_to, _from, next) => {
|
|
69
|
-
const authority = await this.authGuard();
|
|
80
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
70
81
|
if (authority) {
|
|
71
82
|
next();
|
|
72
83
|
} else {
|
|
@@ -78,7 +89,7 @@ class AppRouter {
|
|
|
78
89
|
{
|
|
79
90
|
path: "/:appContext(".concat(paramReg, ")/:view1(").concat(viewReg, ")/:params1(").concat(paramReg, ")"),
|
|
80
91
|
beforeEnter: async (_to, _from, next) => {
|
|
81
|
-
const authority = await this.authGuard();
|
|
92
|
+
const authority = await this.authGuard(this.getAppContext(_to));
|
|
82
93
|
if (authority) {
|
|
83
94
|
next();
|
|
84
95
|
} else {
|
|
@@ -40,10 +40,11 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
40
40
|
setup(props, {
|
|
41
41
|
emit
|
|
42
42
|
}) {
|
|
43
|
+
var _a;
|
|
43
44
|
const ns = vue3Util.useNamespace("action-toolbar");
|
|
44
45
|
const dropdownRef = vue.ref();
|
|
45
46
|
const popoverVisible = vue.ref(false);
|
|
46
|
-
props.actionDetails.forEach((detail) => {
|
|
47
|
+
(_a = props.actionDetails) == null ? void 0 : _a.forEach((detail) => {
|
|
47
48
|
if (detail.capLanguageRes && detail.capLanguageRes.lanResTag) {
|
|
48
49
|
detail.caption = ibiz.i18n.t(detail.capLanguageRes.lanResTag, detail.caption);
|
|
49
50
|
}
|
|
@@ -92,6 +93,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
92
93
|
};
|
|
93
94
|
},
|
|
94
95
|
render() {
|
|
96
|
+
var _a;
|
|
95
97
|
const details = this.actionDetails || [];
|
|
96
98
|
const renderDivider = (isExpand) => {
|
|
97
99
|
return vue.createVNode(vue.resolveComponent("el-divider"), {
|
|
@@ -102,7 +104,8 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
102
104
|
};
|
|
103
105
|
const renderActions = (items, isExpand = true) => {
|
|
104
106
|
return items.map((detail) => {
|
|
105
|
-
|
|
107
|
+
var _a2;
|
|
108
|
+
if ((_a2 = this.actionsState[detail.id]) == null ? void 0 : _a2.visible) {
|
|
106
109
|
return [detail.addSeparator && renderDivider(isExpand), vue.createVNode(vue.resolveComponent("el-button"), {
|
|
107
110
|
"text": true,
|
|
108
111
|
"size": "small",
|
|
@@ -162,7 +165,7 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
|
|
|
162
165
|
default: () => [_slot]
|
|
163
166
|
})];
|
|
164
167
|
};
|
|
165
|
-
if (!this.actionsState.visible) {
|
|
168
|
+
if (!((_a = this.actionsState) == null ? void 0 : _a.visible)) {
|
|
166
169
|
return;
|
|
167
170
|
}
|
|
168
171
|
if (this.mode === "buttons") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.ibiz-action-toolbar{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);display:flex;flex-wrap:wrap}.ibiz-action-toolbar__item{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__item--icon.is-has-icon{display:flex;align-items:
|
|
1
|
+
@charset "UTF-8";.ibiz-action-toolbar{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);display:flex;flex-wrap:wrap}.ibiz-action-toolbar__item{padding:var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none);margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__item--icon.is-has-icon{display:flex;align-items:baseline;justify-content:center;width:var(--ibiz-width-icon-medium);height:var(--ibiz-width-icon-medium);margin-right:var(--ibiz-spacing-extra-tight);margin-left:var(--ibiz-spacing-extra-tight);font-size:var(--ibiz-width-icon-medium)}.ibiz-action-toolbar__item--label.is-has-caption{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-action-toolbar__item+.ibiz-action-toolbar__item{margin:var(--ibiz-action-toolbar-item-margin)}.ibiz-action-toolbar__separator{height:auto}.ibiz-action-toolbar__popover{--ibiz-action-toolbar-item-margin:var(--ibiz-spacing-none) var(--ibiz-spacing-extra-tight) var(--ibiz-spacing-none) var(--ibiz-spacing-none);--ibiz-action-toolbar-separator-height:var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-separator-width:var(--ibiz-spacing-super-tight);--ibiz-action-toolbar-separator-color:var(--ibiz-color-border);--ibiz-action-toolbar-popover-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-none);--ibiz-action-toolbar-popover-button-padding:var(--ibiz-spacing-tight) var(--ibiz-spacing-base-loose);--ibiz-action-toolbar-popover-button-color:var(--ibiz-color-text-2);--ibiz-action-toolbar-popover-button-hover-bg:var(--ibiz-color-bg-0);width:auto!important;min-width:150px;--el-popover-padding:var(--ibiz-action-toolbar-popover-padding)}.ibiz-action-toolbar__popover .el-button{--el-button-size:getCssVar("height-control", "large");display:block;width:100%;padding:var(--ibiz-action-toolbar-popover-button-padding);margin:var(--ibiz-spacing-none);font-size:var(--ibiz-font-size-regular);color:var(--ibiz-action-toolbar-popover-button-color);text-align:left;border-radius:0}.ibiz-action-toolbar__popover .el-button:hover{background-color:var(--ibiz-action-toolbar-popover-button-hover-bg)}.ibiz-action-toolbar__popover .el-button .ibiz-icon{margin-right:var(--ibiz-spacing-extra-tight)}.ibiz-action-toolbar__popover .ibiz-action-toolbar__separator{margin:var(--ibiz-spacing-none)}.ibiz-action-toolbar--dropdown .ibiz-action-toolbar__caption{cursor:pointer}.ibiz-action-toolbar--dropdown .ibiz-action-toolbar__caption-icon{vertical-align:bottom}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ibiz-anchor-bar-list{--ibiz-anchor-bar-item-height:32px;--ibiz-anchor-bar-selected-icon-width:4px;position:relative}.ibiz-anchor-bar-list__item{height:var(--ibiz-anchor-bar-item-height);padding-left:var(--ibiz-spacing-base);overflow:hidden;font-size:var(--ibiz-font-size-header-6);line-height:var(--ibiz-anchor-bar-item-height);color:var(--ibiz-color-text-3);text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.ibiz-anchor-bar-list__item--title{display:block;width:100%;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-anchor-bar-list__item.is-selected{position:relative;font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold);color:var(--ibiz-
|
|
1
|
+
.ibiz-anchor-bar-list{--ibiz-anchor-bar-item-height:32px;--ibiz-anchor-bar-selected-icon-width:4px;--ibiz-anchor-bar-hover-color:var(--ibiz-color-primary-hover);--ibiz-anchor-bar-select-color:var(--ibiz-color-primary-active);--ibiz-anchor-bar-select-bar-color:var(--ibiz-color-primary);position:relative}.ibiz-anchor-bar-list__item{height:var(--ibiz-anchor-bar-item-height);padding-left:var(--ibiz-spacing-base);overflow:hidden;font-size:var(--ibiz-font-size-header-6);line-height:var(--ibiz-anchor-bar-item-height);color:var(--ibiz-color-text-3);text-overflow:ellipsis;white-space:nowrap;cursor:pointer}.ibiz-anchor-bar-list__item--title{display:block;width:100%;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.ibiz-anchor-bar-list__item.is-selected{position:relative;font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold);color:var(--ibiz-anchor-bar-select-color)}.ibiz-anchor-bar-list__item.is-selected::after{position:absolute;top:0;left:0;width:var(--ibiz-anchor-bar-selected-icon-width);height:100%;content:"";background-color:var(--ibiz-anchor-bar-select-bar-color);border-radius:calc(var(--ibiz-anchor-bar-selected-icon-width)/ 2)}.ibiz-anchor-bar-list__item:hover{color:var(--ibiz-anchor-bar-hover-color)}.ibiz-anchor-bar-list::before{position:absolute;top:0;left:0;width:var(--ibiz-anchor-bar-selected-icon-width);height:100%;content:"";background-color:var(--ibiz-color-fill-0)}.ibiz-anchor-bar-list.is-usermode{display:flex;align-items:center;width:100%;height:100%}.ibiz-anchor-bar-list.is-usermode .ibiz-anchor-bar-list__item{display:flex;flex:1;align-items:center;justify-content:center;width:100%;height:100%;overflow:hidden;font-size:var(--ibiz-font-size-header-6);color:var(--ibiz-color-text-3);cursor:pointer}.ibiz-anchor-bar-list.is-usermode .ibiz-anchor-bar-list__item--title{display:block;width:100%;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.ibiz-anchor-bar-list.is-usermode .ibiz-anchor-bar-list__item.is-selected{position:relative;font-size:var(--ibiz-font-size-header-5);font-weight:var(--ibiz-font-weight-bold);color:var(--ibiz-color-primary-active)}.ibiz-anchor-bar-list.is-usermode .ibiz-anchor-bar-list__item.is-selected::after{position:absolute;top:unset;bottom:0;left:0;width:100%;height:var(--ibiz-anchor-bar-selected-icon-width);content:"";background-color:var(--ibiz-color-primary);border-radius:calc(var(--ibiz-anchor-bar-selected-icon-width)/ 2)}.ibiz-anchor-bar-list.is-usermode .ibiz-anchor-bar-list__item:hover{color:var(--ibiz-color-primary-hover)}.ibiz-anchor-bar-list.is-usermode::before{position:absolute;top:unset;bottom:0;left:0;width:100%;height:var(--ibiz-anchor-bar-selected-icon-width);content:"";background-color:var(--ibiz-color-fill-0)}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var vue3Util = require('@ibiz-template/vue3-util');
|
|
5
|
+
var index = require('./provider/index.cjs');
|
|
6
|
+
require('./control-navigation.css');
|
|
7
|
+
|
|
8
|
+
"use strict";
|
|
9
|
+
const IBizControlNavigation = /* @__PURE__ */ vue.defineComponent({
|
|
10
|
+
name: "IBizControlNavigation",
|
|
11
|
+
props: {
|
|
12
|
+
controller: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
setup(props) {
|
|
18
|
+
var _a;
|
|
19
|
+
const ns = vue3Util.useNamespace("control-navigation");
|
|
20
|
+
const provider = index.getNavigationProvider(props.controller);
|
|
21
|
+
const outerWrapper = vue.ref(null);
|
|
22
|
+
const {
|
|
23
|
+
navViewPos,
|
|
24
|
+
controlParam,
|
|
25
|
+
navViewWidth,
|
|
26
|
+
navViewHeight,
|
|
27
|
+
navViewMinWidth,
|
|
28
|
+
navViewMaxWidth,
|
|
29
|
+
navViewMinHeight,
|
|
30
|
+
navViewMaxHeight
|
|
31
|
+
} = props.controller.model;
|
|
32
|
+
const navStyle = {
|
|
33
|
+
minWidth: navViewMinWidth ? navViewMinWidth > 0 ? "".concat(navViewMinWidth, "px") : navViewMinWidth : void 0,
|
|
34
|
+
maxWidth: navViewMaxWidth ? navViewMaxWidth > 0 ? "".concat(navViewMaxWidth, "px") : navViewMaxWidth : void 0,
|
|
35
|
+
minHeight: navViewMinHeight ? navViewMinHeight > 0 ? "".concat(navViewMinHeight, "px") : navViewMinHeight : void 0,
|
|
36
|
+
maxHeight: navViewMaxHeight ? navViewMaxHeight > 0 ? "".concat(navViewMaxHeight, "px") : navViewMaxHeight : void 0
|
|
37
|
+
};
|
|
38
|
+
const navViewMsg = vue.ref();
|
|
39
|
+
const navRenderMode = ((_a = controlParam == null ? void 0 : controlParam.ctrlParams) == null ? void 0 : _a.navRenderMode) ? controlParam.ctrlParams.navRenderMode : "RELOAD";
|
|
40
|
+
const splitValue = vue.ref(0.5);
|
|
41
|
+
const splitMode = vue.ref(["BOTTOM", "ANY_BOTTOM"].includes(navViewPos) ? "vertical" : "horizontal");
|
|
42
|
+
vue.watch(() => provider.navViewMsg.value, (newVal, oldVal) => {
|
|
43
|
+
if (navRenderMode === "REDRAW" || !newVal || oldVal && newVal.viewId !== oldVal.viewId) {
|
|
44
|
+
navViewMsg.value = newVal;
|
|
45
|
+
} else {
|
|
46
|
+
navViewMsg.value = {
|
|
47
|
+
context: newVal.context,
|
|
48
|
+
params: newVal.params,
|
|
49
|
+
viewId: newVal.viewId
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
deep: true,
|
|
54
|
+
immediate: true
|
|
55
|
+
});
|
|
56
|
+
vue.onMounted(() => {
|
|
57
|
+
if (outerWrapper.value) {
|
|
58
|
+
const offsetSize = splitMode.value === "horizontal" ? "offsetWidth" : "offsetHeight";
|
|
59
|
+
const size = outerWrapper.value[offsetSize];
|
|
60
|
+
const viewSize = splitMode.value === "horizontal" ? navViewWidth : navViewHeight;
|
|
61
|
+
if (viewSize) {
|
|
62
|
+
if (viewSize > 0 && viewSize < 1) {
|
|
63
|
+
splitValue.value = 1 - viewSize;
|
|
64
|
+
} else {
|
|
65
|
+
splitValue.value = "".concat(size - viewSize, "px");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
const renderNavView = () => {
|
|
71
|
+
if (navViewMsg.value) {
|
|
72
|
+
return vue.h(vue.resolveComponent("IBizViewShell"), {
|
|
73
|
+
...navViewMsg.value,
|
|
74
|
+
class: ns.e("nav-view")
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
ns,
|
|
80
|
+
navStyle,
|
|
81
|
+
provider,
|
|
82
|
+
splitMode,
|
|
83
|
+
splitValue,
|
|
84
|
+
outerWrapper,
|
|
85
|
+
renderNavView
|
|
86
|
+
};
|
|
87
|
+
},
|
|
88
|
+
render() {
|
|
89
|
+
var _a, _b, _c, _d, _e;
|
|
90
|
+
const {
|
|
91
|
+
state,
|
|
92
|
+
model
|
|
93
|
+
} = this.controller;
|
|
94
|
+
return vue.createVNode("div", {
|
|
95
|
+
"ref": "outerWrapper",
|
|
96
|
+
"class": [this.ns.b(), this.ns.e((_a = model.controlType) == null ? void 0 : _a.toLowerCase())]
|
|
97
|
+
}, [state.enableNavView ? state.showNavView ? vue.createVNode(vue.resolveComponent("iBizNavSplit"), {
|
|
98
|
+
"modelValue": this.splitValue,
|
|
99
|
+
"onUpdate:modelValue": ($event) => this.splitValue = $event,
|
|
100
|
+
"mode": this.splitMode,
|
|
101
|
+
"min": this.splitMode === "horizontal" ? this.navStyle.minWidth : this.navStyle.minHeight,
|
|
102
|
+
"max": this.splitMode === "horizontal" ? this.navStyle.maxWidth : this.navStyle.maxHeight
|
|
103
|
+
}, {
|
|
104
|
+
left: () => {
|
|
105
|
+
var _a2, _b2;
|
|
106
|
+
return (_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2);
|
|
107
|
+
},
|
|
108
|
+
right: () => this.renderNavView(),
|
|
109
|
+
top: () => {
|
|
110
|
+
var _a2, _b2;
|
|
111
|
+
return (_b2 = (_a2 = this.$slots).default) == null ? void 0 : _b2.call(_a2);
|
|
112
|
+
},
|
|
113
|
+
bottom: () => this.renderNavView()
|
|
114
|
+
}) : (_c = (_b = this.$slots).default) == null ? void 0 : _c.call(_b) : (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)]);
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
exports.IBizControlNavigation = IBizControlNavigation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ibiz-control-navigation{width:100%;height:100%}.ibiz-control-navigation__nav-control{width:100%;height:100%;position:relative}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var navigationBase_provider = require('./navigation-base.provider.cjs');
|
|
4
|
+
|
|
5
|
+
"use strict";
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __publicField = (obj, key, value) => {
|
|
9
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
10
|
+
return value;
|
|
11
|
+
};
|
|
12
|
+
class CalendarNavigationProvider extends navigationBase_provider.NavgationBaseProvider {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
__publicField(this, "keyName", "navId");
|
|
16
|
+
}
|
|
17
|
+
onNavDataByStack() {
|
|
18
|
+
const { items } = this.controller.state;
|
|
19
|
+
const navData = this.navStack.map((key) => items.find((item) => item.navId === key)).find((item) => item !== void 0) || items[0];
|
|
20
|
+
if (navData) {
|
|
21
|
+
const date = new Date(navData.beginTime);
|
|
22
|
+
this.controller.setSelectDate(date);
|
|
23
|
+
this.controller.setNavData(navData);
|
|
24
|
+
} else {
|
|
25
|
+
this.navStack = [];
|
|
26
|
+
this.controller.setSelectDate(/* @__PURE__ */ new Date());
|
|
27
|
+
this.navViewMsg.value = void 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
getNavViewMsg(item) {
|
|
31
|
+
const { sysCalendarItems } = this.model;
|
|
32
|
+
const itemModel = sysCalendarItems == null ? void 0 : sysCalendarItems.find(
|
|
33
|
+
(_item) => _item.itemType === item.itemType
|
|
34
|
+
);
|
|
35
|
+
if (itemModel) {
|
|
36
|
+
const { context, params } = this.prepareParams(
|
|
37
|
+
itemModel,
|
|
38
|
+
item.deData ? item.deData : item,
|
|
39
|
+
this.controller.context,
|
|
40
|
+
this.controller.params
|
|
41
|
+
);
|
|
42
|
+
return {
|
|
43
|
+
key: item.navId,
|
|
44
|
+
context,
|
|
45
|
+
params,
|
|
46
|
+
viewId: itemModel.navAppViewId
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
key: item.navId,
|
|
51
|
+
context: this.controller.context,
|
|
52
|
+
params: this.controller.params
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
exports.CalendarNavigationProvider = CalendarNavigationProvider;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var navigationBase_provider = require('./navigation-base.provider.cjs');
|
|
4
|
+
var calendarNavigation_provider = require('./calendar-navigation.provider.cjs');
|
|
5
|
+
var treeNavigation_provider = require('./tree-navigation.provider.cjs');
|
|
6
|
+
|
|
7
|
+
"use strict";
|
|
8
|
+
function getNavigationProvider(controller) {
|
|
9
|
+
const { controlType } = controller.model;
|
|
10
|
+
if (controlType === "CALENDAR") {
|
|
11
|
+
return new calendarNavigation_provider.CalendarNavigationProvider(controller);
|
|
12
|
+
}
|
|
13
|
+
if (controlType === "TREEVIEW") {
|
|
14
|
+
return new treeNavigation_provider.TreeNavigationProvider(controller);
|
|
15
|
+
}
|
|
16
|
+
return new navigationBase_provider.NavgationBaseProvider(controller);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
exports.getNavigationProvider = getNavigationProvider;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var vue = require('vue');
|
|
4
|
+
var runtime = require('@ibiz-template/runtime');
|
|
5
|
+
|
|
6
|
+
"use strict";
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __publicField = (obj, key, value) => {
|
|
10
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
11
|
+
return value;
|
|
12
|
+
};
|
|
13
|
+
class NavgationBaseProvider {
|
|
14
|
+
/**
|
|
15
|
+
* Creates an instance of NavgationBaseProvider.
|
|
16
|
+
* @param {MDControlController} controller
|
|
17
|
+
* @memberof NavgationBaseProvider
|
|
18
|
+
*/
|
|
19
|
+
constructor(controller) {
|
|
20
|
+
this.controller = controller;
|
|
21
|
+
/**
|
|
22
|
+
* 导航栈数据
|
|
23
|
+
*
|
|
24
|
+
* @type {string[]}
|
|
25
|
+
* @memberof NavgationBaseProvider
|
|
26
|
+
*/
|
|
27
|
+
__publicField(this, "navStack", []);
|
|
28
|
+
/**
|
|
29
|
+
* 主键名称
|
|
30
|
+
*
|
|
31
|
+
* @memberof NavgationBaseProvider
|
|
32
|
+
*/
|
|
33
|
+
__publicField(this, "keyName", "srfkey");
|
|
34
|
+
/**
|
|
35
|
+
* 模型
|
|
36
|
+
*
|
|
37
|
+
* @type {IMDControl}
|
|
38
|
+
* @memberof NavgationBaseProvider
|
|
39
|
+
*/
|
|
40
|
+
__publicField(this, "model");
|
|
41
|
+
/**
|
|
42
|
+
* 导航视图信息
|
|
43
|
+
*
|
|
44
|
+
* @type {(Ref<INavViewMsg | undefined>)}
|
|
45
|
+
* @memberof NavgationBaseProvider
|
|
46
|
+
*/
|
|
47
|
+
__publicField(this, "navViewMsg", vue.ref());
|
|
48
|
+
this.model = controller.model;
|
|
49
|
+
if (controller.state.enableNavView) {
|
|
50
|
+
controller.evt.on("onNavDataChange", (evt) => {
|
|
51
|
+
this.onNavDataChange(evt);
|
|
52
|
+
});
|
|
53
|
+
controller.evt.on("onLoadSuccess", () => {
|
|
54
|
+
this.onNavDataByStack();
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* 解析参数
|
|
60
|
+
*
|
|
61
|
+
* @param {(INavigatable & { appDataEntityId?: string })} XDataModel
|
|
62
|
+
* @param {IData} data
|
|
63
|
+
* @param {IContext} context
|
|
64
|
+
* @param {IParams} params
|
|
65
|
+
* @return {*} {{ context: IContext; params: IParams }}
|
|
66
|
+
* @memberof NavgationBaseProvider
|
|
67
|
+
*/
|
|
68
|
+
prepareParams(XDataModel, data, context, params) {
|
|
69
|
+
const {
|
|
70
|
+
navDER,
|
|
71
|
+
navFilter,
|
|
72
|
+
navigateContexts,
|
|
73
|
+
navigateParams,
|
|
74
|
+
appDataEntityId
|
|
75
|
+
} = XDataModel;
|
|
76
|
+
const model = {
|
|
77
|
+
deName: appDataEntityId ? runtime.calcDeCodeNameById(appDataEntityId) : void 0,
|
|
78
|
+
navFilter,
|
|
79
|
+
pickupDEFName: navDER == null ? void 0 : navDER.pickupDEFName,
|
|
80
|
+
navContexts: navigateContexts,
|
|
81
|
+
navParams: navigateParams
|
|
82
|
+
};
|
|
83
|
+
const originParams = {
|
|
84
|
+
context,
|
|
85
|
+
params,
|
|
86
|
+
data
|
|
87
|
+
};
|
|
88
|
+
const { resultContext, resultParams } = runtime.calcNavParams(model, originParams);
|
|
89
|
+
const tempContext = Object.assign(context.clone(), resultContext);
|
|
90
|
+
const tempParams = { ...resultParams };
|
|
91
|
+
return { context: tempContext, params: tempParams };
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* 通过栈数据导航
|
|
95
|
+
*
|
|
96
|
+
* @memberof NavgationBaseProvider
|
|
97
|
+
*/
|
|
98
|
+
onNavDataByStack() {
|
|
99
|
+
const { items } = this.controller.state;
|
|
100
|
+
const navData = this.navStack.map((key) => items.find((item) => item[this.keyName] === key)).find((item) => item !== void 0) || items[0];
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
if (navData) {
|
|
103
|
+
this.controller.setNavData(navData);
|
|
104
|
+
this.controller.setSelection([navData]);
|
|
105
|
+
} else {
|
|
106
|
+
this.navStack = [];
|
|
107
|
+
this.controller.setSelection([]);
|
|
108
|
+
this.navViewMsg.value = void 0;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 导航数据变化
|
|
114
|
+
*
|
|
115
|
+
* @param {IMDControlEvent['onNavDataChange']['event']} event
|
|
116
|
+
* @memberof NavgationBaseProvider
|
|
117
|
+
*/
|
|
118
|
+
onNavDataChange(event) {
|
|
119
|
+
const { navData, context, params } = event;
|
|
120
|
+
this.navStack.unshift(navData[this.keyName]);
|
|
121
|
+
this.navViewMsg.value = this.getNavViewMsg(navData, context, params);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* 获取导航视图信息
|
|
125
|
+
*
|
|
126
|
+
* @param {IData} data
|
|
127
|
+
* @param {IContext} context
|
|
128
|
+
* @param {IParams} params
|
|
129
|
+
* @return {*} {INavViewMsg}
|
|
130
|
+
* @memberof NavgationBaseProvider
|
|
131
|
+
*/
|
|
132
|
+
getNavViewMsg(data, context, params) {
|
|
133
|
+
const viewModelId = this.model.navAppViewId;
|
|
134
|
+
const result = this.prepareParams(this.model, data, context, params);
|
|
135
|
+
return {
|
|
136
|
+
key: data[this.keyName],
|
|
137
|
+
context: result.context,
|
|
138
|
+
params: result.params,
|
|
139
|
+
viewId: viewModelId
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
exports.NavgationBaseProvider = NavgationBaseProvider;
|