🔨 监控逻辑.

This commit is contained in:
lijiahangmax
2025-09-09 21:25:44 +08:00
parent 3c75aedcec
commit 0b7faa038a
229 changed files with 13303 additions and 358 deletions

View File

@@ -59,6 +59,7 @@ export const UPDATE_PASSWORD_ROUTE: RouteRecordRaw = {
name: UPDATE_PASSWORD_ROUTE_NAME,
component: () => import('@/views/base/update-password/index.vue'),
meta: {
noAffix: true,
locale: '修改密码'
},
};
@@ -69,6 +70,7 @@ export const FORBIDDEN_ROUTE: RouteRecordRaw = {
name: FORBIDDEN_ROUTER_NAME,
component: () => import('@/views/base/status/forbidden/index.vue'),
meta: {
noAffix: true,
locale: '403'
},
};
@@ -80,6 +82,7 @@ export const NOT_FOUND_ROUTE: RouteRecordRaw = {
name: NOT_FOUND_ROUTER_NAME,
component: () => import('@/views/base/status/not-found/index.vue'),
meta: {
noAffix: true,
locale: '404'
},
};

View File

@@ -0,0 +1,38 @@
import type { AppRouteRecordRaw } from '../types';
import type { RouteLocationNormalized } from 'vue-router';
import { DEFAULT_LAYOUT } from '../base';
const MONITOR: AppRouteRecordRaw = {
name: 'monitorModule',
path: '/monitor-module',
component: DEFAULT_LAYOUT,
children: [
{
name: 'metrics',
path: '/monitor/metrics',
component: () => import('@/views/monitor/metrics/index.vue'),
},
{
name: 'monitorHost',
path: '/monitor/monitor-host',
component: () => import('@/views/monitor/monitor-host/index.vue'),
},
{
name: 'monitorDetail',
path: '/monitor/detail',
meta: {
// 固定到 tab
noAffix: false,
// 是否允许打开多个 tab
multipleTab: true,
// 名称模板
localeTemplate: (route: RouteLocationNormalized) => {
return `${route.meta.locale} - ${route.query.name || ''}`;
},
},
component: () => import('@/views/monitor/monitor-detail/index.vue'),
},
],
};
export default MONITOR;

View File

@@ -22,7 +22,9 @@ declare module 'vue-router' {
newWindow?: boolean;
// 是否活跃
activeMenu?: string;
// 是否允许打开多个 tag
multipleTab?: boolean;
// 名称模板
localeTemplate?: (key: RouteLocationNormalized) => string;
localeTemplate?: (route: RouteLocationNormalized) => string | undefined;
}
}