Commit 606e5aa55934fbe077064272d5c2b526dcfd7329

Authored by ww
1 parent ab71cfd7

feat: 新增任务中心间隔时间单位(秒)使用环境变量控制

... ... @@ -39,3 +39,6 @@ VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME = 500000
39 39
40 40 # Alarm Notify Auto Close Time Unit is Second
41 41 VITE_GLOB_ALARM_NOTIFY_DURATION = 5
  42 +
  43 +# Should Disabled Task Center Execute Interval Unit (Second)
  44 +VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND = false
... ...
1   -# Whether to open mock
2   -VITE_GLOB_USE_MOCK = false
3   -
4   -# public path
5   -VITE_GLOB_PUBLIC_PATH = /
6   -
7   -# Delete console
8   -VITE_GLOB_DROP_CONSOLE = true
9   -
10   -# Whether to enable gzip or brotli compression
11   -# Optional: gzip | brotli | none
12   -# If you need multiple forms, you can use `,` to separate
13   -VITE_GLOB_BUILD_COMPRESS = 'gzip'
14   -
15   -# Whether to delete origin files when using compress, default false
16   -VITE_GLOB_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
17   -
18   -# Basic interface address SPA
19   -VITE_GLOB_API_URL=http://122.9.141.195:8080/api
20   -
21   -# File upload address, optional
22   -# It can be forwarded by nginx or write the actual address directly
23   -VITE_GLOB_UPLOAD_URL=http://122.9.141.195:8080/api/yt/oss/upload
24   -
25   -# Interface prefix
26   -VITE_GLOB_API_URL_PREFIX=/yt
27   -
28   -# Whether to enable image compression
29   -VITE_GLOB_USE_IMAGEMIN= false
30   -
31   -# use pwa
32   -VITE_USE_PWA = false
33   -
34   -# Is it compatible with older browsers
35   -VITE_LEGACY = true
36   -
37   -# 实时数据的ws地址
38   -VITE_GLOB_WEB_SOCKET = ws://122.9.141.195:8080/api/ws/plugins/telemetry?token=
39   -
40   -#configuration
41   -VITE_GLOB_CONFIGURATION = /thingskit-scada
42   -
43   -# 大屏设计器
44   -VITE_GLOB_LARGE_DESIGNER = /large-designer
45   -
46   -# Content Security Policy
47   -VITE_GLOB_CONTENT_SECURITY_POLICY = false
48   -
49   -# Alarm Notify Polling Interval Time
50   -VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME = 60000
51   -
52   -# Alarm Notify Auto Close Time Unit is Second
53   -VITE_GLOB_ALARM_NOTIFY_DURATION = 5
  1 +# Whether to open mock
  2 +VITE_GLOB_USE_MOCK = false
  3 +
  4 +# public path
  5 +VITE_GLOB_PUBLIC_PATH = /
  6 +
  7 +# Delete console
  8 +VITE_GLOB_DROP_CONSOLE = true
  9 +
  10 +# Whether to enable gzip or brotli compression
  11 +# Optional: gzip | brotli | none
  12 +# If you need multiple forms, you can use `,` to separate
  13 +VITE_GLOB_BUILD_COMPRESS = 'gzip'
  14 +
  15 +# Whether to delete origin files when using compress, default false
  16 +VITE_GLOB_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
  17 +
  18 +# Basic interface address SPA
  19 +VITE_GLOB_API_URL=http://122.9.141.195:8080/api
  20 +
  21 +# File upload address, optional
  22 +# It can be forwarded by nginx or write the actual address directly
  23 +VITE_GLOB_UPLOAD_URL=http://122.9.141.195:8080/api/yt/oss/upload
  24 +
  25 +# Interface prefix
  26 +VITE_GLOB_API_URL_PREFIX=/yt
  27 +
  28 +# Whether to enable image compression
  29 +VITE_GLOB_USE_IMAGEMIN= false
  30 +
  31 +# use pwa
  32 +VITE_USE_PWA = false
  33 +
  34 +# Is it compatible with older browsers
  35 +VITE_LEGACY = true
  36 +
  37 +# 实时数据的ws地址
  38 +VITE_GLOB_WEB_SOCKET = ws://122.9.141.195:8080/api/ws/plugins/telemetry?token=
  39 +
  40 +#configuration
  41 +VITE_GLOB_CONFIGURATION = /thingskit-scada
  42 +
  43 +# 大屏设计器
  44 +VITE_GLOB_LARGE_DESIGNER = /large-designer
  45 +
  46 +# Content Security Policy
  47 +VITE_GLOB_CONTENT_SECURITY_POLICY = false
  48 +
  49 +# Alarm Notify Polling Interval Time
  50 +VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME = 60000
  51 +
  52 +# Alarm Notify Auto Close Time Unit is Second
  53 +VITE_GLOB_ALARM_NOTIFY_DURATION = 5
  54 +
  55 +# Should Disabled Task Center Execute Interval Unit (Second)
  56 +VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND = false
