routes.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. export default [
  2. {
  3. path: '/',
  4. component: '../layouts/SecurityLayout',
  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/BasicLayout',
  20. authority: ['admin', 'clientAccess'],
  21. routes: [
  22. {
  23. path: '/',
  24. redirect: '/workbench/dashboard'
  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. path: '/workbench/admin',
  43. name: 'admin',
  44. component: './Admin',
  45. authority: ['admin']
  46. }
  47. ]
  48. },
  49. {
  50. path: '/customer',
  51. name: 'customer',
  52. icon: 'address-book',
  53. routes: [
  54. {
  55. path: '/customer',
  56. redirect: '/customer/contact'
  57. },
  58. {
  59. path: '/customer/contact',
  60. name: 'contact',
  61. icon: 'user-business',
  62. component: './customer/Contact',
  63. authority: ['admin', 'clientAccess']
  64. },
  65. {
  66. path: '/customer/company',
  67. name: 'company',
  68. icon: 'city',
  69. component: './customer/Company',
  70. authority: ['admin', 'companyAccess']
  71. },
  72. {
  73. path: '/customer/finance',
  74. name: 'finance',
  75. icon: 'finance',
  76. component: './customer/Finance'
  77. },
  78. {
  79. path: '/customer/test',
  80. name: 'test',
  81. icon: 'alarm',
  82. component: './customer/Test'
  83. }
  84. ]
  85. },
  86. {
  87. path: '/product',
  88. name: 'product',
  89. icon: 'ad-product',
  90. routes: [
  91. {
  92. path: '/product',
  93. redirect: '/product/lock'
  94. },
  95. {
  96. path: '/product/lock',
  97. name: 'lock',
  98. icon: 'disk-one',
  99. routes: [
  100. {
  101. path: '/product/lock',
  102. redirect: '/product/lock/lockstore'
  103. },
  104. {
  105. path: '/product/lock/lockstore',
  106. name: 'lockstore',
  107. component: './product/lock/Lockstore'
  108. },
  109. {
  110. path: '/product/lock/lockcount',
  111. name: 'lockcount',
  112. component: './product/lock/Lockcount'
  113. }
  114. ]
  115. },
  116. {
  117. path: '/product/cloud',
  118. name: 'cloud',
  119. icon: 'network-drive',
  120. routes: [
  121. {
  122. path: '/product/cloud',
  123. redirect: '/product/cloud/building'
  124. },
  125. {
  126. path: '/product/cloud/building',
  127. name: 'build',
  128. component: './product/cloud/Building'
  129. },
  130. {
  131. path: '/product/cloud/curing',
  132. name: 'curing',
  133. component: './product/cloud/Curing'
  134. }
  135. ]
  136. }
  137. ]
  138. },
  139. {
  140. path: '/staff',
  141. name: 'staff',
  142. icon: 'peoples-two',
  143. routes: [
  144. {
  145. path: '/staff',
  146. redirect: '/staff/employee'
  147. },
  148. {
  149. path: '/staff/employee',
  150. name: 'employee',
  151. icon: 'peoples-two',
  152. component: './staff/Employee'
  153. }
  154. ]
  155. }
  156. ]
  157. }
  158. ]
  159. },
  160. {
  161. component: './404'
  162. }
  163. ]