@gct-paas/core 0.1.4-dev.18 → 0.1.4-dev.19

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.
@@ -82,7 +82,7 @@ export declare enum EntityFormulaReturnTypeEnum {
82
82
  Int = "integer",
83
83
  Long = "long",
84
84
  Double = "decimal",
85
- Boolen = "boolean"
85
+ Boolean = "boolean"
86
86
  }
87
87
  interface CallbackOptions {
88
88
  expr: string;
@@ -67,7 +67,7 @@ var EntityFormulaReturnTypeEnum = /* @__PURE__ */ function(EntityFormulaReturnTy
67
67
  EntityFormulaReturnTypeEnum["Int"] = "integer";
68
68
  EntityFormulaReturnTypeEnum["Long"] = "long";
69
69
  EntityFormulaReturnTypeEnum["Double"] = "decimal";
70
- EntityFormulaReturnTypeEnum["Boolen"] = "boolean";
70
+ EntityFormulaReturnTypeEnum["Boolean"] = "boolean";
71
71
  return EntityFormulaReturnTypeEnum;
72
72
  }({});
73
73
  var IdentifierAddon = /* @__PURE__ */ function(IdentifierAddon) {
@@ -259,14 +259,7 @@ export declare enum BindCmpStyleTypeEnum {
259
259
  BindDecimal = "bindDecimal"
260
260
  }
261
261
  /** 组件类型下拉框类型对应组件类型 */
262
- export declare const transformBindCmp2CmpType: {
263
- TEXT: FormComponents;
264
- TEXTAREA: FormComponents;
265
- ELECTRONICSIGNATURE: FormComponents;
266
- SELECT_LIST: FormComponents;
267
- RADIO: FormComponents;
268
- CHECKBOX: FormComponents;
269
- };
262
+ export declare const transformBindCmp2CmpType: Record<string, string>;
270
263
  /** 组件类型下拉框集合 */
271
264
  export declare const bindCmpStyleMap: {
272
265
  bindText: BindCmpStyleEnum[];
package/es/index.mjs CHANGED
@@ -52,7 +52,7 @@ import { OverlayContainer } from "./utils/openUtil/overlay-container/overlay-con
52
52
  import { KitPkgUtil } from "./utils/kit-pkg-util/kit-pkg-util.mjs";
53
53
  import { PluginPgkUtil } from "./utils/plugin-pkg-util/plugin-pkg-util.mjs";
54
54
  import { PluginStaticResource } from "./utils/plugin-static-resource/plugin-static-resource.mjs";
55
- import { createWhiteImageWithText, deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams } from "./utils/tools/tools.mjs";
55
+ import { createWhiteImageWithText, deepMerge, getTenant, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams } from "./utils/tools/tools.mjs";
56
56
  import { buildShortUUID, buildUUID, sha256, uuid2 } from "./utils/uuid/uuid.mjs";
57
57
  import { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit } from "./utils/value-helper/value-helper.mjs";
58
58
  import { interceptors } from "./utils/axios/interceptors.mjs";
@@ -79,6 +79,7 @@ import { MENU_COLLAPSED_WIDTH, MENU_WIDTH_RANGE, THEME_COLORS } from "./modules/
79
79
  import { WATERMARK_INIT_DATA } from "./modules/platform-config/constants/watermark.const.mjs";
80
80
  import { usePlatformConfigStore } from "./modules/platform-config/store.mjs";
81
81
  import "./modules/platform-config/index.mjs";
82
+ import { timezone } from "./store/timezone-store.mjs";
82
83
  import { GlobalStoreUtil } from "./store/index.mjs";
83
84
  import { EnvironmentType } from "./modules/env-manager/env-manager.interface.mjs";
84
85
  import { APP_PREVIEW_PATH_REG, APP_PROD_PATH_REG, APP_RUN_PATH_REG, DEV_SINGLE_PATH_REG, HOST_REG, IP_REG, TEST_SINGLE_PATH_REG } from "./modules/env-manager/env-manager.const.mjs";
@@ -127,4 +128,4 @@ function onInit() {
127
128
  }
128
129
  onInit();
129
130
  //#endregion
130
- 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, 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, CategoryTypeEnum, Ch_BindCmpStyleEnum, ContentEnum, ContentTypeEnum, CoreConst, CreateType, CustomAction, DESIGNER_SESSION_CACHE_KEY, DEV_SINGLE_PATH_REG, DataSetReturnTypeEnum, DatasourceTypeEnum, DateRangeEnums, DefaultActions, DefaultDateTypeConst, Dependency_ENUM, DeployModeEnum, DeviceParamsTypeEnum, DictionaryUtil, DisplayEnums, DisplayTagTypeEnum, DisplayType, EditorRegisterConst, EntityFormulaReturnTypeEnum, EntityModelCategoryEnum, EntityModelTypeEnum, EnvironmentManager, EnvironmentType, ErrorHandler, ErrorStrategyFactory, ErrorTypeEnum, EventCategory, 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, 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, ModelTypeOptions, MqttClient, MqttConnectionStatus, MqttManager, NUMBER_TYPE, Namespace, NodesConfigTypeEnum, OBJECT_TYPE, OTHER_LOGIN_KEYS, OpenMode, OperatorTypeEnum, OpinionTypeEnum, OverlayContainer, PLUGIN_BASE_URL, PROJ_CFG_KEY, PageEnum, PanelEnum, PassRule, PatternEnum, PermissionModeEnum, PersonalCenterType, Platform, PlatformSettingActions, PlatformSettingEnum, PlatformType, PluginModeEnum, PluginPgkUtil, PluginStaticResource, Postion, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProgressTypeEnum, ProjectName, PropGroup, RELATION_FIELDS, RETURN_TYPE_MAP, ROLES_KEY, RdoButtonOpeEnum, RequestEnum, ResetRuleType, ResultEnum, ReturnTypeEnum, ReturnTypeMaps, RoleEnum, RouterTransitionEnum, RowSelectionTypeEnums, SCOPE, SCOPEINFO, SEARCH_SERVICE, SHOW_FIELDTYPES, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, STRING_TYPE, STYLE_NAMESPACE_TAG, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, SYSTEM_LOGIN_KEYS, SYSTEM_VAR_PREFIX, SearchComponents, SelectPickerEnums, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, SignatureStyleEnum, SignatureTypeEnum, SizeEnum, StatisticalMethodEnums, StyleGroup, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TIMEZONE_KEY, TODO_TYPE, TOKEN_KEY, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TagTypeEnum, TextAlign, TextDecoration, ThemeEnum, ToolkitEnum, TopMenuAlignEnum, TransactionMode, TreeHelper, TriggerEnum, TypeEnum, USER_INFO_KEY, UniqueConstraintType, UploadTypeEnum, Uploader, UserServiceType, VERIFICATIONCONDITIONS_TYPE, VITE_MINIO_PATH, VarTypeEnum, WATERMARK_INIT_DATA, WidgetInScopeEnum, WinMsgTypeEnum, WorkbenchType, afterFieldSet, afterValueSet, allOperator, biBackFunctionGroup, biBackFunctionMap, bindCmpStyleMap, booleanOperator, booleanTypes, buildItemRules, buildShortUUID, buildUUID, buttonShowType, cacheFnReturn, calcFontStyle, calcStyle, ch_ProcessStatusMap, computedEx, controlConfigEnum, copyTextToClipboard, createAppVue, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getTenant, getTimezone, getToken, hasEmojiAndSpecStr, hasEmojiAndSpecStr1, innerVarIds, innerVarList, insertCustomCssToHead, interceptors, ipaasBackFunctionGroup, ipaasBackFunctionMap, isDef, isMobile, isMultipleOperator, isSortFiled, mitt, mobileSearchListByFieldType, modelLoader, notSingleArr, nullDisplayEnum, numberOperator, numberTypes, openWindow, openWindowEnums, operateSysEnums, operator2FuncMap, padSearchListByFieldType, pageLayoutModeEnum, parseMatrixParams, parseValueUnit, permission, presetColor, randomUUID, returnBolOperator, screenEnum, screenMap, scriptTypeEnum, searchListByFieldType, selectionTypeEnums, setTenant, setToken, setupApp, setupErrorHandler, setupI18n, sha256, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, timeReg, transformBindCmp2CmpType, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
131
+ 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, 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, CategoryTypeEnum, Ch_BindCmpStyleEnum, ContentEnum, ContentTypeEnum, CoreConst, CreateType, CustomAction, DESIGNER_SESSION_CACHE_KEY, DEV_SINGLE_PATH_REG, DataSetReturnTypeEnum, DatasourceTypeEnum, DateRangeEnums, DefaultActions, DefaultDateTypeConst, Dependency_ENUM, DeployModeEnum, DeviceParamsTypeEnum, DictionaryUtil, DisplayEnums, DisplayTagTypeEnum, DisplayType, EditorRegisterConst, EntityFormulaReturnTypeEnum, EntityModelCategoryEnum, EntityModelTypeEnum, EnvironmentManager, EnvironmentType, ErrorHandler, ErrorStrategyFactory, ErrorTypeEnum, EventCategory, 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, 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, ModelTypeOptions, MqttClient, MqttConnectionStatus, MqttManager, NUMBER_TYPE, Namespace, NodesConfigTypeEnum, OBJECT_TYPE, OTHER_LOGIN_KEYS, OpenMode, OperatorTypeEnum, OpinionTypeEnum, OverlayContainer, PLUGIN_BASE_URL, PROJ_CFG_KEY, PageEnum, PanelEnum, PassRule, PatternEnum, PermissionModeEnum, PersonalCenterType, Platform, PlatformSettingActions, PlatformSettingEnum, PlatformType, PluginModeEnum, PluginPgkUtil, PluginStaticResource, Postion, PrintModeEnums, PrintResourceEnum, PrintTypeEnum, ProcessStatusEnum, ProgressTypeEnum, ProjectName, PropGroup, RELATION_FIELDS, RETURN_TYPE_MAP, ROLES_KEY, RdoButtonOpeEnum, RequestEnum, ResetRuleType, ResultEnum, ReturnTypeEnum, ReturnTypeMaps, RoleEnum, RouterTransitionEnum, RowSelectionTypeEnums, SCOPE, SCOPEINFO, SEARCH_SERVICE, SHOW_FIELDTYPES, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, STRING_TYPE, STYLE_NAMESPACE_TAG, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, SYSTEM_LOGIN_KEYS, SYSTEM_VAR_PREFIX, SearchComponents, SelectPickerEnums, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, SignatureStyleEnum, SignatureTypeEnum, SizeEnum, StatisticalMethodEnums, StyleGroup, TENANT_KEY, TEST_SINGLE_PATH_REG, THEME_COLORS, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TIMEZONE_KEY, TODO_TYPE, TOKEN_KEY, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TagTypeEnum, TextAlign, TextDecoration, ThemeEnum, ToolkitEnum, TopMenuAlignEnum, TransactionMode, TreeHelper, TriggerEnum, TypeEnum, USER_INFO_KEY, UniqueConstraintType, UploadTypeEnum, Uploader, UserServiceType, VERIFICATIONCONDITIONS_TYPE, VITE_MINIO_PATH, VarTypeEnum, WATERMARK_INIT_DATA, WidgetInScopeEnum, WinMsgTypeEnum, WorkbenchType, afterFieldSet, afterValueSet, allOperator, biBackFunctionGroup, biBackFunctionMap, bindCmpStyleMap, booleanOperator, booleanTypes, buildItemRules, buildShortUUID, buildUUID, buttonShowType, cacheFnReturn, calcFontStyle, calcStyle, ch_ProcessStatusMap, computedEx, controlConfigEnum, copyTextToClipboard, createAppVue, createWhiteImageWithText, cssLoader, dataURLtoBlob, deepMerge, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, emitFieldSet, fixedAlignENUM, functionGroup, functionMap, gctMemoizeAsync, genUrl, getDeviceFingerprint, getLoginTypeOptions, getMobileBrowserFingerprint, getOperatorList, getPageIdentification, getTenant, getToken, hasEmojiAndSpecStr, hasEmojiAndSpecStr1, innerVarIds, innerVarList, insertCustomCssToHead, interceptors, ipaasBackFunctionGroup, ipaasBackFunctionMap, isDef, isMobile, isMultipleOperator, isSortFiled, mitt, mobileSearchListByFieldType, modelLoader, notSingleArr, nullDisplayEnum, numberOperator, numberTypes, openWindow, openWindowEnums, operateSysEnums, operator2FuncMap, padSearchListByFieldType, pageLayoutModeEnum, parseMatrixParams, parseValueUnit, permission, presetColor, randomUUID, returnBolOperator, screenEnum, screenMap, scriptTypeEnum, searchListByFieldType, selectionTypeEnums, setTenant, setToken, setupApp, setupErrorHandler, setupI18n, sha256, sizeEnum, sizeParser, sortTypeEnum, statisticalMethodEnum, stringifyMatrixParams, t, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, tagEnum, timeReg, timezone, transformBindCmp2CmpType, typeParser, uploaderFiles, urlReg, urlToBase64, useAppInst, useCopyToClipboard, useIFrameProps, useModal, useNamespace, usePermissionStore, usePlatformConfigStore, useTenantStore, useUUid, useUserStore, useWuJieBus, useWuJieProps, uuid2, validateEmoji, validateIsModelName, validateModelName, zeroWidthSpace };
@@ -1,5 +1,5 @@
1
1
  import { LoginParams, UserState } from '../types/user';
2
- import { UserLoginResp } from '@gct-paas/api/platform';
2
+ import { UserLoginResp, UserTenantDTO } from '@gct-paas/api/platform';
3
3
  export declare const useUserStore: import('pinia').StoreDefinition<"user", UserState, {
4
4
  getUserInfo(state: {
5
5
  userInfo: {
@@ -213,6 +213,80 @@ export declare const useUserStore: import('pinia').StoreDefinition<"user", UserS
213
213
  lastUpdateTime: number;
214
214
  userPermissions: Record<string, boolean>;
215
215
  } & import('pinia').PiniaCustomStateProperties<UserState>): Record<string, boolean>;
216
+ /**用户信息下的租户信息 */
217
+ getTenantInfo(state: {
218
+ userInfo: {
219
+ avatar?: string | undefined;
220
+ birthday?: string | undefined;
221
+ country?: string | undefined;
222
+ createTime?: string | undefined;
223
+ email?: string | undefined;
224
+ empNo?: string | undefined;
225
+ ext0?: string | undefined;
226
+ ext1?: string | undefined;
227
+ ext2?: string | undefined;
228
+ ext3?: string | undefined;
229
+ ext4?: string | undefined;
230
+ ext5?: number | undefined;
231
+ ext6?: number | undefined;
232
+ ext7?: number | undefined;
233
+ ext8?: number | undefined;
234
+ ext9?: number | undefined;
235
+ fullname?: string | undefined;
236
+ gender?: number | undefined;
237
+ globalSuperAdmin?: number | undefined;
238
+ ip?: string | undefined;
239
+ match?: boolean | undefined;
240
+ minioDomain?: string | undefined;
241
+ mobile?: string | undefined;
242
+ mqttProperties?: {
243
+ password?: string | undefined;
244
+ username?: string | undefined;
245
+ } | undefined;
246
+ orgIds?: string[] | undefined;
247
+ platTicket?: string | undefined;
248
+ platformManager?: number | undefined;
249
+ platformManagerPermissions?: string[] | undefined;
250
+ signType?: string | undefined;
251
+ signWay?: string | undefined;
252
+ signatureImage?: string | undefined;
253
+ signatureImageWrite?: string | undefined;
254
+ suiteTicket?: string | undefined;
255
+ telephone?: string | undefined;
256
+ tenantList?: {
257
+ duty?: string | undefined;
258
+ enabled?: number | undefined;
259
+ id?: string | undefined;
260
+ managerId?: string | undefined;
261
+ managerName?: string | undefined;
262
+ name?: string | undefined;
263
+ orgNames?: string | undefined;
264
+ userId?: string | undefined;
265
+ userOrgList?: {
266
+ createTime?: string | undefined;
267
+ createUserId?: string | undefined;
268
+ createUserName?: string | undefined;
269
+ id?: string | undefined;
270
+ master?: number | undefined;
271
+ modifyTime?: string | undefined;
272
+ modifyUserId?: string | undefined;
273
+ modifyUserName?: string | undefined;
274
+ orgId?: string | undefined;
275
+ orgName?: string | undefined;
276
+ principal?: number | undefined;
277
+ tenantId?: string | undefined;
278
+ userId?: string | undefined;
279
+ }[] | undefined;
280
+ }[] | undefined;
281
+ token?: string | undefined;
282
+ userId?: string | undefined;
283
+ username?: string | undefined;
284
+ } | null;
285
+ roleList: string[];
286
+ sessionTimeout: boolean;
287
+ lastUpdateTime: number;
288
+ userPermissions: Record<string, boolean>;
289
+ } & import('pinia').PiniaCustomStateProperties<UserState>): UserTenantDTO | undefined;
216
290
  }, {
217
291
  login(config: LoginParams, { hasError }?: {
218
292
  hasError: any;
@@ -1,4 +1,4 @@
1
- import { getToken, setToken } from "../../../utils/tools/tools.mjs";
1
+ import { getTenant, getToken, setToken } from "../../../utils/tools/tools.mjs";
2
2
  import { getDeviceFingerprint, getPageIdentification } from "../../../utils/deviceFingerprint.mjs";
3
3
  import "../../../utils/index.mjs";
4
4
  import { defineStore } from "pinia";
@@ -17,6 +17,9 @@ var useUserStore = defineStore("user", {
17
17
  },
18
18
  getUserPermissions(state) {
19
19
  return state.userPermissions;
20
+ },
21
+ getTenantInfo(state) {
22
+ return state.userInfo?.tenantList?.find((i) => i.id === getTenant());
20
23
  }
21
24
  },
22
25
  actions: {
@@ -1,5 +1,6 @@
1
1
  import { IGlobalStore } from './global-store';
2
2
  import { IPlatformConfigStore } from '../modules/platform-config';
3
+ export { timezone } from './timezone-store';
3
4
  /**
4
5
  * 全局的状态管理工具类
5
6
  *
@@ -1,6 +1,7 @@
1
1
  import { useGlobalStore } from "./global-store.mjs";
2
2
  import { usePlatformConfigStore } from "../modules/platform-config/store.mjs";
3
3
  import "../modules/platform-config/index.mjs";
4
+ import "./timezone-store.mjs";
4
5
  import { createPinia, setActivePinia } from "pinia";
5
6
  //#region src/store/index.ts
6
7
  /**
@@ -0,0 +1 @@
1
+ export declare const timezone: import('@vueuse/core').RemovableRef<string>;
@@ -0,0 +1,7 @@
1
+ import { TIMEZONE_KEY } from "../enums/cacheEnum.mjs";
2
+ import "../enums/index.mjs";
3
+ import { useStorage } from "@vueuse/core";
4
+ //#region src/store/timezone-store.ts
5
+ var timezone = useStorage(TIMEZONE_KEY, "UTC+08:00");
6
+ //#endregion
7
+ export { timezone };
@@ -1,4 +1,6 @@
1
- import { getTenant, getTimezone, getToken } from "../tools/tools.mjs";
1
+ import { getTenant, getToken } from "../tools/tools.mjs";
2
+ import { timezone } from "../../store/timezone-store.mjs";
3
+ import "../../store/index.mjs";
2
4
  import { AxiosHeaders } from "axios";
3
5
  //#region src/utils/axios/interceptors.ts
4
6
  /**
@@ -14,7 +16,7 @@ function interceptors(axios) {
14
16
  Token: getToken(),
15
17
  Lang: _gct.store.lang,
16
18
  "Tenant-Id": getTenant(),
17
- Timezone: getTimezone()
19
+ Timezone: timezone.value
18
20
  });
19
21
  return config;
20
22
  });
@@ -13,7 +13,7 @@ export * from './openUtil';
13
13
  export { KitPkgUtil } from './kit-pkg-util/kit-pkg-util';
14
14
  export { PluginPgkUtil, type IModuleMap, type LoadPluginResult, } from './plugin-pkg-util/plugin-pkg-util';
15
15
  export { PluginStaticResource } from './plugin-static-resource/plugin-static-resource';
16
- export { getToken, setToken, getTenant, getTimezone, isMobile, setTenant, deepMerge, stringifyMatrixParams, parseMatrixParams, createWhiteImageWithText, } from './tools/tools';
16
+ export { getToken, setToken, getTenant, isMobile, setTenant, deepMerge, stringifyMatrixParams, parseMatrixParams, createWhiteImageWithText, } from './tools/tools';
17
17
  export * from './uuid/uuid';
18
18
  export * from './value-helper/value-helper';
19
19
  export { interceptors } from './axios/interceptors';
@@ -56,7 +56,10 @@ var KitPkgUtil = class {
56
56
  if (config) {
57
57
  const loaderUrl = this.joinPaths(this.KIT_PKG_BASE_PATH, config.kit.toUpperCase(), mode, `loader.esm.min.js?version=${config.version || "0.0.0"}`);
58
58
  try {
59
- const module = await import(loaderUrl);
59
+ const module = await import(
60
+ /* @vite-ignore */
61
+ loaderUrl
62
+ );
60
63
  if (module && module.default) app.use(module.default);
61
64
  else console.warn(`Kit ${config.kit} does not export a default function`);
62
65
  } catch (error) {
@@ -70,7 +70,10 @@ var PluginPgkUtil = class {
70
70
  const baseUrl = this.joinPaths(PLUGIN_BASE_URL, plugin.url, "dist");
71
71
  const load = async () => {
72
72
  try {
73
- const module = await import(`${baseUrl}/${mode}/loader.esm.min.js?version=${plugin.version}`);
73
+ const module = await import(
74
+ /* @vite-ignore */
75
+ this.joinPaths(baseUrl, mode, `loader.esm.min.js?version=${plugin.version}`)
76
+ );
74
77
  moduleMap[plugin.key] = module;
75
78
  this.module.set(plugin.key, module);
76
79
  } catch (error) {
@@ -1,4 +1,3 @@
1
- import { default as qs } from 'qs';
2
1
  /**
3
2
  * 获取认证令牌
4
3
  *
@@ -31,13 +30,6 @@ export declare function setTenant(tenant: string): void;
31
30
  * 是否为移动端设备
32
31
  */
33
32
  export declare const isMobile: boolean;
34
- /**
35
- * 获取时区,默认: UTC+08:00
36
- *
37
- * @export
38
- * @returns {*}
39
- */
40
- export declare function getTimezone(): string;
41
33
  /**
42
34
  * 递归合并两个对象
43
35
  *
@@ -53,13 +45,13 @@ export declare function deepMerge<T extends object | null | undefined, U extends
53
45
  * @param {*} params
54
46
  * @returns
55
47
  */
56
- export declare function stringifyMatrixParams(params: Record<string, string | number | null | undefined>): string;
48
+ export declare function stringifyMatrixParams(params: Record<string, unknown>): string;
57
49
  /**
58
50
  * 矩阵参数 → 对象(parse)
59
51
  * @param {*} path
60
52
  * @returns
61
53
  */
62
- export declare function parseMatrixParams(path: string): qs.ParsedQs;
54
+ export declare function parseMatrixParams(path: string): IObject;
63
55
  /**
64
56
  * 创建白色背景的图片,并添加文本
65
57
  *
@@ -1,5 +1,3 @@
1
- import "../../enums/cacheEnum.mjs";
2
- import "../../enums/index.mjs";
3
1
  import { CoreConst } from "../../constants/core.mjs";
4
2
  import "../../constants/index.mjs";
5
3
  import qs from "qs";
@@ -55,15 +53,6 @@ var isMobile = (() => {
55
53
  return mobileRegex.test(ua) || isSmallScreen && isTouch;
56
54
  })();
57
55
  /**
58
- * 获取时区,默认: UTC+08:00
59
- *
60
- * @export
61
- * @returns {*}
62
- */
63
- function getTimezone() {
64
- return localStorage.getItem("TIMEZONE__") || "UTC+08:00";
65
- }
66
- /**
67
56
  * 递归合并两个对象
68
57
  *
69
58
  * @template T
@@ -151,4 +140,4 @@ function createWhiteImageWithText(name, width, height) {
151
140
  return canvas.toDataURL("image/png");
152
141
  }
153
142
  //#endregion
154
- export { createWhiteImageWithText, deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams };
143
+ export { createWhiteImageWithText, deepMerge, getTenant, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/core",
3
- "version": "0.1.4-dev.18",
3
+ "version": "0.1.4-dev.19",
4
4
  "type": "module",
5
5
  "description": "paas 平台核心包",
6
6
  "loader": "dist/index.esm.min.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@fingerprintjs/fingerprintjs": "^5.1.0",
49
- "@gct-paas/api": "^0.1.2-dev.1",
49
+ "@gct-paas/api": "^0.1.2-dev.2",
50
50
  "@module-federation/runtime": "^2.2.3",
51
51
  "@vueuse/core": "^14.1.0",
52
52
  "async-validator": "^4.2.5",
@@ -76,5 +76,5 @@
76
76
  "vue-i18n": ">=11",
77
77
  "vue-router": ">=4"
78
78
  },
79
- "gitHead": "d79e561695bc9a4ff14b7c1bc735a595a32ed3e9"
79
+ "gitHead": "efd978bbe7552b0c5ef6dbc5b62780c68aa116ab"
80
80
  }