@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StateTree } from 'pinia';
|
|
2
2
|
import { ProjectName } from '../../enums';
|
|
3
|
+
import { IAppContext } from '../i-app-context/i-app-context';
|
|
3
4
|
/**
|
|
4
5
|
* 全局 store 状态
|
|
5
6
|
*
|
|
@@ -7,6 +8,12 @@ import { ProjectName } from '../../enums';
|
|
|
7
8
|
* @interface IGlobalState
|
|
8
9
|
*/
|
|
9
10
|
export interface IGlobalState extends StateTree {
|
|
11
|
+
/**
|
|
12
|
+
* 应用上下文
|
|
13
|
+
*
|
|
14
|
+
* @type {IAppContext}
|
|
15
|
+
*/
|
|
16
|
+
context: IAppContext;
|
|
10
17
|
/**
|
|
11
18
|
* 项目名称
|
|
12
19
|
*
|
|
@@ -18,30 +25,16 @@ export interface IGlobalState extends StateTree {
|
|
|
18
25
|
*
|
|
19
26
|
* @type {string}
|
|
20
27
|
*/
|
|
21
|
-
tenantId: string;
|
|
22
28
|
/**
|
|
23
29
|
* 多语言环境
|
|
24
30
|
*
|
|
25
31
|
* @default zh-CN
|
|
26
32
|
* @type {string}
|
|
27
33
|
*/
|
|
28
|
-
lang: string;
|
|
29
34
|
/**
|
|
30
35
|
* 应用信息, todo: 等 api 包完成后,实际类型从 api 导入
|
|
31
36
|
*
|
|
32
37
|
* @type {IObject}
|
|
33
38
|
*/
|
|
34
39
|
appInfo: IObject;
|
|
35
|
-
/**
|
|
36
|
-
* 用户信息
|
|
37
|
-
*
|
|
38
|
-
* @type {IObject}
|
|
39
|
-
*/
|
|
40
|
-
userInfo: IObject;
|
|
41
|
-
/**
|
|
42
|
-
* 租户用户信息
|
|
43
|
-
*
|
|
44
|
-
* @type {IObject}
|
|
45
|
-
*/
|
|
46
|
-
tenantUserInfo: IObject;
|
|
47
40
|
}
|
package/es/interface/index.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export type * from './controller';
|
|
2
2
|
export type * from './events';
|
|
3
3
|
export type * from './form';
|
|
4
|
-
export type * from './
|
|
4
|
+
export type * from './i-app-context/i-app-context';
|
|
5
5
|
export type { IDictionary } from './i-dictionary/i-dictionary';
|
|
6
6
|
export type { IDictionaryItem } from './i-dictionary/i-dictionary-item';
|
|
7
|
+
export type { IFieldCodeChain } from './i-field-code-chain/i-field-code-chain';
|
|
8
|
+
export type { GlobalVar } from './i-global-var/i-global-var';
|
|
7
9
|
export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
|
|
10
|
+
export type { IMobileHomeMenuItem } from './i-mobile-home-menu-item/i-mobile-home-menu-item';
|
|
8
11
|
export type { IModal } from './i-modal/i-modal';
|
|
9
12
|
export type { IModalData } from './i-modal-data/i-modal-data';
|
|
10
13
|
export type { IStyleIMportMap } from './i-import-style-map/i-import-style-map';
|
|
@@ -12,7 +15,7 @@ export type { IGlobalActions } from './i-pinia-action/i-global-actions';
|
|
|
12
15
|
export type { IGlobalGetters } from './i-pinia-getter/i-global-getters';
|
|
13
16
|
export type { IGlobalState } from './i-pinia-state/i-global-state';
|
|
14
17
|
export type * from './layout';
|
|
15
|
-
export type * from './
|
|
18
|
+
export type * from './open-util/i-open-window-options/i-open-window-options';
|
|
16
19
|
export type * from './provider';
|
|
17
20
|
export type * from './state';
|
|
18
21
|
export type * from './style';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* openWindow 函数的配置选项接口
|
|
3
|
+
*
|
|
4
|
+
* @export
|
|
5
|
+
* @interface IOpenWindowOptions
|
|
6
|
+
*/
|
|
7
|
+
export interface IOpenWindowOptions {
|
|
8
|
+
/**
|
|
9
|
+
* 窗口打开方式
|
|
10
|
+
*
|
|
11
|
+
* @type {HTMLAnchorElement['target']}
|
|
12
|
+
* @memberof IOpenWindowOptions
|
|
13
|
+
* @default '_blank'
|
|
14
|
+
*/
|
|
15
|
+
target?: HTMLAnchorElement['target'];
|
|
16
|
+
/**
|
|
17
|
+
* 是否启用 noopener 特性
|
|
18
|
+
* 防止新页面访问 window.opener
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof IOpenWindowOptions
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
noopener?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 是否启用 noreferrer 特性
|
|
27
|
+
* 防止新页面获取来源页面信息
|
|
28
|
+
*
|
|
29
|
+
* @type {boolean}
|
|
30
|
+
* @memberof IOpenWindowOptions
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
noreferrer?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* URL 参数数据
|
|
36
|
+
* 用于替换 URL 中的占位符,格式如 /path/{id}/{name?}
|
|
37
|
+
*
|
|
38
|
+
* @type {IObject}
|
|
39
|
+
* @memberof IOpenWindowOptions
|
|
40
|
+
*/
|
|
41
|
+
genUrlData?: IObject;
|
|
42
|
+
/**
|
|
43
|
+
* 路由路径
|
|
44
|
+
* 将附加到 URL 末尾
|
|
45
|
+
*
|
|
46
|
+
* @type {string}
|
|
47
|
+
* @memberof IOpenWindowOptions
|
|
48
|
+
* @default ''
|
|
49
|
+
*/
|
|
50
|
+
routePath?: string;
|
|
51
|
+
/**
|
|
52
|
+
* 额外的 window.open 特性字符串
|
|
53
|
+
* 如: 'width=800,height=600'
|
|
54
|
+
*
|
|
55
|
+
* @type {string}
|
|
56
|
+
* @memberof IOpenWindowOptions
|
|
57
|
+
*/
|
|
58
|
+
optionStr?: string;
|
|
59
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export type { IDesignerState } from './i-designer-state';
|
|
2
1
|
export type { IFormState } from './form/form.state';
|
|
3
2
|
export type { IFormCollapsePaneState } from './form-collapse-pane/form-collapse-pane.state';
|
|
4
3
|
export type { IFormCollapseState } from './form-collapse/form-collapse.state';
|
package/es/locale/index.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createI18n } from 'vue-i18n';
|
|
2
2
|
|
|
3
|
-
"use strict";
|
|
4
3
|
class LocaleUtil {
|
|
5
4
|
i18n = createI18n({
|
|
6
5
|
locale: "zh-CN",
|
|
@@ -13,7 +12,7 @@ class LocaleUtil {
|
|
|
13
12
|
},
|
|
14
13
|
ja: {
|
|
15
14
|
message: {
|
|
16
|
-
hello: "
|
|
15
|
+
hello: "こんにちは、世界"
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EnvironmentType } from './env-manager.interface.mjs';
|
|
2
2
|
import { HOST_REG, APP_RUN_PATH_REG, APP_PROD_PATH_REG, APP_PREVIEW_PATH_REG, DEV_SINGLE_PATH_REG, TEST_SINGLE_PATH_REG, IP_REG } from './env-manager.const.mjs';
|
|
3
3
|
|
|
4
|
-
"use strict";
|
|
5
4
|
class EnvironmentManager {
|
|
6
5
|
/** 测试环境标识 */
|
|
7
6
|
_testEnv = false;
|
|
@@ -12,7 +11,7 @@ class EnvironmentManager {
|
|
|
12
11
|
/** 域名访问模式标识 */
|
|
13
12
|
_isHostMode = false;
|
|
14
13
|
constructor() {
|
|
15
|
-
this._platformOrigin = (
|
|
14
|
+
this._platformOrigin = (location.origin) || "";
|
|
16
15
|
this._isHostMode = HOST_REG.test(this._platformOrigin);
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
@@ -72,21 +71,21 @@ class EnvironmentManager {
|
|
|
72
71
|
matches = this._platformOrigin.match(HOST_REG);
|
|
73
72
|
this._testEnv = !!(matches && matches[1]);
|
|
74
73
|
if (this._testEnv) {
|
|
75
|
-
const
|
|
74
|
+
const data = await _api.platform.tenant.getInfoByPortOrDomain({
|
|
76
75
|
domain: matches[1]
|
|
77
76
|
});
|
|
78
|
-
Object.assign(this._testTenantData,
|
|
77
|
+
Object.assign(this._testTenantData, data);
|
|
79
78
|
}
|
|
80
79
|
} else {
|
|
81
80
|
matches = this._platformOrigin.match(IP_REG);
|
|
82
81
|
const port = matches && matches[2];
|
|
83
82
|
if (port) {
|
|
84
|
-
const
|
|
83
|
+
const data = await _api.platform.tenant.getInfoByPortOrDomain({
|
|
85
84
|
port
|
|
86
85
|
});
|
|
87
|
-
if (
|
|
88
|
-
Object.assign(this._testTenantData,
|
|
89
|
-
this._testEnv =
|
|
86
|
+
if (data) {
|
|
87
|
+
Object.assign(this._testTenantData, data);
|
|
88
|
+
this._testEnv = data.testEnvPort === port;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
91
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
const HTTP_STATUS_CODE = {
|
|
3
2
|
/** 未授权 */
|
|
4
3
|
UNAUTHORIZED: 401,
|
|
@@ -15,33 +14,5 @@ const HTTP_STATUS_CODE = {
|
|
|
15
14
|
/** 网关超时 */
|
|
16
15
|
GATEWAY_TIMEOUT: 504
|
|
17
16
|
};
|
|
18
|
-
const ERROR_LOG_TEMPLATE = {
|
|
19
|
-
/** JavaScript 错误模板 */
|
|
20
|
-
SCRIPT_ERROR: "[SCRIPT ERROR]",
|
|
21
|
-
/** Vue 组件错误模板 */
|
|
22
|
-
VUE_ERROR: "[VUE ERROR]",
|
|
23
|
-
/** 资源加载错误模板 */
|
|
24
|
-
RESOURCE_ERROR: "[RESOURCE ERROR]",
|
|
25
|
-
/** Ajax 请求错误模板 */
|
|
26
|
-
AJAX_ERROR: "[AJAX ERROR]",
|
|
27
|
-
/** Promise 异常模板 */
|
|
28
|
-
PROMISE_ERROR: "[PROMISE ERROR]"
|
|
29
|
-
};
|
|
30
|
-
const NETWORK_STATUS_MESSAGE = {
|
|
31
|
-
/** 网络连接丢失 */
|
|
32
|
-
CONNECTION_LOST: "Network connection lost",
|
|
33
|
-
/** 网络连接恢复 */
|
|
34
|
-
CONNECTION_RESTORED: "Network connection restored"
|
|
35
|
-
};
|
|
36
|
-
const ERROR_EVENT_NAMES = {
|
|
37
|
-
/** JavaScript 错误事件 */
|
|
38
|
-
ERROR: "error",
|
|
39
|
-
/** Promise 拒绝事件 */
|
|
40
|
-
UNHANDLED_REJECTION: "unhandledrejection",
|
|
41
|
-
/** 网络离线事件 */
|
|
42
|
-
OFFLINE: "offline",
|
|
43
|
-
/** 网络在线事件 */
|
|
44
|
-
ONLINE: "online"
|
|
45
|
-
};
|
|
46
17
|
|
|
47
|
-
export {
|
|
18
|
+
export { HTTP_STATUS_CODE };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LoginTypeEnum } from '../enums/login.enum';
|
|
2
|
+
/** 系统登录方式的 key 数组 */
|
|
3
|
+
export declare const SYSTEM_LOGIN_KEYS: LoginTypeEnum[];
|
|
4
|
+
/** 第三方登录方式的 key 数组 */
|
|
5
|
+
export declare const OTHER_LOGIN_KEYS: LoginTypeEnum[];
|
|
6
|
+
/**
|
|
7
|
+
* 根据登录类型 key 获取登录选项配置
|
|
8
|
+
* @param keys - 登录类型 key 数组
|
|
9
|
+
* @returns 包含登录选项信息的数组
|
|
10
|
+
*/
|
|
11
|
+
export declare const getLoginTypeOptions: (keys: string[]) => {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { LoginTypeEnum } from '../enums/login.enum.mjs';
|
|
2
|
+
|
|
3
|
+
const LOGIN_TYPE_INFO = {
|
|
4
|
+
[LoginTypeEnum.ACCOUNT]: {
|
|
5
|
+
icon: "icon-a-Accountnumber",
|
|
6
|
+
color: "#0E81EC"
|
|
7
|
+
},
|
|
8
|
+
[LoginTypeEnum.DOMAIN_ACCOUNT]: {
|
|
9
|
+
icon: "icon-a-Domainaccount",
|
|
10
|
+
color: "#FFAB06"
|
|
11
|
+
},
|
|
12
|
+
[LoginTypeEnum.MOBILE]: {
|
|
13
|
+
icon: "icon-a-Cellphone",
|
|
14
|
+
color: "#6A70FE"
|
|
15
|
+
},
|
|
16
|
+
[LoginTypeEnum.DINGDING]: {
|
|
17
|
+
icon: "DingdingIcon"
|
|
18
|
+
},
|
|
19
|
+
[LoginTypeEnum.FEISHU]: {
|
|
20
|
+
icon: "FeishuIcon"
|
|
21
|
+
},
|
|
22
|
+
[LoginTypeEnum.QIYEWEIXIN]: {
|
|
23
|
+
icon: "QiyeweixinIcon"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const SYSTEM_LOGIN_KEYS = [
|
|
27
|
+
LoginTypeEnum.ACCOUNT,
|
|
28
|
+
LoginTypeEnum.DOMAIN_ACCOUNT,
|
|
29
|
+
LoginTypeEnum.MOBILE
|
|
30
|
+
];
|
|
31
|
+
const OTHER_LOGIN_KEYS = [
|
|
32
|
+
LoginTypeEnum.DINGDING,
|
|
33
|
+
LoginTypeEnum.FEISHU,
|
|
34
|
+
LoginTypeEnum.QIYEWEIXIN
|
|
35
|
+
];
|
|
36
|
+
const getLoginTypeOptions = (keys) => {
|
|
37
|
+
if (!keys) {
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
return keys.map((key) => {
|
|
41
|
+
return {
|
|
42
|
+
id: key,
|
|
43
|
+
label: key,
|
|
44
|
+
value: key,
|
|
45
|
+
...LOGIN_TYPE_INFO[key]
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export { OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS, getLoginTypeOptions };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
const RELATION_FIELDS = [
|
|
2
|
+
{
|
|
3
|
+
label: "extString0_",
|
|
4
|
+
value: "ext0",
|
|
5
|
+
type: 1
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
label: "extString1_",
|
|
9
|
+
value: "ext1",
|
|
10
|
+
type: 1
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
label: "extString2_",
|
|
14
|
+
value: "ext2",
|
|
15
|
+
type: 1
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: "extString3_",
|
|
19
|
+
value: "ext3",
|
|
20
|
+
type: 1
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
label: "extString4_",
|
|
24
|
+
value: "ext4",
|
|
25
|
+
type: 1
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: "extInt5_",
|
|
29
|
+
value: "ext5",
|
|
30
|
+
type: 0
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "extInt6_",
|
|
34
|
+
value: "ext6",
|
|
35
|
+
type: 0
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: "extInt7_",
|
|
39
|
+
value: "ext7",
|
|
40
|
+
type: 0
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: "extInt8_",
|
|
44
|
+
value: "ext8",
|
|
45
|
+
type: 0
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: "extInt9_",
|
|
49
|
+
value: "ext9",
|
|
50
|
+
type: 0
|
|
51
|
+
}
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
export { RELATION_FIELDS };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 水印相关常量定义
|
|
3
|
+
*/
|
|
4
|
+
/** 水印初始化数据 */
|
|
5
|
+
export declare const WATERMARK_INIT_DATA: {
|
|
6
|
+
openWatermark: boolean;
|
|
7
|
+
watermarkContent: string;
|
|
8
|
+
fontSize: number;
|
|
9
|
+
color: string;
|
|
10
|
+
verticalAlign: string;
|
|
11
|
+
textAlign: string;
|
|
12
|
+
text: string;
|
|
13
|
+
transparent: number;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const WATERMARK_INIT_DATA = {
|
|
2
|
+
openWatermark: false,
|
|
3
|
+
watermarkContent: "custom",
|
|
4
|
+
fontSize: 16,
|
|
5
|
+
color: "#000000",
|
|
6
|
+
verticalAlign: "middle",
|
|
7
|
+
textAlign: "center",
|
|
8
|
+
text: "${username}",
|
|
9
|
+
transparent: 15,
|
|
10
|
+
width: 1600,
|
|
11
|
+
height: 1080
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { WATERMARK_INIT_DATA };
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 登录相关枚举定义
|
|
3
|
+
*/
|
|
1
4
|
/** 登录方式排序分类 */
|
|
2
5
|
export declare enum LoginSortTypeEnum {
|
|
3
6
|
/** 系统登录 */
|
|
@@ -20,10 +23,3 @@ export declare enum LoginTypeEnum {
|
|
|
20
23
|
/** 企业微信 */
|
|
21
24
|
QIYEWEIXIN = "QIYEWEIXIN"
|
|
22
25
|
}
|
|
23
|
-
export declare const SystemLoginKeys: LoginTypeEnum[];
|
|
24
|
-
export declare const OtherLoginKeys: LoginTypeEnum[];
|
|
25
|
-
export declare const getLoginTypeOptions: (keys: string[]) => {
|
|
26
|
-
id: string;
|
|
27
|
-
label: string;
|
|
28
|
-
value: string;
|
|
29
|
-
}[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var LoginSortTypeEnum = /* @__PURE__ */ ((LoginSortTypeEnum2) => {
|
|
2
|
+
LoginSortTypeEnum2["SYSTEM"] = "SYSTEM";
|
|
3
|
+
LoginSortTypeEnum2["THIRD_PARTY"] = "THIRD_PARTY";
|
|
4
|
+
return LoginSortTypeEnum2;
|
|
5
|
+
})(LoginSortTypeEnum || {});
|
|
6
|
+
var LoginTypeEnum = /* @__PURE__ */ ((LoginTypeEnum2) => {
|
|
7
|
+
LoginTypeEnum2["ACCOUNT"] = "ACCOUNT";
|
|
8
|
+
LoginTypeEnum2["DOMAIN_ACCOUNT"] = "DOMAIN_ACCOUNT";
|
|
9
|
+
LoginTypeEnum2["MOBILE"] = "MOBILE";
|
|
10
|
+
LoginTypeEnum2["DINGDING"] = "DINGDING";
|
|
11
|
+
LoginTypeEnum2["FEISHU"] = "FEISHU";
|
|
12
|
+
LoginTypeEnum2["QIYEWEIXIN"] = "QIYEWEIXIN";
|
|
13
|
+
return LoginTypeEnum2;
|
|
14
|
+
})(LoginTypeEnum || {});
|
|
15
|
+
|
|
16
|
+
export { LoginSortTypeEnum, LoginTypeEnum };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 平台设置相关枚举定义
|
|
3
|
+
*/
|
|
4
|
+
/** 平台设置配置类型枚举 */
|
|
5
|
+
export declare enum PlatformSettingEnum {
|
|
6
|
+
BASIC = "BASE_CFG",
|
|
7
|
+
WATERMARK = "MARK_CFG",
|
|
8
|
+
SECURITY = "SECURITY_CFG",
|
|
9
|
+
LOGIN = "LOGIN_CFG",
|
|
10
|
+
THEME = "THEME_CFG",
|
|
11
|
+
ORGANIZATION = "ORG_CFG",
|
|
12
|
+
APK = "APK_CFG",
|
|
13
|
+
DEPLOY = "DEPLOY_CFG",
|
|
14
|
+
GLOBAL = "GLOBAL_CFG"
|
|
15
|
+
}
|
|
16
|
+
/** 密码规则枚举 */
|
|
17
|
+
export declare enum PassRule {
|
|
18
|
+
NUMBER = "NUMBER",
|
|
19
|
+
LOWERCASE = "LOWERCASE",
|
|
20
|
+
UPPERCASE = "UPPERCASE",
|
|
21
|
+
SPECHARS = "SPECHARS"
|
|
22
|
+
}
|
|
23
|
+
/** 踢出用户规则枚举 */
|
|
24
|
+
export declare enum KickRuleEnum {
|
|
25
|
+
SAME_END = "SAME_END",
|
|
26
|
+
DIFFERENT_END = "DIFFERENT_END"
|
|
27
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
var PlatformSettingEnum = /* @__PURE__ */ ((PlatformSettingEnum2) => {
|
|
2
|
+
PlatformSettingEnum2["BASIC"] = "BASE_CFG";
|
|
3
|
+
PlatformSettingEnum2["WATERMARK"] = "MARK_CFG";
|
|
4
|
+
PlatformSettingEnum2["SECURITY"] = "SECURITY_CFG";
|
|
5
|
+
PlatformSettingEnum2["LOGIN"] = "LOGIN_CFG";
|
|
6
|
+
PlatformSettingEnum2["THEME"] = "THEME_CFG";
|
|
7
|
+
PlatformSettingEnum2["ORGANIZATION"] = "ORG_CFG";
|
|
8
|
+
PlatformSettingEnum2["APK"] = "APK_CFG";
|
|
9
|
+
PlatformSettingEnum2["DEPLOY"] = "DEPLOY_CFG";
|
|
10
|
+
PlatformSettingEnum2["GLOBAL"] = "GLOBAL_CFG";
|
|
11
|
+
return PlatformSettingEnum2;
|
|
12
|
+
})(PlatformSettingEnum || {});
|
|
13
|
+
var PassRule = /* @__PURE__ */ ((PassRule2) => {
|
|
14
|
+
PassRule2["NUMBER"] = "NUMBER";
|
|
15
|
+
PassRule2["LOWERCASE"] = "LOWERCASE";
|
|
16
|
+
PassRule2["UPPERCASE"] = "UPPERCASE";
|
|
17
|
+
PassRule2["SPECHARS"] = "SPECHARS";
|
|
18
|
+
return PassRule2;
|
|
19
|
+
})(PassRule || {});
|
|
20
|
+
var KickRuleEnum = /* @__PURE__ */ ((KickRuleEnum2) => {
|
|
21
|
+
KickRuleEnum2["SAME_END"] = "SAME_END";
|
|
22
|
+
KickRuleEnum2["DIFFERENT_END"] = "DIFFERENT_END";
|
|
23
|
+
return KickRuleEnum2;
|
|
24
|
+
})(KickRuleEnum || {});
|
|
25
|
+
|
|
26
|
+
export { KickRuleEnum, PassRule, PlatformSettingEnum };
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* @author chitanda
|
|
5
|
-
* @date 2025-08-21 09:08:33
|
|
6
|
-
* @export
|
|
7
|
-
* @class PlatformConfig
|
|
2
|
+
* 平台配置模块导出
|
|
3
|
+
* 统一导出所有公共 API:枚举、接口、常量、Composable、Store
|
|
8
4
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* @author chitanda
|
|
14
|
-
* @date 2025-08-21 09:08:40
|
|
15
|
-
* @returns {*} {Promise<void>}
|
|
16
|
-
*/
|
|
17
|
-
init(): Promise<void>;
|
|
18
|
-
}
|
|
19
|
-
export declare const platformConfig: PlatformConfig;
|
|
5
|
+
export * from './enums/index';
|
|
6
|
+
export * from './interfaces/index';
|
|
7
|
+
export * from './constants/index';
|
|
8
|
+
export { usePlatformConfigStore } from './store';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 登录配置接口定义
|
|
3
|
+
*/
|
|
4
|
+
/** 登录模式配置映射接口 */
|
|
5
|
+
export interface ILoginModeConfig {
|
|
6
|
+
address: string;
|
|
7
|
+
authType: string;
|
|
8
|
+
relationFields: string;
|
|
9
|
+
domainSuffix?: string;
|
|
10
|
+
}
|
|
11
|
+
/** 登录方法接口,定义登录选项的展示和标识信息 */
|
|
12
|
+
export interface ILoginMethods {
|
|
13
|
+
label: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
color?: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|