forked from hangjob/vue-bag-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaultMenu.ts
366 lines (364 loc) · 9.96 KB
/
defaultMenu.ts
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
import {addUniqueId} from '@/packages/utils/lodash'
/**
* 默认菜单
*/
const arr: Array<any> = [
{
name: '首页',
path: '/home',
icon: 'HomeFilled',
shows: 1,
tabHidden: false,
iframe: '',
tabFix: true,
keepAlive: false,
filePath:'/views/home/Index.vue'
},
{
name: '系统管理',
router: '',
icon: 'SettingOutlined',
shows: 1,
children: [
{
name: '用户管理', path: '/sys/member', icon: '', shows: 1,
tabHidden: false, tabFix: false, keepAlive: true,
filePath: '/views/sys/member/Index.vue'
},
{
name: '菜单列表', path: '/sys/menu', icon: '', shows: 1,
tabHidden: false, tabFix: false, keepAlive: true,
filePath: '/views/sys/menu/Index.vue'
},
{
name: '部门组织',
path: '/sys/branch',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/sys/branch/Index.vue'
},
{
name: '角色管理',
path: '/sys/role',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/sys/role/Index.vue'
},
]
},
{
name: '组件库',
router: '',
icon: 'SmileOutlined',
shows: 1,
children: [
{
name: 'Markdown编辑器',
path: '/module/markdown',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/markdown/Index.vue'
},
{
name: '富文本编辑器',
path: '/module/rich',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/module/rich/Index.vue'
},
{
name: '解析Exel',
path: '/module/exel',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/exel/Index.vue'
},
{
name: '上传',
path: '',
icon: 'FileImageOutlined',
shows: 1,
children: [
{
name: '图片上传',
path: '/module/fileUploadImg',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/fileUpload/FileUploadImg.vue'
},
{
name: '文件上传',
path: '/module/fileUpload',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/fileUpload/FileUpload.vue'
},
],
},
{
name: '文件打印',
path: '/module/print',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/print/Index.vue'
},
{
name: '简洁图标',
path: '/module/icon/iconfont',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/icon/iconfont/Index.vue'
},
{
name: '描述列表',
path: '/module/descriptions',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/descriptions/Index.vue'
},
{
name: '课程表',
path: '/module/course',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/module/course/Index.vue'
},
{
name: '视频播放',
path: '/module/media',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/module/media/Index.vue'
},
{
name: '内容搜索',
path: '/module/fuse',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/module/fuse/Index.vue'
},
{
name: '导出文件',
path: '/module/fileSaver',
icon: '',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: true,
filePath: '/views/module/fileSaver/Index.vue'
},
{
name: '表单生成器',
path: '/iframe/form-generator',
filePath: '/views/module/iframe/Index.vue',
icon: '',
shows: 1,
iframePath: 'https://demo.gin-vue-admin.com/form-generator',
tabHidden: false,
tabFix: false,
keepAlive: false,
},
],
},
{
name: '数据图表',
path: '',
icon: 'PieChartOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
children: [
{
name: 'G2',
path: '/chart/g2',
icon: '',
shows: 1,
iframe: '',
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath:'/views/chart/g2/Index.vue'
},
{
name: 'G2plot',
path: '/chart/g2plot',
icon: '',
shows: 1,
iframe: '',
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/chart/g2plot/Index.vue'
},
],
},
{
name: '开发文档',
path: '',
icon: 'ReadOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
children: [
{
name: 'Vue3',
path: '/iframe/Vue3',
icon: '',
shows: 1,
iframePath: 'https://v3.cn.vuejs.org/',
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/iframe/Index.vue',
},
],
},
{
name: '通知页面',
path: '/error',
icon: 'MehOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/error/Index.vue'
},
{
name: '打点吧',
path: '/admire',
icon: 'RedEnvelopeOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/admire/Index.vue'
},
{
name: '权限控制',
path: '/permit',
icon: 'UserSwitchOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/permit/Index.vue'
},
{
name: '异步组件',
path: '/async',
icon: 'UserOutlined',
shows: 1,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/async/Index.vue'
},
{
name: '关于',
path: '/about',
icon: 'UserOutlined',
shows: 1,
tabHidden: false,
tabFix: true,
keepAlive: false,
filePath: '/views/about/Index.vue'
},
{
name: '错误捕获',
path: '/module/debug',
icon: 'UserOutlined',
shows: 0,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/module/debug/Index.vue'
},
{
name: '403',
path: '/403',
icon: 'UserOutlined',
shows: 0,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/error/403.vue'
},
{
name: '500',
path: '/500',
icon: 'UserOutlined',
shows: 0,
tabHidden: false,
tabFix: false,
keepAlive: false,
filePath: '/views/error/500.vue'
},
]
const defaultMenu = addUniqueId(arr, '_local') // 增加个标识符
/**
* 默认项目菜单
*/
let defaultPrjMenu = [
{
name: '系統菜单',
icon: 'UserOutlined',
shows: 1,
menus: defaultMenu,
},
{
name: '工作平台',
icon: 'UserOutlined',
shows: 1,
menus: defaultMenu.slice(0, 3),
},
{
name: '租户管理',
icon: 'UserOutlined',
shows: 1,
menus: defaultMenu.slice(-3),
},
]
defaultPrjMenu = addUniqueId(defaultPrjMenu, '_local')
export {
defaultMenu,
defaultPrjMenu,
}