UNIVPLMDataIntegration/Web/src/router/route.ts

152 lines
4.2 KiB
TypeScript
Raw Normal View History

2024-06-15 13:02:35 +08:00
import { RouteRecordRaw } from 'vue-router';
/**
* path 便
*
* meta对象参数说明
* meta: {
* title: 菜单栏及 tagsView
* isLink `1、isLink: 链接地址不为空 2、isIframe:false`
* isHide
* isKeepAlive
* isAffix tagsView
* isIframe `1、isIframe:true 2、isLink链接地址不为空`
* roles admin common
* icon tagsView `iconfont xxx`fontawesome `fa xxx`
* }
*/
// 扩展 RouteMeta 接口
declare module 'vue-router' {
interface RouteMeta {
title?: string;
isLink?: string;
isHide?: boolean;
isKeepAlive?: boolean;
isAffix?: boolean;
isIframe?: boolean;
roles?: string[];
icon?: string;
isPublic?: boolean;
2024-06-15 13:02:35 +08:00
}
}
/**
*
* `children 数组`
* @description isRequestRoutes true 使 children
* @description `/@/views/system/menu/component/addMenu.vue 下的 ruleForm`
* @returns
*/
export const dynamicRoutes: Array<RouteRecordRaw> = [
{
path: '/',
name: '/',
component: () => import('/@/layout/index.vue'),
redirect: '/dashboard/home',
meta: {
isKeepAlive: true,
},
children: [],
},
2025-06-17 17:20:04 +08:00
{
path: '/llm/chat',
name: 'chat',
component: () => import('/@/views/chat/index.vue'),
meta: {
title: 'AI对话',
isKeepAlive: true,
}
},
2024-06-15 13:02:35 +08:00
{
path: '/platform/job/dashboard',
name: 'jobDashboard',
component: () => import('/@/views/system/job/dashboard.vue'),
meta: {
title: '任务看板',
isLink: window.__env__.VITE_API_URL + '/schedule',
isHide: true,
isKeepAlive: true,
isAffix: false,
isIframe: true,
icon: 'ele-Clock',
},
},
{
path: '/develop/database/visual',
name: 'databaseVisual',
component: () => import('/@/views/system/database/component/visualTable.vue'),
meta: {
title: '库表可视化',
isHide: true,
isKeepAlive: true,
isAffix: false,
// isIframe: true,
icon: 'ele-View',
},
},
];
/**
* 404401
* @link https://next.router.vuejs.org/zh/guide/essentials/history-mode.html#netlify
*/
export const notFoundAndNoPower = [
{
path: '/:path(.*)*',
name: 'notFound',
component: () => import('/@/views/error/404.vue'),
meta: {
title: 'message.staticRoutes.notFound',
isHide: true,
},
},
{
path: '/401',
name: 'noPower',
component: () => import('/@/views/error/401.vue'),
meta: {
title: 'message.staticRoutes.noPower',
isHide: true,
},
},
];
/**
*
* `dynamicRoutes 数组`
* @description dynamicRoutes dynamicRoutes children layout
* @returns
*/
export const staticRoutes: Array<RouteRecordRaw> = [
{
path: '/login',
name: 'login',
component: () => import('/@/views/login/index.vue'),
meta: {
2025-02-27 23:38:51 +08:00
title: 'Login',
isPublic: true,
2024-06-15 13:02:35 +08:00
},
},
/**
*
* `dynamicRoutes`
*/
// {
// path: '/visualizingDemo1',
// name: 'visualizingDemo1',
// component: () => import('/@/views/visualizing/demo1.vue'),
// meta: {
// title: 'message.router.visualizingLinkDemo1',
// },
// },
// {
// path: '/visualizingDemo2',
// name: 'visualizingDemo2',
// component: () => import('/@/views/visualizing/demo2.vue'),
// meta: {
// title: 'message.router.visualizingLinkDemo2',
// },
// },
];