Blame view

mock/role/routes.js 12.6 KB
d7d9c38c2   Adam   auto commit the c...
1
  // Just a mock data
04e55fcfe   Adam   auto commit the c...
2
  export const constantRoutes = [{
d7d9c38c2   Adam   auto commit the c...
3
4
5
      path: '/redirect',
      component: 'layout/Layout',
      hidden: true,
04e55fcfe   Adam   auto commit the c...
6
7
8
9
      children: [{
        path: '/redirect/:path*',
        component: 'views/redirect/index'
      }]
d7d9c38c2   Adam   auto commit the c...
10
11
12
13
14
15
16
17
18
19
20
21
    },
    {
      path: '/login',
      component: 'views/login/index',
      hidden: true
    },
    {
      path: '/auth-redirect',
      component: 'views/login/auth-redirect',
      hidden: true
    },
    {
50760eab9   Adam   auto commit the c...
22
23
24
25
26
27
28
29
30
31
      path: '/401',
      component: 'views/error-page/401',
      hidden: true
    },
    {
      path: '/403',
      component: 'views/error-page/403',
      hidden: true
    },
    {
d7d9c38c2   Adam   auto commit the c...
32
33
34
35
36
      path: '/404',
      component: 'views/error-page/404',
      hidden: true
    },
    {
50760eab9   Adam   auto commit the c...
37
38
      path: '/500',
      component: 'views/error-page/500',
d7d9c38c2   Adam   auto commit the c...
39
40
41
42
43
44
      hidden: true
    },
    {
      path: '',
      component: 'layout/Layout',
      redirect: 'dashboard',
04e55fcfe   Adam   auto commit the c...
45
46
47
48
49
50
51
52
      children: [{
        path: 'dashboard',
        component: 'views/dashboard/index',
        name: 'Dashboard',
        meta: {
          title: 'dashboard',
          icon: 'dashboard',
          affix: true
d7d9c38c2   Adam   auto commit the c...
53
        }
04e55fcfe   Adam   auto commit the c...
54
      }]
d7d9c38c2   Adam   auto commit the c...
55
56
57
58
    },
    {
      path: '/documentation',
      component: 'layout/Layout',
04e55fcfe   Adam   auto commit the c...
59
60
61
62
63
64
65
66
      children: [{
        path: 'index',
        component: 'views/documentation/index',
        name: 'Documentation',
        meta: {
          title: 'documentation',
          icon: 'documentation',
          affix: true
d7d9c38c2   Adam   auto commit the c...
67
        }
04e55fcfe   Adam   auto commit the c...
68
      }]
d7d9c38c2   Adam   auto commit the c...
69
70
71
72
73
    },
    {
      path: '/guide',
      component: 'layout/Layout',
      redirect: '/guide/index',
04e55fcfe   Adam   auto commit the c...
74
75
76
77
78
79
80
81
      children: [{
        path: 'index',
        component: 'views/guide/index',
        name: 'Guide',
        meta: {
          title: 'guide',
          icon: 'guide',
          noCache: true
d7d9c38c2   Adam   auto commit the c...
82
        }
04e55fcfe   Adam   auto commit the c...
83
      }]
d7d9c38c2   Adam   auto commit the c...
84
85
    }
  ]
