@oinone/kunlun-vue-admin-layout 6.2.0
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/README.md +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.css +1 -0
- package/dist/oinone-kunlun-vue-admin-layout.esm.js +12049 -0
- package/dist/oinone-kunlun-vue-admin-layout.scss +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/src/basic/MaskWidget.d.ts +17 -0
- package/dist/types/src/basic/index.d.ts +2 -0
- package/dist/types/src/basic/register/index.d.ts +1 -0
- package/dist/types/src/basic/register/manager.d.ts +7 -0
- package/dist/types/src/basic/token/BaseMaskWidget.d.ts +55 -0
- package/dist/types/src/basic/token/index.d.ts +1 -0
- package/dist/types/src/component/app-switcher/AppSwitcher.vue.d.ts +84 -0
- package/dist/types/src/component/app-switcher/AppSwitcherMask.vue.d.ts +61 -0
- package/dist/types/src/component/app-switcher/AppSwitcherWidget.d.ts +33 -0
- package/dist/types/src/component/app-switcher/index.d.ts +3 -0
- package/dist/types/src/component/breadcrumb/BreadcrumbWidget.d.ts +33 -0
- package/dist/types/src/component/breadcrumb/DefaultBreadcrumb.vue.d.ts +58 -0
- package/dist/types/src/component/breadcrumb/index.d.ts +2 -0
- package/dist/types/src/component/debug/Debug.vue.d.ts +11 -0
- package/dist/types/src/component/debug/DebugWidget.d.ts +8 -0
- package/dist/types/src/component/debug/constants.d.ts +2 -0
- package/dist/types/src/component/debug/index.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugMaskEditor.d.ts +6 -0
- package/dist/types/src/component/debug/spi/DebugRouterInitializeService.d.ts +4 -0
- package/dist/types/src/component/debug/spi/index.d.ts +1 -0
- package/dist/types/src/component/debug/typing.d.ts +159 -0
- package/dist/types/src/component/debug/view/DebugMainView.vue.d.ts +28 -0
- package/dist/types/src/component/debug/view/DebugMainViewWidget.d.ts +9 -0
- package/dist/types/src/component/debug/view/components/DebugDefaultInfo.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugJsonView.vue.d.ts +26 -0
- package/dist/types/src/component/debug/view/components/DebugRequestInfoPanel.vue.d.ts +22 -0
- package/dist/types/src/component/debug/view/components/DebugResponsePanel.vue.d.ts +12 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApi.vue.d.ts +52 -0
- package/dist/types/src/component/debug/view/debug-api/DebugApiWidget.d.ts +32 -0
- package/dist/types/src/component/debug/view/debug-utils.d.ts +44 -0
- package/dist/types/src/component/debug/view/debug-view/DebugView.vue.d.ts +78 -0
- package/dist/types/src/component/debug/view/debug-view/DebugViewWidget.d.ts +26 -0
- package/dist/types/src/component/debug/view/index.d.ts +5 -0
- package/dist/types/src/component/debug/view/service/DebugRuntimeContextService.d.ts +18 -0
- package/dist/types/src/component/debug/view/service/DebugStackInfoService.d.ts +27 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugConfigureService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.d.ts +8 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugFunctionService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugModelService.d.ts +4 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.d.ts +7 -0
- package/dist/types/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.d.ts +6 -0
- package/dist/types/src/component/debug/view/service/index.d.ts +20 -0
- package/dist/types/src/component/debug/view/storage.d.ts +19 -0
- package/dist/types/src/component/debug/view/useDebugRequestInfo.d.ts +7 -0
- package/dist/types/src/component/divider/Divider.vue.d.ts +2 -0
- package/dist/types/src/component/divider/DividerWidget.d.ts +4 -0
- package/dist/types/src/component/divider/index.d.ts +1 -0
- package/dist/types/src/component/index.d.ts +14 -0
- package/dist/types/src/component/language/DefaultLanguage.vue.d.ts +34 -0
- package/dist/types/src/component/language/LanguageWidget.d.ts +16 -0
- package/dist/types/src/component/language/index.d.ts +1 -0
- package/dist/types/src/component/layout/BaseMaskLayoutWidget.d.ts +4 -0
- package/dist/types/src/component/layout/MaskBlock.vue.d.ts +24 -0
- package/dist/types/src/component/layout/block/MaskBlockWidget.d.ts +4 -0
- package/dist/types/src/component/layout/block/index.d.ts +1 -0
- package/dist/types/src/component/layout/container/MaskContainerWidget.d.ts +4 -0
- package/dist/types/src/component/layout/container/index.d.ts +1 -0
- package/dist/types/src/component/layout/content/MaskContentWidget.d.ts +7 -0
- package/dist/types/src/component/layout/content/index.d.ts +1 -0
- package/dist/types/src/component/layout/grid/Grid.vue.d.ts +2 -0
- package/dist/types/src/component/layout/grid/GridWidget.d.ts +9 -0
- package/dist/types/src/component/layout/grid/index.d.ts +1 -0
- package/dist/types/src/component/layout/header/MaskHeaderWidget.d.ts +4 -0
- package/dist/types/src/component/layout/header/index.d.ts +1 -0
- package/dist/types/src/component/layout/index.d.ts +9 -0
- package/dist/types/src/component/layout/mask/MaskRootWidget.d.ts +4 -0
- package/dist/types/src/component/layout/mask/index.d.ts +1 -0
- package/dist/types/src/component/layout/sidebar/MaskSidebarWidget.d.ts +10 -0
- package/dist/types/src/component/layout/sidebar/index.d.ts +1 -0
- package/dist/types/src/component/layout/widget/MaskCommonWidget.d.ts +14 -0
- package/dist/types/src/component/layout/widget/index.d.ts +1 -0
- package/dist/types/src/component/menu/DefaultMenu.vue.d.ts +115 -0
- package/dist/types/src/component/menu/DefaultSubMenu.vue.d.ts +17 -0
- package/dist/types/src/component/menu/MenuWidget.d.ts +71 -0
- package/dist/types/src/component/menu/index.d.ts +3 -0
- package/dist/types/src/component/multi-tabs/MultiTabs.vue.d.ts +151 -0
- package/dist/types/src/component/multi-tabs/MultiTabsWidget.d.ts +60 -0
- package/dist/types/src/component/multi-tabs/index.d.ts +2 -0
- package/dist/types/src/component/multi-tabs/typing.d.ts +6 -0
- package/dist/types/src/component/notification/DefaultNotification.vue.d.ts +61 -0
- package/dist/types/src/component/notification/NotificationWidget.d.ts +139 -0
- package/dist/types/src/component/notification/index.d.ts +2 -0
- package/dist/types/src/component/order-statistic/OrderStatistic.vue.d.ts +8 -0
- package/dist/types/src/component/order-statistic/index.d.ts +14 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcher.vue.d.ts +28 -0
- package/dist/types/src/component/partner-switcher/PartnerSwitcherWidget.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/index.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/service/PartnerSwitcherService.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.d.ts +17 -0
- package/dist/types/src/component/partner-switcher/service/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/session/PartnerInfoSession.d.ts +26 -0
- package/dist/types/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.d.ts +15 -0
- package/dist/types/src/component/partner-switcher/session/index.d.ts +2 -0
- package/dist/types/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.d.ts +6 -0
- package/dist/types/src/component/partner-switcher/spi/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/index.d.ts +1 -0
- package/dist/types/src/component/partner-switcher/typing/partner.d.ts +20 -0
- package/dist/types/src/component/quick-search/QuickSearch.vue.d.ts +29 -0
- package/dist/types/src/component/quick-search/index.d.ts +24 -0
- package/dist/types/src/component/user/DefaultUser.vue.d.ts +39 -0
- package/dist/types/src/component/user/UserWidget.d.ts +16 -0
- package/dist/types/src/component/user/index.d.ts +1 -0
- package/dist/types/src/config/DebugConfig.d.ts +16 -0
- package/dist/types/src/config/PartnerSwitcherConfig.d.ts +16 -0
- package/dist/types/src/config/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +10 -0
- package/dist/types/src/service/index.d.ts +5 -0
- package/dist/types/src/service/menu-service.d.ts +12 -0
- package/dist/types/src/service/message-service.d.ts +16 -0
- package/dist/types/src/service/module-service.d.ts +7 -0
- package/dist/types/src/service/top-bar-service.d.ts +10 -0
- package/dist/types/src/service/user-service.d.ts +4 -0
- package/dist/types/src/spi/index.d.ts +1 -0
- package/dist/types/src/spi/mask-editor.d.ts +54 -0
- package/dist/types/src/tags/Block.vue.d.ts +5 -0
- package/dist/types/src/tags/Breadcrumb.vue.d.ts +5 -0
- package/dist/types/src/tags/Container.vue.d.ts +5 -0
- package/dist/types/src/tags/Content.vue.d.ts +5 -0
- package/dist/types/src/tags/Header.vue.d.ts +5 -0
- package/dist/types/src/tags/Mask.vue.d.ts +5 -0
- package/dist/types/src/tags/MultiTabs.vue.d.ts +5 -0
- package/dist/types/src/tags/Sidebar.vue.d.ts +5 -0
- package/dist/types/src/tags/Widget.vue.d.ts +5 -0
- package/dist/types/src/tags/context/context.d.ts +8 -0
- package/dist/types/src/tags/context/index.d.ts +1 -0
- package/dist/types/src/tags/index.d.ts +6 -0
- package/dist/types/src/tags/mixin/MaskWidgetTagMixin.d.ts +2 -0
- package/dist/types/src/tags/mixin/index.d.ts +3 -0
- package/dist/types/src/tags/mixin/typing.d.ts +6 -0
- package/dist/types/src/tags/mixin/use-mask-widget-tag.d.ts +38 -0
- package/dist/types/src/tags/register/index.d.ts +1 -0
- package/dist/types/src/tags/register/manager.d.ts +9 -0
- package/dist/types/src/tags/resolve/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/index.d.ts +2 -0
- package/dist/types/src/tags/resolve/internal/typing.d.ts +5 -0
- package/dist/types/src/tags/resolve/internal/widget-resolve.d.ts +3 -0
- package/dist/types/src/tags/resolve/typing.d.ts +26 -0
- package/dist/types/src/tags/resolve/widget-resolve.d.ts +5 -0
- package/dist/types/src/template/default-mask.d.ts +2 -0
- package/dist/types/src/template/index.d.ts +6 -0
- package/dist/types/src/theme/index.d.ts +1 -0
- package/dist/types/src/typing/constant.d.ts +1 -0
- package/dist/types/src/typing/index.d.ts +3 -0
- package/dist/types/src/typing/menu.d.ts +12 -0
- package/dist/types/src/typing/stream-symble.d.ts +12 -0
- package/dist/types/src/util/HomepageUtils.d.ts +3 -0
- package/dist/types/src/util/MenuUtil.d.ts +5 -0
- package/dist/types/src/util/index.d.ts +3 -0
- package/dist/types/src/util/unauthorized-action.d.ts +14 -0
- package/dist/types/src/utils.d.ts +86 -0
- package/index.ts +1 -0
- package/package.json +47 -0
- package/rollup.config.js +33 -0
- package/src/basic/MaskWidget.ts +74 -0
- package/src/basic/index.ts +2 -0
- package/src/basic/register/index.ts +1 -0
- package/src/basic/register/manager.ts +17 -0
- package/src/basic/token/BaseMaskWidget.ts +187 -0
- package/src/basic/token/index.ts +1 -0
- package/src/component/app-switcher/AppSwitcher.vue +133 -0
- package/src/component/app-switcher/AppSwitcherMask.vue +237 -0
- package/src/component/app-switcher/AppSwitcherWidget.ts +152 -0
- package/src/component/app-switcher/index.ts +3 -0
- package/src/component/breadcrumb/BreadcrumbWidget.ts +167 -0
- package/src/component/breadcrumb/DefaultBreadcrumb.vue +95 -0
- package/src/component/breadcrumb/index.ts +2 -0
- package/src/component/debug/Debug.vue +28 -0
- package/src/component/debug/DebugWidget.ts +38 -0
- package/src/component/debug/constants.ts +3 -0
- package/src/component/debug/index.ts +6 -0
- package/src/component/debug/spi/DebugMaskEditor.ts +19 -0
- package/src/component/debug/spi/DebugRouterInitializeService.ts +21 -0
- package/src/component/debug/spi/index.ts +1 -0
- package/src/component/debug/typing.ts +191 -0
- package/src/component/debug/view/DebugMainView.vue +206 -0
- package/src/component/debug/view/DebugMainViewWidget.ts +42 -0
- package/src/component/debug/view/components/DebugDefaultInfo.vue +31 -0
- package/src/component/debug/view/components/DebugJsonView.vue +107 -0
- package/src/component/debug/view/components/DebugRequestInfoPanel.vue +129 -0
- package/src/component/debug/view/components/DebugResponsePanel.vue +66 -0
- package/src/component/debug/view/components/runtime-context/DebugRuntimeFieldComponent.vue +29 -0
- package/src/component/debug/view/debug-api/DebugApi.vue +225 -0
- package/src/component/debug/view/debug-api/DebugApiWidget.ts +400 -0
- package/src/component/debug/view/debug-utils.ts +114 -0
- package/src/component/debug/view/debug-view/DebugView.vue +331 -0
- package/src/component/debug/view/debug-view/DebugViewWidget.ts +181 -0
- package/src/component/debug/view/index.ts +6 -0
- package/src/component/debug/view/service/DebugRuntimeContextService.ts +21 -0
- package/src/component/debug/view/service/DebugStackInfoService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugDefaultRuntimeContextService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeActionService.ts +28 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeDslService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeFieldService.ts +33 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeLayoutService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeMaskService.ts +30 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeTemplateService.ts +16 -0
- package/src/component/debug/view/service/impl/runtime-context/DebugRuntimeViewService.ts +16 -0
- package/src/component/debug/view/service/impl/stack-info/DebugBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugConfigureService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugDefaultStackInfoService.ts +62 -0
- package/src/component/debug/view/service/impl/stack-info/DebugExceptionStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugFunctionService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugHalfBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugModelService.ts +6 -0
- package/src/component/debug/view/service/impl/stack-info/DebugPureBizStackService.ts +19 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceGqlRequestContextService.ts +22 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSceneAnalysisService.ts +35 -0
- package/src/component/debug/view/service/impl/stack-info/DebugStacktraceSessionService.ts +19 -0
- package/src/component/debug/view/service/index.ts +22 -0
- package/src/component/debug/view/storage.ts +35 -0
- package/src/component/debug/view/useDebugRequestInfo.ts +17 -0
- package/src/component/divider/Divider.vue +15 -0
- package/src/component/divider/DividerWidget.ts +12 -0
- package/src/component/divider/index.ts +1 -0
- package/src/component/index.ts +15 -0
- package/src/component/language/DefaultLanguage.vue +111 -0
- package/src/component/language/LanguageWidget.ts +72 -0
- package/src/component/language/index.ts +1 -0
- package/src/component/layout/BaseMaskLayoutWidget.ts +12 -0
- package/src/component/layout/MaskBlock.vue +31 -0
- package/src/component/layout/block/MaskBlockWidget.ts +17 -0
- package/src/component/layout/block/index.ts +1 -0
- package/src/component/layout/container/MaskContainerWidget.ts +13 -0
- package/src/component/layout/container/index.ts +1 -0
- package/src/component/layout/content/MaskContentWidget.ts +41 -0
- package/src/component/layout/content/index.ts +1 -0
- package/src/component/layout/grid/Grid.vue +10 -0
- package/src/component/layout/grid/GridWidget.ts +62 -0
- package/src/component/layout/grid/index.ts +1 -0
- package/src/component/layout/header/MaskHeaderWidget.ts +13 -0
- package/src/component/layout/header/index.ts +1 -0
- package/src/component/layout/index.ts +9 -0
- package/src/component/layout/mask/MaskRootWidget.ts +13 -0
- package/src/component/layout/mask/index.ts +1 -0
- package/src/component/layout/sidebar/MaskSidebarWidget.ts +31 -0
- package/src/component/layout/sidebar/index.ts +1 -0
- package/src/component/layout/widget/MaskCommonWidget.ts +95 -0
- package/src/component/layout/widget/index.ts +1 -0
- package/src/component/menu/DefaultMenu.vue +252 -0
- package/src/component/menu/DefaultSubMenu.vue +68 -0
- package/src/component/menu/MenuWidget.ts +349 -0
- package/src/component/menu/index.ts +3 -0
- package/src/component/menu/style/common.scss +411 -0
- package/src/component/menu/style/index.scss +2 -0
- package/src/component/menu/style/menu-theme/index.scss +5 -0
- package/src/component/menu/style/menu-theme/theme2.scss +37 -0
- package/src/component/menu/style/menu-theme/theme3.scss +59 -0
- package/src/component/menu/style/menu-theme/theme4.scss +56 -0
- package/src/component/menu/style/menu-theme/theme5.scss +45 -0
- package/src/component/menu/style/menu-theme/theme6.scss +45 -0
- package/src/component/menu/style/mixin.scss +23 -0
- package/src/component/multi-tabs/MultiTabs.vue +475 -0
- package/src/component/multi-tabs/MultiTabsWidget.ts +450 -0
- package/src/component/multi-tabs/index.ts +2 -0
- package/src/component/multi-tabs/style/index.scss +217 -0
- package/src/component/multi-tabs/style/mixin.scss +13 -0
- package/src/component/multi-tabs/style/parameters.scss +2 -0
- package/src/component/multi-tabs/style/theme1.scss +92 -0
- package/src/component/multi-tabs/style/theme2.scss +89 -0
- package/src/component/multi-tabs/style/theme3.scss +60 -0
- package/src/component/multi-tabs/style/theme4.scss +85 -0
- package/src/component/multi-tabs/typing.ts +7 -0
- package/src/component/notification/DefaultNotification.vue +455 -0
- package/src/component/notification/NotificationWidget.ts +332 -0
- package/src/component/notification/index.ts +2 -0
- package/src/component/order-statistic/OrderStatistic.vue +12 -0
- package/src/component/order-statistic/index.ts +146 -0
- package/src/component/partner-switcher/PartnerSwitcher.vue +75 -0
- package/src/component/partner-switcher/PartnerSwitcherWidget.ts +70 -0
- package/src/component/partner-switcher/index.ts +6 -0
- package/src/component/partner-switcher/service/PartnerSwitcherService.ts +20 -0
- package/src/component/partner-switcher/service/impl/PartnerSwitcherServiceImpl.ts +48 -0
- package/src/component/partner-switcher/service/index.ts +2 -0
- package/src/component/partner-switcher/session/PartnerInfoSession.ts +32 -0
- package/src/component/partner-switcher/session/impl/DefaultPartnerInfoSession.ts +46 -0
- package/src/component/partner-switcher/session/index.ts +2 -0
- package/src/component/partner-switcher/spi/PartnerSwitcherMaskEditor.ts +24 -0
- package/src/component/partner-switcher/spi/index.ts +1 -0
- package/src/component/partner-switcher/typing/index.ts +1 -0
- package/src/component/partner-switcher/typing/partner.ts +22 -0
- package/src/component/quick-search/QuickSearch.vue +34 -0
- package/src/component/quick-search/index.ts +237 -0
- package/src/component/style/index.scss +4 -0
- package/src/component/style/layout.scss +229 -0
- package/src/component/user/DefaultUser.vue +92 -0
- package/src/component/user/UserWidget.ts +129 -0
- package/src/component/user/index.ts +1 -0
- package/src/config/DebugConfig.ts +30 -0
- package/src/config/PartnerSwitcherConfig.ts +30 -0
- package/src/config/index.ts +2 -0
- package/src/index.ts +11 -0
- package/src/service/index.ts +5 -0
- package/src/service/menu-service.ts +105 -0
- package/src/service/message-service.ts +65 -0
- package/src/service/module-service.ts +69 -0
- package/src/service/top-bar-service.ts +144 -0
- package/src/service/user-service.ts +10 -0
- package/src/shim-translate.d.ts +7 -0
- package/src/shim-vue.d.ts +6 -0
- package/src/spi/index.ts +1 -0
- package/src/spi/mask-editor.ts +102 -0
- package/src/tags/Block.vue +16 -0
- package/src/tags/Breadcrumb.vue +16 -0
- package/src/tags/Container.vue +16 -0
- package/src/tags/Content.vue +16 -0
- package/src/tags/Header.vue +16 -0
- package/src/tags/Mask.vue +16 -0
- package/src/tags/MultiTabs.vue +16 -0
- package/src/tags/Sidebar.vue +16 -0
- package/src/tags/Widget.vue +16 -0
- package/src/tags/context/context.ts +24 -0
- package/src/tags/context/index.ts +1 -0
- package/src/tags/index.ts +48 -0
- package/src/tags/mixin/MaskWidgetTagMixin.ts +79 -0
- package/src/tags/mixin/index.ts +3 -0
- package/src/tags/mixin/typing.ts +8 -0
- package/src/tags/mixin/use-mask-widget-tag.ts +172 -0
- package/src/tags/register/index.ts +1 -0
- package/src/tags/register/manager.ts +43 -0
- package/src/tags/resolve/index.ts +2 -0
- package/src/tags/resolve/internal/index.ts +2 -0
- package/src/tags/resolve/internal/typing.ts +6 -0
- package/src/tags/resolve/internal/widget-resolve.ts +57 -0
- package/src/tags/resolve/typing.ts +39 -0
- package/src/tags/resolve/widget-resolve.ts +64 -0
- package/src/template/default-mask.ts +51 -0
- package/src/template/index.ts +26 -0
- package/src/theme/index.ts +1 -0
- package/src/typing/constant.ts +3 -0
- package/src/typing/index.ts +3 -0
- package/src/typing/menu.ts +15 -0
- package/src/typing/stream-symble.ts +14 -0
- package/src/util/HomepageUtils.ts +41 -0
- package/src/util/MenuUtil.ts +18 -0
- package/src/util/index.ts +3 -0
- package/src/util/unauthorized-action.ts +98 -0
- package/src/utils.ts +716 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
3
|
+
import {
|
|
4
|
+
IResourceDateTimeFormat,
|
|
5
|
+
RedirectTargetEnum,
|
|
6
|
+
executeViewAction,
|
|
7
|
+
queryResourceDateTimeFormat
|
|
8
|
+
} from '@oinone/kunlun-engine';
|
|
9
|
+
import { getModel } from '@oinone/kunlun-service';
|
|
10
|
+
import {
|
|
11
|
+
CastHelper,
|
|
12
|
+
DateUtil,
|
|
13
|
+
defaultDateFormatKey,
|
|
14
|
+
defaultFormat,
|
|
15
|
+
defaultTimeFormatKey,
|
|
16
|
+
ObjectUtils
|
|
17
|
+
} from '@oinone/kunlun-shared';
|
|
18
|
+
import { isDev } from '@oinone/kunlun-router';
|
|
19
|
+
import { MaskWidget } from '../../basic';
|
|
20
|
+
import { MessageService, PamirsMessage } from '../../service';
|
|
21
|
+
import DefaultNotification from './DefaultNotification.vue';
|
|
22
|
+
|
|
23
|
+
type ReturnBeforeClick = (message, messageInfo) => Promise<Boolean | null | undefined>;
|
|
24
|
+
|
|
25
|
+
enum BeforeClickMapName {
|
|
26
|
+
wait = 'wait',
|
|
27
|
+
copy = 'copy',
|
|
28
|
+
write = 'write',
|
|
29
|
+
mail = 'mail'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type BeforeClickMapKey = keyof typeof BeforeClickMapName;
|
|
33
|
+
|
|
34
|
+
export enum NotificationTypeEnum {
|
|
35
|
+
WORKFLOW = 'WORKFLOW',
|
|
36
|
+
NOTIFICATION = 'NOTIFICATION',
|
|
37
|
+
COPY = 'COPY'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@SPI.ClassFactory(MaskWidget.Token({ widget: 'notification' }))
|
|
41
|
+
export class NotificationWidget extends MaskWidget {
|
|
42
|
+
public initialize(props) {
|
|
43
|
+
super.initialize(props);
|
|
44
|
+
this.setComponent(DefaultNotification);
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public async getCopyAction() {
|
|
49
|
+
return {
|
|
50
|
+
name: 'workflow_detail',
|
|
51
|
+
title: '查看工作流用户任务待办',
|
|
52
|
+
displayName: '查看',
|
|
53
|
+
actionType: 'VIEW',
|
|
54
|
+
target: 'ROUTER',
|
|
55
|
+
viewType: 'DETAIL',
|
|
56
|
+
contextType: 'SINGLE',
|
|
57
|
+
bindingType: ['TABLE'],
|
|
58
|
+
model: 'workbench.WorkBenchWorkflowUserTaskCopy',
|
|
59
|
+
resModel: 'workbench.WorkBenchWorkflowUserTaskCopy',
|
|
60
|
+
moduleName: 'workflow',
|
|
61
|
+
resModule: 'workflow',
|
|
62
|
+
resModuleName: 'workflow',
|
|
63
|
+
priority: 100,
|
|
64
|
+
sessionPath: '/workflow/WorkflowMenus_WorkBenchMenu_CopyUserTaskMenu'
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public async getWaitAction() {
|
|
69
|
+
return {
|
|
70
|
+
name: 'workflow_wait',
|
|
71
|
+
title: '审批工作流用户任务待办',
|
|
72
|
+
displayName: '审批',
|
|
73
|
+
actionType: 'VIEW',
|
|
74
|
+
target: 'ROUTER',
|
|
75
|
+
viewType: 'FORM',
|
|
76
|
+
contextType: 'SINGLE',
|
|
77
|
+
bindingType: ['TABLE'],
|
|
78
|
+
model: 'workbench.WorkBenchWorkflowUserTaskActive',
|
|
79
|
+
resModel: 'workbench.WorkBenchWorkflowUserTaskActive',
|
|
80
|
+
invisible: "!(activeRecord.taskType == 'APPROVE' && activeRecord.status == 'ACTIVE')",
|
|
81
|
+
moduleName: 'workflow',
|
|
82
|
+
resModule: 'workflow',
|
|
83
|
+
resModuleName: 'workflow',
|
|
84
|
+
priority: 100,
|
|
85
|
+
sessionPath: '/workflow/WorkflowMenus_WorkBenchMenu_ActiveUserTaskMenu'
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
public async getWriteAction() {
|
|
90
|
+
return {
|
|
91
|
+
name: 'workflow_write',
|
|
92
|
+
title: '填写工作流用户任务待办',
|
|
93
|
+
displayName: '填写',
|
|
94
|
+
actionType: 'VIEW',
|
|
95
|
+
target: 'ROUTER',
|
|
96
|
+
viewType: 'FORM',
|
|
97
|
+
contextType: 'SINGLE',
|
|
98
|
+
bindingType: ['TABLE'],
|
|
99
|
+
model: 'workbench.WorkBenchWorkflowUserTaskActive',
|
|
100
|
+
resModel: 'workbench.WorkBenchWorkflowUserTaskActive',
|
|
101
|
+
invisible: "!(activeRecord.taskType == 'WRITE' && activeRecord.status == 'ACTIVE')",
|
|
102
|
+
moduleName: 'workflow',
|
|
103
|
+
resModule: 'workflow',
|
|
104
|
+
resModuleName: 'workflow',
|
|
105
|
+
priority: 100,
|
|
106
|
+
sessionPath: '/workflow/WorkflowMenus_WorkBenchMenu_ActiveUserTaskMenu'
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
private beforeClickMap = {
|
|
111
|
+
[BeforeClickMapName.wait]: async (message, messageInfo) => {
|
|
112
|
+
return true;
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
[BeforeClickMapName.copy]: async (message, messageInfo) => {
|
|
116
|
+
return true;
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
[BeforeClickMapName.write]: async (message, messageInfo) => {
|
|
120
|
+
return true;
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
[BeforeClickMapName.mail]: async (message, messageInfo) => {
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
public async beforeClick(key: Partial<Record<BeforeClickMapKey, ReturnBeforeClick>>);
|
|
129
|
+
public async beforeClick(key: BeforeClickMapKey, cb: ReturnBeforeClick);
|
|
130
|
+
public async beforeClick(
|
|
131
|
+
args: BeforeClickMapKey | Partial<Record<BeforeClickMapKey, ReturnBeforeClick>>,
|
|
132
|
+
cb?: ReturnBeforeClick
|
|
133
|
+
) {
|
|
134
|
+
if (typeof args === 'string') {
|
|
135
|
+
this.beforeClickMap[args as any] = cb;
|
|
136
|
+
} else {
|
|
137
|
+
Object.entries(args).forEach(([key, val]) => {
|
|
138
|
+
this.beforeClickMap[key as any] = val;
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@Widget.Reactive()
|
|
144
|
+
public messageTextMap = {
|
|
145
|
+
WORKFLOW: {
|
|
146
|
+
title: '工作流',
|
|
147
|
+
desc: '待处理的审批/填写任务',
|
|
148
|
+
btn: '去处理',
|
|
149
|
+
icon: 'oinone-tianxie',
|
|
150
|
+
color: 'rgb(122, 32, 233)'
|
|
151
|
+
},
|
|
152
|
+
NOTIFICATION: {
|
|
153
|
+
title: '站内信',
|
|
154
|
+
desc: '未读的站内信',
|
|
155
|
+
btn: '去查看',
|
|
156
|
+
icon: 'oinone-xitongtongzhi'
|
|
157
|
+
},
|
|
158
|
+
COPY: {
|
|
159
|
+
title: '抄送',
|
|
160
|
+
desc: '未查看的抄送',
|
|
161
|
+
btn: '去查看',
|
|
162
|
+
icon: 'oinone-tianxie'
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
@Widget.Reactive()
|
|
167
|
+
public messageType = NotificationTypeEnum.WORKFLOW;
|
|
168
|
+
|
|
169
|
+
@Widget.Reactive()
|
|
170
|
+
public get messageInfo() {
|
|
171
|
+
return this.messageTextMap[this.messageType];
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@Widget.Reactive()
|
|
175
|
+
public confirmModalTitle = '查看消息';
|
|
176
|
+
|
|
177
|
+
@Widget.Reactive()
|
|
178
|
+
public currentMessage = {} as any;
|
|
179
|
+
|
|
180
|
+
@Widget.Reactive()
|
|
181
|
+
public isShowConfirmModal = false;
|
|
182
|
+
|
|
183
|
+
@Widget.Reactive()
|
|
184
|
+
public currentMessageId = '';
|
|
185
|
+
|
|
186
|
+
@Widget.Method()
|
|
187
|
+
public changeMessageType(type: NotificationTypeEnum) {
|
|
188
|
+
this.messageType = type;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
@Widget.Method()
|
|
192
|
+
public toggleDialog() {
|
|
193
|
+
this.isShowConfirmModal = !this.isShowConfirmModal;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@Widget.Method()
|
|
197
|
+
public async onWorkflowUserTask() {
|
|
198
|
+
const model = await getModel('workflow.WorkflowUserTask');
|
|
199
|
+
const action = model.viewActionList?.find((a) => a.name === 'workflow#任务待办');
|
|
200
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
201
|
+
action &&
|
|
202
|
+
executeViewAction(CastHelper.cast(action), undefined, undefined, {
|
|
203
|
+
module: action.moduleName
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
@Widget.Method()
|
|
208
|
+
public async onDetail(message, messageInfo) {
|
|
209
|
+
if (messageInfo.messageType === 'WORKFLOW' || messageInfo.messageType === 'COPY') {
|
|
210
|
+
let action;
|
|
211
|
+
|
|
212
|
+
if (message.workFlowTaskType === '审批') {
|
|
213
|
+
const rst = await this.beforeClickMap['wait'](message, messageInfo);
|
|
214
|
+
|
|
215
|
+
if (!rst) {
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
action = await this.getWaitAction();
|
|
220
|
+
} else {
|
|
221
|
+
const rst = await this.beforeClickMap['write'](message, messageInfo);
|
|
222
|
+
|
|
223
|
+
if (!rst) {
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
action = await this.getWriteAction();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
if (message.messageType === 'COPY') {
|
|
230
|
+
const rst = await this.beforeClickMap['copy'](message, messageInfo);
|
|
231
|
+
|
|
232
|
+
if (!rst) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
action = await this.getCopyAction();
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (action) {
|
|
239
|
+
executeViewAction(
|
|
240
|
+
action,
|
|
241
|
+
undefined,
|
|
242
|
+
undefined,
|
|
243
|
+
{
|
|
244
|
+
id: message.resId,
|
|
245
|
+
module: action.resModuleName || action.moduleName
|
|
246
|
+
},
|
|
247
|
+
RedirectTargetEnum.BLANK
|
|
248
|
+
);
|
|
249
|
+
}
|
|
250
|
+
} else {
|
|
251
|
+
const rst = await this.beforeClickMap['mail'](message, messageInfo);
|
|
252
|
+
|
|
253
|
+
if (!rst) {
|
|
254
|
+
return;
|
|
255
|
+
}
|
|
256
|
+
this.currentMessage = message;
|
|
257
|
+
this.currentMessageId = messageInfo.id;
|
|
258
|
+
this.isShowConfirmModal = true;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@Widget.Method()
|
|
263
|
+
protected formatDateTime(value: string) {
|
|
264
|
+
if (!value) {
|
|
265
|
+
return value;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
const dateFormat = defaultDateFormatKey;
|
|
269
|
+
const timeFormat = defaultTimeFormatKey;
|
|
270
|
+
|
|
271
|
+
const resourceDateFormat = ObjectUtils.toUpperSnakeCase(
|
|
272
|
+
this.resourceDateTimeFormat.resourceDateFormat as unknown as Record<string, string>
|
|
273
|
+
);
|
|
274
|
+
const resourceTimeFormat = ObjectUtils.toUpperSnakeCase(
|
|
275
|
+
this.resourceDateTimeFormat.resourceTimeFormat as unknown as Record<string, string>
|
|
276
|
+
);
|
|
277
|
+
|
|
278
|
+
const format = [resourceDateFormat[dateFormat!], resourceTimeFormat[timeFormat!]].filter(Boolean).join(' ');
|
|
279
|
+
return DateUtil.dateFormat(DateUtil.toDate(value, defaultFormat), format);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
@Widget.Reactive()
|
|
283
|
+
protected msgTotal = 0;
|
|
284
|
+
|
|
285
|
+
@Widget.Reactive()
|
|
286
|
+
protected resourceDateTimeFormat = {} as IResourceDateTimeFormat;
|
|
287
|
+
|
|
288
|
+
protected async getMsgTotal() {
|
|
289
|
+
this.msgTotal = await MessageService.unreadCount();
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
@Widget.Reactive()
|
|
293
|
+
protected messageList = [] as PamirsMessage[];
|
|
294
|
+
|
|
295
|
+
@Widget.Method()
|
|
296
|
+
protected async getMessageInfo() {
|
|
297
|
+
this.messageList = await MessageService.unreadWorkflowList();
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
@Widget.Method()
|
|
301
|
+
protected readMessage(msgId: string) {
|
|
302
|
+
return MessageService.readWorkflowMessage(msgId);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
protected msgTimer;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* 轮询间隔时间,单位: 秒
|
|
309
|
+
* @protected
|
|
310
|
+
*/
|
|
311
|
+
protected msgDelay = 5000;
|
|
312
|
+
|
|
313
|
+
protected async $$created() {
|
|
314
|
+
super.$$created();
|
|
315
|
+
this.resourceDateTimeFormat = await queryResourceDateTimeFormat();
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
protected mounted() {
|
|
319
|
+
super.mounted();
|
|
320
|
+
this.getMsgTotal();
|
|
321
|
+
if (!isDev()) {
|
|
322
|
+
this.msgTimer = setInterval(() => {
|
|
323
|
+
this.getMsgTotal();
|
|
324
|
+
}, this.msgDelay || 5000);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
protected beforeUnmount() {
|
|
329
|
+
this.msgTimer && clearInterval(this.msgTimer);
|
|
330
|
+
super.beforeUnmount();
|
|
331
|
+
}
|
|
332
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="order-statistic">
|
|
3
|
+
<div v-for="(data, i) in showData" :key="i" class="item">{{ data.displayName }} : {{ data.value }}</div>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
import { defineComponent } from 'vue';
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
props: ['showData'],
|
|
11
|
+
});
|
|
12
|
+
</script>
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { Condition, HttpClient } from '@oinone/kunlun-request';
|
|
2
|
+
import { useMatched } from '@oinone/kunlun-router';
|
|
3
|
+
import { getModel } from '@oinone/kunlun-service';
|
|
4
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
5
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
6
|
+
import { MaskWidget } from '../../basic';
|
|
7
|
+
|
|
8
|
+
import OrderStatisticComponent from './OrderStatistic.vue';
|
|
9
|
+
|
|
10
|
+
interface IData {
|
|
11
|
+
name: string;
|
|
12
|
+
displayName: string;
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const ModelName = 'libra.trade.LibraOrderQuantityCalculate';
|
|
17
|
+
|
|
18
|
+
@SPI.ClassFactory(MaskWidget.Token({ widget: 'order-statistic' }))
|
|
19
|
+
export class OrderStatistic extends MaskWidget {
|
|
20
|
+
@Widget.Reactive()
|
|
21
|
+
private layoutTemplate = '';
|
|
22
|
+
|
|
23
|
+
@Widget.Reactive()
|
|
24
|
+
private showFields: string[] = [];
|
|
25
|
+
|
|
26
|
+
@Widget.Reactive()
|
|
27
|
+
private showData: IData[] = [];
|
|
28
|
+
|
|
29
|
+
@Widget.Reactive()
|
|
30
|
+
private activedModel = '';
|
|
31
|
+
|
|
32
|
+
private http = HttpClient.getInstance();
|
|
33
|
+
|
|
34
|
+
public initialize(props) {
|
|
35
|
+
const { dslNode } = props;
|
|
36
|
+
|
|
37
|
+
const { fields = '' } = dslNode;
|
|
38
|
+
this.showFields = (fields as string).split(',').filter((v) => v);
|
|
39
|
+
|
|
40
|
+
super.initialize(props);
|
|
41
|
+
this.setComponent(OrderStatisticComponent);
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@Widget.Method()
|
|
46
|
+
public async mounted() {
|
|
47
|
+
const page = useMatched().matched.segmentParams.page;
|
|
48
|
+
this.activedModel = page.model || '';
|
|
49
|
+
await this.loadData('', page.scene || '');
|
|
50
|
+
|
|
51
|
+
useMatched()
|
|
52
|
+
.getMatched$()
|
|
53
|
+
.subscribe((val) => {
|
|
54
|
+
const { searchBody, scene } = val.segmentParams.page;
|
|
55
|
+
|
|
56
|
+
if (searchBody) {
|
|
57
|
+
const condition = new Condition('1==1');
|
|
58
|
+
condition.and(this.buildSearchConditions(JSON.parse(searchBody)));
|
|
59
|
+
|
|
60
|
+
this.loadData(condition.toString() === '1==1' ? '' : condition, scene);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@Widget.Method()
|
|
66
|
+
private async loadData(condition, scene) {
|
|
67
|
+
if (!this.showFields.length) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
try {
|
|
72
|
+
const result = await this.queryData(condition, scene);
|
|
73
|
+
const model = await getModel(ModelName);
|
|
74
|
+
this.showData = this.showFields.map((f) => {
|
|
75
|
+
const displayName = (model.modelFields.find((m) => m.name === f) || {}).displayName;
|
|
76
|
+
return {
|
|
77
|
+
displayName,
|
|
78
|
+
name: f,
|
|
79
|
+
value: result[f]
|
|
80
|
+
};
|
|
81
|
+
}) as any;
|
|
82
|
+
} catch (error) {
|
|
83
|
+
console.error(error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@Widget.Method()
|
|
88
|
+
private async queryData(condition, scene) {
|
|
89
|
+
const queryFields = this.showFields.join('\n');
|
|
90
|
+
|
|
91
|
+
const body = `
|
|
92
|
+
query{
|
|
93
|
+
libraDeliveryOrderQuery{
|
|
94
|
+
calculateQuantity(calculate:{modelModel:"${this.activedModel}", rsql:"${condition}"}){
|
|
95
|
+
${queryFields}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
`;
|
|
100
|
+
|
|
101
|
+
const result = await this.http.query('base', body, undefined, {
|
|
102
|
+
__queryParams: { scene }
|
|
103
|
+
});
|
|
104
|
+
return result.data.libraDeliveryOrderQuery.calculateQuantity;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@Widget.Method()
|
|
108
|
+
public buildSearchConditions(content: Record<string, unknown>) {
|
|
109
|
+
const { page } = useMatched().matched.segmentParams;
|
|
110
|
+
const extraConditions: { leftValue: string[]; operator: string; right: unknown }[] =
|
|
111
|
+
(page.searchConditions && JSON.parse(decodeURIComponent(page.searchConditions))) || [];
|
|
112
|
+
const extraContent: Record<string, unknown> =
|
|
113
|
+
(page.searchBody && JSON.parse(decodeURIComponent(page.searchBody))) || {};
|
|
114
|
+
|
|
115
|
+
const condition = new Condition('1==1');
|
|
116
|
+
const mixedContent = { ...content, ...extraContent };
|
|
117
|
+
Object.keys(mixedContent).forEach((c) => {
|
|
118
|
+
if (mixedContent[c] !== null && mixedContent[c] !== undefined && mixedContent[c] !== '') {
|
|
119
|
+
const val = mixedContent[c];
|
|
120
|
+
if (typeof val === 'string') {
|
|
121
|
+
condition.and(new Condition(c).equal(mixedContent[c] as string));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
extraConditions
|
|
126
|
+
.map((c) => {
|
|
127
|
+
if (c.operator === '=like=' || c.operator === '=notlike=') {
|
|
128
|
+
return { ...c, right: `%${c.right}%` };
|
|
129
|
+
}
|
|
130
|
+
return c;
|
|
131
|
+
})
|
|
132
|
+
.forEach((con) => {
|
|
133
|
+
const left = con.leftValue[con.leftValue.length - 1];
|
|
134
|
+
if (con.operator !== 'between') {
|
|
135
|
+
condition.and(new Condition(left).append(con.operator).append(new Condition(con.right as string).toString()));
|
|
136
|
+
} else {
|
|
137
|
+
condition.and(
|
|
138
|
+
new Condition(left)
|
|
139
|
+
.greaterThanOrEuqalTo((<string[]>con.right)[0])
|
|
140
|
+
.and(new Condition(left).lessThanOrEqualTo((<string[]>con.right)[1]))
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return condition;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<oio-dropdown v-if="currentPartner" :trigger="['click']" placement="bottomCenter">
|
|
3
|
+
<div class="k-layout-partner-switcher">
|
|
4
|
+
<span>{{ currentPartner.name }}</span>
|
|
5
|
+
<caret-down-outlined :style="{ fontSize: '12px', color: '#c3c4c6' }" />
|
|
6
|
+
</div>
|
|
7
|
+
<template #overlay>
|
|
8
|
+
<a-menu class="k-layout-partner-switcher-overlay" @click="onSelect">
|
|
9
|
+
<a-menu-item v-for="item in partnerList" :key="item.id" :title="item.name">{{ item.name }}</a-menu-item>
|
|
10
|
+
</a-menu>
|
|
11
|
+
</template>
|
|
12
|
+
</oio-dropdown>
|
|
13
|
+
</template>
|
|
14
|
+
<script lang="ts">
|
|
15
|
+
import { CaretDownOutlined } from '@ant-design/icons-vue';
|
|
16
|
+
import { OioDropdown } from '@oinone/kunlun-vue-ui-antd';
|
|
17
|
+
import { Menu as AMenu, MenuItem as AMenuItem } from 'ant-design-vue';
|
|
18
|
+
import { defineComponent, PropType } from 'vue';
|
|
19
|
+
import { PartnerItem } from './typing';
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
name: 'PartnerSwitcher',
|
|
23
|
+
components: {
|
|
24
|
+
AMenu,
|
|
25
|
+
AMenuItem,
|
|
26
|
+
CaretDownOutlined,
|
|
27
|
+
OioDropdown
|
|
28
|
+
},
|
|
29
|
+
inheritAttrs: false,
|
|
30
|
+
props: {
|
|
31
|
+
currentPartner: {
|
|
32
|
+
type: Object as PropType<PartnerItem>
|
|
33
|
+
},
|
|
34
|
+
partnerList: {
|
|
35
|
+
type: Array as PropType<PartnerItem[]>
|
|
36
|
+
},
|
|
37
|
+
onChangePartner: {
|
|
38
|
+
type: Function as PropType<(item: PartnerItem) => void>
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
setup(props) {
|
|
42
|
+
const onSelect = (e: { key: string }) => {
|
|
43
|
+
const { key } = e;
|
|
44
|
+
const target = props.partnerList?.find((v) => v.id === key);
|
|
45
|
+
if (target) {
|
|
46
|
+
props.onChangePartner?.(target);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
onSelect
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
<style lang="scss">
|
|
57
|
+
.k-layout-partner-switcher {
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
line-height: 48px;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
|
|
63
|
+
span {
|
|
64
|
+
margin-left: 10px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
color: #606cee;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.k-layout-partner-switcher-overlay {
|
|
73
|
+
max-height: 500px !important;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { SPI } from '@oinone/kunlun-spi';
|
|
2
|
+
import { Widget } from '@oinone/kunlun-vue-widget';
|
|
3
|
+
import { MaskWidget } from '../../basic';
|
|
4
|
+
import PartnerSwitcher from './PartnerSwitcher.vue';
|
|
5
|
+
import { PartnerSwitcherService, PartnerSwitcherServiceToken } from './service';
|
|
6
|
+
import { PartnerInfoSession, PartnerInfoSessionToken, PartnerSessionStore } from './session';
|
|
7
|
+
import { PartnerInfo, PartnerItem } from './typing';
|
|
8
|
+
|
|
9
|
+
@SPI.ClassFactory(MaskWidget.Token({ widget: 'partner-switcher' }))
|
|
10
|
+
export class PartnerSwitcherWidget extends MaskWidget {
|
|
11
|
+
protected partnerSwitcherService!: PartnerSwitcherService;
|
|
12
|
+
|
|
13
|
+
protected partnerInfoSession!: PartnerInfoSession<PartnerSessionStore>;
|
|
14
|
+
|
|
15
|
+
public constructor(handle: string) {
|
|
16
|
+
super(handle);
|
|
17
|
+
this.partnerSwitcherService = SPI.RawInstantiate(PartnerSwitcherServiceToken)!;
|
|
18
|
+
this.partnerInfoSession = SPI.RawInstantiate(PartnerInfoSessionToken) as PartnerInfoSession<PartnerSessionStore>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@Widget.Reactive()
|
|
22
|
+
protected currentPartner: PartnerItem | undefined;
|
|
23
|
+
|
|
24
|
+
@Widget.Reactive()
|
|
25
|
+
protected partnerList: PartnerItem[] | undefined;
|
|
26
|
+
|
|
27
|
+
public initialize(props) {
|
|
28
|
+
super.initialize(props);
|
|
29
|
+
this.setComponent(PartnerSwitcher);
|
|
30
|
+
return this;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@Widget.Method()
|
|
34
|
+
public async onChangePartner(item: PartnerItem) {
|
|
35
|
+
const partnerInfo = await this.partnerSwitcherService?.changePartner(item);
|
|
36
|
+
this.reloadPartnerInfo(partnerInfo);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected reloadPartnerInfo(target: PartnerInfo | undefined, predict?: (target: PartnerInfo) => boolean) {
|
|
40
|
+
if (!target) {
|
|
41
|
+
this.partnerInfoSession?.clear();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const { currentPartner, partnerList } = target;
|
|
45
|
+
const currentPartnerId = currentPartner?.id;
|
|
46
|
+
if (!currentPartnerId) {
|
|
47
|
+
this.partnerInfoSession?.clear();
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (!predict || predict(target)) {
|
|
51
|
+
this.currentPartner = currentPartner;
|
|
52
|
+
this.partnerList = partnerList || [];
|
|
53
|
+
this.partnerInfoSession?.setPartnerInfo(target);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
protected async mounted() {
|
|
58
|
+
const partnerInfo = await this.partnerSwitcherService?.queryPartnerInfo();
|
|
59
|
+
this.reloadPartnerInfo(partnerInfo, (target) => {
|
|
60
|
+
const currentPartnerId = target.currentPartner.id;
|
|
61
|
+
const store = this.partnerInfoSession?.getCurrentPartnerStore();
|
|
62
|
+
if (store && (store.sid !== currentPartnerId || store.lid !== currentPartnerId)) {
|
|
63
|
+
window.location.href = '/';
|
|
64
|
+
this.partnerInfoSession?.setPartnerInfo(target);
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ServiceIdentifier } from '@oinone/kunlun-spi';
|
|
2
|
+
import { PartnerInfo, PartnerItem } from '../typing';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 合作伙伴选择服务
|
|
6
|
+
*/
|
|
7
|
+
export interface PartnerSwitcherService {
|
|
8
|
+
/**
|
|
9
|
+
* 查询合作伙伴信息
|
|
10
|
+
*/
|
|
11
|
+
queryPartnerInfo(): Promise<PartnerInfo | undefined>;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 选择合作伙伴
|
|
15
|
+
* @param target
|
|
16
|
+
*/
|
|
17
|
+
changePartner(target: PartnerItem): Promise<PartnerInfo | undefined>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const PartnerSwitcherServiceToken = ServiceIdentifier<PartnerSwitcherService>('PartnerSwitcherService');
|