routes.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. export default [
  2. {
  3. path: '/user',
  4. layout: false,
  5. routes: [
  6. {
  7. path: '/user',
  8. routes: [
  9. {
  10. name: 'login',
  11. path: '/user/login',
  12. component: './user/Login',
  13. },
  14. ],
  15. },
  16. ],
  17. },
  18. {
  19. path: '/analysis',
  20. name: 'analysis',
  21. icon: 'smile',
  22. component: './Welcome',
  23. },
  24. {
  25. path: '/system',
  26. name: 'system',
  27. icon: 'crown',
  28. routes: [
  29. {
  30. path: '/system',
  31. redirect: '/system/user',
  32. },
  33. {
  34. path: '/system/user',
  35. name: 'user',
  36. icon: 'smile',
  37. component: './system/User',
  38. },
  39. {
  40. path: '/system/role',
  41. name: 'role',
  42. icon: 'smile',
  43. component: './system/Role',
  44. },
  45. {
  46. path: '/system/permission',
  47. name: 'permission',
  48. icon: 'smile',
  49. component: './system/Permission',
  50. },
  51. {
  52. path: '/system/org',
  53. name: 'org',
  54. icon: 'smile',
  55. component: './system/Org',
  56. },
  57. {
  58. path: '/system/open-api',
  59. name: 'open-api',
  60. icon: 'smile',
  61. component: './system/OpenAPI',
  62. },
  63. {
  64. path: '/system/tenant',
  65. name: 'tenant',
  66. icon: 'smile',
  67. component: './system/Tenant',
  68. },
  69. ],
  70. },
  71. {
  72. path: '/device',
  73. name: 'device',
  74. icon: 'crown',
  75. routes: [
  76. {
  77. path: '/device',
  78. redirect: '/device/product',
  79. },
  80. {
  81. path: '/device/product',
  82. name: 'product',
  83. icon: 'smile',
  84. component: './device/Product',
  85. },
  86. {
  87. hideInMenu: true,
  88. path: '/device/product/detail/:id',
  89. name: 'product-detail',
  90. icon: 'smile',
  91. component: './device/Product/Detail',
  92. },
  93. {
  94. path: '/device/instance',
  95. name: 'instance',
  96. icon: 'smile',
  97. component: './device/Instance',
  98. },
  99. {
  100. path: '/device/command',
  101. name: 'command',
  102. icon: 'smile',
  103. component: './device/Command',
  104. },
  105. {
  106. path: '/device/firmware',
  107. name: 'firmware',
  108. icon: 'smile',
  109. component: './device/Firmware',
  110. },
  111. {
  112. path: '/device/alarm',
  113. name: 'alarm',
  114. icon: 'smile',
  115. component: './device/Alarm',
  116. },
  117. ],
  118. },
  119. {
  120. path: '/log',
  121. name: 'log',
  122. icon: 'crown',
  123. routes: [
  124. {
  125. path: '/log',
  126. redirect: '/log/access',
  127. },
  128. {
  129. path: '/log/access',
  130. name: 'access',
  131. icon: 'smile',
  132. component: './log/Access',
  133. },
  134. {
  135. path: '/log/system',
  136. name: 'system',
  137. icon: 'smile',
  138. component: './log/System',
  139. },
  140. ],
  141. },
  142. {
  143. path: '/',
  144. redirect: '/analysis',
  145. },
  146. {
  147. component: './404',
  148. },
  149. ];