@gct-paas/core 0.1.4-dev.7 → 0.1.4-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.min.mjs +4456 -18521
- package/dist/index.min.cjs +14 -2
- package/dist/index.system.min.js +14 -2
- package/es/constants/core.mjs +0 -1
- package/es/constants/editor-register/editor-register.mjs +0 -1
- package/es/constants/editor-type/editor-type.d.ts +65 -1
- package/es/constants/editor-type/editor-type.mjs +14 -1
- package/es/constants/form-container-type/form-container-type.mjs +0 -1
- package/es/constants/index.d.ts +4 -0
- package/es/constants/index.mjs +2 -7
- package/es/controller/edit-form/edit-form.controller.mjs +0 -1
- package/es/controller/editor/color-editor.controller.mjs +0 -1
- package/es/controller/editor/length-unit-editor.controller.mjs +0 -1
- package/es/controller/editor-item/editor-item.controller.mjs +0 -1
- package/es/controller/form/form.controller.mjs +5 -4
- package/es/controller/form-collapse/form-collapse.controller.mjs +4 -3
- package/es/controller/form-collapse-pane/form-collapse-pane.controller.mjs +4 -3
- package/es/controller/form-edit-item/form-edit-item.controller.d.ts +1 -0
- package/es/controller/form-edit-item/form-edit-item.controller.mjs +6 -2
- package/es/controller/form-group/form-group.controller.mjs +4 -3
- package/es/controller/form-item/form-item.controller.d.ts +1 -0
- package/es/controller/form-item/form-item.controller.mjs +7 -3
- package/es/controller/form-item-basic/form-item-basic.controller.mjs +3 -2
- package/es/controller/form-item-hidden/form-item-hidden.controller.mjs +0 -1
- package/es/controller/form-tab/form-tab.controller.mjs +4 -3
- package/es/controller/form-tab-pane/form-tab-pane.controller.mjs +4 -3
- package/es/controller/gct-form/gct-form.controller.mjs +5 -4
- package/es/create-app-vue.mjs +4 -3
- package/es/enums/app-designer/index.d.ts +13 -1
- package/es/enums/app-designer/index.mjs +8 -2
- package/es/enums/appEnum.d.ts +17 -66
- package/es/enums/appEnum.mjs +18 -14
- package/es/enums/appStateEnum.mjs +0 -1
- package/es/enums/authActionEnum.mjs +0 -1
- package/es/enums/breakpointEnum.mjs +0 -1
- package/es/enums/cacheEnum.mjs +0 -1
- package/es/enums/designEnum.mjs +0 -1
- package/es/enums/exceptionEnum.mjs +0 -1
- package/es/enums/globalEnum.d.ts +38 -0
- package/es/enums/globalEnum.mjs +25 -0
- package/es/enums/httpEnum.mjs +0 -1
- package/es/enums/index.d.ts +13 -0
- package/es/enums/index.mjs +15 -16
- package/es/enums/menuEnum.mjs +0 -1
- package/es/enums/page-designer/designer.d.ts +17 -3
- package/es/enums/page-designer/designer.mjs +85 -6
- package/es/enums/page-designer/panel.mjs +0 -1
- package/es/enums/page-designer/toolkit.mjs +0 -1
- package/es/enums/page-designer/widget.d.ts +2 -1
- package/es/enums/page-designer/widget.mjs +3 -3
- package/es/enums/pageEnum.mjs +0 -1
- package/es/enums/plugin-enum.mjs +0 -1
- package/es/enums/processEnum.mjs +0 -1
- package/es/enums/roleEnum.mjs +0 -1
- package/es/enums/sizeEnum.mjs +0 -1
- package/es/global/gct/gct.d.ts +2 -15
- package/es/global/gct/gct.mjs +19 -17
- package/es/hooks/index.d.ts +2 -0
- package/es/hooks/use-app-inst/use-app-inst.d.ts +8 -0
- package/es/hooks/use-app-inst/use-app-inst.mjs +8 -0
- package/es/hooks/use-form/use-form.mjs +0 -1
- package/es/hooks/use-gct-form-value/use-gct-form-value.d.ts +1 -1
- package/es/hooks/use-gct-form-value/use-gct-form-value.mjs +0 -4
- package/es/hooks/use-modal/use-modal.mjs +0 -1
- package/es/hooks/use-namespace/use-namespace.mjs +11 -2
- package/es/hooks/use-sub-app-utils/use-sub-app-utils.d.ts +31 -0
- package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +30 -0
- package/es/hooks/useCopyToClipboard.mjs +0 -1
- package/es/index.d.ts +5 -1
- package/es/index.mjs +77 -58
- package/es/interface/controller/form-edit-item/form-edit-item.controller.d.ts +5 -0
- package/es/interface/controller/index.d.ts +0 -1
- package/es/interface/form/i-editor/i-editor-basic.d.ts +2 -2
- package/es/interface/form/i-editor/i-model-field-select-editor.d.ts +18 -0
- package/es/interface/form/i-form/i-form-collapse-pane.d.ts +4 -0
- package/es/interface/form/i-form/i-form-item-basic.d.ts +1 -1
- package/es/interface/form/i-form/i-form-tab-pane.d.ts +4 -0
- package/es/interface/form/index.d.ts +1 -0
- package/es/interface/i-app-context/i-app-context.d.ts +34 -0
- package/es/interface/i-field-code-chain/i-field-code-chain.d.ts +17 -0
- package/es/interface/i-global-var/i-global-var.d.ts +15 -0
- package/es/interface/i-mobile-home-menu-item/i-mobile-home-menu-item.d.ts +94 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +8 -20
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +1 -1
- package/es/interface/i-pinia-state/i-global-state.d.ts +7 -14
- package/es/interface/index.d.ts +5 -2
- package/es/interface/open-util/i-open-window-options/i-open-window-options.d.ts +59 -0
- package/es/interface/state/index.d.ts +0 -1
- package/es/locale/index.mjs +1 -2
- package/es/modules/env-manager/env-manager.const.mjs +0 -1
- package/es/modules/env-manager/env-manager.interface.mjs +0 -1
- package/es/modules/env-manager/env-manager.mjs +7 -8
- package/es/modules/error-handler/error-handler.const.mjs +1 -30
- package/es/modules/error-handler/error-strategy.mjs +0 -1
- package/es/modules/error-handler/index.mjs +0 -1
- package/es/modules/platform-config/constants/index.d.ts +7 -0
- package/es/modules/platform-config/constants/login.const.d.ts +15 -0
- package/es/modules/platform-config/constants/login.const.mjs +50 -0
- package/es/modules/platform-config/constants/org.const.d.ts +9 -0
- package/es/modules/platform-config/constants/org.const.mjs +54 -0
- package/es/modules/platform-config/constants/theme.const.d.ts +9 -0
- package/es/modules/platform-config/constants/theme.const.mjs +5 -0
- package/es/modules/platform-config/constants/watermark.const.d.ts +16 -0
- package/es/modules/platform-config/constants/watermark.const.mjs +14 -0
- package/es/modules/platform-config/enums/deploy.enum.d.ts +10 -0
- package/es/modules/platform-config/enums/deploy.enum.mjs +7 -0
- package/es/modules/platform-config/enums/index.d.ts +6 -0
- package/es/modules/platform-config/{constants.d.ts → enums/login.enum.d.ts} +3 -7
- package/es/modules/platform-config/enums/login.enum.mjs +16 -0
- package/es/modules/platform-config/enums/platform.enum.d.ts +27 -0
- package/es/modules/platform-config/enums/platform.enum.mjs +26 -0
- package/es/modules/platform-config/index.d.ts +6 -17
- package/es/modules/platform-config/interfaces/global-setting.interface.d.ts +7 -0
- package/es/modules/platform-config/interfaces/index.d.ts +7 -0
- package/es/modules/platform-config/interfaces/login-config.interface.d.ts +17 -0
- package/es/modules/platform-config/interfaces/platform-map.interface.d.ts +8 -0
- package/es/modules/platform-config/interfaces/theme-setting.interface.d.ts +30 -0
- package/es/modules/platform-config/store.d.ts +221 -0
- package/es/modules/platform-config/store.mjs +78 -0
- package/es/modules/platform-config/useBasicSetting.d.ts +6 -2
- package/es/modules/platform-config/useBasicSetting.mjs +39 -0
- package/es/modules/platform-config/useDeploySetting.d.ts +9 -4
- package/es/modules/platform-config/useDeploySetting.mjs +27 -0
- package/es/modules/platform-config/useLoginSetting.d.ts +4 -14
- package/es/modules/platform-config/useLoginSetting.mjs +177 -0
- package/es/modules/platform-config/useOrgSetting.d.ts +5 -1
- package/es/modules/platform-config/useOrgSetting.mjs +66 -0
- package/es/modules/platform-config/useProjectSetting.d.ts +12 -0
- package/es/modules/platform-config/useProjectSetting.mjs +11 -0
- package/es/modules/platform-config/useSecuritySetting.d.ts +5 -1
- package/es/modules/platform-config/useSecuritySetting.mjs +60 -0
- package/es/modules/platform-config/useThemeSetting.d.ts +6 -3
- package/es/modules/platform-config/useThemeSetting.mjs +64 -0
- package/es/modules/platform-config/useWatermarkSetting.d.ts +4 -1
- package/es/modules/platform-config/useWatermarkSetting.mjs +26 -0
- package/es/modules/user-stores/index.d.ts +3 -0
- package/es/modules/user-stores/store/permission.store.d.ts +21 -0
- package/es/modules/user-stores/store/permission.store.mjs +38 -0
- package/es/modules/user-stores/store/tenant.store.d.ts +9 -0
- package/es/modules/user-stores/store/tenant.store.mjs +24 -0
- package/es/modules/user-stores/store/user.store.d.ts +154 -0
- package/es/modules/user-stores/store/user.store.mjs +100 -0
- package/es/modules/user-stores/types/permission.d.ts +1 -0
- package/es/modules/user-stores/types/tenant.d.ts +1 -0
- package/es/modules/user-stores/types/user.d.ts +14 -0
- package/es/register/editor-register/editor-register.d.ts +5 -13
- package/es/register/editor-register/editor-register.mjs +8 -17
- package/es/register/form-item-register/form-item-register.d.ts +4 -15
- package/es/register/form-item-register/form-item-register.mjs +7 -17
- package/es/register/index.d.ts +18 -1
- package/es/register/render-register/render-register.mjs +0 -1
- package/es/router/index.mjs +0 -1
- package/es/state/form/form.state.mjs +0 -1
- package/es/state/form-collapse/form-collapse.state.mjs +0 -1
- package/es/state/form-collapse-pane/form-collapse-pane.state.mjs +0 -1
- package/es/state/form-edit-item/form-edit-item.state.mjs +0 -1
- package/es/state/form-group/form-group.state.mjs +0 -1
- package/es/state/form-item/form-item.state.mjs +0 -1
- package/es/state/form-item-basic/form-item-basic.state.mjs +0 -1
- package/es/state/form-tab/form-tab.state.mjs +0 -1
- package/es/state/form-tab-pane/form-tab-pane.state.mjs +0 -1
- package/es/state/global-pinia-state/global-pinia-state.d.ts +8 -25
- package/es/state/global-pinia-state/global-pinia-state.mjs +30 -16
- package/es/store/global-store.d.ts +1 -0
- package/es/store/global-store.mjs +34 -37
- package/es/store/index.d.ts +2 -3
- package/es/store/index.mjs +0 -1
- package/es/types/index.d.ts +14 -1
- package/es/utils/axios/interceptors.mjs +3 -23
- package/es/utils/deviceFingerprint.d.ts +17 -0
- package/es/utils/deviceFingerprint.mjs +73 -0
- package/es/utils/dictionary/dictionary.mjs +0 -1
- package/es/utils/i18n/index.d.ts +2 -1
- package/es/utils/i18n/index.mjs +3 -4
- package/es/utils/index.d.ts +11 -2
- package/es/utils/linked-list/linked-list.d.ts +72 -0
- package/es/utils/linked-list/linked-list.mjs +119 -0
- package/es/utils/linked-node/linked-node.d.ts +31 -0
- package/es/utils/linked-node/linked-node.mjs +32 -0
- package/es/utils/mitt/mitt.d.ts +1 -0
- package/es/utils/mitt/mitt.mjs +5 -0
- package/es/utils/model-loader/model-loader.d.ts +118 -0
- package/es/utils/model-loader/model-loader.mjs +326 -0
- package/es/utils/namespace/namespace.mjs +0 -1
- package/es/utils/plugin-static-resource/plugin-static-resource.mjs +0 -1
- package/es/utils/props/gct-form-item/gct-form-item.props.d.ts +63 -0
- package/es/utils/props/gct-form-item/gct-form-item.props.mjs +66 -0
- package/es/utils/props/index.d.ts +1 -0
- package/es/utils/style/index.d.ts +16 -0
- package/es/utils/style/index.mjs +141 -0
- package/es/utils/tools/tools.d.ts +13 -10
- package/es/utils/tools/tools.mjs +19 -11
- package/es/utils/treeHelper/treeHelper.d.ts +117 -0
- package/es/utils/treeHelper/treeHelper.mjs +220 -0
- package/es/utils/util.d.ts +39 -0
- package/es/utils/util.mjs +40 -0
- package/es/utils/value-helper/value-helper.d.ts +49 -0
- package/es/utils/value-helper/value-helper.mjs +109 -0
- package/es/utils/width-install/width-install.mjs +0 -2
- package/package.json +12 -16
- package/es/controller/index.mjs +0 -17
- package/es/enums/page-designer/index.mjs +0 -6
- package/es/global/index.mjs +0 -3
- package/es/hooks/index.mjs +0 -7
- package/es/interface/controller/i-designer-controller.d.ts +0 -116
- package/es/interface/hooks/i-designer-hooks.d.ts +0 -26
- package/es/interface/hooks/index.d.ts +0 -1
- package/es/interface/index.mjs +0 -1
- package/es/interface/low-code-types/index.d.ts +0 -4
- package/es/interface/low-code-types/modal-types.d.ts +0 -67
- package/es/interface/low-code-types/model/index.d.ts +0 -5338
- package/es/interface/low-code-types/schema/index.d.ts +0 -12
- package/es/interface/low-code-types/widget-basic-types.d.ts +0 -667
- package/es/interface/state/i-designer-state.d.ts +0 -27
- package/es/modules/env-manager/index.mjs +0 -5
- package/es/modules/platform-config/index.mjs +0 -17
- package/es/modules/platform-config/types.d.ts +0 -67
- package/es/provider/i-designer-provider/i-designer-provider.d.ts +0 -102
- package/es/provider/index.d.ts +0 -1
- package/es/provider/index.mjs +0 -1
- package/es/register/designer-register/designer-register.d.ts +0 -53
- package/es/register/designer-register/designer-register.mjs +0 -68
- package/es/register/index.mjs +0 -6
- package/es/state/index.mjs +0 -12
- package/es/utils/index.mjs +0 -10
- package/es/utils/plugin-pkg-util/plugin-pkg-util.d.ts +0 -96
- package/es/utils/plugin-pkg-util/plugin-pkg-util.mjs +0 -260
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RouterTransitionEnum } from '../../../enums';
|
|
2
|
+
/** 主题设置配置接口 */
|
|
3
|
+
export interface IThemeSettingConfig {
|
|
4
|
+
toolbarMode: string;
|
|
5
|
+
mode: string;
|
|
6
|
+
width: number;
|
|
7
|
+
menuSetting: string[];
|
|
8
|
+
contentSetting: string[];
|
|
9
|
+
menuSettingFold: string;
|
|
10
|
+
menuTopLayout: string;
|
|
11
|
+
animationSetting: string[];
|
|
12
|
+
animationType: RouterTransitionEnum;
|
|
13
|
+
}
|
|
14
|
+
/** 主题设置接口,定义应用的主题和界面风格配置 */
|
|
15
|
+
export interface IThemeSetting {
|
|
16
|
+
darkMode: 'light' | 'dark';
|
|
17
|
+
themeColor: string;
|
|
18
|
+
menuMode: 'classic' | 'mix-sider' | 'horizontal-mix-sider';
|
|
19
|
+
menuWidth: number;
|
|
20
|
+
menuCollapsible: boolean;
|
|
21
|
+
menuSearchable?: boolean;
|
|
22
|
+
menuFilter: boolean;
|
|
23
|
+
showLogo: boolean;
|
|
24
|
+
showBreadcrumb: boolean;
|
|
25
|
+
showBreadcrumbIcon: boolean;
|
|
26
|
+
showTabs: boolean;
|
|
27
|
+
pageProgress: boolean;
|
|
28
|
+
pageLoading: boolean;
|
|
29
|
+
colorMode: 'normal' | 'colorWeak' | 'gray';
|
|
30
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { SysConfigResponse } from '@gct-paas/api/platform';
|
|
2
|
+
/**
|
|
3
|
+
* 平台配置 Store
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"platform-config", Pick<{
|
|
6
|
+
projectSetting: {};
|
|
7
|
+
setProjectConfig: (config: {}) => void;
|
|
8
|
+
deploySetting: {
|
|
9
|
+
deployMode: import('./enums').DeployModeEnum;
|
|
10
|
+
};
|
|
11
|
+
setDeploySetting: (data: SysConfigResponse) => void;
|
|
12
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
13
|
+
watermarkSetting: {
|
|
14
|
+
openWatermark: boolean;
|
|
15
|
+
watermarkContent: string;
|
|
16
|
+
fontSize: number;
|
|
17
|
+
color: string;
|
|
18
|
+
verticalAlign: string;
|
|
19
|
+
textAlign: string;
|
|
20
|
+
text: string;
|
|
21
|
+
transparent: number;
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
};
|
|
25
|
+
postWatermarkSetting: () => Promise<void>;
|
|
26
|
+
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
27
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
28
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
29
|
+
postThemeSetting: () => Promise<void>;
|
|
30
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
31
|
+
toggleMenuCollapsed: () => void;
|
|
32
|
+
menuCollapsedWidth: number;
|
|
33
|
+
menuWidthRange: number[];
|
|
34
|
+
themeColors: string[];
|
|
35
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
36
|
+
postSecuritySetting: () => Promise<void>;
|
|
37
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
38
|
+
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
39
|
+
setOrgSetting: (data: SysConfigResponse) => void;
|
|
40
|
+
postOrgSetting: () => Promise<void>;
|
|
41
|
+
relationFields: import('vue').Ref<{
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
type: number;
|
|
45
|
+
}[], {
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
type: number;
|
|
49
|
+
}[] | {
|
|
50
|
+
label: string;
|
|
51
|
+
value: string;
|
|
52
|
+
type: number;
|
|
53
|
+
}[]>;
|
|
54
|
+
relationFiledsCopy: import('vue').Ref<{
|
|
55
|
+
label: string;
|
|
56
|
+
value: string;
|
|
57
|
+
}[], {
|
|
58
|
+
label: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}[] | {
|
|
61
|
+
label: string;
|
|
62
|
+
value: string;
|
|
63
|
+
}[]>;
|
|
64
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
65
|
+
postLoginSetting: () => Promise<void>;
|
|
66
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
67
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
68
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
69
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
70
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
71
|
+
loginModeConfig: Map<string, IObject>;
|
|
72
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
73
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
74
|
+
postBasicSetting: () => Promise<string>;
|
|
75
|
+
init: () => Promise<void>;
|
|
76
|
+
renderInit: () => Promise<void>;
|
|
77
|
+
}, "projectSetting" | "deploySetting" | "watermarkSetting" | "themeSetting" | "menuCollapsed" | "menuCollapsedWidth" | "menuWidthRange" | "themeColors" | "securitySetting" | "orgSetting" | "relationFields" | "relationFiledsCopy" | "loginSetting" | "loginModeAuthTypes" | "openIDOAuthAuthTypes" | "sysLoginSort" | "openIDOAuthAuthSort" | "loginModeConfig" | "basicSetting">, Pick<{
|
|
78
|
+
projectSetting: {};
|
|
79
|
+
setProjectConfig: (config: {}) => void;
|
|
80
|
+
deploySetting: {
|
|
81
|
+
deployMode: import('./enums').DeployModeEnum;
|
|
82
|
+
};
|
|
83
|
+
setDeploySetting: (data: SysConfigResponse) => void;
|
|
84
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
85
|
+
watermarkSetting: {
|
|
86
|
+
openWatermark: boolean;
|
|
87
|
+
watermarkContent: string;
|
|
88
|
+
fontSize: number;
|
|
89
|
+
color: string;
|
|
90
|
+
verticalAlign: string;
|
|
91
|
+
textAlign: string;
|
|
92
|
+
text: string;
|
|
93
|
+
transparent: number;
|
|
94
|
+
width: number;
|
|
95
|
+
height: number;
|
|
96
|
+
};
|
|
97
|
+
postWatermarkSetting: () => Promise<void>;
|
|
98
|
+
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
99
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
100
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
101
|
+
postThemeSetting: () => Promise<void>;
|
|
102
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
103
|
+
toggleMenuCollapsed: () => void;
|
|
104
|
+
menuCollapsedWidth: number;
|
|
105
|
+
menuWidthRange: number[];
|
|
106
|
+
themeColors: string[];
|
|
107
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
108
|
+
postSecuritySetting: () => Promise<void>;
|
|
109
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
110
|
+
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
111
|
+
setOrgSetting: (data: SysConfigResponse) => void;
|
|
112
|
+
postOrgSetting: () => Promise<void>;
|
|
113
|
+
relationFields: import('vue').Ref<{
|
|
114
|
+
label: string;
|
|
115
|
+
value: string;
|
|
116
|
+
type: number;
|
|
117
|
+
}[], {
|
|
118
|
+
label: string;
|
|
119
|
+
value: string;
|
|
120
|
+
type: number;
|
|
121
|
+
}[] | {
|
|
122
|
+
label: string;
|
|
123
|
+
value: string;
|
|
124
|
+
type: number;
|
|
125
|
+
}[]>;
|
|
126
|
+
relationFiledsCopy: import('vue').Ref<{
|
|
127
|
+
label: string;
|
|
128
|
+
value: string;
|
|
129
|
+
}[], {
|
|
130
|
+
label: string;
|
|
131
|
+
value: string;
|
|
132
|
+
}[] | {
|
|
133
|
+
label: string;
|
|
134
|
+
value: string;
|
|
135
|
+
}[]>;
|
|
136
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
137
|
+
postLoginSetting: () => Promise<void>;
|
|
138
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
139
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
140
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
141
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
142
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
143
|
+
loginModeConfig: Map<string, IObject>;
|
|
144
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
145
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
146
|
+
postBasicSetting: () => Promise<string>;
|
|
147
|
+
init: () => Promise<void>;
|
|
148
|
+
renderInit: () => Promise<void>;
|
|
149
|
+
}, "isIndependentApp">, Pick<{
|
|
150
|
+
projectSetting: {};
|
|
151
|
+
setProjectConfig: (config: {}) => void;
|
|
152
|
+
deploySetting: {
|
|
153
|
+
deployMode: import('./enums').DeployModeEnum;
|
|
154
|
+
};
|
|
155
|
+
setDeploySetting: (data: SysConfigResponse) => void;
|
|
156
|
+
isIndependentApp: import('vue').ComputedRef<boolean>;
|
|
157
|
+
watermarkSetting: {
|
|
158
|
+
openWatermark: boolean;
|
|
159
|
+
watermarkContent: string;
|
|
160
|
+
fontSize: number;
|
|
161
|
+
color: string;
|
|
162
|
+
verticalAlign: string;
|
|
163
|
+
textAlign: string;
|
|
164
|
+
text: string;
|
|
165
|
+
transparent: number;
|
|
166
|
+
width: number;
|
|
167
|
+
height: number;
|
|
168
|
+
};
|
|
169
|
+
postWatermarkSetting: () => Promise<void>;
|
|
170
|
+
setWatermarkSetting: (data: SysConfigResponse) => void;
|
|
171
|
+
themeSetting: import('./interfaces').IThemeSetting;
|
|
172
|
+
setThemeSetting: (data: SysConfigResponse) => void;
|
|
173
|
+
postThemeSetting: () => Promise<void>;
|
|
174
|
+
menuCollapsed: import('vue').Ref<boolean, boolean>;
|
|
175
|
+
toggleMenuCollapsed: () => void;
|
|
176
|
+
menuCollapsedWidth: number;
|
|
177
|
+
menuWidthRange: number[];
|
|
178
|
+
themeColors: string[];
|
|
179
|
+
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
180
|
+
postSecuritySetting: () => Promise<void>;
|
|
181
|
+
setSecuritySetting: (data: SysConfigResponse) => void;
|
|
182
|
+
orgSetting: import('@gct-paas/api/platform').OrgConfig;
|
|
183
|
+
setOrgSetting: (data: SysConfigResponse) => void;
|
|
184
|
+
postOrgSetting: () => Promise<void>;
|
|
185
|
+
relationFields: import('vue').Ref<{
|
|
186
|
+
label: string;
|
|
187
|
+
value: string;
|
|
188
|
+
type: number;
|
|
189
|
+
}[], {
|
|
190
|
+
label: string;
|
|
191
|
+
value: string;
|
|
192
|
+
type: number;
|
|
193
|
+
}[] | {
|
|
194
|
+
label: string;
|
|
195
|
+
value: string;
|
|
196
|
+
type: number;
|
|
197
|
+
}[]>;
|
|
198
|
+
relationFiledsCopy: import('vue').Ref<{
|
|
199
|
+
label: string;
|
|
200
|
+
value: string;
|
|
201
|
+
}[], {
|
|
202
|
+
label: string;
|
|
203
|
+
value: string;
|
|
204
|
+
}[] | {
|
|
205
|
+
label: string;
|
|
206
|
+
value: string;
|
|
207
|
+
}[]>;
|
|
208
|
+
loginSetting: import('@gct-paas/api/platform').AuthConfig;
|
|
209
|
+
postLoginSetting: () => Promise<void>;
|
|
210
|
+
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
211
|
+
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
212
|
+
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
213
|
+
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
214
|
+
openIDOAuthAuthSort: import('vue').Ref<IObject[], IObject[]>;
|
|
215
|
+
loginModeConfig: Map<string, IObject>;
|
|
216
|
+
basicSetting: import('@gct-paas/api/platform').PlatformBaseConfig;
|
|
217
|
+
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
218
|
+
postBasicSetting: () => Promise<string>;
|
|
219
|
+
init: () => Promise<void>;
|
|
220
|
+
renderInit: () => Promise<void>;
|
|
221
|
+
}, "setProjectConfig" | "setDeploySetting" | "postWatermarkSetting" | "setWatermarkSetting" | "setThemeSetting" | "postThemeSetting" | "toggleMenuCollapsed" | "postSecuritySetting" | "setSecuritySetting" | "setOrgSetting" | "postOrgSetting" | "postLoginSetting" | "setLoginSetting" | "setBasicSetting" | "postBasicSetting" | "init" | "renderInit">>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { PlatformSettingEnum } from './enums/platform.enum.mjs';
|
|
2
|
+
import { useBasicSetting } from './useBasicSetting.mjs';
|
|
3
|
+
import { useDeploySetting } from './useDeploySetting.mjs';
|
|
4
|
+
import { useLoginSetting } from './useLoginSetting.mjs';
|
|
5
|
+
import { useOrgSetting } from './useOrgSetting.mjs';
|
|
6
|
+
import { useSecuritySetting } from './useSecuritySetting.mjs';
|
|
7
|
+
import { useThemeSetting } from './useThemeSetting.mjs';
|
|
8
|
+
import { useWatermarkSetting } from './useWatermarkSetting.mjs';
|
|
9
|
+
import { useProjectSetting } from './useProjectSetting.mjs';
|
|
10
|
+
import { defineStore } from 'pinia';
|
|
11
|
+
|
|
12
|
+
const usePlatformConfigStore = defineStore("platform-config", () => {
|
|
13
|
+
const base = useBasicSetting();
|
|
14
|
+
const login = useLoginSetting();
|
|
15
|
+
const org = useOrgSetting();
|
|
16
|
+
const security = useSecuritySetting();
|
|
17
|
+
const theme = useThemeSetting();
|
|
18
|
+
const watermark = useWatermarkSetting();
|
|
19
|
+
const deploy = useDeploySetting();
|
|
20
|
+
const project = useProjectSetting();
|
|
21
|
+
async function init() {
|
|
22
|
+
const data = await _api.platform.plat.getList();
|
|
23
|
+
const map = {};
|
|
24
|
+
if (data && data.length > 0) {
|
|
25
|
+
data.forEach((item) => {
|
|
26
|
+
if (item.value) {
|
|
27
|
+
try {
|
|
28
|
+
map[item.configEnum] = JSON.parse(item.value);
|
|
29
|
+
} catch (err) {
|
|
30
|
+
console.warn(`${item.configEnum}配置解析失败`, err, item);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (map[PlatformSettingEnum.BASIC]) {
|
|
36
|
+
base.setBasicSetting(map[PlatformSettingEnum.BASIC]);
|
|
37
|
+
}
|
|
38
|
+
if (map[PlatformSettingEnum.LOGIN]) {
|
|
39
|
+
login.setLoginSetting(map[PlatformSettingEnum.LOGIN]);
|
|
40
|
+
}
|
|
41
|
+
if (map[PlatformSettingEnum.ORGANIZATION]) {
|
|
42
|
+
org.setOrgSetting(map[PlatformSettingEnum.ORGANIZATION]);
|
|
43
|
+
}
|
|
44
|
+
if (map[PlatformSettingEnum.SECURITY]) {
|
|
45
|
+
security.setSecuritySetting(map[PlatformSettingEnum.SECURITY]);
|
|
46
|
+
}
|
|
47
|
+
if (map[PlatformSettingEnum.THEME]) {
|
|
48
|
+
theme.setThemeSetting(map[PlatformSettingEnum.THEME]);
|
|
49
|
+
}
|
|
50
|
+
if (map[PlatformSettingEnum.WATERMARK]) {
|
|
51
|
+
watermark.setWatermarkSetting(map[PlatformSettingEnum.WATERMARK]);
|
|
52
|
+
}
|
|
53
|
+
if (map[PlatformSettingEnum.DEPLOY]) {
|
|
54
|
+
deploy.setDeploySetting(map[PlatformSettingEnum.DEPLOY]);
|
|
55
|
+
}
|
|
56
|
+
console.debug("平台配置初始化完成", map);
|
|
57
|
+
}
|
|
58
|
+
async function renderInit() {
|
|
59
|
+
const res = await _api.apaas.basicConfig.getDetail({
|
|
60
|
+
configEnum: PlatformSettingEnum.THEME
|
|
61
|
+
});
|
|
62
|
+
if (res) theme.setThemeSetting(res);
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
init,
|
|
66
|
+
renderInit,
|
|
67
|
+
...base,
|
|
68
|
+
...login,
|
|
69
|
+
...org,
|
|
70
|
+
...security,
|
|
71
|
+
...theme,
|
|
72
|
+
...watermark,
|
|
73
|
+
...deploy,
|
|
74
|
+
...project
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export { usePlatformConfigStore };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { PlatformBaseConfig, SysConfigResponse } from '@gct-paas/api/platform';
|
|
2
|
+
/**
|
|
3
|
+
* 基础设置 Composable 函数
|
|
4
|
+
* @param isPlatform - 是否为平台模式,默认为 true
|
|
5
|
+
* @returns 返回基础设置相关的响应式数据和方法
|
|
6
|
+
*/
|
|
2
7
|
export declare function useBasicSetting(isPlatform?: boolean): {
|
|
3
8
|
basicSetting: PlatformBaseConfig;
|
|
4
|
-
loadBasicSetting: () => Promise<void>;
|
|
5
9
|
setBasicSetting: (data: SysConfigResponse, transfer?: boolean) => void;
|
|
6
|
-
postBasicSetting: () =>
|
|
10
|
+
postBasicSetting: () => Promise<string>;
|
|
7
11
|
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { reactive } from 'vue';
|
|
2
|
+
import { omit } from 'lodash-es';
|
|
3
|
+
|
|
4
|
+
const basicSetting = reactive({
|
|
5
|
+
copyright: '© 2016-<span class="ownInput">${当前年份}</span> 冠骋信息技术(苏州)有限公司 版权所有',
|
|
6
|
+
description: "",
|
|
7
|
+
icon: "",
|
|
8
|
+
loadingImage: "",
|
|
9
|
+
logo: "",
|
|
10
|
+
name: "冠骋云PaaS平台",
|
|
11
|
+
thumbnail: "",
|
|
12
|
+
version: "暂未支持"
|
|
13
|
+
});
|
|
14
|
+
function useBasicSetting(isPlatform = true) {
|
|
15
|
+
const postBasicSetting = () => {
|
|
16
|
+
if (isPlatform) {
|
|
17
|
+
return _api.platform.plat.postBase(omit({ ...basicSetting }, "version"));
|
|
18
|
+
}
|
|
19
|
+
return _api.apaas.plat.postBase(omit({ ...basicSetting }, "version"));
|
|
20
|
+
};
|
|
21
|
+
function setBasicSetting(data, transfer = true) {
|
|
22
|
+
const { value } = data;
|
|
23
|
+
if (!value) return;
|
|
24
|
+
try {
|
|
25
|
+
Object.assign(basicSetting, transfer ? JSON.parse(value) : value, {
|
|
26
|
+
version: undefined .version
|
|
27
|
+
});
|
|
28
|
+
} catch (err) {
|
|
29
|
+
console.warn(err);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
basicSetting,
|
|
34
|
+
setBasicSetting,
|
|
35
|
+
postBasicSetting
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { useBasicSetting };
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { SysConfigResponse } from '@gct-paas/api/platform';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { DeployModeEnum } from './enums/deploy.enum';
|
|
3
|
+
/**
|
|
4
|
+
* 设置部署配置信息
|
|
5
|
+
* @param data - 系统配置响应数据
|
|
6
|
+
*/
|
|
6
7
|
declare function setDeploySetting(data: SysConfigResponse): void;
|
|
8
|
+
/**
|
|
9
|
+
* 部署设置 Composable 函数
|
|
10
|
+
* @returns 返回部署设置相关的响应式数据和方法
|
|
11
|
+
*/
|
|
7
12
|
export declare function useDeploySetting(): {
|
|
8
13
|
deploySetting: {
|
|
9
14
|
deployMode: DeployModeEnum;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { reactive, computed } from 'vue';
|
|
2
|
+
import { DeployModeEnum } from './enums/deploy.enum.mjs';
|
|
3
|
+
|
|
4
|
+
const deploySetting = reactive({
|
|
5
|
+
deployMode: DeployModeEnum.STANDARD
|
|
6
|
+
});
|
|
7
|
+
const isIndependentApp = computed(() => {
|
|
8
|
+
return deploySetting.deployMode === DeployModeEnum.INDEPENDENT_APP;
|
|
9
|
+
});
|
|
10
|
+
function setDeploySetting(data) {
|
|
11
|
+
const { value } = data;
|
|
12
|
+
if (!value) return;
|
|
13
|
+
try {
|
|
14
|
+
Object.assign(deploySetting, JSON.parse(value));
|
|
15
|
+
} catch (err) {
|
|
16
|
+
console.warn(err);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function useDeploySetting() {
|
|
20
|
+
return {
|
|
21
|
+
deploySetting,
|
|
22
|
+
setDeploySetting,
|
|
23
|
+
isIndependentApp
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { useDeploySetting };
|
|
@@ -1,22 +1,12 @@
|
|
|
1
1
|
import { AuthConfig, SysConfigResponse } from '@gct-paas/api/platform';
|
|
2
|
+
/**
|
|
3
|
+
* 登录设置 Composable 函数
|
|
4
|
+
* @returns 返回登录设置相关的响应式数据和方法
|
|
5
|
+
*/
|
|
2
6
|
export declare function useLoginSetting(): {
|
|
3
7
|
loginSetting: AuthConfig;
|
|
4
|
-
loadLoginSetting: () => Promise<void>;
|
|
5
8
|
postLoginSetting: () => Promise<void>;
|
|
6
9
|
setLoginSetting: (config: SysConfigResponse | undefined) => void;
|
|
7
|
-
theme: import('vue').Ref<{
|
|
8
|
-
imgUrl: string;
|
|
9
|
-
value: string;
|
|
10
|
-
label: string;
|
|
11
|
-
}[], {
|
|
12
|
-
imgUrl: string;
|
|
13
|
-
value: string;
|
|
14
|
-
label: string;
|
|
15
|
-
}[] | {
|
|
16
|
-
imgUrl: string;
|
|
17
|
-
value: string;
|
|
18
|
-
label: string;
|
|
19
|
-
}[]>;
|
|
20
10
|
loginModeAuthTypes: import('vue').Ref<string[], string[]>;
|
|
21
11
|
openIDOAuthAuthTypes: import('vue').Ref<string[], string[]>;
|
|
22
12
|
sysLoginSort: import('vue').Ref<IObject[], IObject[]>;
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { ref, reactive } from 'vue';
|
|
2
|
+
import { LoginTypeEnum, LoginSortTypeEnum } from './enums/login.enum.mjs';
|
|
3
|
+
import { getLoginTypeOptions, OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS } from './constants/login.const.mjs';
|
|
4
|
+
import { has, isEmpty } from 'lodash-es';
|
|
5
|
+
|
|
6
|
+
const loginModeAuthTypes = ref([LoginTypeEnum.ACCOUNT]);
|
|
7
|
+
const openIDOAuthAuthTypes = ref([]);
|
|
8
|
+
const sysLoginSort = ref(getLoginTypeOptions(SYSTEM_LOGIN_KEYS));
|
|
9
|
+
const openIDOAuthAuthSort = ref(
|
|
10
|
+
getLoginTypeOptions(OTHER_LOGIN_KEYS)
|
|
11
|
+
);
|
|
12
|
+
const loginSetting = reactive({
|
|
13
|
+
theme: "full",
|
|
14
|
+
title: "欢迎登录冠骋云PaaS平台",
|
|
15
|
+
subtitle: "让数字化赋能客户成功!",
|
|
16
|
+
logo: "",
|
|
17
|
+
banner: "",
|
|
18
|
+
loginModeConfigs: [],
|
|
19
|
+
openIDOAuthConfigs: [],
|
|
20
|
+
sortJson: "",
|
|
21
|
+
defaultAuthType: LoginTypeEnum.ACCOUNT
|
|
22
|
+
});
|
|
23
|
+
const loginModeConfig = reactive(
|
|
24
|
+
/* @__PURE__ */ new Map([
|
|
25
|
+
[
|
|
26
|
+
LoginTypeEnum.ACCOUNT,
|
|
27
|
+
{
|
|
28
|
+
address: "",
|
|
29
|
+
authType: LoginTypeEnum.ACCOUNT,
|
|
30
|
+
relationField: "",
|
|
31
|
+
enabled: 0
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
LoginTypeEnum.DOMAIN_ACCOUNT,
|
|
36
|
+
{
|
|
37
|
+
address: "",
|
|
38
|
+
authType: LoginTypeEnum.DOMAIN_ACCOUNT,
|
|
39
|
+
relationField: "",
|
|
40
|
+
domainSuffix: "",
|
|
41
|
+
relationFieldName: "",
|
|
42
|
+
enabled: 0
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
LoginTypeEnum.MOBILE,
|
|
47
|
+
{
|
|
48
|
+
smsServiceProvider: "",
|
|
49
|
+
// 短信服务商
|
|
50
|
+
smsKey: "",
|
|
51
|
+
// 授权key
|
|
52
|
+
smsKeySecret: "",
|
|
53
|
+
// 授权secret
|
|
54
|
+
smsTemplateCode: "",
|
|
55
|
+
// 模板代码
|
|
56
|
+
smsSignName: "",
|
|
57
|
+
// 短信签名
|
|
58
|
+
phoneNumb: "",
|
|
59
|
+
smsSdkAppId: "",
|
|
60
|
+
authType: LoginTypeEnum.MOBILE,
|
|
61
|
+
enabled: 0
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
LoginTypeEnum.DINGDING,
|
|
66
|
+
{
|
|
67
|
+
appId: "",
|
|
68
|
+
authType: LoginTypeEnum.DINGDING,
|
|
69
|
+
secret: "",
|
|
70
|
+
redirectURL: "",
|
|
71
|
+
enabled: 0
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
LoginTypeEnum.FEISHU,
|
|
76
|
+
{
|
|
77
|
+
appId: "",
|
|
78
|
+
authType: LoginTypeEnum.FEISHU,
|
|
79
|
+
secret: "",
|
|
80
|
+
redirectURL: "",
|
|
81
|
+
enabled: 0
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
LoginTypeEnum.QIYEWEIXIN,
|
|
86
|
+
{
|
|
87
|
+
appId: "",
|
|
88
|
+
agentId: "",
|
|
89
|
+
authType: LoginTypeEnum.QIYEWEIXIN,
|
|
90
|
+
secret: "",
|
|
91
|
+
redirectURL: "",
|
|
92
|
+
enabled: 0,
|
|
93
|
+
certFileName: ""
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
])
|
|
97
|
+
);
|
|
98
|
+
function useLoginSetting() {
|
|
99
|
+
const postLoginSetting = async () => {
|
|
100
|
+
const enableTypes = [
|
|
101
|
+
...loginModeAuthTypes.value,
|
|
102
|
+
...openIDOAuthAuthTypes.value
|
|
103
|
+
];
|
|
104
|
+
enableTypes.forEach((item) => {
|
|
105
|
+
const config = loginModeConfig.get(item);
|
|
106
|
+
if (config) {
|
|
107
|
+
config.enabled = 1;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
loginSetting.loginModeConfigs = SYSTEM_LOGIN_KEYS.map((item) => {
|
|
111
|
+
return loginModeConfig.get(item);
|
|
112
|
+
}).filter((config) => config !== void 0);
|
|
113
|
+
loginSetting.openIDOAuthConfigs = OTHER_LOGIN_KEYS.map((item) => {
|
|
114
|
+
return loginModeConfig.get(item);
|
|
115
|
+
}).filter((config) => config !== void 0);
|
|
116
|
+
loginSetting.sortJson = JSON.stringify({
|
|
117
|
+
[LoginSortTypeEnum.SYSTEM]: sysLoginSort.value.map((item) => item.id),
|
|
118
|
+
[LoginSortTypeEnum.THIRD_PARTY]: openIDOAuthAuthSort.value.map(
|
|
119
|
+
(item) => item.id
|
|
120
|
+
)
|
|
121
|
+
});
|
|
122
|
+
await _api.platform.plat.postLogin(loginSetting);
|
|
123
|
+
};
|
|
124
|
+
const setLoginSetting = (config) => {
|
|
125
|
+
if (config && config.value) {
|
|
126
|
+
const value = JSON.parse(config.value);
|
|
127
|
+
for (const k in value) {
|
|
128
|
+
if (k in loginSetting) {
|
|
129
|
+
loginSetting[k] = value[k];
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (has(value, "sortJson") && !isEmpty(value.sortJson)) {
|
|
133
|
+
const sortObj = JSON.parse(value.sortJson);
|
|
134
|
+
if (has(sortObj, LoginSortTypeEnum.SYSTEM)) {
|
|
135
|
+
sysLoginSort.value = getLoginTypeOptions(
|
|
136
|
+
sortObj[LoginSortTypeEnum.SYSTEM]
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
if (has(sortObj, LoginSortTypeEnum.THIRD_PARTY)) {
|
|
140
|
+
openIDOAuthAuthSort.value = getLoginTypeOptions(
|
|
141
|
+
sortObj[LoginSortTypeEnum.THIRD_PARTY]
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
loginSetting.loginModeConfigs?.forEach((item) => {
|
|
146
|
+
loginModeConfig.set(item.authType, { ...item, enabled: 0 });
|
|
147
|
+
});
|
|
148
|
+
const loginModeConfigs = loginSetting.loginModeConfigs?.filter((item) => {
|
|
149
|
+
return item.enabled;
|
|
150
|
+
}).map((i) => {
|
|
151
|
+
return i.authType;
|
|
152
|
+
}) || [];
|
|
153
|
+
loginModeConfigs.push(LoginTypeEnum.ACCOUNT);
|
|
154
|
+
loginModeAuthTypes.value = [...new Set(loginModeConfigs)];
|
|
155
|
+
loginSetting.openIDOAuthConfigs?.forEach((item) => {
|
|
156
|
+
loginModeConfig.set(item.authType, { ...item, enabled: 0 });
|
|
157
|
+
});
|
|
158
|
+
openIDOAuthAuthTypes.value = loginSetting.openIDOAuthConfigs?.filter((item) => {
|
|
159
|
+
return item.enabled;
|
|
160
|
+
}).map((i) => {
|
|
161
|
+
return i.authType;
|
|
162
|
+
}) || [];
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
return {
|
|
166
|
+
loginSetting,
|
|
167
|
+
postLoginSetting,
|
|
168
|
+
setLoginSetting,
|
|
169
|
+
loginModeAuthTypes,
|
|
170
|
+
openIDOAuthAuthTypes,
|
|
171
|
+
sysLoginSort,
|
|
172
|
+
openIDOAuthAuthSort,
|
|
173
|
+
loginModeConfig
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export { useLoginSetting };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { OrgConfig, SysConfigResponse } from '@gct-paas/api/platform';
|
|
2
|
+
/**
|
|
3
|
+
* 组织设置 Composable 函数
|
|
4
|
+
* @param isPlatform - 是否为平台模式,默认为 true
|
|
5
|
+
* @returns 返回组织设置相关的响应式数据和方法
|
|
6
|
+
*/
|
|
2
7
|
export declare function useOrgSetting(isPlatform?: boolean): {
|
|
3
8
|
orgSetting: OrgConfig;
|
|
4
|
-
loadOrgSetting: () => Promise<void>;
|
|
5
9
|
setOrgSetting: (data: SysConfigResponse) => void;
|
|
6
10
|
postOrgSetting: () => Promise<void>;
|
|
7
11
|
relationFields: import('vue').Ref<{
|