index.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. import { createRouter, createWebHistory } from 'vue-router'
  2. const MainLayout = () => import('@/layouts/MainLayout.vue')
  3. const Dashboard = () => import('@/views/Dashboard.vue')
  4. const Editor = () => import('@/views/Editor.vue')
  5. const Statistics = () => import('@/views/Statistics.vue')
  6. const Chat = () => import('@/views/Chat.vue')
  7. const Templates = () => import('@/views/TemplateDetail.vue')
  8. const QuickStart = () => import('@/views/QuickStart.vue')
  9. const Docs = () => import('@/views/Docs.vue')
  10. const About = () => import('@/views/About.vue')
  11. const UserCenter = () => import('@/views/UserCenter.vue')
  12. const LogStream = () => import('@/views/LogStream.vue')
  13. const ModelLog = () => import('@/views/ModelLog.vue')
  14. const WorkflowOrchestration = () => import('@/views/WorkflowOrchestration.vue')
  15. const WorkflowExecution = () => import('@/views/WorkflowExecution.vue')
  16. const routes = [
  17. {
  18. path: '/',
  19. component: MainLayout,
  20. children: [
  21. {
  22. path: '',
  23. name: 'Dashboard',
  24. component: Dashboard,
  25. alias: 'overview'
  26. },
  27. {
  28. path: 'statistics',
  29. name: 'Statistics',
  30. component: Statistics
  31. },
  32. {
  33. path: 'orchestration',
  34. name: 'WorkflowOrchestration',
  35. component: WorkflowOrchestration
  36. },
  37. {
  38. path: 'execution',
  39. name: 'WorkflowExecution',
  40. component: WorkflowExecution
  41. },
  42. {
  43. path: 'chat',
  44. name: 'Chat',
  45. component: Chat
  46. },
  47. {
  48. path: 'workflow/:id',
  49. name: 'Editor',
  50. component: Editor
  51. },
  52. {
  53. path: 'templates/:id',
  54. name: 'TemplateDetail',
  55. component: Templates
  56. },
  57. {
  58. path: 'quick-start',
  59. name: 'QuickStart',
  60. component: QuickStart
  61. },
  62. {
  63. path: 'docs',
  64. name: 'Docs',
  65. component: Docs
  66. },
  67. {
  68. path: 'about',
  69. name: 'About',
  70. component: About
  71. },
  72. {
  73. path: 'user-center',
  74. name: 'UserCenter',
  75. component: UserCenter
  76. },
  77. {
  78. path: 'log-stream',
  79. name: 'LogStream',
  80. component: LogStream
  81. },
  82. {
  83. path: 'model-log',
  84. name: 'ModelLog',
  85. component: ModelLog
  86. }
  87. ]
  88. }
  89. ]
  90. const router = createRouter({
  91. history: createWebHistory(),
  92. routes
  93. })
  94. export default router