@gct-paas/core 0.1.4-dev.11 → 0.1.4-dev.13
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.js +4522 -0
- package/es/constants/core.mjs +5 -4
- package/es/constants/default-date-type/default-date-type.mjs +73 -21
- package/es/constants/editor-register/editor-register.mjs +17 -5
- package/es/constants/expression-type/BuiltOperators.mjs +152 -147
- package/es/constants/expression-type/FunctionKeys.mjs +75 -79
- package/es/constants/expression-type/editor.mjs +10 -3
- package/es/constants/expression-type/function.mjs +602 -613
- package/es/constants/expression-type/index.mjs +111 -113
- package/es/constants/expression-type/modeCfg.mjs +256 -263
- package/es/constants/expression-type/variable.mjs +43 -39
- package/es/constants/form-container-type/form-container-type.mjs +17 -5
- package/es/constants/index.d.ts +1 -0
- package/es/constants/index.mjs +31 -10
- package/es/constants/page-designer/model.mjs +15 -5
- package/es/constants/page-designer/regex.d.ts +2 -0
- package/es/constants/page-designer/regex.mjs +5 -0
- package/es/create-app-vue.mjs +15 -9
- package/es/enums/app-designer/index.d.ts +19 -0
- package/es/enums/app-designer/index.mjs +131 -63
- package/es/enums/appEnum.mjs +681 -360
- package/es/enums/appStateEnum.mjs +17 -10
- package/es/enums/authActionEnum.mjs +63 -51
- package/es/enums/breakpointEnum.mjs +27 -26
- package/es/enums/cacheEnum.mjs +22 -21
- package/es/enums/designEnum.mjs +110 -71
- package/es/enums/developer-center/integration.mjs +7 -6
- package/es/enums/exceptionEnum.mjs +21 -17
- package/es/enums/expressionEnum.d.ts +1 -1
- package/es/enums/expressionEnum.mjs +81 -74
- package/es/enums/globalEnum.mjs +59 -36
- package/es/enums/httpEnum.mjs +71 -61
- package/es/enums/index.mjs +44 -14
- package/es/enums/menuEnum.mjs +42 -38
- package/es/enums/page-designer/designer.mjs +403 -407
- package/es/enums/page-designer/index.d.ts +1 -0
- package/es/enums/page-designer/index.mjs +5 -0
- package/es/enums/page-designer/layout.d.ts +12 -0
- package/es/enums/page-designer/layout.mjs +17 -0
- package/es/enums/page-designer/panel.mjs +341 -213
- package/es/enums/page-designer/toolkit.mjs +13 -12
- package/es/enums/page-designer/widget.mjs +425 -338
- package/es/enums/pageEnum.mjs +14 -13
- package/es/enums/plugin-enum.mjs +23 -7
- package/es/enums/processEnum.mjs +95 -60
- package/es/enums/roleEnum.mjs +7 -6
- package/es/enums/sizeEnum.d.ts +18 -0
- package/es/enums/sizeEnum.mjs +28 -8
- package/es/global/gct/gct.mjs +84 -96
- package/es/global/index.mjs +1 -0
- package/es/hooks/index.mjs +4 -0
- package/es/hooks/use-app-inst/use-app-inst.mjs +11 -5
- package/es/hooks/use-modal/use-modal.mjs +16 -10
- package/es/hooks/use-sub-app-utils/use-sub-app-utils.mjs +43 -23
- package/es/hooks/useCopyToClipboard.mjs +50 -50
- package/es/index.mjs +125 -114
- package/es/interface/i-pinia-state/i-global-state.d.ts +0 -11
- package/es/locale/index.mjs +50 -57
- package/es/modules/env-manager/env-manager.const.mjs +16 -8
- package/es/modules/env-manager/env-manager.d.ts +2 -0
- package/es/modules/env-manager/env-manager.interface.d.ts +2 -0
- package/es/modules/env-manager/env-manager.interface.mjs +14 -7
- package/es/modules/env-manager/env-manager.mjs +108 -107
- package/es/modules/error-handler/error-handler.const.mjs +11 -16
- package/es/modules/error-handler/error-strategy.mjs +199 -175
- package/es/modules/error-handler/index.mjs +120 -106
- package/es/modules/mqtt/constants/mqtt.const.mjs +21 -24
- package/es/modules/mqtt/enums/mqtt-status.enum.mjs +23 -9
- package/es/modules/mqtt/index.mjs +4 -0
- package/es/modules/mqtt/mqtt-client.mjs +228 -261
- package/es/modules/mqtt/mqtt-manager.mjs +117 -77
- package/es/modules/platform-config/constants/index.mjs +4 -0
- package/es/modules/platform-config/constants/login.const.mjs +48 -45
- package/es/modules/platform-config/constants/org.const.mjs +57 -52
- package/es/modules/platform-config/constants/theme.const.mjs +11 -4
- package/es/modules/platform-config/constants/watermark.const.mjs +17 -12
- package/es/modules/platform-config/enums/deploy.enum.mjs +13 -6
- package/es/modules/platform-config/enums/login.enum.mjs +29 -15
- package/es/modules/platform-config/enums/platform.enum.mjs +16 -13
- package/es/modules/platform-config/index.mjs +9 -0
- package/es/modules/platform-config/store.mjs +68 -79
- package/es/modules/platform-config/useBasicSetting.mjs +47 -35
- package/es/modules/platform-config/useDeploySetting.mjs +29 -21
- package/es/modules/platform-config/useLoginSetting.mjs +151 -173
- package/es/modules/platform-config/useOrgSetting.mjs +63 -62
- package/es/modules/platform-config/useProjectSetting.mjs +14 -6
- package/es/modules/platform-config/useSecuritySetting.mjs +68 -56
- package/es/modules/platform-config/useThemeSetting.mjs +78 -59
- package/es/modules/platform-config/useWatermarkSetting.mjs +37 -23
- package/es/modules/user-stores/index.mjs +3 -0
- package/es/modules/user-stores/store/permission.store.mjs +27 -36
- package/es/modules/user-stores/store/tenant.store.mjs +20 -22
- package/es/modules/user-stores/store/user.store.mjs +94 -117
- package/es/router/index.mjs +25 -28
- package/es/setup-app.mjs +23 -39
- package/es/state/global-pinia-state/global-pinia-state.d.ts +0 -6
- package/es/state/global-pinia-state/global-pinia-state.mjs +43 -71
- package/es/state/index.mjs +1 -0
- package/es/store/global-store.mjs +50 -72
- package/es/store/index.mjs +25 -19
- package/es/types/index.d.ts +7 -0
- package/es/utils/axios/interceptors.mjs +21 -17
- package/es/utils/cache-adapter/cache-adapter.mjs +61 -56
- package/es/utils/css-loader/css-loader.d.ts +36 -0
- package/es/utils/css-loader/css-loader.mjs +82 -0
- package/es/utils/design/design.mjs +18 -12
- package/es/utils/deviceFingerprint.mjs +77 -63
- package/es/utils/dictionary/dictionary.mjs +142 -145
- package/es/utils/file/base64Conver.mjs +35 -30
- package/es/utils/file/download.mjs +94 -98
- package/es/utils/file/parser.d.ts +3 -0
- package/es/utils/file/parser.mjs +29 -0
- package/es/utils/i18n/index.mjs +14 -3
- package/es/utils/index.d.ts +3 -1
- package/es/utils/index.mjs +32 -0
- package/es/utils/is-sort-filed/is-sort-filed.mjs +42 -37
- package/es/utils/linked-list/linked-list.mjs +115 -118
- package/es/utils/linked-node/linked-node.mjs +41 -31
- package/es/utils/lowcode/utils.mjs +13 -18
- package/es/utils/lowcode/validate.mjs +20 -26
- package/es/utils/mitt/mitt.mjs +4 -4
- package/es/utils/model-loader/model-loader.mjs +280 -325
- package/es/utils/namespace/namespace.mjs +178 -164
- package/es/utils/openUtil/index.mjs +2 -0
- package/es/utils/openUtil/modal/modal.mjs +72 -79
- package/es/utils/openUtil/overlay-container/overlay-container.mjs +144 -138
- package/es/utils/permission.mjs +33 -37
- package/es/utils/plugin-static-resource/plugin-static-resource.mjs +46 -42
- package/es/utils/style/index.mjs +94 -138
- package/es/utils/tools/tools.mjs +86 -54
- package/es/utils/treeHelper/treeHelper.mjs +205 -233
- package/es/utils/uploader/uploader.mjs +81 -115
- package/es/utils/useUUid.mjs +79 -87
- package/es/utils/util.mjs +55 -35
- package/es/utils/uuid/uuid.d.ts +2 -0
- package/es/utils/uuid/uuid.mjs +33 -43
- package/es/utils/validate.mjs +15 -19
- package/es/utils/value-helper/value-helper.mjs +113 -98
- package/package.json +9 -18
- package/dist/index.esm.min.mjs +0 -18322
- package/dist/index.min.cjs +0 -393
- package/dist/index.system.min.js +0 -393
package/es/enums/pageEnum.mjs
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
//#region src/enums/pageEnum.ts
|
|
2
|
+
var PageEnum = /* @__PURE__ */ function(PageEnum) {
|
|
3
|
+
PageEnum["BASE_LOGIN"] = "/login";
|
|
4
|
+
PageEnum["BASE_TENANT"] = "/tenant";
|
|
5
|
+
PageEnum["BASE_HOME"] = "/home";
|
|
6
|
+
PageEnum["USER_CENTER"] = "/user-center";
|
|
7
|
+
PageEnum["PROCESS_CENTER"] = "/process";
|
|
8
|
+
PageEnum["MESSAGE_CENTER"] = "/message";
|
|
9
|
+
PageEnum["ERROR_PAGE"] = "/exception";
|
|
10
|
+
PageEnum["ERROR_LOG_PAGE"] = "/error-log/list";
|
|
11
|
+
PageEnum["USER_CENTER_PWD"] = "/user-center/password";
|
|
12
|
+
return PageEnum;
|
|
13
|
+
}({});
|
|
14
|
+
//#endregion
|
|
14
15
|
export { PageEnum };
|
package/es/enums/plugin-enum.mjs
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
//#region src/enums/plugin-enum.ts
|
|
2
|
+
/**
|
|
3
|
+
* 插件模式枚举
|
|
4
|
+
*
|
|
5
|
+
* @export
|
|
6
|
+
* @enum {number}
|
|
7
|
+
*/
|
|
8
|
+
var PluginModeEnum = /* @__PURE__ */ function(PluginModeEnum) {
|
|
9
|
+
/**
|
|
10
|
+
* 设计模式
|
|
11
|
+
*/
|
|
12
|
+
PluginModeEnum["DESIGN"] = "design";
|
|
13
|
+
/**
|
|
14
|
+
* 网页端绘制模式
|
|
15
|
+
*/
|
|
16
|
+
PluginModeEnum["WEB"] = "web";
|
|
17
|
+
/**
|
|
18
|
+
* 移动端绘制模式
|
|
19
|
+
*/
|
|
20
|
+
PluginModeEnum["MOBILE"] = "mobile";
|
|
21
|
+
return PluginModeEnum;
|
|
22
|
+
}({});
|
|
23
|
+
//#endregion
|
|
8
24
|
export { PluginModeEnum };
|
package/es/enums/processEnum.mjs
CHANGED
|
@@ -1,62 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
//#region src/enums/processEnum.ts
|
|
2
|
+
var ProcessStatusEnum = /* @__PURE__ */ function(ProcessStatusEnum) {
|
|
3
|
+
/** 审批中 */
|
|
4
|
+
ProcessStatusEnum["APPROVING"] = "APPROVING";
|
|
5
|
+
/** 已完成 */
|
|
6
|
+
ProcessStatusEnum["COMPLETED"] = "COMPLETED";
|
|
7
|
+
/** 已拒绝 */
|
|
8
|
+
ProcessStatusEnum["REFUSED"] = "REFUSED";
|
|
9
|
+
/** 已驳回 */
|
|
10
|
+
ProcessStatusEnum["REJECTED"] = "REJECTED";
|
|
11
|
+
/** 已终止 */
|
|
12
|
+
ProcessStatusEnum["TERMINATED"] = "TERMINATED";
|
|
13
|
+
/** 已撤回 */
|
|
14
|
+
ProcessStatusEnum["WITHDRAWN"] = "WITHDRAWN";
|
|
15
|
+
return ProcessStatusEnum;
|
|
16
|
+
}({});
|
|
17
|
+
var ch_ProcessStatusMap = {
|
|
18
|
+
[ProcessStatusEnum.APPROVING]: "sys.process.status.approving",
|
|
19
|
+
[ProcessStatusEnum.COMPLETED]: "sys.process.status.completed",
|
|
20
|
+
[ProcessStatusEnum.REFUSED]: "sys.process.status.refused",
|
|
21
|
+
[ProcessStatusEnum.REJECTED]: "sys.process.status.rejected",
|
|
22
|
+
[ProcessStatusEnum.TERMINATED]: "sys.process.status.terminated",
|
|
23
|
+
[ProcessStatusEnum.WITHDRAWN]: "sys.process.status.withdrawn"
|
|
17
24
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
25
|
+
/**审批状态 */
|
|
26
|
+
var ExamineAndApproveStateEnum = /* @__PURE__ */ function(ExamineAndApproveStateEnum) {
|
|
27
|
+
/**我的申请 */
|
|
28
|
+
ExamineAndApproveStateEnum["MY_APPLICATION"] = "myApplication";
|
|
29
|
+
/**我的代办 */
|
|
30
|
+
ExamineAndApproveStateEnum["MY_AGENT"] = "myAgent";
|
|
31
|
+
/**我的已办 */
|
|
32
|
+
ExamineAndApproveStateEnum["MY_DONE"] = "myDone";
|
|
33
|
+
/**我的自定义审批 */
|
|
34
|
+
ExamineAndApproveStateEnum["MY_CUSTOM"] = "myCustom";
|
|
35
|
+
/**我的自定义审批模态框 */
|
|
36
|
+
ExamineAndApproveStateEnum["MY_CUSTOM_Modal"] = "myCustomModal";
|
|
37
|
+
return ExamineAndApproveStateEnum;
|
|
38
|
+
}({});
|
|
39
|
+
/**
|
|
40
|
+
* tips: 增加枚举时同步后端增加,该值会作为变量运行在 bpmn 中
|
|
41
|
+
*/
|
|
42
|
+
var ButtonTypeEnum = /* @__PURE__ */ function(ButtonTypeEnum) {
|
|
43
|
+
/** 重新提交 */
|
|
44
|
+
ButtonTypeEnum["Resubmit"] = "Resubmit";
|
|
45
|
+
/** 终止 */
|
|
46
|
+
ButtonTypeEnum["End"] = "Terminate";
|
|
47
|
+
/** 撤回 */
|
|
48
|
+
ButtonTypeEnum["Withdraw"] = "Withdraw";
|
|
49
|
+
/** 同意 */
|
|
50
|
+
ButtonTypeEnum["Approve"] = "Approve";
|
|
51
|
+
/** 拒绝 */
|
|
52
|
+
ButtonTypeEnum["Refuse"] = "Refuse";
|
|
53
|
+
/** 转交 */
|
|
54
|
+
ButtonTypeEnum["Reassign"] = "Reassign";
|
|
55
|
+
/** 加签 */
|
|
56
|
+
ButtonTypeEnum["Countersign"] = "Countersign";
|
|
57
|
+
/** 驳回 */
|
|
58
|
+
ButtonTypeEnum["Reject"] = "Reject";
|
|
59
|
+
return ButtonTypeEnum;
|
|
60
|
+
}({});
|
|
61
|
+
/** 审批意见枚举 */
|
|
62
|
+
var OpinionTypeEnum = /* @__PURE__ */ function(OpinionTypeEnum) {
|
|
63
|
+
/** 全部必填 */
|
|
64
|
+
OpinionTypeEnum["Required"] = "Required";
|
|
65
|
+
/** 全部非必填 */
|
|
66
|
+
OpinionTypeEnum["Optional"] = "Optional";
|
|
67
|
+
/** 同意时必填 */
|
|
68
|
+
OpinionTypeEnum["ApproveRequired"] = "ApproveRequired";
|
|
69
|
+
/** 拒绝时必填 */
|
|
70
|
+
OpinionTypeEnum["RefuseRequired"] = "RefuseRequired";
|
|
71
|
+
/** 转交时必填 */
|
|
72
|
+
OpinionTypeEnum["ReassignRequired"] = "ReassignRequired";
|
|
73
|
+
/** 驳回时必填 */
|
|
74
|
+
OpinionTypeEnum["RejectRequired"] = "RejectRequired";
|
|
75
|
+
/** 加签时必填 */
|
|
76
|
+
OpinionTypeEnum["CountersignRequired"] = "CountersignRequired";
|
|
77
|
+
return OpinionTypeEnum;
|
|
78
|
+
}({});
|
|
79
|
+
/**
|
|
80
|
+
* bpmn节点类型
|
|
81
|
+
*/
|
|
82
|
+
var BpmnNodeTypeEnum = /* @__PURE__ */ function(BpmnNodeTypeEnum) {
|
|
83
|
+
BpmnNodeTypeEnum["BpmnStart"] = "bpmnStart";
|
|
84
|
+
BpmnNodeTypeEnum["BpmnSubmit"] = "bpmnSubmit";
|
|
85
|
+
BpmnNodeTypeEnum["BpmnApproval"] = "bpmnApproval";
|
|
86
|
+
BpmnNodeTypeEnum["BpmnEnd"] = "bpmnEnd";
|
|
87
|
+
BpmnNodeTypeEnum["BpmnExclusive"] = "bpmnExclusive";
|
|
88
|
+
BpmnNodeTypeEnum["BpmnJs"] = "bpmnJs";
|
|
89
|
+
BpmnNodeTypeEnum["BpmnMessage"] = "bpmnMessage";
|
|
90
|
+
BpmnNodeTypeEnum["BpmnParallel"] = "bpmnParallel";
|
|
91
|
+
BpmnNodeTypeEnum["BpmnJoin"] = "bpmnJoin";
|
|
92
|
+
BpmnNodeTypeEnum["BpmnForm"] = "bpmnForm";
|
|
93
|
+
BpmnNodeTypeEnum["BpmnBusiness"] = "bpmnBusiness";
|
|
94
|
+
return BpmnNodeTypeEnum;
|
|
95
|
+
}({});
|
|
96
|
+
//#endregion
|
|
62
97
|
export { BpmnNodeTypeEnum, ButtonTypeEnum, ExamineAndApproveStateEnum, OpinionTypeEnum, ProcessStatusEnum, ch_ProcessStatusMap };
|
package/es/enums/roleEnum.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
//#region src/enums/roleEnum.ts
|
|
2
|
+
var RoleEnum = /* @__PURE__ */ function(RoleEnum) {
|
|
3
|
+
RoleEnum["SUPER"] = "super";
|
|
4
|
+
RoleEnum["TEST"] = "test";
|
|
5
|
+
return RoleEnum;
|
|
6
|
+
}({});
|
|
7
|
+
//#endregion
|
|
7
8
|
export { RoleEnum };
|
package/es/enums/sizeEnum.d.ts
CHANGED
|
@@ -3,3 +3,21 @@ export declare enum SizeEnum {
|
|
|
3
3
|
SMALL = "small",
|
|
4
4
|
LARGE = "large"
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* 附件类型
|
|
8
|
+
*/
|
|
9
|
+
export declare enum UploadTypeEnum {
|
|
10
|
+
JPG = "jpg",
|
|
11
|
+
JPEG = "jpeg",
|
|
12
|
+
PNG = "png",
|
|
13
|
+
BMP = "bmp",
|
|
14
|
+
DOCX = "docx",
|
|
15
|
+
PDF = "pdf",
|
|
16
|
+
XLSX = "xlsx",
|
|
17
|
+
DOC = "doc",
|
|
18
|
+
MP4 = "mp4",
|
|
19
|
+
AVI = "avi",
|
|
20
|
+
PPT = "ppt",
|
|
21
|
+
GIF = "gif",
|
|
22
|
+
CER = "cer"
|
|
23
|
+
}
|
package/es/enums/sizeEnum.mjs
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
//#region src/enums/sizeEnum.ts
|
|
2
|
+
var SizeEnum = /* @__PURE__ */ function(SizeEnum) {
|
|
3
|
+
SizeEnum["DEFAULT"] = "default";
|
|
4
|
+
SizeEnum["SMALL"] = "small";
|
|
5
|
+
SizeEnum["LARGE"] = "large";
|
|
6
|
+
return SizeEnum;
|
|
7
|
+
}({});
|
|
8
|
+
/**
|
|
9
|
+
* 附件类型
|
|
10
|
+
*/
|
|
11
|
+
var UploadTypeEnum = /* @__PURE__ */ function(UploadTypeEnum) {
|
|
12
|
+
UploadTypeEnum["JPG"] = "jpg";
|
|
13
|
+
UploadTypeEnum["JPEG"] = "jpeg";
|
|
14
|
+
UploadTypeEnum["PNG"] = "png";
|
|
15
|
+
UploadTypeEnum["BMP"] = "bmp";
|
|
16
|
+
UploadTypeEnum["DOCX"] = "docx";
|
|
17
|
+
UploadTypeEnum["PDF"] = "pdf";
|
|
18
|
+
UploadTypeEnum["XLSX"] = "xlsx";
|
|
19
|
+
UploadTypeEnum["DOC"] = "doc";
|
|
20
|
+
UploadTypeEnum["MP4"] = "mp4";
|
|
21
|
+
UploadTypeEnum["AVI"] = "avi";
|
|
22
|
+
UploadTypeEnum["PPT"] = "ppt";
|
|
23
|
+
UploadTypeEnum["GIF"] = "gif";
|
|
24
|
+
UploadTypeEnum["CER"] = "cer";
|
|
25
|
+
return UploadTypeEnum;
|
|
26
|
+
}({});
|
|
27
|
+
//#endregion
|
|
28
|
+
export { SizeEnum, UploadTypeEnum };
|
package/es/global/gct/gct.mjs
CHANGED
|
@@ -1,97 +1,85 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* 异步初始化一些内容,在 createApp 之前调用
|
|
86
|
-
*
|
|
87
|
-
* @author chitanda
|
|
88
|
-
* @date 2025-08-20 16:08:12
|
|
89
|
-
* @returns {*} {Promise<void>}
|
|
90
|
-
*/
|
|
91
|
-
async init() {
|
|
92
|
-
await this.env.checkIsTestEnv();
|
|
93
|
-
await this.store.init();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
1
|
+
import { DictionaryUtil } from "../../utils/dictionary/dictionary.mjs";
|
|
2
|
+
import "../../utils/index.mjs";
|
|
3
|
+
import { GlobalStoreUtil } from "../../store/index.mjs";
|
|
4
|
+
import { EnvironmentManager } from "../../modules/env-manager/env-manager.mjs";
|
|
5
|
+
import { MqttManager } from "../../modules/mqtt/mqtt-manager.mjs";
|
|
6
|
+
import "../../modules/mqtt/index.mjs";
|
|
7
|
+
import { LocaleUtil } from "../../locale/index.mjs";
|
|
8
|
+
import { RouterUtil } from "../../router/index.mjs";
|
|
9
|
+
//#region src/global/gct/gct.ts
|
|
10
|
+
/**
|
|
11
|
+
* gct paas 平台全局对象
|
|
12
|
+
*
|
|
13
|
+
* @export
|
|
14
|
+
* @class GctGlobal
|
|
15
|
+
*/
|
|
16
|
+
var GctGlobal = class {
|
|
17
|
+
/**
|
|
18
|
+
* i18n 工具类
|
|
19
|
+
*/
|
|
20
|
+
i18nUtil = new LocaleUtil();
|
|
21
|
+
/**
|
|
22
|
+
* i18n 实例
|
|
23
|
+
*
|
|
24
|
+
* @description 目前底包的实例化只是为了避免报错,需要由主项目实例化后挂载
|
|
25
|
+
* @type {I18n}
|
|
26
|
+
*/
|
|
27
|
+
i18n = this.i18nUtil.i18n;
|
|
28
|
+
/**
|
|
29
|
+
* 全局 store 工具类
|
|
30
|
+
*/
|
|
31
|
+
storeUtil = new GlobalStoreUtil();
|
|
32
|
+
/**
|
|
33
|
+
* 全局 store 实例
|
|
34
|
+
*/
|
|
35
|
+
store = this.storeUtil.store;
|
|
36
|
+
/**
|
|
37
|
+
* 全局 router 工具类
|
|
38
|
+
*/
|
|
39
|
+
routerUtil = new RouterUtil();
|
|
40
|
+
router = this.routerUtil.router;
|
|
41
|
+
/**
|
|
42
|
+
* 消息提示工具类(预览、移动、网页,需要分别实现)
|
|
43
|
+
*
|
|
44
|
+
* @type {IMessageUtil}
|
|
45
|
+
*/
|
|
46
|
+
message;
|
|
47
|
+
/**
|
|
48
|
+
* 全局数据字典工具类
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
dictionary = new DictionaryUtil();
|
|
52
|
+
/**
|
|
53
|
+
* 环境管理器
|
|
54
|
+
*/
|
|
55
|
+
env = new EnvironmentManager();
|
|
56
|
+
/**
|
|
57
|
+
* MQTT 实例管理中心
|
|
58
|
+
*
|
|
59
|
+
* @description 管理多个 MQTT 客户端实例的生命周期,支持多实例连接、订阅、发布
|
|
60
|
+
*/
|
|
61
|
+
mqtt = new MqttManager();
|
|
62
|
+
/**
|
|
63
|
+
* 综合性注册中心
|
|
64
|
+
*/
|
|
65
|
+
register = {};
|
|
66
|
+
/**
|
|
67
|
+
* 全局呈现容器控制器,这里只是声明了类型,具体实例需要由主项目根据实际情况进行实现和挂载
|
|
68
|
+
*
|
|
69
|
+
* @type {IOverlayController}
|
|
70
|
+
*/
|
|
71
|
+
openUtil;
|
|
72
|
+
/**
|
|
73
|
+
* 异步初始化一些内容,在 createApp 之前调用
|
|
74
|
+
*
|
|
75
|
+
* @author chitanda
|
|
76
|
+
* @date 2025-08-20 16:08:12
|
|
77
|
+
* @returns {*} {Promise<void>}
|
|
78
|
+
*/
|
|
79
|
+
async init() {
|
|
80
|
+
await this.env.checkIsTestEnv();
|
|
81
|
+
await this.store.init();
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
97
85
|
export { GctGlobal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./gct/gct.mjs";
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { APP_INST } from "../../constants/index.mjs";
|
|
2
|
+
import { inject } from "vue";
|
|
3
|
+
//#region src/hooks/use-app-inst/use-app-inst.ts
|
|
4
|
+
/**
|
|
5
|
+
* 获取当前绘制界面Vue应用实例
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @returns {*} {App}
|
|
9
|
+
*/
|
|
4
10
|
function useAppInst() {
|
|
5
|
-
|
|
11
|
+
return inject(APP_INST);
|
|
6
12
|
}
|
|
7
|
-
|
|
13
|
+
//#endregion
|
|
8
14
|
export { useAppInst };
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { inject } from
|
|
2
|
-
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
//#region src/hooks/use-modal/use-modal.ts
|
|
3
|
+
/**
|
|
4
|
+
* 获取模态打开时的模态实例
|
|
5
|
+
*
|
|
6
|
+
* @author zhanghanrui
|
|
7
|
+
* @date 2024-04-02 23:04:32
|
|
8
|
+
* @export
|
|
9
|
+
* @return {*} {IModal}
|
|
10
|
+
*/
|
|
3
11
|
function useModal(ok) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return modal;
|
|
12
|
+
const modal = inject("modal");
|
|
13
|
+
if (modal) {
|
|
14
|
+
if (ok) modal.ok = ok;
|
|
15
|
+
}
|
|
16
|
+
return modal;
|
|
11
17
|
}
|
|
12
|
-
|
|
18
|
+
//#endregion
|
|
13
19
|
export { useModal };
|
|
@@ -1,30 +1,50 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { computed, onMounted, onUnmounted, shallowRef } from "vue";
|
|
2
|
+
//#region src/hooks/use-sub-app-utils/use-sub-app-utils.ts
|
|
3
|
+
/**
|
|
4
|
+
* 获取 IFrame 通信的 props
|
|
5
|
+
*
|
|
6
|
+
* @author chitanda
|
|
7
|
+
* @date 2025-09-22 09:09:22
|
|
8
|
+
* @export
|
|
9
|
+
* @template T
|
|
10
|
+
* @returns {*} {ComputedRef<T>}
|
|
11
|
+
*/
|
|
3
12
|
function useIFrameProps() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
});
|
|
17
|
-
return computed(() => props.value);
|
|
13
|
+
const props = shallowRef({});
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
const handleMessage = (event) => {
|
|
16
|
+
if (event.data?.type === "IFRAME_PROPS") props.value = event.data.props;
|
|
17
|
+
};
|
|
18
|
+
window.addEventListener("message", handleMessage);
|
|
19
|
+
window.parent.postMessage({ type: "IFRAME_READY" }, "*");
|
|
20
|
+
onUnmounted(() => {
|
|
21
|
+
window.removeEventListener("message", handleMessage);
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
return computed(() => props.value);
|
|
18
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* 获取 WuJie 输入的 props
|
|
28
|
+
*
|
|
29
|
+
* @export
|
|
30
|
+
* @template T
|
|
31
|
+
* @return {*} {ComputedRef<T>}
|
|
32
|
+
*/
|
|
19
33
|
function useWuJieProps() {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
return computed(() => {
|
|
35
|
+
return window.$wujie?.props || {};
|
|
36
|
+
});
|
|
23
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* 获取 WuJie 的事件总线
|
|
40
|
+
*
|
|
41
|
+
* @export
|
|
42
|
+
* @return {*} {(ComputedRef<EventBus | undefined>)}
|
|
43
|
+
*/
|
|
24
44
|
function useWuJieBus() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
45
|
+
return computed(() => {
|
|
46
|
+
return window.$wujie?.bus;
|
|
47
|
+
});
|
|
28
48
|
}
|
|
29
|
-
|
|
49
|
+
//#endregion
|
|
30
50
|
export { useIFrameProps, useWuJieBus, useWuJieProps };
|