@gct-paas/core 0.1.6-dev.26 → 0.1.6-dev.28
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-CXM17Y16.js → redirect-index-BFuhimnn.js} +1 -1
- package/es/enums/page-designer/panel.d.ts +1 -2
- package/es/enums/page-designer/panel.mjs +0 -1
- package/es/global/gct/gct.d.ts +3 -3
- package/es/index.d.ts +1 -0
- package/es/index.mjs +5 -2
- package/es/interface/i-app-context/i-app-context.d.ts +6 -0
- package/es/interface/i-pinia-action/i-global-actions.d.ts +6 -0
- package/es/interface/i-pinia-getter/i-global-getters.d.ts +22 -1
- package/es/interface/i-pinia-state/i-global-state.d.ts +9 -2
- package/es/modules/mqtt/interfaces/i-mqtt.d.ts +6 -2
- package/es/modules/mqtt/mqtt-client.d.ts +7 -7
- package/es/modules/mqtt/mqtt-client.mjs +20 -19
- package/es/modules/platform-config/constants/theme.const.d.ts +9 -1
- package/es/modules/platform-config/constants/theme.const.mjs +13 -2
- package/es/modules/platform-config/store.d.ts +3 -3
- package/es/modules/platform-config/useThemeSetting.d.ts +1 -1
- package/es/modules/platform-config/useThemeSetting.mjs +32 -4
- package/es/modules/system-mqtt/index.d.ts +3 -0
- package/es/modules/system-mqtt/index.mjs +2 -0
- package/es/modules/system-mqtt/system-mqtt.const.d.ts +1 -0
- package/es/modules/system-mqtt/system-mqtt.const.mjs +13 -0
- package/es/modules/system-mqtt/system-mqtt.interface.d.ts +71 -0
- package/es/modules/system-mqtt/system-mqtt.service.d.ts +102 -0
- package/es/modules/system-mqtt/system-mqtt.service.mjs +176 -0
- package/es/router/guard/index.d.ts +4 -0
- package/es/router/guard/index.mjs +41 -0
- package/es/router/index.mjs +2 -0
- package/es/state/global-pinia-state/global-pinia-state.d.ts +6 -0
- package/es/state/global-pinia-state/global-pinia-state.mjs +6 -0
- package/es/store/global-store.mjs +6 -0
- package/package.json +3 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @gct-paas/core v0.1.6-dev.
|
|
1
|
+
/*! @gct-paas/core v0.1.6-dev.28 */
|
|
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};
|
|
@@ -268,7 +268,6 @@ var GLOBAL_VAR_TYPE = /* @__PURE__ */ function(GLOBAL_VAR_TYPE) {
|
|
|
268
268
|
GLOBAL_VAR_TYPE["DATE"] = "date";
|
|
269
269
|
GLOBAL_VAR_TYPE["DATETIME"] = "datetime";
|
|
270
270
|
GLOBAL_VAR_TYPE["TIME"] = "time";
|
|
271
|
-
GLOBAL_VAR_TYPE["VAR"] = "var";
|
|
272
271
|
return GLOBAL_VAR_TYPE;
|
|
273
272
|
}({});
|
|
274
273
|
var GLOBAL_TYPE = /* @__PURE__ */ function(GLOBAL_TYPE) {
|
package/es/global/gct/gct.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export declare class GctGlobal {
|
|
|
96
96
|
toggleMenuCollapsed: () => void;
|
|
97
97
|
menuCollapsedWidth: number;
|
|
98
98
|
menuWidthRange: number[];
|
|
99
|
-
themeColors:
|
|
99
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
100
100
|
watermarkSetting: {
|
|
101
101
|
openWatermark: boolean;
|
|
102
102
|
watermarkContent: string;
|
|
@@ -169,7 +169,7 @@ export declare class GctGlobal {
|
|
|
169
169
|
toggleMenuCollapsed: () => void;
|
|
170
170
|
menuCollapsedWidth: number;
|
|
171
171
|
menuWidthRange: number[];
|
|
172
|
-
themeColors:
|
|
172
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
173
173
|
watermarkSetting: {
|
|
174
174
|
openWatermark: boolean;
|
|
175
175
|
watermarkContent: string;
|
|
@@ -242,7 +242,7 @@ export declare class GctGlobal {
|
|
|
242
242
|
toggleMenuCollapsed: () => void;
|
|
243
243
|
menuCollapsedWidth: number;
|
|
244
244
|
menuWidthRange: number[];
|
|
245
|
-
themeColors:
|
|
245
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
246
246
|
watermarkSetting: {
|
|
247
247
|
openWatermark: boolean;
|
|
248
248
|
watermarkContent: string;
|
package/es/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './locale';
|
|
|
7
7
|
export * from './modules/env-manager';
|
|
8
8
|
export * from './modules/error-handler';
|
|
9
9
|
export * from './modules/mqtt';
|
|
10
|
+
export * from './modules/system-mqtt';
|
|
10
11
|
export * from './modules/platform-config';
|
|
11
12
|
export * from './modules/user-stores';
|
|
12
13
|
export * from './store';
|
package/es/index.mjs
CHANGED
|
@@ -89,7 +89,7 @@ import { KickRuleEnum, PassRule } from "./modules/platform-config/enums/platform
|
|
|
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";
|
|
92
|
-
import { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS } from "./modules/platform-config/constants/theme.const.mjs";
|
|
92
|
+
import { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS, THEME_COLOR_BLUE, THEME_COLOR_CLASS, THEME_COLOR_CLASS_MAP, THEME_COLOR_TEAL } from "./modules/platform-config/constants/theme.const.mjs";
|
|
93
93
|
import { WATERMARK_INIT_DATA } from "./modules/platform-config/constants/watermark.const.mjs";
|
|
94
94
|
import { usePlatformConfigStore } from "./modules/platform-config/store.mjs";
|
|
95
95
|
import "./modules/platform-config/index.mjs";
|
|
@@ -120,6 +120,9 @@ import { getSeriesList } from "./interface/model-designer/serial.mjs";
|
|
|
120
120
|
import "./interface/index.mjs";
|
|
121
121
|
import { ErrorStrategyFactory } from "./modules/error-handler/error-strategy.mjs";
|
|
122
122
|
import { ErrorHandler, setupErrorHandler } from "./modules/error-handler/index.mjs";
|
|
123
|
+
import { ProjectNameType } from "./modules/system-mqtt/system-mqtt.const.mjs";
|
|
124
|
+
import { SystemMqttService } from "./modules/system-mqtt/system-mqtt.service.mjs";
|
|
125
|
+
import "./modules/system-mqtt/index.mjs";
|
|
123
126
|
import { createAppVue } from "./create-app-vue.mjs";
|
|
124
127
|
import { setupApp } from "./setup-app.mjs";
|
|
125
128
|
import { api } from "@gct-paas/api";
|
|
@@ -155,4 +158,4 @@ function onInit() {
|
|
|
155
158
|
}
|
|
156
159
|
onInit();
|
|
157
160
|
//#endregion
|
|
158
|
-
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, 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, 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, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, 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, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, statusEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, tenantRef, timeReg, transformBindCmp2CmpType, transformUrl, truncateText, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useDebouncePromise, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
|
161
|
+
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, 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, 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, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, statusEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, tenantRef, timeReg, transformBindCmp2CmpType, transformUrl, truncateText, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useDebouncePromise, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
|
|
@@ -8,7 +8,28 @@ import { IGlobalState } from '../i-pinia-state/i-global-state';
|
|
|
8
8
|
* @extends {_GettersTree<IGlobalState>}
|
|
9
9
|
*/
|
|
10
10
|
export interface IGlobalGetters extends _GettersTree<IGlobalState> {
|
|
11
|
+
/**
|
|
12
|
+
* 当前项目名称
|
|
13
|
+
*
|
|
14
|
+
* @return {*} {string}
|
|
15
|
+
*/
|
|
11
16
|
getProjectName(): string;
|
|
12
|
-
|
|
17
|
+
/**
|
|
18
|
+
* 空值显示内容
|
|
19
|
+
*
|
|
20
|
+
* @return {*} {string}
|
|
21
|
+
*/
|
|
13
22
|
getEmptyDisplay(): string;
|
|
23
|
+
/**
|
|
24
|
+
* 获取用户信息
|
|
25
|
+
*
|
|
26
|
+
* @return {*} {IObject}
|
|
27
|
+
*/
|
|
28
|
+
getAppInfo(): IObject;
|
|
29
|
+
/**
|
|
30
|
+
* 获取页面加载状态
|
|
31
|
+
*
|
|
32
|
+
* @return {*} {boolean}
|
|
33
|
+
*/
|
|
34
|
+
getPageLoading(): boolean;
|
|
14
35
|
}
|
|
@@ -2,6 +2,7 @@ import { StateTree } from 'pinia';
|
|
|
2
2
|
import { ProjectName, nullDisplayEnum } from '../../enums';
|
|
3
3
|
import { IAppContext } from '../i-app-context/i-app-context';
|
|
4
4
|
import { UserLoginResp } from '@gct-paas/api/platform';
|
|
5
|
+
import { GetAppResponse } from '@gct-paas/api/apaas';
|
|
5
6
|
/**
|
|
6
7
|
* 全局 store 状态
|
|
7
8
|
*
|
|
@@ -21,12 +22,18 @@ export interface IGlobalState extends StateTree {
|
|
|
21
22
|
* @type {ProjectName}
|
|
22
23
|
*/
|
|
23
24
|
projectName: ProjectName;
|
|
25
|
+
/**
|
|
26
|
+
* setting 中的页面加载配置开启时,路由守卫中会触发 loading
|
|
27
|
+
*
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
*/
|
|
30
|
+
pageLoading: boolean;
|
|
24
31
|
/**
|
|
25
32
|
* 应用信息, todo: 等 api 包完成后,实际类型从 api 导入
|
|
26
33
|
*
|
|
27
|
-
* @type {
|
|
34
|
+
* @type {GetAppResponse}
|
|
28
35
|
*/
|
|
29
|
-
appInfo:
|
|
36
|
+
appInfo: GetAppResponse;
|
|
30
37
|
/**
|
|
31
38
|
* 用户信息(user.store.ts 中加载后赋值)
|
|
32
39
|
*
|
|
@@ -7,6 +7,10 @@ import { MqttConnectionStatus } from '../enums/mqtt-status.enum';
|
|
|
7
7
|
* @param payload 消息内容
|
|
8
8
|
*/
|
|
9
9
|
export type IMqttMessageCallback = (topic: string, payload: Buffer) => void;
|
|
10
|
+
/**
|
|
11
|
+
* 取消订阅函数类型
|
|
12
|
+
*/
|
|
13
|
+
export type MqttCancelSub = () => void;
|
|
10
14
|
/**
|
|
11
15
|
* MQTT 客户端事件回调函数类型映射
|
|
12
16
|
*/
|
|
@@ -66,13 +70,13 @@ export interface IMqttClient {
|
|
|
66
70
|
* @param callback 消息回调函数
|
|
67
71
|
* @returns 取消订阅函数
|
|
68
72
|
*/
|
|
69
|
-
subscribe(topics: string
|
|
73
|
+
subscribe(topics: string, callback: IMqttMessageCallback): MqttCancelSub;
|
|
70
74
|
/**
|
|
71
75
|
* 取消订阅一个或多个主题
|
|
72
76
|
*
|
|
73
77
|
* @param topics 主题或主题数组
|
|
74
78
|
*/
|
|
75
|
-
unsubscribe(topics: string
|
|
79
|
+
unsubscribe(topics: string): void;
|
|
76
80
|
/**
|
|
77
81
|
* 向指定主题发布消息
|
|
78
82
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MqttConnectionStatus } from './enums/mqtt-status.enum';
|
|
2
|
-
import { IMqttClient, IMqttClientEventMap, IMqttConnectOptions, IMqttMessageCallback, IMqttPublishOptions } from './interfaces/i-mqtt';
|
|
2
|
+
import { MqttCancelSub, IMqttClient, IMqttClientEventMap, IMqttConnectOptions, IMqttMessageCallback, IMqttPublishOptions } from './interfaces/i-mqtt';
|
|
3
3
|
/**
|
|
4
4
|
* MQTT 客户端
|
|
5
5
|
*
|
|
@@ -48,19 +48,19 @@ export declare class MqttClient implements IMqttClient {
|
|
|
48
48
|
*/
|
|
49
49
|
disconnect(): void;
|
|
50
50
|
/**
|
|
51
|
-
*
|
|
51
|
+
* 订阅一个主题
|
|
52
52
|
*
|
|
53
|
-
* @param
|
|
53
|
+
* @param topic 主题
|
|
54
54
|
* @param callback 消息回调函数
|
|
55
55
|
* @returns 取消订阅函数
|
|
56
56
|
*/
|
|
57
|
-
subscribe(
|
|
57
|
+
subscribe(topic: string, callback: IMqttMessageCallback): MqttCancelSub;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* 取消订阅一个主题,取消订阅时会移除所有回调函数
|
|
60
60
|
*
|
|
61
|
-
* @param
|
|
61
|
+
* @param topic 主题
|
|
62
62
|
*/
|
|
63
|
-
unsubscribe(
|
|
63
|
+
unsubscribe(topic: string): void;
|
|
64
64
|
/**
|
|
65
65
|
* 向指定主题发布消息
|
|
66
66
|
*
|
|
@@ -85,33 +85,34 @@ var MqttClient = class {
|
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
/**
|
|
88
|
-
*
|
|
88
|
+
* 订阅一个主题
|
|
89
89
|
*
|
|
90
|
-
* @param
|
|
90
|
+
* @param topic 主题
|
|
91
91
|
* @param callback 消息回调函数
|
|
92
92
|
* @returns 取消订阅函数
|
|
93
93
|
*/
|
|
94
|
-
subscribe(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
if (
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
this._subscriptions.get(topic)
|
|
102
|
-
|
|
103
|
-
|
|
94
|
+
subscribe(topic, callback) {
|
|
95
|
+
if (!this._subscriptions.has(topic)) {
|
|
96
|
+
this._subscriptions.set(topic, /* @__PURE__ */ new Set());
|
|
97
|
+
if (this._client && this._status === MqttConnectionStatus.CONNECTED) this._client.subscribe(topic);
|
|
98
|
+
}
|
|
99
|
+
this._subscriptions.get(topic).add(callback);
|
|
100
|
+
return () => {
|
|
101
|
+
const arr = this._subscriptions.get(topic);
|
|
102
|
+
if (arr) {
|
|
103
|
+
arr.delete(callback);
|
|
104
|
+
if (arr.size === 0) this.unsubscribe(topic);
|
|
105
|
+
} else console.warn(`MqttClient [${this.instanceId}]: 取消订阅时未找到 topic [${topic}] 的回调集合`);
|
|
106
|
+
};
|
|
104
107
|
}
|
|
105
108
|
/**
|
|
106
|
-
*
|
|
109
|
+
* 取消订阅一个主题,取消订阅时会移除所有回调函数
|
|
107
110
|
*
|
|
108
|
-
* @param
|
|
111
|
+
* @param topic 主题
|
|
109
112
|
*/
|
|
110
|
-
unsubscribe(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
if (this._client && this._status === MqttConnectionStatus.CONNECTED) this._client.unsubscribe(topic);
|
|
114
|
-
});
|
|
113
|
+
unsubscribe(topic) {
|
|
114
|
+
this._subscriptions.delete(topic);
|
|
115
|
+
if (this._client && this._status === MqttConnectionStatus.CONNECTED) this._client.unsubscribe(topic);
|
|
115
116
|
}
|
|
116
117
|
/**
|
|
117
118
|
* 向指定主题发布消息
|
|
@@ -5,5 +5,13 @@
|
|
|
5
5
|
export declare const MENU_COLLAPSED_WIDTH = 46;
|
|
6
6
|
/** 菜单宽度范围 */
|
|
7
7
|
export declare const MENU_WIDTH_RANGE: number[];
|
|
8
|
+
/** 默认主题色(蓝) */
|
|
9
|
+
export declare const THEME_COLOR_BLUE = "#026AC8";
|
|
10
|
+
/** 青绿主题色 */
|
|
11
|
+
export declare const THEME_COLOR_TEAL = "#0DAA9C";
|
|
8
12
|
/** 可选的主题颜色列表 */
|
|
9
|
-
export declare const THEME_COLORS:
|
|
13
|
+
export declare const THEME_COLORS: readonly ["#026AC8", "#0DAA9C"];
|
|
14
|
+
/** 非默认主题色对应的 class 名 */
|
|
15
|
+
export declare const THEME_COLOR_CLASS = "theme-color-teal";
|
|
16
|
+
/** 主题色 hex → class 映射;null 表示默认色(移除 class 即可) */
|
|
17
|
+
export declare const THEME_COLOR_CLASS_MAP: Record<string, string | null>;
|
|
@@ -6,7 +6,18 @@
|
|
|
6
6
|
var MENU_COLLAPSED_WIDTH = 46;
|
|
7
7
|
/** 菜单宽度范围 */
|
|
8
8
|
var MENU_WIDTH_RANGE = [100, 1e3];
|
|
9
|
+
/** 默认主题色(蓝) */
|
|
10
|
+
var THEME_COLOR_BLUE = "#026AC8";
|
|
11
|
+
/** 青绿主题色 */
|
|
12
|
+
var THEME_COLOR_TEAL = "#0DAA9C";
|
|
9
13
|
/** 可选的主题颜色列表 */
|
|
10
|
-
var THEME_COLORS = [
|
|
14
|
+
var THEME_COLORS = [THEME_COLOR_BLUE, THEME_COLOR_TEAL];
|
|
15
|
+
/** 非默认主题色对应的 class 名 */
|
|
16
|
+
var THEME_COLOR_CLASS = "theme-color-teal";
|
|
17
|
+
/** 主题色 hex → class 映射;null 表示默认色(移除 class 即可) */
|
|
18
|
+
var THEME_COLOR_CLASS_MAP = {
|
|
19
|
+
[THEME_COLOR_BLUE]: null,
|
|
20
|
+
[THEME_COLOR_TEAL]: THEME_COLOR_CLASS
|
|
21
|
+
};
|
|
11
22
|
//#endregion
|
|
12
|
-
export { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS };
|
|
23
|
+
export { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS, THEME_COLOR_BLUE, THEME_COLOR_CLASS, THEME_COLOR_CLASS_MAP, THEME_COLOR_TEAL };
|
|
@@ -56,7 +56,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
56
56
|
toggleMenuCollapsed: () => void;
|
|
57
57
|
menuCollapsedWidth: number;
|
|
58
58
|
menuWidthRange: number[];
|
|
59
|
-
themeColors:
|
|
59
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
60
60
|
watermarkSetting: {
|
|
61
61
|
openWatermark: boolean;
|
|
62
62
|
watermarkContent: string;
|
|
@@ -129,7 +129,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
129
129
|
toggleMenuCollapsed: () => void;
|
|
130
130
|
menuCollapsedWidth: number;
|
|
131
131
|
menuWidthRange: number[];
|
|
132
|
-
themeColors:
|
|
132
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
133
133
|
watermarkSetting: {
|
|
134
134
|
openWatermark: boolean;
|
|
135
135
|
watermarkContent: string;
|
|
@@ -202,7 +202,7 @@ export declare const usePlatformConfigStore: import('pinia').StoreDefinition<"pl
|
|
|
202
202
|
toggleMenuCollapsed: () => void;
|
|
203
203
|
menuCollapsedWidth: number;
|
|
204
204
|
menuWidthRange: number[];
|
|
205
|
-
themeColors:
|
|
205
|
+
themeColors: readonly ["#026AC8", "#0DAA9C"];
|
|
206
206
|
watermarkSetting: {
|
|
207
207
|
openWatermark: boolean;
|
|
208
208
|
watermarkContent: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MENU_WIDTH_RANGE, THEME_COLORS } from "./constants/theme.const.mjs";
|
|
1
|
+
import { MENU_WIDTH_RANGE, THEME_COLORS, THEME_COLOR_CLASS, THEME_COLOR_CLASS_MAP } from "./constants/theme.const.mjs";
|
|
2
2
|
import { reactive, ref, watch } from "vue";
|
|
3
3
|
//#region src/modules/platform-config/useThemeSetting.ts
|
|
4
4
|
/**
|
|
@@ -30,20 +30,48 @@ var menuCollapsedWidth = 46;
|
|
|
30
30
|
var menuWidthRange = MENU_WIDTH_RANGE;
|
|
31
31
|
/** 可选的主题颜色列表 */
|
|
32
32
|
var themeColors = THEME_COLORS;
|
|
33
|
+
function setThemeMode(mode) {
|
|
34
|
+
if (mode === "colorWeak") {
|
|
35
|
+
document.body.classList.add("color-weak");
|
|
36
|
+
document.body.classList.remove("gray-mode");
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
if (mode === "gray") {
|
|
40
|
+
document.body.classList.add("gray-mode");
|
|
41
|
+
document.body.classList.remove("color-weak");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
document.body.classList.remove("gray-mode");
|
|
45
|
+
document.body.classList.remove("color-weak");
|
|
46
|
+
}
|
|
33
47
|
/**
|
|
34
48
|
* 切换颜色模式
|
|
35
49
|
* 根据当前颜色模式更新界面显示效果
|
|
36
50
|
*/
|
|
37
51
|
var toggleColorMode = () => {
|
|
38
52
|
switch (themeSetting.colorMode) {
|
|
39
|
-
case "colorWeak":
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
case "colorWeak":
|
|
54
|
+
setThemeMode("colorWeak");
|
|
55
|
+
break;
|
|
56
|
+
case "gray":
|
|
57
|
+
setThemeMode("gray");
|
|
58
|
+
break;
|
|
59
|
+
default: setThemeMode();
|
|
42
60
|
}
|
|
43
61
|
};
|
|
44
62
|
watch(() => themeSetting.colorMode, (value) => {
|
|
45
63
|
if (value) toggleColorMode();
|
|
46
64
|
});
|
|
65
|
+
function applyThemeColorClass(color) {
|
|
66
|
+
const normalized = color.toUpperCase();
|
|
67
|
+
const el = document.documentElement;
|
|
68
|
+
el.classList.remove(THEME_COLOR_CLASS);
|
|
69
|
+
const themeClass = THEME_COLOR_CLASS_MAP[normalized];
|
|
70
|
+
if (themeClass) el.classList.add(themeClass);
|
|
71
|
+
}
|
|
72
|
+
watch(() => themeSetting.themeColor, (value) => {
|
|
73
|
+
if (value) applyThemeColorClass(value);
|
|
74
|
+
}, { immediate: true });
|
|
47
75
|
/**
|
|
48
76
|
* 主题设置 Composable 函数
|
|
49
77
|
* @returns 返回主题设置相关的响应式数据和方法
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ProjectNameType: Record<string, string>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProjectName } from "../../enums/appEnum.mjs";
|
|
2
|
+
import "../../enums/index.mjs";
|
|
3
|
+
//#region src/modules/system-mqtt/system-mqtt.const.ts
|
|
4
|
+
var ProjectNameType = {
|
|
5
|
+
[ProjectName.PORTAL]: "WORKTABLE",
|
|
6
|
+
[ProjectName.BACKEND_MANAGEMENT]: "ENTERPRISE",
|
|
7
|
+
[ProjectName.DEVELOPER_CENTER]: "DEVELOPER",
|
|
8
|
+
[ProjectName.TENANT_CENTER]: "TENANT",
|
|
9
|
+
[ProjectName.APP_DESIGNER]: "APPDESIGN",
|
|
10
|
+
[ProjectName.WEB_RENDER]: "APPFRONT"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { ProjectNameType };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MQTT 订阅消息回调函数类型
|
|
3
|
+
*/
|
|
4
|
+
export type MqttSubCallback<T> = (payload?: T) => void | Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* 登出消息
|
|
7
|
+
*
|
|
8
|
+
* @export
|
|
9
|
+
* @interface IKickOutPayload
|
|
10
|
+
*/
|
|
11
|
+
export interface IKickOutPayload {
|
|
12
|
+
/**
|
|
13
|
+
* 用户 token
|
|
14
|
+
*
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof IKickOutPayload
|
|
17
|
+
*/
|
|
18
|
+
token: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 未读消息变化
|
|
22
|
+
*
|
|
23
|
+
* @export
|
|
24
|
+
* @interface IInternalMessagePayload
|
|
25
|
+
*/
|
|
26
|
+
export interface IInternalMessagePayload {
|
|
27
|
+
/**
|
|
28
|
+
* 全局未读消息数量
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
*/
|
|
32
|
+
totalUnreadCount: number;
|
|
33
|
+
/**
|
|
34
|
+
* 应用未读消息数量
|
|
35
|
+
*
|
|
36
|
+
* @type {{
|
|
37
|
+
* appId: string;
|
|
38
|
+
* unreadCount: number;
|
|
39
|
+
* }}
|
|
40
|
+
*/
|
|
41
|
+
appMessageCount: {
|
|
42
|
+
appId: string;
|
|
43
|
+
unreadCount: number;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 待办消息数量变化
|
|
48
|
+
*
|
|
49
|
+
* @export
|
|
50
|
+
* @interface IToDoMessagePayload
|
|
51
|
+
*/
|
|
52
|
+
export interface IToDoMessagePayload {
|
|
53
|
+
/**
|
|
54
|
+
* 待办消息数量
|
|
55
|
+
*
|
|
56
|
+
* @type {number}
|
|
57
|
+
*/
|
|
58
|
+
Count: number;
|
|
59
|
+
/**
|
|
60
|
+
* 应用待办消息数量
|
|
61
|
+
*
|
|
62
|
+
* @type {{
|
|
63
|
+
* appId: string;
|
|
64
|
+
* count: number;
|
|
65
|
+
* }}
|
|
66
|
+
*/
|
|
67
|
+
appMessageCount: {
|
|
68
|
+
appId: string;
|
|
69
|
+
count: number;
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { MqttCancelSub, IMqttClient } from '../mqtt';
|
|
2
|
+
import { IInternalMessagePayload, IKickOutPayload, IToDoMessagePayload, MqttSubCallback } from './system-mqtt.interface';
|
|
3
|
+
/**
|
|
4
|
+
* 系统级 MQTT 业务
|
|
5
|
+
*
|
|
6
|
+
* @export
|
|
7
|
+
* @class SystemMqttService
|
|
8
|
+
*/
|
|
9
|
+
export declare class SystemMqttService {
|
|
10
|
+
private static isInitialized;
|
|
11
|
+
protected static client: IMqttClient | undefined;
|
|
12
|
+
protected static fingerprint: string | undefined;
|
|
13
|
+
protected static client_id: string;
|
|
14
|
+
/**
|
|
15
|
+
* 用户登出消息 topic
|
|
16
|
+
*
|
|
17
|
+
* @static
|
|
18
|
+
*/
|
|
19
|
+
static readonly USER_LOGOUT_TOPIC = "users/logout/msg";
|
|
20
|
+
/**
|
|
21
|
+
* 踢出用户消息 topic
|
|
22
|
+
*
|
|
23
|
+
* @readonly
|
|
24
|
+
* @static
|
|
25
|
+
* @type {string}
|
|
26
|
+
*/
|
|
27
|
+
static get KICK_OUT_TOPIC(): string;
|
|
28
|
+
/**
|
|
29
|
+
* 未读消息变化 topic
|
|
30
|
+
*
|
|
31
|
+
* @readonly
|
|
32
|
+
* @static
|
|
33
|
+
* @type {string}
|
|
34
|
+
*/
|
|
35
|
+
static get INTERNAL_MESSAGE_TOPIC(): string;
|
|
36
|
+
/**
|
|
37
|
+
* 待办消息数量 topic
|
|
38
|
+
*
|
|
39
|
+
* @readonly
|
|
40
|
+
* @static
|
|
41
|
+
* @type {string}
|
|
42
|
+
*/
|
|
43
|
+
static get TASK_TODO_COUNT_TOPIC(): string;
|
|
44
|
+
/**
|
|
45
|
+
* 强制刷新并清空缓存 topic
|
|
46
|
+
*
|
|
47
|
+
* @static
|
|
48
|
+
*/
|
|
49
|
+
static readonly CLEAN_CACHE_TOPIC = "CLEAN_CACHE";
|
|
50
|
+
/**
|
|
51
|
+
* 初始化系统级 MQTT 客户端,需要在用户信息以及应用信息加载完成后调用
|
|
52
|
+
*
|
|
53
|
+
* @static
|
|
54
|
+
* @return {*} {Promise<void>}
|
|
55
|
+
*/
|
|
56
|
+
static init(): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* 订阅系统级 MQTT 消息
|
|
59
|
+
*
|
|
60
|
+
* @static
|
|
61
|
+
* @param {string} topic
|
|
62
|
+
*/
|
|
63
|
+
protected static subscribe<T = IObject>(topic: string, callback: MqttSubCallback<T>): MqttCancelSub;
|
|
64
|
+
/**
|
|
65
|
+
* 订阅用户被踢出消息
|
|
66
|
+
*
|
|
67
|
+
* @static
|
|
68
|
+
* @param {MqttSubCallback<IKickOutPayload>} callback
|
|
69
|
+
* @return {*} {MqttCancelSub}
|
|
70
|
+
*/
|
|
71
|
+
static subKickOut(callback: MqttSubCallback<IKickOutPayload>): MqttCancelSub;
|
|
72
|
+
/**
|
|
73
|
+
* 订阅未读消息变化
|
|
74
|
+
*
|
|
75
|
+
* @static
|
|
76
|
+
* @param {MqttSubCallback<IInternalMessagePayload>} callback
|
|
77
|
+
* @return {*} {MqttCancelSub}
|
|
78
|
+
*/
|
|
79
|
+
static subInternalMessage(callback: MqttSubCallback<IInternalMessagePayload>): MqttCancelSub;
|
|
80
|
+
/**
|
|
81
|
+
* 订阅待办消息数量变化
|
|
82
|
+
*
|
|
83
|
+
* @static
|
|
84
|
+
* @param {MqttSubCallback<IToDoMessagePayload>} callback
|
|
85
|
+
* @return {*} {MqttCancelSub}
|
|
86
|
+
*/
|
|
87
|
+
static subTaskTodoCount(callback: MqttSubCallback<IToDoMessagePayload>): MqttCancelSub;
|
|
88
|
+
/**
|
|
89
|
+
* 强制用户界面刷新
|
|
90
|
+
*
|
|
91
|
+
* @static
|
|
92
|
+
* @param {MqttSubCallback<void>} callback
|
|
93
|
+
* @return {*} {MqttCancelSub}
|
|
94
|
+
*/
|
|
95
|
+
static subCleanCache(): MqttCancelSub;
|
|
96
|
+
/**
|
|
97
|
+
* 发送用户登出消息
|
|
98
|
+
*
|
|
99
|
+
* @static
|
|
100
|
+
*/
|
|
101
|
+
static pubLogout(): void;
|
|
102
|
+
}
|