fix:添加审计和全局
Build and Deploy Vue3 / build (push) Successful in 1m10s
Build and Deploy Vue3 / deploy (push) Successful in 3m51s

This commit is contained in:
2025-09-24 13:48:13 +08:00
parent 1b6874cc5f
commit 7a3134ac0c
14 changed files with 3739 additions and 272 deletions
+91 -2
View File
@@ -37,13 +37,18 @@ const iconMap = {
'tags': 'List',
'statistics': 'PieChart',
'visits': 'DataAnalysis',
'performance': 'DataAnalysis'
'performance': 'DataAnalysis',
'servers': 'Setting',
'server': 'Setting',
'vm': 'Setting',
'container': 'Setting'
}
// 生成面包屑数据
const breadcrumbs = computed(() => {
// 当前路由的完整路径
const currentPath = route.path
const currentQuery = route.query
// 按照路径层级生成面包屑
const pathSegments = currentPath.split('/').filter(segment => segment !== '')
@@ -56,7 +61,90 @@ const breadcrumbs = computed(() => {
icon: 'HomeFilled'
})
// 构建剩余的面包屑
// 特殊处理服务器相关页面
if (currentPath.includes('/servers/')) {
// 处理服务器详情页面
if (currentPath === '/servers/server') {
// 构建完整的路径,包含查询参数,用于面包屑导航
const fullPath = currentQuery.server_id ?
`${currentPath}?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
currentPath
result.push({
path: fullPath,
title: '服务器详情',
icon: 'Setting'
})
} else if (currentPath === '/servers/vm') {
const fullPath = currentQuery.server_id ?
`${currentPath}?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
currentPath
result.push({
path: fullPath,
title: '虚拟机详情',
icon: 'Setting'
})
} else if (currentPath === '/servers/container') {
const fullPath = currentQuery.server_id ?
`${currentPath}?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
currentPath
result.push({
path: fullPath,
title: '容器详情',
icon: 'Setting'
})
} else if (currentPath === '/servers/container/console') {
// 添加容器详情面包屑
const containerPath = currentQuery.server_id ?
`/servers/container?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
'/servers/container'
result.push({
path: containerPath,
title: '容器详情',
icon: 'Setting'
})
// 添加当前页面面包屑
const consolePath = currentQuery.server_id ?
`${currentPath}?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
currentPath
result.push({
path: consolePath,
title: '终端容器',
icon: 'Setting'
})
} else if (currentPath === '/servers/container/files') {
// 添加容器详情面包屑
const containerPath = currentQuery.server_id ?
`/servers/container?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
'/servers/container'
result.push({
path: containerPath,
title: '容器详情',
icon: 'Setting'
})
// 添加当前页面面包屑
const filesPath = currentQuery.server_id ?
`${currentPath}?server_id=${currentQuery.server_id}&type=${currentQuery.type || ''}` :
currentPath
result.push({
path: filesPath,
title: '容器文件管理',
icon: 'Setting'
})
}
return result
}
// 构建剩余的面包屑(非服务器页面的常规处理)
let currentPathBuilder = ''
for (let i = 0; i < pathSegments.length; i++) {
@@ -73,6 +161,7 @@ const breadcrumbs = computed(() => {
title: matchedRoute.meta.title,
icon: segmentIcon
})
} else if (segment) {
// 如果没有匹配的路由,但有路径段,也添加到面包屑
result.push({