routes.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. },
  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. authority: ['admin', 'clientAccess']
  58. },
  59. {
  60. path: '/customer/company',
  61. name: 'company',
  62. icon: 'city',
  63. component: './customer/Company',
  64. authority: ['admin', 'companyAccess']
  65. },
  66. {
  67. path: '/customer/finance',
  68. name: 'finance',
  69. icon: 'finance',
  70. component: './customer/Finance'
  71. },
  72. {
  73. path: '/customer/test',
  74. name: 'test',
  75. icon: 'alarm',
  76. component: './customer/Test'
  77. }
  78. ]
  79. },
  80. {
  81. path: '/product',
  82. name: 'product',
  83. icon: 'ad-product',
  84. routes: [
  85. {
  86. path: '/product',
  87. redirect: '/product/lock'
  88. },
  89. {
  90. path: '/product/lock',
  91. name: 'lock',
  92. icon: 'disk-one',
  93. routes: [
  94. {
  95. path: '/product/lock',
  96. redirect: '/product/lock/lockstore'
  97. },
  98. {
  99. path: '/product/lock/lockstore',
  100. name: 'lockstore',
  101. component: './product/lock/Lockstore'
  102. },
  103. {
  104. path: '/product/lock/lockcount',
  105. name: 'lockcount',
  106. component: './product/lock/Lockcount'
  107. }
  108. ]
  109. },
  110. {
  111. path: '/product/cloud',
  112. name: 'cloud',
  113. icon: 'network-drive',
  114. routes: [
  115. {
  116. path: '/product/cloud',
  117. redirect: '/product/cloud/building'
  118. },
  119. {
  120. path: '/product/cloud/building',
  121. name: 'build',
  122. component: './product/cloud/Building'
  123. },
  124. {
  125. path: '/product/cloud/curing',
  126. name: 'curing',
  127. component: './product/cloud/Curing'
  128. }
  129. ]
  130. }
  131. ]
  132. },
  133. {
  134. path: '/staff',
  135. name: 'staff',
  136. icon: 'peoples-two',
  137. routes: [
  138. {
  139. path: '/staff',
  140. redirect: '/staff/employee'
  141. },
  142. {
  143. path: '/staff/employee',
  144. name: 'employee',
  145. icon: 'peoples-two',
  146. component: './staff/Employee'
  147. }
  148. ]
  149. }
  150. ]
  151. }
  152. ]
  153. },
  154. {
  155. component: './404'
  156. }
  157. ]