Showing
5 changed files
with
378 additions
and
364 deletions
| @@ -16,7 +16,7 @@ VITE_GLOB_PUBLIC_PATH = / | @@ -16,7 +16,7 @@ VITE_GLOB_PUBLIC_PATH = / | ||
| 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
| 17 | VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"],["/large-designer", "http://localhost:5555/large-designer/"]] | 17 | VITE_PROXY = [["/api","http://222.180.200.114:48080/api"],["/thingskit-drawio","http://localhost:3000/"],["/large-designer", "http://localhost:5555/large-designer/"]] |
| 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | 18 | # VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
| 19 | -# VITE_PROXY = [["/api","http://192.168.10.103:8080/api"],["/thingskit-drawio","http://192.168.10.136:8080/api"]] | 19 | +# VITE_PROXY = [["/api","http://192.168.10.125:8080/api"],["/thingskit-drawio","http://192.168.10.125:8080/api"]] |
| 20 | 20 | ||
| 21 | # 实时数据的ws地址 | 21 | # 实时数据的ws地址 |
| 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= | 22 | # VITE_WEB_SOCKET = ws://localhost:8080/api/ws/plugins/telemetry?token= |
| @@ -39,6 +39,9 @@ VITE_GLOB_API_URL_PREFIX=/yt | @@ -39,6 +39,9 @@ VITE_GLOB_API_URL_PREFIX=/yt | ||
| 39 | #configuration | 39 | #configuration |
| 40 | VITE_GLOB_CONFIGURATION = /thingskit-drawio | 40 | VITE_GLOB_CONFIGURATION = /thingskit-drawio |
| 41 | 41 | ||
| 42 | +# 大屏设计器 | ||
| 43 | +VITE_GLOB_LARGE_DESIGNER = /large-designer | ||
| 44 | + | ||
| 42 | # Content Security Policy | 45 | # Content Security Policy |
| 43 | VITE_GLOB_CONTENT_SECURITY_POLICY = false | 46 | VITE_GLOB_CONTENT_SECURITY_POLICY = false |
| 44 | 47 |
| 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 | -# Content Security Policy | ||
| 44 | -VITE_GLOB_CONTENT_SECURITY_POLICY = false | ||
| 45 | - | ||
| 46 | -# Alarm Notify Polling Interval Time | ||
| 47 | -VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME = 60000 | ||
| 48 | - | ||
| 49 | -# Alarm Notify Auto Close Time Unit is Second | ||
| 50 | -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 |
| 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 | - } = getAppEnvConfig(); | ||
| 19 | - | ||
| 20 | - if (!/[a-zA-Z\_]*/.test(VITE_GLOB_APP_SHORT_NAME)) { | ||
| 21 | - warn( | ||
| 22 | - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` | ||
| 23 | - ); | ||
| 24 | - } | ||
| 25 | - | ||
| 26 | - // Take global configuration | ||
| 27 | - const glob: Readonly<GlobConfig> = { | ||
| 28 | - title: VITE_GLOB_APP_TITLE, | ||
| 29 | - apiUrl: VITE_GLOB_API_URL, | ||
| 30 | - shortName: VITE_GLOB_APP_SHORT_NAME, | ||
| 31 | - urlPrefix: VITE_GLOB_API_URL_PREFIX, | ||
| 32 | - uploadUrl: VITE_GLOB_UPLOAD_URL, | ||
| 33 | - configurationPrefix: VITE_GLOB_CONFIGURATION, | ||
| 34 | - socketUrl: VITE_GLOB_WEB_SOCKET, | ||
| 35 | - securityPolicy: VITE_GLOB_CONTENT_SECURITY_POLICY, | ||
| 36 | - alarmNotifyDuration: VITE_GLOB_ALARM_NOTIFY_DURATION, | ||
| 37 | - alarmPollingInterval: VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME, | ||
| 38 | - }; | ||
| 39 | - return glob as Readonly<GlobConfig>; | ||
| 40 | -}; | 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 { 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 | - } = ENV; | ||
| 36 | - | ||
| 37 | - if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) { | ||
| 38 | - warn( | ||
| 39 | - `VITE_GLOB_APP_SHORT_NAME Variables can only be characters/underscores, please modify in the environment variables and re-running.` | ||
| 40 | - ); | ||
| 41 | - } | ||
| 42 | - | ||
| 43 | - return { | ||
| 44 | - VITE_GLOB_APP_TITLE, | ||
| 45 | - VITE_GLOB_API_URL, | ||
| 46 | - VITE_GLOB_APP_SHORT_NAME, | ||
| 47 | - VITE_GLOB_API_URL_PREFIX, | ||
| 48 | - VITE_GLOB_UPLOAD_URL, | ||
| 49 | - VITE_GLOB_CONFIGURATION, | ||
| 50 | - VITE_GLOB_WEB_SOCKET, | ||
| 51 | - VITE_GLOB_CONTENT_SECURITY_POLICY, | ||
| 52 | - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME, | ||
| 53 | - VITE_GLOB_ALARM_NOTIFY_DURATION, | ||
| 54 | - }; | ||
| 55 | -} | ||
| 56 | - | ||
| 57 | -/** | ||
| 58 | - * @description: Development mode | ||
| 59 | - */ | ||
| 60 | -export const devMode = 'development'; | ||
| 61 | - | ||
| 62 | -/** | ||
| 63 | - * @description: Production mode | ||
| 64 | - */ | ||
| 65 | -export const prodMode = 'production'; | ||
| 66 | - | ||
| 67 | -/** | ||
| 68 | - * @description: Get environment variables | ||
| 69 | - * @returns: | ||
| 70 | - * @example: | ||
| 71 | - */ | ||
| 72 | -export function getEnv(): string { | ||
| 73 | - return import.meta.env.MODE; | ||
| 74 | -} | ||
| 75 | - | ||
| 76 | -/** | ||
| 77 | - * @description: Is it a development mode | ||
| 78 | - * @returns: | ||
| 79 | - * @example: | ||
| 80 | - */ | ||
| 81 | -export function isDevMode(): boolean { | ||
| 82 | - return import.meta.env.DEV; | ||
| 83 | -} | ||
| 84 | - | ||
| 85 | -/** | ||
| 86 | - * @description: Is it a production mode | ||
| 87 | - * @returns: | ||
| 88 | - * @example: | ||
| 89 | - */ | ||
| 90 | -export function isProdMode(): boolean { | ||
| 91 | - return import.meta.env.PROD; | ||
| 92 | -} | 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 { 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 | - // socket url | ||
| 152 | - socketUrl: string; | ||
| 153 | - // alarm notify alarm duration | ||
| 154 | - alarmNotifyDuration: string; | ||
| 155 | - // alarm notify polling interval | ||
| 156 | - alarmPollingInterval: string; | ||
| 157 | - // upgrade your http policy to https | ||
| 158 | - securityPolicy: string; | ||
| 159 | -} | ||
| 160 | -export interface GlobEnvConfig { | ||
| 161 | - // Site title | ||
| 162 | - VITE_GLOB_APP_TITLE: string; | ||
| 163 | - // Service interface url | ||
| 164 | - VITE_GLOB_API_URL: string; | ||
| 165 | - // Service interface url prefix | ||
| 166 | - VITE_GLOB_API_URL_PREFIX?: string; | ||
| 167 | - // Project abbreviation | ||
| 168 | - VITE_GLOB_APP_SHORT_NAME: string; | ||
| 169 | - // Upload url | ||
| 170 | - VITE_GLOB_UPLOAD_URL?: string; | ||
| 171 | - // configuration | ||
| 172 | - VITE_GLOB_CONFIGURATION: string; | ||
| 173 | - // socket | ||
| 174 | - VITE_GLOB_WEB_SOCKET: string; | ||
| 175 | - // force transform http to https | ||
| 176 | - VITE_GLOB_CONTENT_SECURITY_POLICY: string; | ||
| 177 | - // notify polling interval time | ||
| 178 | - VITE_GLOB_ALARM_NOTIFY_POLLING_INTERVAL_TIME: string; | ||
| 179 | - // notify duration | ||
| 180 | - VITE_GLOB_ALARM_NOTIFY_DURATION: string; | ||
| 181 | -} | 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 | +} |