04e55fcfe   Adam   auto commit the c...
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
  export const asyncRoutes = [{
      path: '/permission',
      component: 'layout/Layout',
      redirect: '/permission/index',
      alwaysShow: true,
      meta: {
        title: 'permission',
        icon: 'lock',
        // roles: ['admin', 'assistant', 'runner', 'shoper']
      },
      children: [{
          path: 'page',
          component: 'views/permission/page',
          name: 'PagePermission',
          meta: {
            title: 'pagePermission',
            roles: ['admin', 'assistant']
          }
        },
        {
          path: 'directive',
          component: 'views/permission/directive',
          name: 'DirectivePermission',
          meta: {
            title: 'directivePermission',
            roles: ['shoper']
          }
        },
        {
          path: 'role',
          component: 'views/permission/role',
          name: 'RolePermission',
          meta: {
            title: 'rolePermission',
            roles: ['runner']
          }
        }
      ]
    },
d7d9c38c2   Adam   auto commit the c...
125
126
127
128
  
    {
      path: '/icon',
      component: 'layout/Layout',
3d3cdb68f   Adam   auto commit the c...
129
130
      meta: {
        title: 'ddddd',
04e55fcfe   Adam   auto commit the c...
131
        icon: 'people',
3d3cdb68f   Adam   auto commit the c...
132
133
        roles: ['runner']
      },
04e55fcfe   Adam   auto commit the c...
134
135
136
137
138
139
140
141
      children: [{
        path: 'index',
        component: 'views/icons/index',
        name: 'Icons',
        meta: {
          title: 'icons',
          icon: 'icon',
          noCache: true
d7d9c38c2   Adam   auto commit the c...
142
        }
04e55fcfe   Adam   auto commit the c...
143
      }]
d7d9c38c2   Adam   auto commit the c...
144
145
146
147
148
149
150
151
152
153
154
    },
  
    {
      path: '/components',
      component: 'layout/Layout',
      redirect: 'noRedirect',
      name: 'ComponentDemo',
      meta: {
        title: 'components',
        icon: 'component'
      },
04e55fcfe   Adam   auto commit the c...
155
      children: [{
d7d9c38c2   Adam   auto commit the c...
156
157
158
          path: 'tinymce',
          component: 'views/components-demo/tinymce',
          name: 'TinymceDemo',
04e55fcfe   Adam   auto commit the c...
159
160
161
          meta: {
            title: 'tinymce'
          }
d7d9c38c2   Adam   auto commit the c...
162
163
164
165
166
        },
        {
          path: 'markdown',
          component: 'views/components-demo/markdown',
          name: 'MarkdownDemo',
04e55fcfe   Adam   auto commit the c...
167
168
169
          meta: {
            title: 'markdown'
          }
d7d9c38c2   Adam   auto commit the c...
170
171
172
173
174
        },
        {
          path: 'json-editor',
          component: 'views/components-demo/json-editor',
          name: 'JsonEditorDemo',
04e55fcfe   Adam   auto commit the c...
175
176
177
          meta: {
            title: 'jsonEditor'
          }
d7d9c38c2   Adam   auto commit the c...
178
179
180
181
182
        },
        {
          path: 'split-pane',
          component: 'views/components-demo/split-pane',
          name: 'SplitpaneDemo',
04e55fcfe   Adam   auto commit the c...
183
184
185
          meta: {
            title: 'splitPane'
          }
d7d9c38c2   Adam   auto commit the c...
186
187
188
189
190
        },
        {
          path: 'avatar-upload',
          component: 'views/components-demo/avatar-upload',
          name: 'AvatarUploadDemo',
04e55fcfe   Adam   auto commit the c...
191
192
193
          meta: {
            title: 'avatarUpload'
          }
d7d9c38c2   Adam   auto commit the c...
194
195
196
197
198
        },
        {
          path: 'dropzone',
          component: 'views/components-demo/dropzone',
          name: 'DropzoneDemo',
04e55fcfe   Adam   auto commit the c...
199
200
201
          meta: {
            title: 'dropzone'
          }
d7d9c38c2   Adam   auto commit the c...
202
203
204
205
206
        },
        {
          path: 'sticky',
          component: 'views/components-demo/sticky',
          name: 'StickyDemo',
04e55fcfe   Adam   auto commit the c...
207
208
209
          meta: {
            title: 'sticky'
          }
d7d9c38c2   Adam   auto commit the c...
210
211
212
213
214
        },
        {
          path: 'count-to',
          component: 'views/components-demo/count-to',
          name: 'CountToDemo',
04e55fcfe   Adam   auto commit the c...
215
216
217
          meta: {
            title: 'countTo'
          }
d7d9c38c2   Adam   auto commit the c...
218
219
220
221
222
        },
        {
          path: 'mixin',
          component: 'views/components-demo/mixin',
          name: 'ComponentMixinDemo',
04e55fcfe   Adam   auto commit the c...
223
224
225
          meta: {
            title: 'componentMixin'
          }
d7d9c38c2   Adam   auto commit the c...
226
227
228
229
230
        },
        {
          path: 'back-to-top',
          component: 'views/components-demo/back-to-top',
          name: 'BackToTopDemo',
04e55fcfe   Adam   auto commit the c...
231
232
233
          meta: {
            title: 'backToTop'
          }
d7d9c38c2   Adam   auto commit the c...
234
235
236
237
238
        },
        {
          path: 'drag-dialog',
          component: 'views/components-demo/drag-dialog',
          name: 'DragDialogDemo',
04e55fcfe   Adam   auto commit the c...
239
240
241
          meta: {
            title: 'dragDialog'
          }
d7d9c38c2   Adam   auto commit the c...
242
243
244
245
246
        },
        {
          path: 'drag-select',
          component: 'views/components-demo/drag-select',
          name: 'DragSelectDemo',
04e55fcfe   Adam   auto commit the c...
247
248
249
          meta: {
            title: 'dragSelect'
          }
d7d9c38c2   Adam   auto commit the c...
250
251
252
253
254
        },
        {
          path: 'dnd-list',
          component: 'views/components-demo/dnd-list',
          name: 'DndListDemo',
04e55fcfe   Adam   auto commit the c...
255
256
257
          meta: {
            title: 'dndList'
          }
d7d9c38c2   Adam   auto commit the c...
258
259
260
261
262
        },
        {
          path: 'drag-kanban',
          component: 'views/components-demo/drag-kanban',
          name: 'DragKanbanDemo',
04e55fcfe   Adam   auto commit the c...
263
264
265
          meta: {
            title: 'dragKanban'
          }
d7d9c38c2   Adam   auto commit the c...
266
267
268
269
270
271
272
273
274
275
276
277
        }
      ]
    },
    {
      path: '/charts',
      component: 'layout/Layout',
      redirect: 'noRedirect',
      name: 'Charts',
      meta: {
        title: 'charts',
        icon: 'chart'
      },
04e55fcfe   Adam   auto commit the c...
278
      children: [{
d7d9c38c2   Adam   auto commit the c...
279
280
281
          path: 'keyboard',
          component: 'views/charts/keyboard',
          name: 'KeyboardChart',
04e55fcfe   Adam   auto commit the c...
282
283
284
285
          meta: {
            title: 'keyboardChart',
            noCache: true
          }
d7d9c38c2   Adam   auto commit the c...
286
287
288
289
290
        },
        {
          path: 'line',
          component: 'views/charts/line',
          name: 'LineChart',
04e55fcfe   Adam   auto commit the c...
291
292
293
294
          meta: {
            title: 'lineChart',
            noCache: true
          }
d7d9c38c2   Adam   auto commit the c...
295
296
297
298
299
        },
        {
          path: 'mixchart',
          component: 'views/charts/mixChart',
          name: 'MixChart',
04e55fcfe   Adam   auto commit the c...
300
301
302
303
          meta: {
            title: 'mixChart',
            noCache: true
          }
d7d9c38c2   Adam   auto commit the c...
304
305
306
307
308
309
310
311
312
313
314
315
        }
      ]
    },
    {
      path: '/nested',
      component: 'layout/Layout',
      redirect: '/nested/menu1/menu1-1',
      name: 'Nested',
      meta: {
        title: 'nested',
        icon: 'nested'
      },
04e55fcfe   Adam   auto commit the c...
316
      children: [{
d7d9c38c2   Adam   auto commit the c...
317
318
319
          path: 'menu1',
          component: 'views/nested/menu1/index',
          name: 'Menu1',
04e55fcfe   Adam   auto commit the c...
320
321
322
          meta: {
            title: 'menu1'
          },
d7d9c38c2   Adam   auto commit the c...
323
          redirect: '/nested/menu1/menu1-1',
04e55fcfe   Adam   auto commit the c...
324
          children: [{
d7d9c38c2   Adam   auto commit the c...
325
326
327
              path: 'menu1-1',
              component: 'views/nested/menu1/menu1-1',
              name: 'Menu1-1',
04e55fcfe   Adam   auto commit the c...
328
329
330
              meta: {
                title: 'menu1-1'
              }
d7d9c38c2   Adam   auto commit the c...
331
332
333
334
335
336
            },
            {
              path: 'menu1-2',
              component: 'views/nested/menu1/menu1-2',
              name: 'Menu1-2',
              redirect: '/nested/menu1/menu1-2/menu1-2-1',
04e55fcfe   Adam   auto commit the c...
337
338
339
340
              meta: {
                title: 'menu1-2'
              },
              children: [{
d7d9c38c2   Adam   auto commit the c...
341
342
343
                  path: 'menu1-2-1',
                  component: 'views/nested/menu1/menu1-2/menu1-2-1',
                  name: 'Menu1-2-1',
04e55fcfe   Adam   auto commit the c...
344
345
346
                  meta: {
                    title: 'menu1-2-1'
                  }
d7d9c38c2   Adam   auto commit the c...
347
348
349
350
351
                },
                {
                  path: 'menu1-2-2',
                  component: 'views/nested/menu1/menu1-2/menu1-2-2',
                  name: 'Menu1-2-2',
04e55fcfe   Adam   auto commit the c...
352
353
354
                  meta: {
                    title: 'menu1-2-2'
                  }
d7d9c38c2   Adam   auto commit the c...
355
356
357
358
359
360
361
                }
              ]
            },
            {
              path: 'menu1-3',
              component: 'views/nested/menu1/menu1-3',
              name: 'Menu1-3',
04e55fcfe   Adam   auto commit the c...
362
363
364
              meta: {
                title: 'menu1-3'
              }
d7d9c38c2   Adam   auto commit the c...
365
366
367
368
369
370
371
            }
          ]
        },
        {
          path: 'menu2',
          name: 'Menu2',
          component: 'views/nested/menu2/index',
04e55fcfe   Adam   auto commit the c...
372
373
374
          meta: {
            title: 'menu2'
          }
d7d9c38c2   Adam   auto commit the c...
375
376
377
378
379
380
381
382
383
384
385
386
387
        }
      ]
    },
  
    {
      path: '/example',
      component: 'layout/Layout',
      redirect: '/example/list',
      name: 'Example',
      meta: {
        title: 'example',
        icon: 'example'
      },
04e55fcfe   Adam   auto commit the c...
388
      children: [{
d7d9c38c2   Adam   auto commit the c...
389
390
391
          path: 'create',
          component: 'views/example/create',
          name: 'CreateArticle',
04e55fcfe   Adam   auto commit the c...
392
393
394
395
          meta: {
            title: 'createArticle',
            icon: 'edit'
          }
d7d9c38c2   Adam   auto commit the c...
396
397
398
399
400
        },
        {
          path: 'edit/:id(\\d+)',
          component: 'views/example/edit',
          name: 'EditArticle',
04e55fcfe   Adam   auto commit the c...
401
402
403
404
          meta: {
            title: 'editArticle',
            noCache: true
          },
d7d9c38c2   Adam   auto commit the c...
405
406
407
408
409
410
          hidden: true
        },
        {
          path: 'list',
          component: 'views/example/list',
          name: 'ArticleList',
04e55fcfe   Adam   auto commit the c...
411
412
413
414
          meta: {
            title: 'articleList',
            icon: 'list'
          }
d7d9c38c2   Adam   auto commit the c...
415
416
417
418
419
420
421
        }
      ]
    },
  
    {
      path: '/tab',
      component: 'layout/Layout',
04e55fcfe   Adam   auto commit the c...
422
423
424
425
426
427
428
      children: [{
        path: 'index',
        component: 'views/tab/index',
        name: 'Tab',
        meta: {
          title: 'tab',
          icon: 'tab'
d7d9c38c2   Adam   auto commit the c...
429
        }
04e55fcfe   Adam   auto commit the c...
430
      }]
d7d9c38c2   Adam   auto commit the c...
431
432
433
434
435
436
437
438
439
440
441
    },
  
    {
      path: '/error',
      component: 'layout/Layout',
      redirect: 'noRedirect',
      name: 'ErrorPages',
      meta: {
        title: 'errorPages',
        icon: '404'
      },
04e55fcfe   Adam   auto commit the c...
442
      children: [{
d7d9c38c2   Adam   auto commit the c...
443
444
445
          path: '401',
          component: 'views/error-page/401',
          name: 'Page401',
04e55fcfe   Adam   auto commit the c...
446
447
448
449
          meta: {
            title: 'page401',
            noCache: true
          }
d7d9c38c2   Adam   auto commit the c...
450
451
452
453
454
        },
        {
          path: '404',
          component: 'views/error-page/404',
          name: 'Page404',
04e55fcfe   Adam   auto commit the c...
455
456
457
458
          meta: {
            title: 'page404',
            noCache: true
          }
50760eab9   Adam   auto commit the c...
459
460
461
462
463
        },
        {
          path: '500',
          component: 'views/error-page/500',
          name: 'Page500',
04e55fcfe   Adam   auto commit the c...
464
465
466
467
          meta: {
            title: 'page500',
            noCache: true
          }
d7d9c38c2   Adam   auto commit the c...
468
469
470
471
472
473
474
475
        }
      ]
    },
  
    {
      path: '/error-log',
      component: 'layout/Layout',
      redirect: 'noRedirect',
04e55fcfe   Adam   auto commit the c...
476
477
478
479
480
481
482
      children: [{
        path: 'log',
        component: 'views/error-log/index',
        name: 'ErrorLog',
        meta: {
          title: 'errorLog',
          icon: 'bug'
d7d9c38c2   Adam   auto commit the c...
483
        }
04e55fcfe   Adam   auto commit the c...
484
      }]
d7d9c38c2   Adam   auto commit the c...
485
486
487
488
489
490
491
492
493
494
495
    },
  
    {
      path: '/excel',
      component: 'layout/Layout',
      redirect: '/excel/export-excel',
      name: 'Excel',
      meta: {
        title: 'excel',
        icon: 'excel'
      },
04e55fcfe   Adam   auto commit the c...
496
      children: [{
d7d9c38c2   Adam   auto commit the c...
497
498
499
          path: 'export-excel',
          component: 'views/excel/export-excel',
          name: 'ExportExcel',
04e55fcfe   Adam   auto commit the c...
500
501
502
          meta: {
            title: 'exportExcel'
          }
d7d9c38c2   Adam   auto commit the c...
503
504
505
506
507
        },
        {
          path: 'export-selected-excel',
          component: 'views/excel/select-excel',
          name: 'SelectExcel',
04e55fcfe   Adam   auto commit the c...
508
509
510
          meta: {
            title: 'selectExcel'
          }
d7d9c38c2   Adam   auto commit the c...
511
512
513
514
515
        },
        {
          path: 'export-merge-header',
          component: 'views/excel/merge-header',
          name: 'MergeHeader',
04e55fcfe   Adam   auto commit the c...
516
517
518
          meta: {
            title: 'mergeHeader'
          }
d7d9c38c2   Adam   auto commit the c...
519
520
521
522
523
        },
        {
          path: 'upload-excel',
          component: 'views/excel/upload-excel',
          name: 'UploadExcel',
04e55fcfe   Adam   auto commit the c...
524
525
526
          meta: {
            title: 'uploadExcel'
          }
d7d9c38c2   Adam   auto commit the c...
527
528
529
530
531
532
533
534
535
        }
      ]
    },
  
    {
      path: '/zip',
      component: 'layout/Layout',
      redirect: '/zip/download',
      alwaysShow: true,
04e55fcfe   Adam   auto commit the c...
536
537
538
539
540
541
542
543
544
545
      meta: {
        title: 'zip',
        icon: 'zip'
      },
      children: [{
        path: 'download',
        component: 'views/zip/index',
        name: 'ExportZip',
        meta: {
          title: 'exportZip'
d7d9c38c2   Adam   auto commit the c...
546
        }
04e55fcfe   Adam   auto commit the c...
547
      }]
d7d9c38c2   Adam   auto commit the c...
548
549
550
551
552
553
    },
  
    {
      path: '/pdf',
      component: 'layout/Layout',
      redirect: '/pdf/index',
04e55fcfe   Adam   auto commit the c...
554
555
556
557
558
559
560
      children: [{
        path: 'index',
        component: 'views/pdf/index',
        name: 'PDF',
        meta: {
          title: 'pdf',
          icon: 'pdf'
d7d9c38c2   Adam   auto commit the c...
561
        }
04e55fcfe   Adam   auto commit the c...
562
      }]
d7d9c38c2   Adam   auto commit the c...
563
564
565
566
567
568
569
570
571
572
573
    },
    {
      path: '/pdf/download',
      component: 'views/pdf/download',
      hidden: true
    },
  
    {
      path: '/theme',
      component: 'layout/Layout',
      redirect: 'noRedirect',
04e55fcfe   Adam   auto commit the c...
574
575
576
577
578
579
580
      children: [{
        path: 'index',
        component: 'views/theme/index',
        name: 'Theme',
        meta: {
          title: 'theme',
          icon: 'theme'
d7d9c38c2   Adam   auto commit the c...
581
        }
04e55fcfe   Adam   auto commit the c...
582
      }]
d7d9c38c2   Adam   auto commit the c...
583
584
585
586
587
588
    },
  
    {
      path: '/clipboard',
      component: 'layout/Layout',
      redirect: 'noRedirect',
04e55fcfe   Adam   auto commit the c...
589
590
591
592
593
594
595
      children: [{
        path: 'index',
        component: 'views/clipboard/index',
        name: 'ClipboardDemo',
        meta: {
          title: 'clipboardDemo',
          icon: 'clipboard'
d7d9c38c2   Adam   auto commit the c...
596
        }
04e55fcfe   Adam   auto commit the c...
597
      }]
d7d9c38c2   Adam   auto commit the c...
598
599
600
601
602
    },
  
    {
      path: '/i18n',
      component: 'layout/Layout',
04e55fcfe   Adam   auto commit the c...
603
604
605
606
607
608
609
      children: [{
        path: 'index',
        component: 'views/i18n-demo/index',
        name: 'I18n',
        meta: {
          title: 'i18n',
          icon: 'international'
d7d9c38c2   Adam   auto commit the c...
610
        }
04e55fcfe   Adam   auto commit the c...
611
      }]
d7d9c38c2   Adam   auto commit the c...
612
613
614
615
616
    },
  
    {
      path: 'external-link',
      component: 'layout/Layout',
04e55fcfe   Adam   auto commit the c...
617
618
619
620
621
      children: [{
        path: 'https://github.com/PanJiaChen/vue-element-admin',
        meta: {
          title: 'externalLink',
          icon: 'link'
d7d9c38c2   Adam   auto commit the c...
622
        }
04e55fcfe   Adam   auto commit the c...
623
      }]
d7d9c38c2   Adam   auto commit the c...
624
    },
04e55fcfe   Adam   auto commit the c...
625
626
627
628
629
    {
      path: '*',
      redirect: '/404',
      hidden: true
    }
d7d9c38c2   Adam   auto commit the c...
630
  ]