1- import { createRouter , createWebHashHistory } from ' vue-router'
1+ import { createRouter , createWebHashHistory } from " vue-router" ;
22
3- import Layout from '@/components/layout/index.vue'
4- import login from '@/views/login/index.vue'
5- import chat from '@/views/chat/index.vue'
6- import ds from '@/views/ds/index.vue'
7- import DashboardEditor from '@/views/dashboard/editor/index.vue'
8- import Dashboard from '@/views/dashboard/index.vue'
9- import setting from '@/views/setting/index.vue'
10- import { watchRouter } from './watch'
3+ import Layout from "@/components/layout/index.vue" ;
4+ import SinglePage from "@/components/layout/SinglePage.vue" ;
5+ import login from "@/views/login/index.vue" ;
6+ import chat from "@/views/chat/index.vue" ;
7+ import ds from "@/views/ds/index.vue" ;
8+ import DashboardEditor from "@/views/dashboard/editor/index.vue" ;
9+ import Dashboard from "@/views/dashboard/index.vue" ;
10+ import setting from "@/views/setting/index.vue" ;
11+ import { watchRouter } from "./watch" ;
1112const router = createRouter ( {
1213 history : createWebHashHistory ( ) ,
1314 routes : [
1415 {
15- path : ' /login' ,
16- name : ' login' ,
17- component : login
16+ path : " /login" ,
17+ name : " login" ,
18+ component : login ,
1819 } ,
1920 {
20- path : ' /chat' ,
21+ path : " /chat" ,
2122 component : Layout ,
22- redirect : ' /chat/index' ,
23+ redirect : " /chat/index" ,
2324 children : [
2425 {
25- path : ' index' ,
26- name : ' chat' ,
26+ path : " index" ,
27+ name : " chat" ,
2728 component : chat ,
28- meta : { title : 'Data Q&A' , icon : 'chat' }
29- }
30- ]
29+ meta : { title : "Data Q&A" , icon : "chat" } ,
30+ } ,
31+ ] ,
32+ } ,
33+ {
34+ path : "/dsTable" ,
35+ component : SinglePage ,
36+ children : [
37+ {
38+ path : ":dsId/:dsName" ,
39+ name : "dsTable" ,
40+ component : ( ) => import ( "@/views/ds/TableList.vue" ) ,
41+ props : true ,
42+ } ,
43+ ] ,
3144 } ,
3245 {
33- path : ' /ds' ,
46+ path : " /ds" ,
3447 component : Layout ,
35- redirect : ' /ds/index' ,
48+ redirect : " /ds/index" ,
3649 children : [
3750 {
38- path : ' index' ,
39- name : 'ds' ,
51+ path : " index" ,
52+ name : "ds" ,
4053 component : ds ,
41- meta : { title : ' Data Connections' , icon : 'ds' }
54+ meta : { title : " Data Connections" , icon : "ds" } ,
4255 } ,
43- {
44- path : 'dsTable/:dsId/:dsName' ,
45- name : 'dsTable' ,
46- component : ( ) => import ( '@/views/ds/TableList.vue' ) ,
47- props : true
48- }
49- ]
56+ ] ,
5057 } ,
5158 {
52- path : ' /dashboard' ,
59+ path : " /dashboard" ,
5360 component : Layout ,
54- redirect : ' /dashboard/index' ,
61+ redirect : " /dashboard/index" ,
5562 children : [
5663 {
57- path : ' index' ,
58- name : ' dashboard' ,
64+ path : " index" ,
65+ name : " dashboard" ,
5966 component : Dashboard ,
60- meta : { title : ' Dashboard' , icon : ' dashboard' }
61- }
62- ]
67+ meta : { title : " Dashboard" , icon : " dashboard" } ,
68+ } ,
69+ ] ,
6370 } ,
6471 {
65- path : ' /dashboard-edit' ,
66- redirect : ' /dashboard-edit/index' ,
72+ path : " /dashboard-edit" ,
73+ redirect : " /dashboard-edit/index" ,
6774 component : Layout ,
6875 children : [
6976 {
70- path : ' index' ,
71- name : ' dashboard-edit' ,
77+ path : " index" ,
78+ name : " dashboard-edit" ,
7279 component : DashboardEditor ,
73- meta : { title : ' dashboard-edit' , icon : ' dashboard' }
74- }
75- ]
80+ meta : { title : " dashboard-edit" , icon : " dashboard" } ,
81+ } ,
82+ ] ,
7683 } ,
7784 {
78- path : ' /setting' ,
85+ path : " /setting" ,
7986 component : Layout ,
80- redirect : ' /setting/index' ,
87+ redirect : " /setting/index" ,
8188 children : [
8289 {
83- path : ' index' ,
84- name : ' setting' ,
90+ path : " index" ,
91+ name : " setting" ,
8592 component : setting ,
86- meta : { title : ' Settings' , icon : ' setting' }
87- }
88- ]
93+ meta : { title : " Settings" , icon : " setting" } ,
94+ } ,
95+ ] ,
8996 } ,
9097 {
91- path : ' /system' ,
98+ path : " /system" ,
9299 component : Layout ,
93- redirect : ' /system/user' ,
100+ redirect : " /system/user" ,
94101 children : [
95102 {
96- path : ' user' ,
97- name : ' user' ,
98- component : ( ) => import ( ' @/views/system/user/index.vue' ) ,
99- meta : { title : ' User Management' , icon : ' icon_user' }
103+ path : " user" ,
104+ name : " user" ,
105+ component : ( ) => import ( " @/views/system/user/index.vue" ) ,
106+ meta : { title : " User Management" , icon : " icon_user" } ,
100107 } ,
101108 {
102- path : ' model' ,
103- name : ' model' ,
104- component : ( ) => import ( ' @/views/system/model/index.vue' ) ,
105- meta : { title : ' AI Model Configuration' , icon : ' icon_ai' }
106- }
107- ]
108- }
109- ]
110- } )
111- watchRouter ( router )
112- export default router
109+ path : " model" ,
110+ name : " model" ,
111+ component : ( ) => import ( " @/views/system/model/index.vue" ) ,
112+ meta : { title : " AI Model Configuration" , icon : " icon_ai" } ,
113+ } ,
114+ ] ,
115+ } ,
116+ ] ,
117+ } ) ;
118+ watchRouter ( router ) ;
119+ export default router ;
0 commit comments