routes.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. export default [
  2. {
  3. path: '/',
  4. component: '../layouts/BlankLayout',
  5. routes: [
  6. {
  7. path: '/user',
  8. component: '../layouts/UserLayout',
  9. routes: [
  10. {
  11. name: 'login',
  12. path: '/user/login',
  13. component: './user/login'
  14. }
  15. ]
  16. },
  17. {
  18. path: '/',
  19. component: '../layouts/SecurityLayout',
  20. routes: [
  21. {
  22. path: '/',
  23. component: '../layouts/BasicLayout',
  24. authority: ['admin', 'client_access'],
  25. routes: [
  26. {
  27. path: '/',
  28. redirect: '/customer/contact'
  29. },
  30. {
  31. path: '/workbench',
  32. name: 'workbench',
  33. icon: 'icon-chess',
  34. routes: [
  35. {
  36. path: '/workbench',
  37. redirect: '/workbench/dashboard'
  38. },
  39. {
  40. path: '/workbench/dashboard',
  41. name: 'dashboard',
  42. icon: 'icon-tachometer-alt',
  43. component: './workbench/Dashboard'
  44. }
  45. ]
  46. },
  47. {
  48. path: '/customer',
  49. name: 'customer',
  50. icon: 'icon-address-book-o',
  51. routes: [
  52. {
  53. path: '/customer',
  54. redirect: '/customer/contact',
  55. authority: ['admin', 'client_access']
  56. },
  57. {
  58. path: '/customer/contact',
  59. name: 'contact',
  60. icon: 'icon-address-book',
  61. component: './customer/Contact',
  62. authority: ['admin', 'client_access']
  63. },
  64. {
  65. path: '/customer/company',
  66. name: 'company',
  67. icon: 'icon-building',
  68. component: './customer/Company',
  69. authority: ['admin', 'company_access']
  70. },
  71. {
  72. path: '/customer/business',
  73. name: 'business',
  74. icon: 'icon-usd-circle',
  75. component: './customer/Business'
  76. }
  77. ]
  78. },
  79. {
  80. path: '/product',
  81. name: 'product',
  82. icon: 'icon-box',
  83. routes: [
  84. {
  85. path: '/product',
  86. redirect: '/product/lock'
  87. },
  88. {
  89. path: '/product/lock',
  90. name: 'lock',
  91. icon: 'icon-magic',
  92. routes: [
  93. {
  94. path: '/product/lock',
  95. redirect: '/product/lock/lockstore'
  96. },
  97. {
  98. path: '/product/lock/lockstore',
  99. name: 'lockstore',
  100. component: './product/lock/Lockstore'
  101. },
  102. {
  103. path: '/product/lock/lockcount',
  104. name: 'lockcount',
  105. component: './product/lock/Lockcount'
  106. }
  107. ]
  108. },
  109. {
  110. path: '/product/cloud',
  111. name: 'cloud',
  112. icon: 'icon-cloud',
  113. routes: [
  114. {
  115. path: '/product/cloud',
  116. redirect: '/product/cloud/building'
  117. },
  118. {
  119. path: '/product/cloud/building',
  120. name: 'build',
  121. component: './product/cloud/Building'
  122. },
  123. {
  124. path: '/product/cloud/curing',
  125. name: 'curing',
  126. component: './product/cloud/Curing'
  127. }
  128. ]
  129. }
  130. ]
  131. },
  132. {
  133. path: '/staff',
  134. name: 'staff',
  135. icon: 'icon-users',
  136. routes: [
  137. {
  138. path: '/staff',
  139. redirect: '/staff/employee'
  140. },
  141. {
  142. path: '/staff/employee',
  143. name: 'employee',
  144. icon: 'icon-users',
  145. component: './Staff/Employee'
  146. }
  147. ]
  148. }
  149. ]
  150. }
  151. ]
  152. }
  153. ]
  154. },
  155. {
  156. component: './404'
  157. }
  158. ]