我叫洪圣文
This commit is contained in:
@@ -137,6 +137,13 @@ function normalizeBusinessMenu(menu: any): any {
|
||||
menu.component = '@/views/event/eventList/index.vue'
|
||||
}
|
||||
|
||||
if (isSteadyDataViewMenu(menu)) {
|
||||
// 后端菜单可能存在 steady-data-view 等历史写法,前端统一收敛到静态 steadyDataView 页面入口。
|
||||
menu.path = '/steadyDataView/index'
|
||||
menu.name = 'steadyDataView'
|
||||
menu.component = '@/views/steady/steadyDataView/index.vue'
|
||||
}
|
||||
|
||||
return menu
|
||||
}
|
||||
|
||||
@@ -153,8 +160,22 @@ function isEventListMenu(menu: any): boolean {
|
||||
return title.includes('事件列表') && (title.includes('暂降') || title.includes('暂态'))
|
||||
}
|
||||
|
||||
function isSteadyDataViewMenu(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 === 'steadydataview') return true
|
||||
if (normalizedPath.includes('steadydataview')) return true
|
||||
if (normalizedComponent.includes('steadydataview')) return true
|
||||
|
||||
return title.includes('稳态数据')
|
||||
}
|
||||
|
||||
export function resolveBusinessMenuPath(menu: Menu.MenuOptions): string {
|
||||
return isEventListMenu(menu) ? '/eventList/index' : menu.path
|
||||
if (isEventListMenu(menu)) return '/eventList/index'
|
||||
return isSteadyDataViewMenu(menu) ? '/steadyDataView/index' : menu.path
|
||||
}
|
||||
|
||||
function normalizeActivateInfo(rawData: unknown): Activate.ActivationCodePlaintext {
|
||||
|
||||
Reference in New Issue
Block a user