... ...
... ... @@ -23,3 +23,8 @@ export enum TimeUnitNameEnum {
23 23 MINUTE = '分',
24 24 HOUR = '时',
25 25 }
  26 +
  27 +export enum BooleanStringEnum {
  28 + TRUE = 'true',
  29 + FALSE = 'false',
  30 +}
... ...
1   -import type { GlobConfig } from '/#/config';
2   -
3   -import { warn } from '/@/utils/log';
4   -import { getAppEnvConfig } from '/@/utils/env';
5   -
6   -export const useGlobSetting = (): Readonly<GlobConfig> => {
7   - const {
8   - VITE_GLOB_APP_TITLE,
9   - VITE_GLOB_API_URL,
10   - VITE_GLOB_APP_SHORT_NAME,
11   - VITE_GLOB_API_URL_PREFIX,
12   - VITE_GLOB_UPLOAD_URL,
13   - VITE_GLOB_CONFIGURATION,
14   - VITE_GLOB_WEB_SOCKET,
15   - VITE_GLOB_CONTENT_SECURITY_POLICY,
16   - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
17   - VITE_GLOB_ALARM_NOTIFY_DURATION,
18   - VITE_GLOB_LARGE_DESIGNER,
19   - } = getAppEnvConfig();
20   -
21   - if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
22   - warn(
23   - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
24   - );
25   - }
26   -
27   - // Take global configuration
28   - const glob: Readonly<GlobConfig> = {
29   - title: VITE_GLOB_APP_TITLE,
30   - apiUrl: VITE_GLOB_API_URL,
31   - shortName: VITE_GLOB_APP_SHORT_NAME,
32   - urlPrefix: VITE_GLOB_API_URL_PREFIX,
33   - uploadUrl: VITE_GLOB_UPLOAD_URL,
34   - configurationPrefix: VITE_GLOB_CONFIGURATION,
35   - largeDesignerPrefix: VITE_GLOB_LARGE_DESIGNER,
36   - socketUrl: VITE_GLOB_WEB_SOCKET,
37   - securityPolicy: VITE_GLOB_CONTENT_SECURITY_POLICY,
38   - alarmNotifyDuration: VITE_GLOB_ALARM_NOTIFY_DURATION,
39   - alarmPollingInterval: VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
40   - };
41   - return glob as Readonly<GlobConfig>;
42   -};
  1 +import type { GlobConfig } from '/#/config';
  2 +
  3 +import { warn } from '/@/utils/log';
  4 +import { getAppEnvConfig } from '/@/utils/env';
  5 +
  6 +export const useGlobSetting = (): Readonly<GlobConfig> => {
  7 + const {
  8 + VITE_GLOB_APP_TITLE,
  9 + VITE_GLOB_API_URL,
  10 + VITE_GLOB_APP_SHORT_NAME,
  11 + VITE_GLOB_API_URL_PREFIX,
  12 + VITE_GLOB_UPLOAD_URL,
  13 + VITE_GLOB_CONFIGURATION,
  14 + VITE_GLOB_WEB_SOCKET,
  15 + VITE_GLOB_CONTENT_SECURITY_POLICY,
  16 + VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
  17 + VITE_GLOB_ALARM_NOTIFY_DURATION,
  18 + VITE_GLOB_LARGE_DESIGNER,
  19 + VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND,
  20 + } = getAppEnvConfig();
  21 +
  22 + if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) {
  23 + warn(
  24 + `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
  25 + );
  26 + }
  27 +
  28 + // Take global configuration
  29 + const glob: Readonly<GlobConfig> = {
  30 + title: VITE_GLOB_APP_TITLE,
  31 + apiUrl: VITE_GLOB_API_URL,
  32 + shortName: VITE_GLOB_APP_SHORT_NAME,
  33 + urlPrefix: VITE_GLOB_API_URL_PREFIX,
  34 + uploadUrl: VITE_GLOB_UPLOAD_URL,
  35 + configurationPrefix: VITE_GLOB_CONFIGURATION,
  36 + largeDesignerPrefix: VITE_GLOB_LARGE_DESIGNER,
  37 + socketUrl: VITE_GLOB_WEB_SOCKET,
  38 + securityPolicy: VITE_GLOB_CONTENT_SECURITY_POLICY,
  39 + alarmNotifyDuration: VITE_GLOB_ALARM_NOTIFY_DURATION,
  40 + alarmPollingInterval: VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
  41 + disabledTaskCenterExecuteIntervalUnitSecond:
  42 + VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND,
  43 + };
  44 + return glob as Readonly<GlobConfig>;
  45 +};
... ...
1   -import type { GlobEnvConfig } from '/#/config';
2   -
3   -import { warn } from '/@/utils/log';
4   -import pkg from '../../package.json';
5   -import { getConfigFileName } from '../../build/getConfigFileName';
6   -
7   -export function getCommonStoragePrefix() {
8   - const { VITE_GLOB_APP_SHORT_NAME } = getAppEnvConfig();
9   - return `${VITE_GLOB_APP_SHORT_NAME}__${getEnv()}`.toUpperCase();
10   -}
11   -
12   -// Generate cache key according to version
13   -export function getStorageShortName() {
14   - return `${getCommonStoragePrefix()}${`__${pkg.version}`}__`.toUpperCase();
15   -}
16   -
17   -export function getAppEnvConfig() {
18   - const ENV_NAME = getConfigFileName(import.meta.env);
19   -
20   - const ENV = (import.meta.env.DEV
21   - ? // Get the global configuration (the configuration will be extracted independently when packaging)
22   - (import.meta.env as unknown as GlobEnvConfig)
23   - : window[ENV_NAME as any]) as unknown as GlobEnvConfig;
24   - const {
25   - VITE_GLOB_APP_TITLE,
26   - VITE_GLOB_API_URL,
27   - VITE_GLOB_APP_SHORT_NAME,
28   - VITE_GLOB_API_URL_PREFIX,
29   - VITE_GLOB_UPLOAD_URL,
30   - VITE_GLOB_CONFIGURATION,
31   - VITE_GLOB_WEB_SOCKET,
32   - VITE_GLOB_CONTENT_SECURITY_POLICY,
33   - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
34   - VITE_GLOB_ALARM_NOTIFY_DURATION,
35   - VITE_GLOB_LARGE_DESIGNER,
36   - } = ENV;
37   -
38   - if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
39   - warn(
40   - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
41   - );
42   - }
43   -
44   - return {
45   - VITE_GLOB_APP_TITLE,
46   - VITE_GLOB_API_URL,
47   - VITE_GLOB_APP_SHORT_NAME,
48   - VITE_GLOB_API_URL_PREFIX,
49   - VITE_GLOB_UPLOAD_URL,
50   - VITE_GLOB_CONFIGURATION,
51   - VITE_GLOB_WEB_SOCKET,
52   - VITE_GLOB_CONTENT_SECURITY_POLICY,
53   - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
54   - VITE_GLOB_ALARM_NOTIFY_DURATION,
55   - VITE_GLOB_LARGE_DESIGNER,
56   - };
57   -}
58   -
59   -/**
60   - * @description: Development mode
61   - */
62   -export const devMode = 'development';
63   -
64   -/**
65   - * @description: Production mode
66   - */
67   -export const prodMode = 'production';
68   -
69   -/**
70   - * @description: Get environment variables
71   - * @returns:
72   - * @example:
73   - */
74   -export function getEnv(): string {
75   - return import.meta.env.MODE;
76   -}
77   -
78   -/**
79   - * @description: Is it a development mode
80   - * @returns:
81   - * @example:
82   - */
83   -export function isDevMode(): boolean {
84   - return import.meta.env.DEV;
85   -}
86   -
87   -/**
88   - * @description: Is it a production mode
89   - * @returns:
90   - * @example:
91   - */
92   -export function isProdMode(): boolean {
93   - return import.meta.env.PROD;
94   -}
  1 +import type { GlobEnvConfig } from '/#/config';
  2 +
  3 +import { warn } from '/@/utils/log';
  4 +import pkg from '../../package.json';
  5 +import { getConfigFileName } from '../../build/getConfigFileName';
  6 +
  7 +export function getCommonStoragePrefix() {
  8 + const { VITE_GLOB_APP_SHORT_NAME } = getAppEnvConfig();
  9 + return `${VITE_GLOB_APP_SHORT_NAME}__${getEnv()}`.toUpperCase();
  10 +}
  11 +
  12 +// Generate cache key according to version
  13 +export function getStorageShortName() {
  14 + return `${getCommonStoragePrefix()}${`__${pkg.version}`}__`.toUpperCase();
  15 +}
  16 +
  17 +export function getAppEnvConfig() {
  18 + const ENV_NAME = getConfigFileName(import.meta.env);
  19 +
  20 + const ENV = (import.meta.env.DEV
  21 + ? // Get the global configuration (the configuration will be extracted independently when packaging)
  22 + (import.meta.env as unknown as GlobEnvConfig)
  23 + : window[ENV_NAME as any]) as unknown as GlobEnvConfig;
  24 + const {
  25 + VITE_GLOB_APP_TITLE,
  26 + VITE_GLOB_API_URL,
  27 + VITE_GLOB_APP_SHORT_NAME,
  28 + VITE_GLOB_API_URL_PREFIX,
  29 + VITE_GLOB_UPLOAD_URL,
  30 + VITE_GLOB_CONFIGURATION,
  31 + VITE_GLOB_WEB_SOCKET,
  32 + VITE_GLOB_CONTENT_SECURITY_POLICY,
  33 + VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
  34 + VITE_GLOB_ALARM_NOTIFY_DURATION,
  35 + VITE_GLOB_LARGE_DESIGNER,
  36 + VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND,
  37 + } = ENV;
  38 +
  39 + if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
  40 + warn(
  41 + `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.`
  42 + );
  43 + }
  44 +
  45 + return {
  46 + VITE_GLOB_APP_TITLE,
  47 + VITE_GLOB_API_URL,
  48 + VITE_GLOB_APP_SHORT_NAME,
  49 + VITE_GLOB_API_URL_PREFIX,
  50 + VITE_GLOB_UPLOAD_URL,
  51 + VITE_GLOB_CONFIGURATION,
  52 + VITE_GLOB_WEB_SOCKET,
  53 + VITE_GLOB_CONTENT_SECURITY_POLICY,
  54 + VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME,
  55 + VITE_GLOB_ALARM_NOTIFY_DURATION,
  56 + VITE_GLOB_LARGE_DESIGNER,
  57 + VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND,
  58 + };
  59 +}
  60 +
  61 +/**
  62 + * @description: Development mode
  63 + */
  64 +export const devMode = 'development';
  65 +
  66 +/**
  67 + * @description: Production mode
  68 + */
  69 +export const prodMode = 'production';
  70 +
  71 +/**
  72 + * @description: Get environment variables
  73 + * @returns:
  74 + * @example:
  75 + */
  76 +export function getEnv(): string {
  77 + return import.meta.env.MODE;
  78 +}
  79 +
  80 +/**
  81 + * @description: Is it a development mode
  82 + * @returns:
  83 + * @example:
  84 + */
  85 +export function isDevMode(): boolean {
  86 + return import.meta.env.DEV;
  87 +}
  88 +
  89 +/**
  90 + * @description: Is it a production mode
  91 + * @returns:
  92 + * @example:
  93 + */
  94 +export function isProdMode(): boolean {
  95 + return import.meta.env.PROD;
  96 +}
... ...
... ... @@ -10,14 +10,17 @@ import { PollCommandInput, ModeEnum } from '../PollCommandInput';
10 10 import { DeviceProfileModel } from '/@/api/device/model/deviceModel';
11 11 import { TransportTypeEnum } from '/@/views/device/profiles/components/TransportDescript/const';
12 12 import { JSONEditorValidator } from '/@/components/CodeEditor/src/JSONEditor';
13   -import { TimeUnitEnum, TimeUnitNameEnum } from '/@/enums/toolEnum';
  13 +import { BooleanStringEnum, TimeUnitEnum, TimeUnitNameEnum } from '/@/enums/toolEnum';
14 14 import { dateUtil } from '/@/utils/dateUtil';
15 15 import { ProductPicker, validateProductPicker } from '../ProductPicker';
  16 +import { useGlobSetting } from '/@/hooks/setting';
16 17
17 18 useComponentRegister('DevicePicker', DevicePicker);
18 19 useComponentRegister('ProductPicker', ProductPicker);
19 20 useComponentRegister('PollCommandInput', PollCommandInput);
20 21
  22 +const { disabledTaskCenterExecuteIntervalUnitSecond } = useGlobSetting();
  23 +
21 24 export enum FormFieldsEnum {
22 25 // 任务名称
23 26 NAME = 'name',
... ... @@ -338,13 +341,21 @@ export const formSchemas: FormSchema[] = [
338 341 component: 'RadioGroup',
339 342 label: '时间单位',
340 343 ifShow: ({ model }) => model[FormFieldsEnum.EXECUTE_TIME_TYPE] === ExecuteTimeTypeEnum.POLL,
341   - defaultValue: TimeUnitEnum.SECOND,
342   - componentProps: {
343   - options: [
344   - { label: TimeUnitNameEnum.SECOND, value: TimeUnitEnum.SECOND },
  344 + defaultValue:
  345 + disabledTaskCenterExecuteIntervalUnitSecond === BooleanStringEnum.TRUE
  346 + ? TimeUnitEnum.MINUTE
  347 + : TimeUnitEnum.SECOND,
  348 + componentProps: () => {
  349 + const options = [
345 350 { label: TimeUnitNameEnum.MINUTE, value: TimeUnitEnum.MINUTE },
346 351 { label: TimeUnitNameEnum.HOUR, value: TimeUnitEnum.HOUR },
347   - ],
  352 + ];
  353 + if (disabledTaskCenterExecuteIntervalUnitSecond === BooleanStringEnum.FALSE) {
  354 + options.unshift({ label: TimeUnitNameEnum.SECOND, value: TimeUnitEnum.SECOND });
  355 + }
  356 + return {
  357 + options,
  358 + };
348 359 },
349 360 },
350 361 {
... ...
1   -import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
2   -import {
3   - ContentEnum,
4   - PermissionModeEnum,
5   - ThemeEnum,
6   - RouterTransitionEnum,
7   - SettingButtonPositionEnum,
8   - SessionTimeoutProcessingEnum,
9   -} from '/@/enums/appEnum';
10   -
11   -import { CacheTypeEnum } from '/@/enums/cacheEnum';
12   -
13   -export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
14   -
15   -export interface MenuSetting {
16   - bgColor: string;
17   - fixed: boolean;
18   - collapsed: boolean;
19   - canDrag: boolean;
20   - show: boolean;
21   - hidden: boolean;
22   - split: boolean;
23   - menuWidth: number;
24   - mode: MenuModeEnum;
25   - type: MenuTypeEnum;
26   - theme: ThemeEnum;
27   - topMenuAlign: 'start' | 'center' | 'end';
28   - trigger: TriggerEnum;
29   - accordion: boolean;
30   - closeMixSidebarOnChange: boolean;
31   - collapsedShowTitle: boolean;
32   - mixSideTrigger: MixSidebarTriggerEnum;
33   - mixSideFixed: boolean;
34   -}
35   -
36   -export interface MultiTabsSetting {
37   - cache: boolean;
38   - show: boolean;
39   - showQuick: boolean;
40   - canDrag: boolean;
41   - showRedo: boolean;
42   - showFold: boolean;
43   -}
44   -
45   -export interface HeaderSetting {
46   - bgColor: string;
47   - fixed: boolean;
48   - show: boolean;
49   - theme: ThemeEnum;
50   - // Turn on full screen
51   - showFullScreen: boolean;
52   - // Whether to show the lock screen
53   - useLockPage: boolean;
54   - // Show document button
55   - showDoc: boolean;
56   - // Show message center button
57   - showNotice: boolean;
58   - showSearch: boolean;
59   -}
60   -
61   -export interface LocaleSetting {
62   - showPicker: boolean;
63   - // Current language
64   - locale: LocaleType;
65   - // default language
66   - fallback: LocaleType;
67   - // available Locales
68   - availableLocales: LocaleType[];
69   -}
70   -
71   -export interface TransitionSetting {
72   - // Whether to open the page switching animation
73   - enable: boolean;
74   - // Route basic switching animation
75   - basicTransition: RouterTransitionEnum;
76   - // Whether to open page switching loading
77   - openPageLoading: boolean;
78   - // Whether to open the top progress bar
79   - openNProgress: boolean;
80   -}
81   -
82   -export interface ProjectConfig {
83   - // Storage location of permission related information
84   - permissionCacheType: CacheTypeEnum;
85   - // Whether to show the configuration button
86   - showSettingButton: boolean;
87   - // Whether to show the theme switch button
88   - showDarkModeToggle: boolean;
89   - // Configure where the button is displayed
90   - settingButtonPosition: SettingButtonPositionEnum;
91   - // Permission mode
92   - permissionMode: PermissionModeEnum;
93   - // Session timeout processing
94   - sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
95   - // Website gray mode, open for possible mourning dates
96   - grayMode: boolean;
97   - // Whether to turn on the color weak mode
98   - colorWeak: boolean;
99   - // Theme color
100   - themeColor: string;
101   -
102   - // The main interface is displayed in full screen, the menu is not displayed, and the top
103   - fullContent: boolean;
104   - // content width
105   - contentMode: ContentEnum;
106   - // Whether to display the logo
107   - showLogo: boolean;
108   - // Whether to show the global footer
109   - showFooter: boolean;
110   - // menuType: MenuTypeEnum;
111   - headerSetting: HeaderSetting;
112   - // menuSetting
113   - menuSetting: MenuSetting;
114   - // Multi-tab settings
115   - multiTabsSetting: MultiTabsSetting;
116   - // Animation configuration
117   - transitionSetting: TransitionSetting;
118   - // pageLayout whether to enable keep-alive
119   - openKeepAlive: boolean;
120   - // Lock screen time
121   - lockTime: number;
122   - // Show breadcrumbs
123   - showBreadCrumb: boolean;
124   - // Show breadcrumb icon
125   - showBreadCrumbIcon: boolean;
126   - // Use error-handler-plugin
127   - useErrorHandle: boolean;
128   - // Whether to open back to top
129   - useOpenBackTop: boolean;
130   - // Is it possible to embed iframe pages
131   - canEmbedIFramePage: boolean;
132   - // Whether to delete unclosed messages and notify when switching the interface
133   - closeMessageOnSwitch: boolean;
134   - // Whether to cancel the http request that has been sent but not responded when switching the interface.
135   - removeAllHttpPending: boolean;
136   -}
137   -
138   -export interface GlobConfig {
139   - // Site title
140   - title: string;
141   - // Service interface url
142   - apiUrl: string;
143   - // Upload url
144   - uploadUrl?: string;
145   - // Service interface url prefix
146   - urlPrefix?: string;
147   - // Project abbreviation
148   - shortName: string;
149   - // configuration center proxy prefix
150   - configurationPrefix: string;
151   - // large designer proxy prefix
152   - largeDesignerPrefix: string;
153   - // socket url
154   - socketUrl: string;
155   - // alarm notify alarm duration
156   - alarmNotifyDuration: string;
157   - // alarm notify polling interval
158   - alarmPollingInterval: string;
159   - // upgrade your http policy to https
160   - securityPolicy: string;
161   -}
162   -export interface GlobEnvConfig {
163   - // Site title
164   - VITE_GLOB_APP_TITLE: string;
165   - // Service interface url
166   - VITE_GLOB_API_URL: string;
167   - // Service interface url prefix
168   - VITE_GLOB_API_URL_PREFIX?: string;
169   - // Project abbreviation
170   - VITE_GLOB_APP_SHORT_NAME: string;
171   - // Upload url
172   - VITE_GLOB_UPLOAD_URL?: string;
173   - // configuration
174   - VITE_GLOB_CONFIGURATION: string;
175   - // large designer
176   - VITE_GLOB_LARGE_DESIGNER: string;
177   - // socket
178   - VITE_GLOB_WEB_SOCKET: string;
179   - // force transform http to https
180   - VITE_GLOB_CONTENT_SECURITY_POLICY: string;
181   - // notify polling interval time
182   - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME: string;
183   - // notify duration
184   - VITE_GLOB_ALARM_NOTIFY_DURATION: string;
185   -}
  1 +import { MenuTypeEnum, MenuModeEnum, TriggerEnum, MixSidebarTriggerEnum } from '/@/enums/menuEnum';
  2 +import {
  3 + ContentEnum,
  4 + PermissionModeEnum,
  5 + ThemeEnum,
  6 + RouterTransitionEnum,
  7 + SettingButtonPositionEnum,
  8 + SessionTimeoutProcessingEnum,
  9 +} from '/@/enums/appEnum';
  10 +
  11 +import { CacheTypeEnum } from '/@/enums/cacheEnum';
  12 +
  13 +export type LocaleType = 'zh_CN' | 'en' | 'ru' | 'ja' | 'ko';
  14 +
  15 +export interface MenuSetting {
  16 + bgColor: string;
  17 + fixed: boolean;
  18 + collapsed: boolean;
  19 + canDrag: boolean;
  20 + show: boolean;
  21 + hidden: boolean;
  22 + split: boolean;
  23 + menuWidth: number;
  24 + mode: MenuModeEnum;
  25 + type: MenuTypeEnum;
  26 + theme: ThemeEnum;
  27 + topMenuAlign: 'start' | 'center' | 'end';
  28 + trigger: TriggerEnum;
  29 + accordion: boolean;
  30 + closeMixSidebarOnChange: boolean;
  31 + collapsedShowTitle: boolean;
  32 + mixSideTrigger: MixSidebarTriggerEnum;
  33 + mixSideFixed: boolean;
  34 +}
  35 +
  36 +export interface MultiTabsSetting {
  37 + cache: boolean;
  38 + show: boolean;
  39 + showQuick: boolean;
  40 + canDrag: boolean;
  41 + showRedo: boolean;
  42 + showFold: boolean;
  43 +}
  44 +
  45 +export interface HeaderSetting {
  46 + bgColor: string;
  47 + fixed: boolean;
  48 + show: boolean;
  49 + theme: ThemeEnum;
  50 + // Turn on full screen
  51 + showFullScreen: boolean;
  52 + // Whether to show the lock screen
  53 + useLockPage: boolean;
  54 + // Show document button
  55 + showDoc: boolean;
  56 + // Show message center button
  57 + showNotice: boolean;
  58 + showSearch: boolean;
  59 +}
  60 +
  61 +export interface LocaleSetting {
  62 + showPicker: boolean;
  63 + // Current language
  64 + locale: LocaleType;
  65 + // default language
  66 + fallback: LocaleType;
  67 + // available Locales
  68 + availableLocales: LocaleType[];
  69 +}
  70 +
  71 +export interface TransitionSetting {
  72 + // Whether to open the page switching animation
  73 + enable: boolean;
  74 + // Route basic switching animation
  75 + basicTransition: RouterTransitionEnum;
  76 + // Whether to open page switching loading
  77 + openPageLoading: boolean;
  78 + // Whether to open the top progress bar
  79 + openNProgress: boolean;
  80 +}
  81 +
  82 +export interface ProjectConfig {
  83 + // Storage location of permission related information
  84 + permissionCacheType: CacheTypeEnum;
  85 + // Whether to show the configuration button
  86 + showSettingButton: boolean;
  87 + // Whether to show the theme switch button
  88 + showDarkModeToggle: boolean;
  89 + // Configure where the button is displayed
  90 + settingButtonPosition: SettingButtonPositionEnum;
  91 + // Permission mode
  92 + permissionMode: PermissionModeEnum;
  93 + // Session timeout processing
  94 + sessionTimeoutProcessing: SessionTimeoutProcessingEnum;
  95 + // Website gray mode, open for possible mourning dates
  96 + grayMode: boolean;
  97 + // Whether to turn on the color weak mode
  98 + colorWeak: boolean;
  99 + // Theme color
  100 + themeColor: string;
  101 +
  102 + // The main interface is displayed in full screen, the menu is not displayed, and the top
  103 + fullContent: boolean;
  104 + // content width
  105 + contentMode: ContentEnum;
  106 + // Whether to display the logo
  107 + showLogo: boolean;
  108 + // Whether to show the global footer
  109 + showFooter: boolean;
  110 + // menuType: MenuTypeEnum;
  111 + headerSetting: HeaderSetting;
  112 + // menuSetting
  113 + menuSetting: MenuSetting;
  114 + // Multi-tab settings
  115 + multiTabsSetting: MultiTabsSetting;
  116 + // Animation configuration
  117 + transitionSetting: TransitionSetting;
  118 + // pageLayout whether to enable keep-alive
  119 + openKeepAlive: boolean;
  120 + // Lock screen time
  121 + lockTime: number;
  122 + // Show breadcrumbs
  123 + showBreadCrumb: boolean;
  124 + // Show breadcrumb icon
  125 + showBreadCrumbIcon: boolean;
  126 + // Use error-handler-plugin
  127 + useErrorHandle: boolean;
  128 + // Whether to open back to top
  129 + useOpenBackTop: boolean;
  130 + // Is it possible to embed iframe pages
  131 + canEmbedIFramePage: boolean;
  132 + // Whether to delete unclosed messages and notify when switching the interface
  133 + closeMessageOnSwitch: boolean;
  134 + // Whether to cancel the http request that has been sent but not responded when switching the interface.
  135 + removeAllHttpPending: boolean;
  136 +}
  137 +
  138 +export interface GlobConfig {
  139 + // Site title
  140 + title: string;
  141 + // Service interface url
  142 + apiUrl: string;
  143 + // Upload url
  144 + uploadUrl?: string;
  145 + // Service interface url prefix
  146 + urlPrefix?: string;
  147 + // Project abbreviation
  148 + shortName: string;
  149 + // configuration center proxy prefix
  150 + configurationPrefix: string;
  151 + // large designer proxy prefix
  152 + largeDesignerPrefix: string;
  153 + // socket url
  154 + socketUrl: string;
  155 + // alarm notify alarm duration
  156 + alarmNotifyDuration: string;
  157 + // alarm notify polling interval
  158 + alarmPollingInterval: string;
  159 + // upgrade your http policy to https
  160 + securityPolicy: string;
  161 + // Should Disabled Task Center Execute Interval Unit (Second)
  162 + disabledTaskCenterExecuteIntervalUnitSecond: string;
  163 +}
  164 +export interface GlobEnvConfig {
  165 + // Site title
  166 + VITE_GLOB_APP_TITLE: string;
  167 + // Service interface url
  168 + VITE_GLOB_API_URL: string;
  169 + // Service interface url prefix
  170 + VITE_GLOB_API_URL_PREFIX?: string;
  171 + // Project abbreviation
  172 + VITE_GLOB_APP_SHORT_NAME: string;
  173 + // Upload url
  174 + VITE_GLOB_UPLOAD_URL?: string;
  175 + // configuration
  176 + VITE_GLOB_CONFIGURATION: string;
  177 + // large designer
  178 + VITE_GLOB_LARGE_DESIGNER: string;
  179 + // socket
  180 + VITE_GLOB_WEB_SOCKET: string;
  181 + // force transform http to https
  182 + VITE_GLOB_CONTENT_SECURITY_POLICY: string;
  183 + // notify polling interval time
  184 + VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME: string;
  185 + // notify duration
  186 + VITE_GLOB_ALARM_NOTIFY_DURATION: string;
  187 + // Should Disabled Task Center Execute Interval Unit (Second)
  188 + VITE_GLOB_DISABLED_TASK_CENTER_EXECUTE_INTERVAL_UNIT_SECOND: string;
  189 +}
... ...