feat(auth): 统一数据库运维菜单路由并添加装置单位及监测点限值配置功能
- 统一数据库监控菜单路径到 /system-ops/dbms 入口 - 添加 isDbmsMenu 函数处理多种数据库菜单路径匹配 - 在动态路由中增加多个数据库监控路径的重定向规则 - 添加设备单位配置功能包括新增 EquipmentUnitForm 接口定义 - 添加监测点限值配置功能包括新增 OverlimitDetail 接口定义 - 在装置表单中添加单位配置按钮并集成单位调试功能 - 在监测点表单中添加限值配置按钮并集成限值调试功能 - 添加电压等级变更时的默认容量和变比同步逻辑 - 配置监测点表单中的线路类型选择选项 - 添加装置表单中比率输入组的高度紧凑样式 - 新增数据库运维静态路由配置和别名支持
This commit is contained in:
@@ -156,6 +156,13 @@ function normalizeBusinessMenu(menu: any): any {
|
||||
menu.component = '@/views/steady/checksquare/index.vue'
|
||||
}
|
||||
|
||||
if (isDbmsMenu(menu)) {
|
||||
// 数据库运维菜单后端存在 systemMonitor/dbms 等历史路径,统一收敛到当前静态页面入口。
|
||||
menu.path = '/system-ops/dbms'
|
||||
menu.name = 'systemOpsDbms'
|
||||
menu.component = '@/views/system-ops/dbms/index.vue'
|
||||
}
|
||||
|
||||
return menu
|
||||
}
|
||||
|
||||
@@ -211,10 +218,25 @@ function isChecksquareMenu(menu: any): boolean {
|
||||
return title.includes('数据验证')
|
||||
}
|
||||
|
||||
function isDbmsMenu(menu: any): boolean {
|
||||
const normalizedName = String(menu?.name ?? '').toLowerCase().replace(/[-_]/g, '')
|
||||
const normalizedPath = String(menu?.path ?? '').toLowerCase().replace(/[-_]/g, '')
|
||||
const normalizedComponent = String(menu?.component ?? '').toLowerCase().replace(/[-_]/g, '')
|
||||
const title = String(menu?.meta?.title ?? menu?.title ?? '')
|
||||
|
||||
if (normalizedName === 'systemopsdbms' || normalizedName === 'dbms') return true
|
||||
if (normalizedPath.includes('systemmonitor/dbms') || normalizedPath.includes('systemops/dbms')) return true
|
||||
if (normalizedPath.includes('databasemonitor') || normalizedComponent.includes('databasemonitor')) return true
|
||||
if (normalizedComponent.includes('systemmonitor/dbms') || normalizedComponent.includes('systemops/dbms')) return true
|
||||
|
||||
return title.includes('数据库') && (title.includes('运维') || title.includes('监控'))
|
||||
}
|
||||
|
||||
export function resolveBusinessMenuPath(menu: Menu.MenuOptions): string {
|
||||
if (isEventListMenu(menu)) return '/eventList/index'
|
||||
if (isChecksquareMenu(menu)) return '/checksquare/index'
|
||||
if (isSteadyTrendMenu(menu)) return '/steadyTrend/index'
|
||||
if (isDbmsMenu(menu)) return '/system-ops/dbms'
|
||||
return isSteadyDataViewMenu(menu) ? '/steadyDataView/index' : menu.path
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user