routes.js 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. export default [
  2. {
  3. path: '/user',
  4. component: '../layouts/UserLayout',
  5. routes: [
  6. {
  7. name: 'login',
  8. path: '/user/login',
  9. component: './user/login'
  10. }
  11. ]
  12. },
  13. {
  14. path: '/',
  15. component: '../layouts/SecurityLayout',
  16. routes: [
  17. {
  18. path: '/',
  19. component: '../layouts/BasicLayout',
  20. authority: ['admin', 'user'],
  21. routes: [
  22. {
  23. path: '/',
  24. redirect: '/workbench'
  25. },
  26. {
  27. path: '/workbench',
  28. name: 'workbench',
  29. icon: 'table-lamp',
  30. routes: [
  31. {
  32. path: '/workbench',
  33. redirect: '/workbench/dashboard'
  34. },
  35. {
  36. path: '/workbench/dashboard',
  37. name: 'workbench',
  38. icon: 'list',
  39. component: './workbench/Dashboard'
  40. }
  41. ]
  42. },
  43. {
  44. path: '/customer',
  45. name: 'customer',
  46. icon: 'address-book',
  47. routes: [
  48. {
  49. path: '/customer',
  50. redirect: '/customer/contact'
  51. },
  52. {
  53. path: '/customer/contact',
  54. name: 'contact',
  55. icon: 'user-business',
  56. component: './customer/Contact'
  57. },
  58. {
  59. path: '/customer/company',
  60. name: 'company',
  61. icon: 'city',
  62. component: './customer/Company'
  63. },
  64. {
  65. path: '/customer/finance',
  66. name: 'finance',
  67. icon: 'finance',
  68. component: './customer/Finance'
  69. },
  70. {
  71. path: '/customer/test',
  72. name: 'test',
  73. icon: 'alarm',
  74. component: './customer/Test'
  75. }
  76. ]
  77. },
  78. {
  79. path: '/product',
  80. name: 'product',
  81. icon: 'ad-product',
  82. routes: [
  83. {
  84. path: '/product',
  85. redirect: '/product/lock'
  86. },
  87. {
  88. path: '/product/lock',
  89. name: 'lock',
  90. icon: 'disk-one',
  91. routes: [
  92. {
  93. path: '/product/lock',
  94. redirect: '/product/lock/lockstore'
  95. },
  96. {
  97. path: '/product/lock/lockstore',
  98. name: 'lockstore',
  99. component: './product/lock/Lockstore'
  100. },
  101. {
  102. path: '/product/lock/lockcount',
  103. name: 'lockcount',
  104. component: './product/lock/Lockcount'
  105. }
  106. ]
  107. },
  108. {
  109. path: '/product/cloud',
  110. name: 'cloud',
  111. icon: 'network-drive',
  112. routes: [
  113. {
  114. path: '/product/cloud',
  115. redirect: '/product/cloud/building'
  116. },
  117. {
  118. path: '/product/cloud/building',
  119. name: 'build',
  120. component: './product/cloud/Building'
  121. },
  122. {
  123. path: '/product/cloud/curing',
  124. name: 'curing',
  125. component: './product/cloud/Curing'
  126. }
  127. ]
  128. }
  129. ]
  130. },
  131. {
  132. path: '/staff',
  133. name: 'staff',
  134. icon: 'peoples-two',
  135. routes: [
  136. {
  137. path: '/staff',
  138. redirect: '/staff/employee'
  139. },
  140. {
  141. path: '/staff/employee',
  142. name: 'employee',
  143. icon: 'peoples-two',
  144. component: './staff/Employee'
  145. }
  146. ]
  147. }
  148. // {
  149. // path: '/admin',
  150. // name: 'admin',
  151. // icon: 'crown',
  152. // component: './Admin',
  153. // authority: ['admin'],
  154. // routes: [
  155. // {
  156. // path: '/admin/sub-page',
  157. // name: 'sub-page',
  158. // icon: 'smile',
  159. // component: './Welcome',
  160. // authority: ['admin'],
  161. // },
  162. // ],
  163. // },
  164. // {
  165. // name: 'list.table-list',
  166. // icon: 'table',
  167. // path: '/list',
  168. // component: './ListTableList',
  169. // },
  170. // {
  171. // component: './404',
  172. // },
  173. ]
  174. },
  175. {
  176. component: './404'
  177. }
  178. ]
  179. },
  180. {
  181. component: './404'
  182. }
  183. ]