1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
| import Vue from 'vue'
| import Router from 'vue-router'
| import Layout from './views/Layout/Layout.vue'
| import store from "./store";
|
| import Login from './views/Login.vue'
| import NotFound from './views/403.vue'
| import Welcome from './views/Welcome'
|
| import Table from './views/User/Users.vue'
| import Roles from './views/User/Roles.vue'
|
| import Module from './views/Permission/Module.vue'
| import Permission from './views/Permission/Permission.vue'
| import Assign from './views/Permission/Assign.vue'
|
| import Form from './views/Form/Form.vue'
| import Charts from './views/Form/Charts.vue'
|
|
| import Blogs from './views/Blog/Blogs.vue'
| import Bugs from './views/Tibug/Bugs.vue'
|
| import APIDoc from './views/APIDoc'
| import {saveRefreshtime} from "./api/api";
| import NoPage from "./views/404";
| import TestOne from "./views/TestShow/TestOne";
|
|
|
| Vue.use(Router)
|
|
| /**
| * 这是手动注册的方式,弃用
| */
| const router = new Router({
| mode: 'history',
| base: process.env.BASE_URL,
| routes: [
| {
| path: '/404', component: NoPage, name: 'NoPage',
| meta: {
| title: 'NoPage',
| requireAuth: false,
| NoNeedHome: true // 添加该字段,表示不需要home模板
| },
| hidden: true
| },
| {
| path: '/403', component: NotFound, name: 'NotFound',
| meta: {
| title: '首页',
| NoTabPage: true,
| requireAuth: false
| },
| hidden: true
| },
| {
| path: '/APIDoc', component: APIDoc, name: 'APIDoc',
| meta: {
| title: 'APIDoc',
| requireAuth: false
| },
| hidden: true
| },
| {
| path: '/',
| component: Welcome,
| name: '首页',
| iconCls: 'fa-qq',//图标样式class
| // hidden: true,
| meta: {
| title: '首页',
| requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| {
| path: '/login',
| component: Login,
| name: 'login',
| iconCls: 'fa-address-card',//图标样式class
| meta: {
| title: '登录',
| NoTabPage: true,
| NoNeedHome: true // 添加该字段,表示不需要home模板
| },
| hidden: true
| },
| {
| path: '/',
| component: Layout,
| name: '用户角色管理',
| iconCls: 'fa-users',//图标样式class
| children: [
| {
| path: '/User/Users', component: Table, name: '用户管理',
| meta: {
| title: '用户管理',
| requireAuth: true
| }
| },
| {
| path: '/User/Roles', component: Roles, name: '角色管理',
| meta: {
| title: '角色管理',
| requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| ]
| },
| {
| path: '/',
| component: Layout,
| name: '菜单权限管理',
| iconCls: 'fa-sitemap',//图标样式class
| children: [
| {
| path: '/Permission/Module', component: Module, name: '接口管理',
| meta: {
| title: '接口管理',
| requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| {
| path: '/Permission/Permission', component: Permission, name: '菜单管理',
| meta: {
| title: '菜单管理',
| requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| {
| path: '/Permission/Assign', component: Assign, name: '权限分配',
| meta: {
| title: '权限分配',
| requireAuth: true // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| ]
| },
| {
| path: '/',
| component: Layout,
| name: '报表管理',
| iconCls: 'fa-line-chart ',//图标样式class
| children: [
| {
| path: '/Chart/From', component: Form, name: '表单Form',
| meta: {
| title: '表单Form',
| requireAuth: true
| }
| },
| {
| path: '/Chart/Charts', component: Charts, name: '图表Chart',
| meta: {
| title: '图表Chart',
| requireAuth: true
| }
| },
| ]
| },
| {
| path: '/Tibug',
| component: Bugs,
| name: '问题管理',
| iconCls: ' fa-bug',//图标样式class
| // hidden: true,
| meta: {
| title: '问题管理',
| requireAuth: false // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| {
| path: '/Blogs',
| component: Blogs,
| name: '博客管理',
| iconCls: ' fa-file-word-o',//图标样式class
| // hidden: true,
| meta: {
| title: '博客管理',
| requireAuth: false // 添加该字段,表示进入这个路由是需要登录的
| }
| },
| {
| path: '/',
| component: Layout,
| name: '测试管理',
| iconCls: 'fa-line-chart ',//图标样式class
| children: [
| {
| path: '/TestShow/TestOne', component: TestOne, name: '测试页1',
| meta: {
| title: '测试页1',
| requireAuth: true
| }
| },
| ]
| },
| {
| path: '*',
| hidden: true,
| redirect: {path: '/404'}
| }
| ]
| })
|
| export default router;
|
|