feat(auth): 统一数据库运维菜单路由并添加装置单位及监测点限值配置功能
- 统一数据库监控菜单路径到 /system-ops/dbms 入口 - 添加 isDbmsMenu 函数处理多种数据库菜单路径匹配 - 在动态路由中增加多个数据库监控路径的重定向规则 - 添加设备单位配置功能包括新增 EquipmentUnitForm 接口定义 - 添加监测点限值配置功能包括新增 OverlimitDetail 接口定义 - 在装置表单中添加单位配置按钮并集成单位调试功能 - 在监测点表单中添加限值配置按钮并集成限值调试功能 - 添加电压等级变更时的默认容量和变比同步逻辑 - 配置监测点表单中的线路类型选择选项 - 添加装置表单中比率输入组的高度紧凑样式 - 新增数据库运维静态路由配置和别名支持
This commit is contained in:
187
frontend/src/api/system/dbms/interface/index.ts
Normal file
187
frontend/src/api/system/dbms/interface/index.ts
Normal file
@@ -0,0 +1,187 @@
|
||||
import type { ReqPage, ResPage } from '@/api/interface'
|
||||
|
||||
export namespace Dbms {
|
||||
export type DbType = 'ORACLE' | 'MYSQL'
|
||||
export type ConnectType = 'SERVICE_NAME' | 'SID'
|
||||
export type BackupStrategy = 'DATA_PUMP' | 'JDBC_EXPORT'
|
||||
export type BackupMode = 'FULL_TABLE' | 'TIME_RANGE' | 'SIZE_SPLIT'
|
||||
export type OperationType = 'BACKUP' | 'RESTORE'
|
||||
export type TaskStatus = 'WAITING' | 'RUNNING' | 'SUCCESS' | 'FAIL' | 'FAILED' | 'CANCELLED'
|
||||
export type RestoreMode = 'SKIP' | 'APPEND' | 'TRUNCATE' | 'REPLACE'
|
||||
|
||||
export interface Overview {
|
||||
menuName: string
|
||||
menuCode: string
|
||||
path: string
|
||||
status: string
|
||||
description: string
|
||||
}
|
||||
|
||||
export interface ConnectionListParams extends ReqPage {
|
||||
connectionName?: string
|
||||
dbType?: DbType
|
||||
schemaName?: string
|
||||
}
|
||||
|
||||
export interface ConnectionRecord {
|
||||
id: string
|
||||
connectionName: string
|
||||
dbType: DbType
|
||||
host: string
|
||||
port: number
|
||||
connectType: ConnectType
|
||||
serviceName?: string | null
|
||||
sid?: string | null
|
||||
schemaName?: string | null
|
||||
username: string
|
||||
savePassword: 0 | 1
|
||||
directoryName?: string | null
|
||||
directoryPath?: string | null
|
||||
extraConfigJson?: string | null
|
||||
remark?: string | null
|
||||
lastTestStatus?: string | null
|
||||
lastTestMessage?: string | null
|
||||
lastTestTime?: string | null
|
||||
state?: number
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface ConnectionPayload {
|
||||
id?: string
|
||||
connectionName: string
|
||||
dbType: DbType
|
||||
host: string
|
||||
port: number
|
||||
connectType: ConnectType
|
||||
serviceName?: string | null
|
||||
sid?: string | null
|
||||
schemaName?: string | null
|
||||
username: string
|
||||
password?: string | null
|
||||
savePassword: 0 | 1
|
||||
directoryName?: string | null
|
||||
directoryPath?: string | null
|
||||
extraConfigJson?: string | null
|
||||
remark?: string | null
|
||||
}
|
||||
|
||||
export interface DeleteConnectionParams {
|
||||
id: string
|
||||
}
|
||||
|
||||
export interface TestConnectionParams {
|
||||
connectionId?: string
|
||||
connection?: ConnectionPayload
|
||||
temporaryPassword?: string
|
||||
}
|
||||
|
||||
export interface TestConnectionResult {
|
||||
success: boolean
|
||||
message: string
|
||||
}
|
||||
|
||||
export interface TableListParams {
|
||||
connectionId: string
|
||||
temporaryPassword?: string
|
||||
schemaName?: string
|
||||
}
|
||||
|
||||
export interface TableRecord {
|
||||
owner: string
|
||||
tableName: string
|
||||
comments?: string | null
|
||||
}
|
||||
|
||||
export interface CreateBackupParams {
|
||||
connectionId: string
|
||||
backupStrategy?: BackupStrategy
|
||||
schemaName?: string
|
||||
targetNames?: string[]
|
||||
backupMode?: BackupMode
|
||||
timeColumn?: string | null
|
||||
startTime?: string | null
|
||||
endTime?: string | null
|
||||
maxFileSizeMb?: number | null
|
||||
directoryName?: string | null
|
||||
temporaryPassword?: string
|
||||
}
|
||||
|
||||
export interface CreateRestoreParams {
|
||||
connectionId: string
|
||||
backupFileId: string
|
||||
restoreMode?: RestoreMode
|
||||
targetSchemaName?: string
|
||||
temporaryPassword?: string
|
||||
overwriteConfirmText?: string | null
|
||||
}
|
||||
|
||||
export interface TaskCreateResult {
|
||||
taskId: string
|
||||
taskNo: string
|
||||
taskStatus: TaskStatus
|
||||
}
|
||||
|
||||
export interface TaskListParams extends ReqPage {
|
||||
connectionId?: string
|
||||
taskStatus?: TaskStatus | ''
|
||||
}
|
||||
|
||||
export interface TaskRecord {
|
||||
id: string
|
||||
taskNo: string
|
||||
connectionId: string
|
||||
dbType: DbType
|
||||
operationType: OperationType
|
||||
backupStrategy?: BackupStrategy | null
|
||||
taskStatus: TaskStatus
|
||||
schemaName?: string | null
|
||||
targetNamesJson?: string | null
|
||||
resultMessage?: string | null
|
||||
progressPercent?: number | null
|
||||
startedAt?: string | null
|
||||
finishedAt?: string | null
|
||||
createTime?: string
|
||||
updateTime?: string
|
||||
}
|
||||
|
||||
export interface FileListParams extends ReqPage {
|
||||
connectionId?: string
|
||||
taskId?: string
|
||||
backupStrategy?: BackupStrategy | ''
|
||||
}
|
||||
|
||||
export interface BackupFileRecord {
|
||||
id: string
|
||||
taskId: string
|
||||
connectionId: string
|
||||
dbType: DbType
|
||||
backupStrategy: BackupStrategy
|
||||
fileFormat?: string | null
|
||||
schemaName?: string | null
|
||||
targetNamesJson?: string | null
|
||||
backupMode?: BackupMode | null
|
||||
fileName: string
|
||||
filePath?: string | null
|
||||
logFileName?: string | null
|
||||
logFilePath?: string | null
|
||||
fileSize?: number | null
|
||||
checksum?: string | null
|
||||
state?: number
|
||||
createTime?: string
|
||||
}
|
||||
|
||||
export interface DeleteBackupFileParams {
|
||||
backupFileId: string
|
||||
confirmText: string
|
||||
}
|
||||
|
||||
export interface DeleteTaskParams {
|
||||
taskId: string
|
||||
confirmText: string
|
||||
}
|
||||
|
||||
export interface ConnectionPageData extends ResPage<ConnectionRecord> {}
|
||||
export interface TaskPageData extends ResPage<TaskRecord> {}
|
||||
export interface BackupFilePageData extends ResPage<BackupFileRecord> {}
|
||||
}
|
||||
Reference in New Issue
Block a user