@gct-paas/core 6.0.0-dev.9 → 6.0.3-dev.1
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 +2 -2
- package/dist/{redirect-index-60183YGE.js → redirect-index-DZUQbzHI.js} +1 -1
- package/es/constants/default-date-type/default-date-type.d.ts +4 -0
- package/es/constants/default-date-type/default-date-type.mjs +4 -0
- package/es/constants/expression-type/FunctionKeys.mjs +5 -0
- package/es/constants/expression-type/function.mjs +44 -1
- package/es/constants/expression-type/index.mjs +3 -0
- package/es/constants/expression-type/modeCfg.mjs +4 -2
- package/es/enums/designEnum.mjs +2 -1
- package/es/enums/page-designer/layout.d.ts +6 -0
- package/es/enums/page-designer/layout.mjs +8 -1
- package/es/enums/page-designer/panel.d.ts +4 -2
- package/es/enums/page-designer/panel.mjs +3 -1
- package/es/global/gct/gct.d.ts +4 -1
- package/es/global/gct/gct.mjs +1 -0
- package/es/index.mjs +3 -3
- package/es/interface/i-kit-plugin-module/i-kit-plugin-module.d.ts +2 -1
- package/es/locale/index.mjs +5 -1
- package/es/modules/env-manager/env-manager.d.ts +1 -0
- package/es/modules/env-manager/env-manager.interface.d.ts +6 -0
- package/es/modules/env-manager/env-manager.mjs +9 -0
- package/es/modules/mqtt/mqtt-manager.d.ts +1 -1
- package/es/modules/mqtt/mqtt-manager.mjs +3 -2
- package/es/modules/mqtt/utils/mqtt-broker-url.util.d.ts +6 -0
- package/es/modules/mqtt/utils/mqtt-broker-url.util.mjs +11 -0
- package/es/modules/platform-config/enums/platform.enum.d.ts +4 -0
- package/es/modules/platform-config/enums/platform.enum.mjs +6 -1
- package/es/modules/platform-config/store.d.ts +4 -1
- package/es/modules/platform-config/useSecuritySetting.d.ts +1 -0
- package/es/modules/platform-config/useSecuritySetting.mjs +11 -0
- package/es/modules/user-stores/store/user.store.d.ts +4 -0
- package/es/setup-app.mjs +6 -0
- package/es/types/index.d.ts +4 -17
- package/es/utils/axios/interceptors.mjs +33 -3
- package/es/utils/kit-pkg-util/kit-pkg-util.d.ts +4 -0
- package/es/utils/kit-pkg-util/kit-pkg-util.mjs +13 -2
- package/es/utils/openUtil/overlay-container/overlay-container.mjs +5 -0
- package/es/utils/tools/tools.d.ts +2 -0
- package/es/utils/tools/tools.mjs +8 -4
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/core v6.0.
|
|
1
|
+
/*! @gct-paas/core v6.0.3-dev.0 */
|
|
2
2
|
import{createElementBlock as e,defineComponent as r,openBlock as t,unref as a}from"vue";import{useRouter as p}from"vue-router";var o=/* @__PURE__ */r({__name:"redirect-index",setup(r){const{currentRoute:o,replace:i}=p(),{params:s,query:u}=a(o),{path:m,_redirect_type:n="path"}=s;Reflect.deleteProperty(s,"_redirect_type"),Reflect.deleteProperty(s,"path");const c=Array.isArray(m)?m.join("/"):m;return i("name"===n?{name:c,query:u,params:JSON.parse(s._origin_params??"{}")}:{path:c.startsWith("/")?c:"/"+c,query:u}),(r,a)=>(t(),e("div"))}});export{o as default};
|
|
@@ -21,6 +21,10 @@ var DefaultDateTypeConst = /* @__PURE__ */ function(DefaultDateTypeConst) {
|
|
|
21
21
|
*/
|
|
22
22
|
DefaultDateTypeConst["PastDays"] = "past-days";
|
|
23
23
|
/**
|
|
24
|
+
* 未来N天
|
|
25
|
+
*/
|
|
26
|
+
DefaultDateTypeConst["FutureDays"] = "future-days";
|
|
27
|
+
/**
|
|
24
28
|
* 本周
|
|
25
29
|
*/
|
|
26
30
|
DefaultDateTypeConst["ThisWeek"] = "this-week";
|
|
@@ -43,10 +43,13 @@ var FUNC_KEYS = [
|
|
|
43
43
|
"MOD",
|
|
44
44
|
"POWER",
|
|
45
45
|
"SQRT",
|
|
46
|
+
"EXP",
|
|
47
|
+
"LN",
|
|
46
48
|
"SUMSQ",
|
|
47
49
|
"STDEV",
|
|
48
50
|
"RSQ",
|
|
49
51
|
"MAXABS",
|
|
52
|
+
"BANKROUND",
|
|
50
53
|
"TUPLE",
|
|
51
54
|
"SEQMAP",
|
|
52
55
|
"GET",
|
|
@@ -57,6 +60,8 @@ var FUNC_KEYS = [
|
|
|
57
60
|
"TIMESTAMP2DATE",
|
|
58
61
|
"DATE2TIMESTAMP",
|
|
59
62
|
"DATEFORMAT",
|
|
63
|
+
"DateAdd",
|
|
64
|
+
"DateSubtract",
|
|
60
65
|
"NOW",
|
|
61
66
|
"TODAY",
|
|
62
67
|
"YEAR",
|
|
@@ -364,6 +364,24 @@ POWER(4, 2) 返回 16`,
|
|
|
364
364
|
SQRT(4) 返回 2`,
|
|
365
365
|
definition: "declare function SQRT(v: number): Promise<number>;"
|
|
366
366
|
},
|
|
367
|
+
{
|
|
368
|
+
desc: `EXP(value)
|
|
369
|
+
获取以自然常数e为底、数值value为指数的幂,返回数值
|
|
370
|
+
参数必须为Number类型
|
|
371
|
+
示例
|
|
372
|
+
EXP(1) 返回 2.718281828459045
|
|
373
|
+
EXP(2) 返回 7.38905609893065`,
|
|
374
|
+
definition: "declare function EXP(v: number): Promise<number>;"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
desc: `LN(value)
|
|
378
|
+
获取数值value的自然对数(以自然常数 e 为底),返回数值
|
|
379
|
+
参数必须为Number类型,且value需大于0
|
|
380
|
+
示例
|
|
381
|
+
LN(2.718281828459045) 返回 1
|
|
382
|
+
LN(1) 返回 0`,
|
|
383
|
+
definition: "declare function LN(v: number): Promise<number>;"
|
|
384
|
+
},
|
|
367
385
|
{
|
|
368
386
|
desc: `SUMSQ
|
|
369
387
|
SUMSQ(数字1, 数字2, ...) 计算一组数值的平方和。
|
|
@@ -397,6 +415,13 @@ RSQ([1], [2]) 返回 空`,
|
|
|
397
415
|
示例
|
|
398
416
|
MAXABS(-2, -6, -4)=-6`,
|
|
399
417
|
definition: "declare function MAXABS(...args: number[]): Promise<number>;"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
desc: `BANKROUND
|
|
421
|
+
BANKROUND(数值,保留小数位数)按四舍六入五成双规则修约,5 遇奇进、遇偶舍。
|
|
422
|
+
示例
|
|
423
|
+
BANKROUND(2.345, 2) = 2.34`,
|
|
424
|
+
definition: "declare function BANKROUND(v: number, n: number): Promise<number>;"
|
|
400
425
|
}
|
|
401
426
|
]
|
|
402
427
|
},
|
|
@@ -587,12 +612,30 @@ ISDATERANGE(NOW(), WEEKRANGE()) 返回 true`,
|
|
|
587
612
|
ISTIMERANGE(DATEFORMAT(NOW(), HH:mm), ['06:00', '12:00']) 返回 true
|
|
588
613
|
ISTIMERANGE(DATEFORMAT(NOW(), HH:mm), ['13:00', '07:00']) 返回 true `,
|
|
589
614
|
definition: "declare function ISTIMERANGE(v: string, r: [string, string]): Promise<boolean>;"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
desc: `DateAdd(date, num, unit, format?)
|
|
618
|
+
给初始日期增加一个给定的时间量,比如可以推算某天后3个月的日期
|
|
619
|
+
参数 date: 原始日期,num: 数量,unit: 单位(year/month/week/day/hour/minute/second),format: 输出格式(可选,默认 YYYY-MM-DD HH:mm:ss)
|
|
620
|
+
示例
|
|
621
|
+
DateAdd('2024-01-01', 3, 'month') 返回 2024-04-01 00:00:00
|
|
622
|
+
DateAdd('2024-01-01', 3, 'month', 'YYYY-MM-DD') 返回 2024-04-01`,
|
|
623
|
+
definition: "declare function DateAdd(v: string, num: number, unit: string, format?: string): Promise<string>;"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
desc: `DateSubtract(date, num, unit, format?)
|
|
627
|
+
给初始日期减少一个给定的时间量,比如可以推算某天前3个月的日期
|
|
628
|
+
参数 date: 原始日期,num: 数量,unit: 单位(year/month/week/day/hour/minute/second),format: 输出格式(可选,默认 YYYY-MM-DD HH:mm:ss)
|
|
629
|
+
示例
|
|
630
|
+
DateSubtract('2024-04-01', 3, 'month') 返回 2024-01-01 00:00:00
|
|
631
|
+
DateSubtract('2024-04-01', 3, 'month', 'YYYY-MM-DD') 返回 2024-01-01`,
|
|
632
|
+
definition: "declare function DateSubtract(v: string, num: number, unit: string, format?: string): Promise<string>;"
|
|
590
633
|
}
|
|
591
634
|
]
|
|
592
635
|
}
|
|
593
636
|
].map((group) => {
|
|
594
637
|
group.children = (group.children ?? []).map((item) => {
|
|
595
|
-
const id = item.definition.match(/(?<=declare function )([A-
|
|
638
|
+
const id = item.definition.match(/(?<=declare function )([A-Za-z][A-Za-z0-9]*)/g)?.[0] ?? "UNKNOWN";
|
|
596
639
|
const args = (item.definition.match(/([a-z]:)+/g) || []).length;
|
|
597
640
|
Object.assign(item, {
|
|
598
641
|
id,
|
|
@@ -94,7 +94,8 @@ var ModeFnMap = {
|
|
|
94
94
|
"SEQMAP",
|
|
95
95
|
"SUMSQ",
|
|
96
96
|
"RSQ",
|
|
97
|
-
"MAXABS"
|
|
97
|
+
"MAXABS",
|
|
98
|
+
"BANKROUND"
|
|
98
99
|
],
|
|
99
100
|
[ExpressionModeEnum.LABEL_PRINT]: [
|
|
100
101
|
"IF",
|
|
@@ -137,7 +138,8 @@ var ModeFnMap = {
|
|
|
137
138
|
"SEQMAP",
|
|
138
139
|
"SUMSQ",
|
|
139
140
|
"RSQ",
|
|
140
|
-
"MAXABS"
|
|
141
|
+
"MAXABS",
|
|
142
|
+
"BANKROUND"
|
|
141
143
|
]
|
|
142
144
|
};
|
|
143
145
|
/**
|
package/es/enums/designEnum.mjs
CHANGED
|
@@ -67,7 +67,8 @@ var notSingleArr = [
|
|
|
67
67
|
SEARCH_SERVICE.NOTIN,
|
|
68
68
|
SEARCH_SERVICE.CONTAINANY,
|
|
69
69
|
SEARCH_SERVICE.CONTAINALL,
|
|
70
|
-
SEARCH_SERVICE.VERSIONIN
|
|
70
|
+
SEARCH_SERVICE.VERSIONIN,
|
|
71
|
+
SEARCH_SERVICE.VERSIONNOTIN
|
|
71
72
|
];
|
|
72
73
|
/**设计页面对齐方式 */
|
|
73
74
|
var AGLINE_ENUMS = /* @__PURE__ */ function(AGLINE_ENUMS) {
|
|
@@ -20,5 +20,12 @@ var ContextSceneEnum = /* @__PURE__ */ function(ContextSceneEnum) {
|
|
|
20
20
|
ContextSceneEnum["DETAIL"] = "detail";
|
|
21
21
|
return ContextSceneEnum;
|
|
22
22
|
}({});
|
|
23
|
+
var ContextTxnPageModeEnum = /* @__PURE__ */ function(ContextTxnPageModeEnum) {
|
|
24
|
+
/** 创建 */
|
|
25
|
+
ContextTxnPageModeEnum["CREATE"] = "create";
|
|
26
|
+
/** 详情 */
|
|
27
|
+
ContextTxnPageModeEnum["DETAIL"] = "detail";
|
|
28
|
+
return ContextTxnPageModeEnum;
|
|
29
|
+
}({});
|
|
23
30
|
//#endregion
|
|
24
|
-
export { ContextSceneEnum, FormDesignEnum, PrintTypeEnum };
|
|
31
|
+
export { ContextSceneEnum, ContextTxnPageModeEnum, FormDesignEnum, PrintTypeEnum };
|
|
@@ -297,8 +297,10 @@ export declare enum VERIFICATIONCONDITIONS_TYPE {
|
|
|
297
297
|
export declare enum ASSIGNMENTSTRATEGY_ENUM {
|
|
298
298
|
/**始终覆盖 */
|
|
299
299
|
alwaysCover = "alwaysCover",
|
|
300
|
-
|
|
301
|
-
notCovered = "notCovered"
|
|
300
|
+
/**不覆盖已修改(本次编辑有效) */
|
|
301
|
+
notCovered = "notCovered",
|
|
302
|
+
/**不覆盖已修改(永久有效) */
|
|
303
|
+
notCoveredForever = "notCoveredForever"
|
|
302
304
|
}
|
|
303
305
|
/**组件依赖枚举 */
|
|
304
306
|
export declare enum Dependency_ENUM {
|
|
@@ -319,8 +319,10 @@ var VERIFICATIONCONDITIONS_TYPE = /* @__PURE__ */ function(VERIFICATIONCONDITION
|
|
|
319
319
|
var ASSIGNMENTSTRATEGY_ENUM = /* @__PURE__ */ function(ASSIGNMENTSTRATEGY_ENUM) {
|
|
320
320
|
/**始终覆盖 */
|
|
321
321
|
ASSIGNMENTSTRATEGY_ENUM["alwaysCover"] = "alwaysCover";
|
|
322
|
-
|
|
322
|
+
/**不覆盖已修改(本次编辑有效) */
|
|
323
323
|
ASSIGNMENTSTRATEGY_ENUM["notCovered"] = "notCovered";
|
|
324
|
+
/**不覆盖已修改(永久有效) */
|
|
325
|
+
ASSIGNMENTSTRATEGY_ENUM["notCoveredForever"] = "notCoveredForever";
|
|
324
326
|
return ASSIGNMENTSTRATEGY_ENUM;
|
|
325
327
|
}({});
|
|
326
328
|
/**组件依赖枚举 */
|
package/es/global/gct/gct.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ export declare class GctGlobal {
|
|
|
86
86
|
value: string;
|
|
87
87
|
}[]>;
|
|
88
88
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
89
|
+
isSupportCardSign: () => boolean | undefined;
|
|
89
90
|
postSecuritySetting: () => Promise<void>;
|
|
90
91
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
91
92
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -159,6 +160,7 @@ export declare class GctGlobal {
|
|
|
159
160
|
value: string;
|
|
160
161
|
}[]>;
|
|
161
162
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
163
|
+
isSupportCardSign: () => boolean | undefined;
|
|
162
164
|
postSecuritySetting: () => Promise<void>;
|
|
163
165
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
164
166
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -232,6 +234,7 @@ export declare class GctGlobal {
|
|
|
232
234
|
value: string;
|
|
233
235
|
}[]>;
|
|
234
236
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
237
|
+
isSupportCardSign: () => boolean | undefined;
|
|
235
238
|
postSecuritySetting: () => Promise<void>;
|
|
236
239
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
237
240
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -261,7 +264,7 @@ export declare class GctGlobal {
|
|
|
261
264
|
setProjectConfig: (config: {}) => void;
|
|
262
265
|
init: () => Promise<void>;
|
|
263
266
|
renderInit: () => Promise<void>;
|
|
264
|
-
}, "getSignWay" | "init" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
267
|
+
}, "getSignWay" | "init" | "isSupportCardSign" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
265
268
|
/**
|
|
266
269
|
* 全局 router 工具类
|
|
267
270
|
*/
|
package/es/global/gct/gct.mjs
CHANGED
package/es/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, Di
|
|
|
4
4
|
import { ToolkitEnum } from "./enums/page-designer/toolkit.mjs";
|
|
5
5
|
import { BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonSize, ButtonStyle, ButtonType, ButtonTypeGroup, ButtonType_vant, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CategoryTypeEnum, DatasourceTypeEnum, DateRangeEnums, DisplayEnums, KeyMode, ListTreeSearchTypeEnum, Platform, PrintModeEnums, ResetRuleType, RowSelectionTypeEnums, SelectPickerEnums, SignatureStyleEnum, SignatureTypeEnum, StatisticalMethodEnums, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TransactionMode, WidgetInScopeEnum, openWindowEnums, operateSysEnums } from "./enums/page-designer/widget.mjs";
|
|
6
6
|
import { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SCOPEINFO, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, mobileSearchListByFieldType, padSearchListByFieldType, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from "./enums/page-designer/designer.mjs";
|
|
7
|
-
import { ContextSceneEnum, FormDesignEnum, PrintTypeEnum } from "./enums/page-designer/layout.mjs";
|
|
7
|
+
import { ContextSceneEnum, ContextTxnPageModeEnum, FormDesignEnum, PrintTypeEnum } from "./enums/page-designer/layout.mjs";
|
|
8
8
|
import { PrintFormatEnum, PrintResourceEnum } from "./enums/developer-center/integration.mjs";
|
|
9
9
|
import { AppPublishStateEnum } from "./enums/appStateEnum.mjs";
|
|
10
10
|
import { BasicAction, CustomAction, DefaultActions, PlatformSettingActions } from "./enums/authActionEnum.mjs";
|
|
@@ -85,7 +85,7 @@ import "./utils/index.mjs";
|
|
|
85
85
|
import { EnvironmentType } from "./modules/env-manager/env-manager.interface.mjs";
|
|
86
86
|
import { normalizeEnv } from "./modules/env-manager/env-manager.util.mjs";
|
|
87
87
|
import { LoginSortTypeEnum, LoginTypeEnum } from "./modules/platform-config/enums/login.enum.mjs";
|
|
88
|
-
import { KickRuleEnum, PassRule } from "./modules/platform-config/enums/platform.enum.mjs";
|
|
88
|
+
import { KickRuleEnum, PassRule, SecuritySignMethodEnum } from "./modules/platform-config/enums/platform.enum.mjs";
|
|
89
89
|
import { DeployModeEnum } from "./modules/platform-config/enums/deploy.enum.mjs";
|
|
90
90
|
import { OTHER_LOGIN_KEYS, SYSTEM_LOGIN_KEYS, getLoginTypeOptions } from "./modules/platform-config/constants/login.const.mjs";
|
|
91
91
|
import { RELATION_FIELDS } from "./modules/platform-config/constants/org.const.mjs";
|
|
@@ -162,4 +162,4 @@ function onInit() {
|
|
|
162
162
|
}
|
|
163
163
|
onInit();
|
|
164
164
|
//#endregion
|
|
165
|
-
export { AGLINE_ENUMS, APP_DARK_MODE_KEY_, APP_INST, APP_LOCAL_CACHE_KEY, APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, APP_SESSION_CACHE_KEY, ARRAY_TYPE, ASSIGNMENTSTRATEGY_ENUM, AggTypes, AppPublishStateEnum, AuthUtil, BOOLEAN_TYPE, BasicAction, BindCmpStyleEnum, BindCmpStyleTypeEnum, BizServiceEnum, BorderStyle, BpmnNodeTypeEnum, BuiltOperators, BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonOpeEnum, ButtonSize, ButtonStyle, ButtonType, ButtonTypeEnum, ButtonTypeGroup, ButtonType_vant, CARD_TRIGGER_ENUM, COLUMNS_TYPE, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CUSTOM_LANGUAGE, CUSTOM_THEME, CacheTypeEnum, CategoryModuleEnum, CategoryTypeEnum, Ch_BindCmpStyleEnum, ContentEnum, ContentTypeEnum, ContextSceneEnum, CoreConst, CreateType, CustomAction, DEFAULT_MQTT_INSTANCE_ID, DESIGNER_SESSION_CACHE_KEY, DEV_SINGLE_PATH_REG, DYN_FORMAT_TYPE_ENUM, DataSetReturnTypeEnum, DatasourceTypeEnum, DateRangeEnums, DefaultActions, DefaultDateTypeConst, Dependency_ENUM, DeployModeEnum, DeviceParamsTypeEnum, DictionaryUtil, DisplayEnums, DisplayTagTypeEnum, DisplayType, DynFormatTypes, ENV, EditorRegisterConst, EntityFormulaReturnTypeEnum, EntityModelCategoryEnum, EntityModelTypeEnum, EnvironmentManager, EnvironmentType, ErrorHandler, ErrorStrategyFactory, ErrorTypeEnum, EventCategory, EventsTypeEnum, ExamineAndApproveStateEnum, ExceptionEnum, ExpressionModeEnum, ExpressionTabEnum, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FUNC_KEYS, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, FieldDefaultValueTypeEnum, FieldIconMap, FieldSysVarDefaultValueEnum, FieldTypeToJs, FormComponents, FormContainerType, FormDesignEnum, GENDER_TYPE, GLOBAL_TYPE, GLOBAL_VAR_TYPE, GctGlobal, GctMqttTopsEnum, GlobalParamEnum, GlobalStoreUtil, HOST_REG, INNER_EVENT, IP_REG, IdentifierAddon, KeyMode, KickRuleEnum, KitPkgUtil, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, LinkedList, LinkedNode, ListTreeSearchTypeEnum, LocaleUtil, LoginSortTypeEnum, LoginTypeEnum, LogoTypeEnum, MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, MQTT_CLIENT_EVENT, MQTT_DEFAULT_CONNECT_OPTIONS, MULTIPLE_TABS_KEY, MaterialEnum, MenuModeEnum, MenuSplitTyeEnum, MenuType, MenuTypeEnum, MessageType, MixSidebarTriggerEnum, Modal, ModeFnMap, ModeTabDict, ModeTabMap, ModelFieldEnum, ModelTypeEnum, ModelTypeOptions, MqttClient, MqttConnectionStatus, MqttManager, NUMBER_TYPE, Namespace, NodesConfigTypeEnum, OBJECT_TYPE, OTHER_LOGIN_KEYS, OpenMode, OperatorTypeEnum, OpinionTypeEnum, OverlayContainer, OverlayPopoverContainer, PLUGIN_BASE_URL, PROJ_CFG_KEY, PageEnum, PageTypeEnum, PanelEnum, PassRule, PatternEnum, PermissionModeEnum, PersonalCenterType, Platform, PlatformSettingActions, PlatformSettingEnum, PlatformType, PluginModeEnum, PluginPgkUtil, PluginStaticResource, Postion, PrintFormatEnum, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProcessTypeEnum, ProgressTypeEnum, ProjectName, ProjectNameType, PropGroup, QuickSearchEnum, REDIRECT_NAME, RELATION_FIELDS, RETURN_TYPE_MAP, ROLES_KEY, RdoButtonOpeEnum, RequestEnum, ResetConditionEnum, ResetRuleType, ResultEnum, ReturnTypeEnum, ReturnTypeMaps, RoleEnum, RouterTransitionEnum, RowSelectionTypeEnums, SANDBOX_PATH_REG, SCOPE, SCOPEINFO, SEARCH_SERVICE, SHOW_FIELDTYPES, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SINGLE_PATH_REG, STRING_TYPE, STYLE_NAMESPACE_TAG, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, SYSTEM_FIELD_KEY, SYSTEM_LOGIN_KEYS, SYSTEM_VAR_PREFIX, ScriptTypeEnum, SearchComponents, SelectPickerEnums, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, SignatureStyleEnum, SignatureTypeEnum, SizeEnum, StatisticalMethodEnums, StyleGroup, SystemMqttService, TABLE_CELL_HEIGHT_MODE, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, THEME_COLOR_BLUE, THEME_COLOR_CLASS, THEME_COLOR_CLASS_MAP, THEME_COLOR_TEAL, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TODO_TYPE, TOKEN_KEY, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TagTypeEnum, TextAlign, TextDecoration, TextMeasureUtil, ThemeEnum, TimezoneOptions, ToolkitEnum, TopMenuAlignEnum, TransactionMode, TreeHelper, TriggerEnum, TypeEnum, USER_INFO_KEY, UniqueConstraintType, UploadTypeEnum, Uploader, UserRoleReqEnum, UserServiceType, VERIFICATIONCONDITIONS_TYPE, VITE_GLOB_DEFAULT_AVATAR, VITE_MINIO_PATH, VarTypeEnum, WATERMARK_INIT_DATA, WidgetInScopeEnum, WinMsgTypeEnum, WorkBenchTabEnum, WorkbenchType, afterFieldSet, afterValueSet, allOperator, approvalObserver, biBackFunctionGroup, biBackFunctionMap, bindCmpStyleMap, booleanOperator, booleanTypes, buildItemRules, buildShortUUID, buildUUID, buttonShowType, cacheFnReturn, calcFontStyle, calcStyle, calcStylePX, ch_ProcessStatusMap, computedEx, controlConfigEnum, copyTextToClipboard, createAppVue, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, deleteAndInsertArr, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, dynamicData, emitFieldSet, fileUrlParser, filterDynFormatTypes, filterTree, findUniqueNode, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getBrowserFingerprint, getDeviceFingerprint, getInterfaceApi, getLoginTypeOptions, getMaxTextWidth, getMinTextWidth, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getSeriesList, getTenant, getToken, getTotalTextWidth, getVueComponentByCode, globalRefSession, globalRefStorage, hasEmojiAndSpecStr, hasEmojiAndSpecStr1, highlightName, innerVarIds, innerVarList, insertCustomCssToHead, interceptors, ipaasBackFunctionGroup, ipaasBackFunctionMap, isDef, isMobile, isMultipleOperator, isRdoUniqueField, isSortFiled, list2Tree, measureText, measureTexts, mitt, mobileSearchListByFieldType, modelLoader, normalizeEnv, notSingleArr, nullDisplayEnum, numberOperator, numberTypes, openWindow, openWindowEnums, operateSysEnums, operator2FuncMap, padSearchListByFieldType, pageLayoutModeEnum, parentObserver, parseMatrixParams, parseValueUnit, permission, presetColor, randomUUID, returnBolOperator, screenEnum, screenMap, scriptLoader, scriptTypeEnum, searchListByFieldType, selectionTypeEnums, setTenant, setToken, setupApp, setupErrorHandler, setupI18n, sha256, showDynamicTitle, signLogRegister, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, statusEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, tenantRef, timeReg, transformBindCmp2CmpType, transformUrl, truncateText, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useBasicSetting, useCopyToClipboard, useDebouncePromise, useIFrameProps, useModal, useNamespace, useOrgSetting, usePermissionStore, usePlatformConfigStore, useSecuritySetting, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
|
165
|
+
export { AGLINE_ENUMS, APP_DARK_MODE_KEY_, APP_INST, APP_LOCAL_CACHE_KEY, APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, APP_SESSION_CACHE_KEY, ARRAY_TYPE, ASSIGNMENTSTRATEGY_ENUM, AggTypes, AppPublishStateEnum, AuthUtil, BOOLEAN_TYPE, BasicAction, BindCmpStyleEnum, BindCmpStyleTypeEnum, BizServiceEnum, BorderStyle, BpmnNodeTypeEnum, BuiltOperators, BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonOpeEnum, ButtonSize, ButtonStyle, ButtonType, ButtonTypeEnum, ButtonTypeGroup, ButtonType_vant, CARD_TRIGGER_ENUM, COLUMNS_TYPE, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CUSTOM_LANGUAGE, CUSTOM_THEME, CacheTypeEnum, CategoryModuleEnum, CategoryTypeEnum, Ch_BindCmpStyleEnum, ContentEnum, ContentTypeEnum, ContextSceneEnum, ContextTxnPageModeEnum, CoreConst, CreateType, CustomAction, DEFAULT_MQTT_INSTANCE_ID, DESIGNER_SESSION_CACHE_KEY, DEV_SINGLE_PATH_REG, DYN_FORMAT_TYPE_ENUM, DataSetReturnTypeEnum, DatasourceTypeEnum, DateRangeEnums, DefaultActions, DefaultDateTypeConst, Dependency_ENUM, DeployModeEnum, DeviceParamsTypeEnum, DictionaryUtil, DisplayEnums, DisplayTagTypeEnum, DisplayType, DynFormatTypes, ENV, EditorRegisterConst, EntityFormulaReturnTypeEnum, EntityModelCategoryEnum, EntityModelTypeEnum, EnvironmentManager, EnvironmentType, ErrorHandler, ErrorStrategyFactory, ErrorTypeEnum, EventCategory, EventsTypeEnum, ExamineAndApproveStateEnum, ExceptionEnum, ExpressionModeEnum, ExpressionTabEnum, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FUNC_KEYS, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, FieldDefaultValueTypeEnum, FieldIconMap, FieldSysVarDefaultValueEnum, FieldTypeToJs, FormComponents, FormContainerType, FormDesignEnum, GENDER_TYPE, GLOBAL_TYPE, GLOBAL_VAR_TYPE, GctGlobal, GctMqttTopsEnum, GlobalParamEnum, GlobalStoreUtil, HOST_REG, INNER_EVENT, IP_REG, IdentifierAddon, KeyMode, KickRuleEnum, KitPkgUtil, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, LinkedList, LinkedNode, ListTreeSearchTypeEnum, LocaleUtil, LoginSortTypeEnum, LoginTypeEnum, LogoTypeEnum, MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, MQTT_CLIENT_EVENT, MQTT_DEFAULT_CONNECT_OPTIONS, MULTIPLE_TABS_KEY, MaterialEnum, MenuModeEnum, MenuSplitTyeEnum, MenuType, MenuTypeEnum, MessageType, MixSidebarTriggerEnum, Modal, ModeFnMap, ModeTabDict, ModeTabMap, ModelFieldEnum, ModelTypeEnum, ModelTypeOptions, MqttClient, MqttConnectionStatus, MqttManager, NUMBER_TYPE, Namespace, NodesConfigTypeEnum, OBJECT_TYPE, OTHER_LOGIN_KEYS, OpenMode, OperatorTypeEnum, OpinionTypeEnum, OverlayContainer, OverlayPopoverContainer, PLUGIN_BASE_URL, PROJ_CFG_KEY, PageEnum, PageTypeEnum, PanelEnum, PassRule, PatternEnum, PermissionModeEnum, PersonalCenterType, Platform, PlatformSettingActions, PlatformSettingEnum, PlatformType, PluginModeEnum, PluginPgkUtil, PluginStaticResource, Postion, PrintFormatEnum, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProcessTypeEnum, ProgressTypeEnum, ProjectName, ProjectNameType, PropGroup, QuickSearchEnum, REDIRECT_NAME, RELATION_FIELDS, RETURN_TYPE_MAP, ROLES_KEY, RdoButtonOpeEnum, RequestEnum, ResetConditionEnum, ResetRuleType, ResultEnum, ReturnTypeEnum, ReturnTypeMaps, RoleEnum, RouterTransitionEnum, RowSelectionTypeEnums, SANDBOX_PATH_REG, SCOPE, SCOPEINFO, SEARCH_SERVICE, SHOW_FIELDTYPES, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SINGLE_PATH_REG, STRING_TYPE, STYLE_NAMESPACE_TAG, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, SYSTEM_FIELD_KEY, SYSTEM_LOGIN_KEYS, SYSTEM_VAR_PREFIX, ScriptTypeEnum, SearchComponents, SecuritySignMethodEnum, SelectPickerEnums, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, SignatureStyleEnum, SignatureTypeEnum, SizeEnum, StatisticalMethodEnums, StyleGroup, SystemMqttService, TABLE_CELL_HEIGHT_MODE, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, THEME_COLOR_BLUE, THEME_COLOR_CLASS, THEME_COLOR_CLASS_MAP, THEME_COLOR_TEAL, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TODO_TYPE, TOKEN_KEY, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TagTypeEnum, TextAlign, TextDecoration, TextMeasureUtil, ThemeEnum, TimezoneOptions, ToolkitEnum, TopMenuAlignEnum, TransactionMode, TreeHelper, TriggerEnum, TypeEnum, USER_INFO_KEY, UniqueConstraintType, UploadTypeEnum, Uploader, UserRoleReqEnum, UserServiceType, VERIFICATIONCONDITIONS_TYPE, VITE_GLOB_DEFAULT_AVATAR, VITE_MINIO_PATH, VarTypeEnum, WATERMARK_INIT_DATA, WidgetInScopeEnum, WinMsgTypeEnum, WorkBenchTabEnum, WorkbenchType, afterFieldSet, afterValueSet, allOperator, approvalObserver, biBackFunctionGroup, biBackFunctionMap, bindCmpStyleMap, booleanOperator, booleanTypes, buildItemRules, buildShortUUID, buildUUID, buttonShowType, cacheFnReturn, calcFontStyle, calcStyle, calcStylePX, ch_ProcessStatusMap, computedEx, controlConfigEnum, copyTextToClipboard, createAppVue, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, deleteAndInsertArr, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, dynamicData, emitFieldSet, fileUrlParser, filterDynFormatTypes, filterTree, findUniqueNode, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getBrowserFingerprint, getDeviceFingerprint, getInterfaceApi, getLoginTypeOptions, getMaxTextWidth, getMinTextWidth, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getSeriesList, getTenant, getToken, getTotalTextWidth, getVueComponentByCode, globalRefSession, globalRefStorage, hasEmojiAndSpecStr, hasEmojiAndSpecStr1, highlightName, innerVarIds, innerVarList, insertCustomCssToHead, interceptors, ipaasBackFunctionGroup, ipaasBackFunctionMap, isDef, isMobile, isMultipleOperator, isRdoUniqueField, isSortFiled, list2Tree, measureText, measureTexts, mitt, mobileSearchListByFieldType, modelLoader, normalizeEnv, notSingleArr, nullDisplayEnum, numberOperator, numberTypes, openWindow, openWindowEnums, operateSysEnums, operator2FuncMap, padSearchListByFieldType, pageLayoutModeEnum, parentObserver, parseMatrixParams, parseValueUnit, permission, presetColor, randomUUID, returnBolOperator, screenEnum, screenMap, scriptLoader, scriptTypeEnum, searchListByFieldType, selectionTypeEnums, setTenant, setToken, setupApp, setupErrorHandler, setupI18n, sha256, showDynamicTitle, signLogRegister, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, statusEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, tenantRef, timeReg, transformBindCmp2CmpType, transformUrl, truncateText, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useBasicSetting, useCopyToClipboard, useDebouncePromise, useIFrameProps, useModal, useNamespace, useOrgSetting, usePermissionStore, usePlatformConfigStore, useSecuritySetting, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
package/es/locale/index.mjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { EnvironmentType } from "../modules/env-manager/env-manager.interface.mjs";
|
|
1
2
|
import { globalRefStorage } from "../store/storage-store.mjs";
|
|
2
3
|
import "../store/index.mjs";
|
|
4
|
+
import "../modules/env-manager/index.mjs";
|
|
3
5
|
import { createI18n } from "vue-i18n";
|
|
4
6
|
import { HttpUtil } from "@gct-paas/api";
|
|
5
7
|
//#region src/locale/index.ts
|
|
@@ -130,7 +132,9 @@ var LocaleUtil = class {
|
|
|
130
132
|
}
|
|
131
133
|
getMessageUrl(payload) {
|
|
132
134
|
if ("app" in payload) {
|
|
133
|
-
|
|
135
|
+
let tag = payload.env;
|
|
136
|
+
if (payload.env === EnvironmentType.DEV) tag = `dev_${payload.branch}`;
|
|
137
|
+
else if (payload.env === EnvironmentType.SANDBOX) tag = EnvironmentType.PROD;
|
|
134
138
|
return `/minio/${payload.app}/locale-js/${tag}/${payload.locale}__.json`;
|
|
135
139
|
}
|
|
136
140
|
return `/minio/locale-js/${payload.locale}__platform__.json`;
|
|
@@ -35,6 +35,12 @@ export interface IEnvironmentManager {
|
|
|
35
35
|
* @param loadTenant 是否加载租户信息
|
|
36
36
|
*/
|
|
37
37
|
checkIsTestEnv(loadTenant?: boolean): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* 检查分支信息,如果是 dev 环境时,aid 存在的情况下,未指定分支去后台获取默认分支
|
|
40
|
+
*
|
|
41
|
+
* @return {*} {Promise<void>}
|
|
42
|
+
*/
|
|
43
|
+
checkBranch(): Promise<void>;
|
|
38
44
|
/**
|
|
39
45
|
* 获取当前环境类型
|
|
40
46
|
* @returns 环境类型
|
|
@@ -94,6 +94,15 @@ var EnvironmentManager = class {
|
|
|
94
94
|
}
|
|
95
95
|
if (this._testEnv) await _gct.store.setContext({ env: EnvironmentType.TEST });
|
|
96
96
|
}
|
|
97
|
+
async checkBranch() {
|
|
98
|
+
if (_gct.store.context.aid && !_gct.store.context.bid && _gct.store.context.env === EnvironmentType.DEV) try {
|
|
99
|
+
const defaultBranch = (await _api.apaas.appBranch.getList()).find((item) => item.head === 1);
|
|
100
|
+
if (defaultBranch) _gct.store.setContext({ bid: defaultBranch.id });
|
|
101
|
+
else console.warn("未找到默认分支,请检查后台配置");
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.error("获取默认分支失败", error);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
97
106
|
/**
|
|
98
107
|
* 获取当前环境类型
|
|
99
108
|
* @returns 环境类型
|
|
@@ -12,10 +12,10 @@ import { IMqttClient, IMqttConnectOptions, IMqttManager } from './interfaces/i-m
|
|
|
12
12
|
*
|
|
13
13
|
* // 创建一个 MQTT 客户端实例
|
|
14
14
|
* const client = manager.create('device-001', {
|
|
15
|
-
* brokerUrl: 'ws://localhost:8083/mqtt',
|
|
16
15
|
* username: 'admin',
|
|
17
16
|
* password: 'password',
|
|
18
17
|
* });
|
|
18
|
+
* // 默认连接地址随页面协议自动切换:HTTP 使用 ws,HTTPS 使用 wss。
|
|
19
19
|
*
|
|
20
20
|
* // 连接
|
|
21
21
|
* client.connect();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_MQTT_INSTANCE_ID } from "./enums/mqtt-status.enum.mjs";
|
|
2
2
|
import { MqttClient } from "./mqtt-client.mjs";
|
|
3
|
+
import { getMqttBrokerUrl } from "./utils/mqtt-broker-url.util.mjs";
|
|
3
4
|
import { createUUID } from "qx-util";
|
|
4
5
|
//#region src/modules/mqtt/mqtt-manager.ts
|
|
5
6
|
/**
|
|
@@ -15,10 +16,10 @@ import { createUUID } from "qx-util";
|
|
|
15
16
|
*
|
|
16
17
|
* // 创建一个 MQTT 客户端实例
|
|
17
18
|
* const client = manager.create('device-001', {
|
|
18
|
-
* brokerUrl: 'ws://localhost:8083/mqtt',
|
|
19
19
|
* username: 'admin',
|
|
20
20
|
* password: 'password',
|
|
21
21
|
* });
|
|
22
|
+
* // 默认连接地址随页面协议自动切换:HTTP 使用 ws,HTTPS 使用 wss。
|
|
22
23
|
*
|
|
23
24
|
* // 连接
|
|
24
25
|
* client.connect();
|
|
@@ -64,7 +65,7 @@ var MqttManager = class {
|
|
|
64
65
|
console.warn(`MqttManager: 实例 ${instanceId} 已存在,返回已注册的实例`);
|
|
65
66
|
return this._clients.get(instanceId);
|
|
66
67
|
}
|
|
67
|
-
const client = new MqttClient(instanceId,
|
|
68
|
+
const client = new MqttClient(instanceId, getMqttBrokerUrl(location.protocol, location.host), {
|
|
68
69
|
clientId: `gct_mqtt_${_gct.store.userInfo.userId}_${instanceId}_${this.uuid}`,
|
|
69
70
|
...options
|
|
70
71
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/modules/mqtt/utils/mqtt-broker-url.util.ts
|
|
2
|
+
/**
|
|
3
|
+
* 根据页面地址生成 MQTT WebSocket 连接地址。
|
|
4
|
+
*
|
|
5
|
+
* HTTPS 页面必须使用 WSS,避免浏览器因 Mixed Content 拦截 MQTT 连接。
|
|
6
|
+
*/
|
|
7
|
+
function getMqttBrokerUrl(protocol, host) {
|
|
8
|
+
return `${protocol === "https:" ? "wss:" : "ws:"}//${host}/mqtt`;
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { getMqttBrokerUrl };
|
|
@@ -13,5 +13,10 @@ var KickRuleEnum = /* @__PURE__ */ function(KickRuleEnum) {
|
|
|
13
13
|
KickRuleEnum["DIFFERENT_END"] = "DIFFERENT_END";
|
|
14
14
|
return KickRuleEnum;
|
|
15
15
|
}({});
|
|
16
|
+
var SecuritySignMethodEnum = /* @__PURE__ */ function(SecuritySignMethodEnum) {
|
|
17
|
+
SecuritySignMethodEnum["PASSWORD"] = "PASSWORD";
|
|
18
|
+
SecuritySignMethodEnum["CARD"] = "CARD";
|
|
19
|
+
return SecuritySignMethodEnum;
|
|
20
|
+
}({});
|
|
16
21
|
//#endregion
|
|
17
|
-
export { KickRuleEnum, PassRule };
|
|
22
|
+
export { KickRuleEnum, PassRule, SecuritySignMethodEnum };
|
|
@@ -46,6 +46,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
46
46
|
value: string;
|
|
47
47
|
}[]>;
|
|
48
48
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
49
|
+
isSupportCardSign: () => boolean | undefined;
|
|
49
50
|
postSecuritySetting: () => Promise<void>;
|
|
50
51
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
51
52
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -119,6 +120,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
119
120
|
value: string;
|
|
120
121
|
}[]>;
|
|
121
122
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
123
|
+
isSupportCardSign: () => boolean | undefined;
|
|
122
124
|
postSecuritySetting: () => Promise<void>;
|
|
123
125
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
124
126
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -192,6 +194,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
192
194
|
value: string;
|
|
193
195
|
}[]>;
|
|
194
196
|
securitySetting: import('@gct-paas/api/platform').SecurityConfig;
|
|
197
|
+
isSupportCardSign: () => boolean | undefined;
|
|
195
198
|
postSecuritySetting: () => Promise<void>;
|
|
196
199
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
197
200
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -221,5 +224,5 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
221
224
|
setProjectConfig: (config: {}) => void;
|
|
222
225
|
init: () => Promise<void>;
|
|
223
226
|
renderInit: () => Promise<void>;
|
|
224
|
-
}, "getSignWay" | "init" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
227
|
+
}, "getSignWay" | "init" | "isSupportCardSign" | "postBasicSetting" | "postLoginSetting" | "postOrgSetting" | "postSecuritySetting" | "postThemeSetting" | "postWatermarkSetting" | "renderInit" | "setBasicSetting" | "setDeploySetting" | "setLoginSetting" | "setOrgSetting" | "setProjectConfig" | "setSecuritySetting" | "setThemeSetting" | "setWatermarkSetting" | "toggleMenuCollapsed">>;
|
|
225
228
|
export type IPlatformConfigStore = ReturnType<typeof usePlatformConfigStore>;
|
|
@@ -6,6 +6,7 @@ import { SecurityConfig } from '@gct-paas/api/platform';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function useSecuritySetting(isPlatform?: boolean): {
|
|
8
8
|
securitySetting: SecurityConfig;
|
|
9
|
+
isSupportCardSign: () => boolean | undefined;
|
|
9
10
|
postSecuritySetting: () => Promise<void>;
|
|
10
11
|
setSecuritySetting: (data: IObject | undefined) => void;
|
|
11
12
|
getSignWay: () => "DOMAIN" | "LOGIN" | "SIGN";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SecuritySignMethodEnum } from "./enums/platform.enum.mjs";
|
|
1
2
|
import { reactive } from "vue";
|
|
2
3
|
//#region src/modules/platform-config/useSecuritySetting.ts
|
|
3
4
|
/**
|
|
@@ -30,6 +31,7 @@ var securitySetting = reactive({
|
|
|
30
31
|
repeatNum: 1,
|
|
31
32
|
timeUnit: "DAYS",
|
|
32
33
|
signTimeUnit: "DAYS",
|
|
34
|
+
signMethod: SecuritySignMethodEnum.PASSWORD,
|
|
33
35
|
noOpRetainHour: 8,
|
|
34
36
|
noOpRetainMinute: 0,
|
|
35
37
|
earlyAlarmMinute: 5,
|
|
@@ -73,8 +75,17 @@ function useSecuritySetting(isPlatform = true) {
|
|
|
73
75
|
default: return "LOGIN";
|
|
74
76
|
}
|
|
75
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* 是否支持刷卡签名
|
|
80
|
+
* @returns boolean
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
function isSupportCardSign() {
|
|
84
|
+
return securitySetting.signMethod?.includes(SecuritySignMethodEnum.CARD);
|
|
85
|
+
}
|
|
76
86
|
return {
|
|
77
87
|
securitySetting,
|
|
88
|
+
isSupportCardSign,
|
|
78
89
|
postSecuritySetting,
|
|
79
90
|
setSecuritySetting,
|
|
80
91
|
getSignWay
|
|
@@ -23,6 +23,7 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
|
|
|
23
23
|
gender?: number | undefined;
|
|
24
24
|
globalSuperAdmin?: number | undefined;
|
|
25
25
|
ip?: string | undefined;
|
|
26
|
+
kickOut?: boolean | undefined;
|
|
26
27
|
match?: boolean | undefined;
|
|
27
28
|
minioDomain?: string | undefined;
|
|
28
29
|
mobile?: string | undefined;
|
|
@@ -95,6 +96,7 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
|
|
|
95
96
|
gender?: number | undefined;
|
|
96
97
|
globalSuperAdmin?: number | undefined;
|
|
97
98
|
ip?: string | undefined;
|
|
99
|
+
kickOut?: boolean | undefined;
|
|
98
100
|
match?: boolean | undefined;
|
|
99
101
|
minioDomain?: string | undefined;
|
|
100
102
|
mobile?: string | undefined;
|
|
@@ -164,6 +166,7 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
|
|
|
164
166
|
gender?: number | undefined;
|
|
165
167
|
globalSuperAdmin?: number | undefined;
|
|
166
168
|
ip?: string | undefined;
|
|
169
|
+
kickOut?: boolean | undefined;
|
|
167
170
|
match?: boolean | undefined;
|
|
168
171
|
minioDomain?: string | undefined;
|
|
169
172
|
mobile?: string | undefined;
|
|
@@ -239,6 +242,7 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
|
|
|
239
242
|
gender?: number | undefined;
|
|
240
243
|
globalSuperAdmin?: number | undefined;
|
|
241
244
|
ip?: string | undefined;
|
|
245
|
+
kickOut?: boolean | undefined;
|
|
242
246
|
match?: boolean | undefined;
|
|
243
247
|
minioDomain?: string | undefined;
|
|
244
248
|
mobile?: string | undefined;
|
package/es/setup-app.mjs
CHANGED
|
@@ -5,6 +5,7 @@ import "./modules/platform-config/index.mjs";
|
|
|
5
5
|
import { registerCoreLocale } from "./locale/auto-register.mjs";
|
|
6
6
|
import { HttpUtil } from "@gct-paas/api";
|
|
7
7
|
//#region src/setup-app.ts
|
|
8
|
+
var setupAppKey = Symbol.for("@gct-paas/core/setupApp");
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
10
11
|
*
|
|
@@ -12,6 +13,11 @@ import { HttpUtil } from "@gct-paas/api";
|
|
|
12
13
|
* @param {App} app
|
|
13
14
|
*/
|
|
14
15
|
async function setupApp(_app) {
|
|
16
|
+
if (Reflect.get(window, setupAppKey)) {
|
|
17
|
+
console.error("@gct-paas/core setupApp 已执行,请勿重复调用。");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
Reflect.set(window, setupAppKey, true);
|
|
15
21
|
HttpUtil.use(interceptors);
|
|
16
22
|
await _gct.init();
|
|
17
23
|
registerCoreLocale();
|