feat(ui): finalize shared shells and loading states
This commit is contained in:
@@ -12,7 +12,6 @@ export const appViews = [
|
||||
'digitalEmployees',
|
||||
'employees',
|
||||
'policies',
|
||||
'logs',
|
||||
'settings'
|
||||
]
|
||||
|
||||
@@ -81,14 +80,6 @@ export const navItems = [
|
||||
title: '制度与知识库',
|
||||
desc: '统一管理制度文档、检索入口与知识资产。'
|
||||
},
|
||||
{
|
||||
id: 'logs',
|
||||
label: '系统日志',
|
||||
navHint: '查看系统运行日志',
|
||||
icon: icons.logs,
|
||||
title: '系统日志',
|
||||
desc: '集中查看系统运行日志、结构化事件和请求追踪信息。'
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
label: '系统设置',
|
||||
@@ -107,18 +98,21 @@ const viewRouteNames = {
|
||||
policies: 'app-policies',
|
||||
audit: 'app-audit',
|
||||
digitalEmployees: 'app-digitalEmployees',
|
||||
logs: 'app-logs',
|
||||
employees: 'app-employees',
|
||||
settings: 'app-settings'
|
||||
}
|
||||
|
||||
const legacyViewRouteNames = {
|
||||
logs: 'app-settings'
|
||||
}
|
||||
|
||||
const routeNameViews = Object.fromEntries(
|
||||
Object.entries(viewRouteNames).map(([view, routeName]) => [routeName, view])
|
||||
)
|
||||
|
||||
routeNameViews['app-request-detail'] = 'documents'
|
||||
routeNameViews['app-document-detail'] = 'documents'
|
||||
routeNameViews['app-log-detail'] = 'logs'
|
||||
routeNameViews['app-log-detail'] = 'settings'
|
||||
|
||||
export function resolveAppViewFromRoute(route) {
|
||||
const routeName = String(route?.name || '').trim()
|
||||
@@ -131,7 +125,7 @@ export function resolveAppViewFromRoute(route) {
|
||||
}
|
||||
|
||||
export function resolveTargetRouteName(view) {
|
||||
return viewRouteNames[view] || viewRouteNames.overview
|
||||
return viewRouteNames[view] || legacyViewRouteNames[view] || viewRouteNames.overview
|
||||
}
|
||||
|
||||
export function useNavigation() {
|
||||
|
||||
Reference in New Issue
Block a user