routes.js 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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: [
  25. 'admin',
  26. 'client_access',
  27. 'company_access',
  28. 'business_access',
  29. 'department_access'
  30. ],
  31. routes: [
  32. {
  33. path: '/',
  34. redirect: '/customer/contact'
  35. },
  36. {
  37. path: '/workbench',
  38. name: 'workbench',
  39. icon: 'icon-chess',
  40. routes: [
  41. {
  42. path: '/workbench',
  43. redirect: '/workbench/dashboard'
  44. },
  45. {
  46. path: '/workbench/dashboard',
  47. name: 'dashboard',
  48. icon: 'icon-tachometer-alt',
  49. component: './Workbench/Dashboard'
  50. }
  51. ]
  52. },
  53. {
  54. path: '/customer',
  55. name: 'customer',
  56. icon: 'icon-address-book-o',
  57. routes: [
  58. {
  59. path: '/customer',
  60. redirect: '/customer/client',
  61. authority: ['admin', 'client_access']
  62. },
  63. {
  64. path: '/customer/client',
  65. name: 'client',
  66. icon: 'icon-address-book',
  67. component: './Customer/Client',
  68. authority: ['admin', 'client_access']
  69. },
  70. {
  71. path: '/customer/company',
  72. name: 'company',
  73. icon: 'icon-building',
  74. component: './Customer/Company',
  75. authority: ['admin', 'company_access']
  76. },
  77. {
  78. path: '/customer/business',
  79. name: 'business',
  80. icon: 'icon-usd-circle',
  81. component: './Customer/Business',
  82. authority: ['admin', 'business_access']
  83. },
  84. {
  85. path: '/customer/test',
  86. name: 'test',
  87. icon: 'icon-usd-circle',
  88. component: './Customer/Test'
  89. }
  90. ]
  91. },
  92. {
  93. path: '/product',
  94. name: 'product',
  95. icon: 'icon-box',
  96. routes: [
  97. {
  98. path: '/product',
  99. redirect: '/product/lock'
  100. },
  101. {
  102. path: '/product/lock',
  103. name: 'lock',
  104. icon: 'icon-magic',
  105. routes: [
  106. {
  107. path: '/product/lock',
  108. redirect: '/product/lock/lockstore'
  109. },
  110. {
  111. path: '/product/lock/lockstore',
  112. name: 'lockstore',
  113. component: './Product/Lock/LockStore'
  114. },
  115. {
  116. path: '/product/lock/lockcount',
  117. name: 'lockcount',
  118. component: './Product/Lock/LockCount'
  119. }
  120. ]
  121. },
  122. {
  123. path: '/product/cloud',
  124. name: 'cloud',
  125. icon: 'icon-cloud',
  126. routes: [
  127. {
  128. path: '/product/cloud',
  129. redirect: '/product/cloud/building'
  130. },
  131. {
  132. path: '/product/cloud/building',
  133. name: 'build',
  134. component: './Product/Cloud/Building'
  135. },
  136. {
  137. path: '/product/cloud/curing',
  138. name: 'curing',
  139. component: './Product/Cloud/Curing'
  140. }
  141. ]
  142. }
  143. ]
  144. },
  145. {
  146. path: '/staff',
  147. name: 'staff',
  148. icon: 'icon-users',
  149. routes: [
  150. {
  151. path: '/staff',
  152. redirect: '/staff/employee',
  153. authority: ['admin', 'department_access']
  154. },
  155. {
  156. path: '/staff/employee',
  157. name: 'employee',
  158. icon: 'icon-users',
  159. component: './Staff/Employee',
  160. authority: ['admin', 'department_access']
  161. }
  162. ]
  163. }
  164. ]
  165. }
  166. ]
  167. }
  168. ]
  169. },
  170. {
  171. component: './404'
  172. }
  173. ]