routes.ts 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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: './Analysis',
  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. access: 'user',
  38. component: './system/User',
  39. },
  40. {
  41. path: '/system/role',
  42. name: 'role',
  43. icon: 'smile',
  44. access: 'role',
  45. component: './system/Role',
  46. },
  47. {
  48. path: '/system/permission',
  49. name: 'permission',
  50. icon: 'smile',
  51. component: './system/Permission',
  52. },
  53. {
  54. path: '/system/org',
  55. name: 'org',
  56. icon: 'smile',
  57. access: 'organization',
  58. component: './system/Org',
  59. },
  60. {
  61. path: '/system/open-api',
  62. name: 'open-api',
  63. icon: 'smile',
  64. component: './system/OpenAPI',
  65. },
  66. {
  67. path: '/system/tenant',
  68. name: 'tenant',
  69. icon: 'smile',
  70. component: './system/Tenant',
  71. },
  72. {
  73. path: '/system/datasource',
  74. name: 'datasource',
  75. icon: 'smile',
  76. component: './system/DataSource',
  77. },
  78. ],
  79. },
  80. {
  81. path: '/device',
  82. name: 'device',
  83. icon: 'crown',
  84. routes: [
  85. {
  86. path: '/device',
  87. redirect: '/device/product',
  88. },
  89. {
  90. path: '/device/product',
  91. name: 'product',
  92. icon: 'smile',
  93. component: './device/Product',
  94. },
  95. {
  96. path: '/device/category',
  97. name: 'category',
  98. icon: 'smile',
  99. component: './device/Category',
  100. },
  101. {
  102. hideInMenu: true,
  103. path: '/device/product/detail/:id',
  104. name: 'product-detail',
  105. icon: 'smile',
  106. component: './device/Product/Detail',
  107. },
  108. {
  109. path: '/device/instance',
  110. name: 'instance',
  111. icon: 'smile',
  112. component: './device/Instance',
  113. },
  114. {
  115. hideInMenu: true,
  116. path: '/device/instance/detail/:id',
  117. name: 'instance-detail',
  118. icon: 'smile',
  119. component: './device/Instance/Detail',
  120. },
  121. {
  122. path: '/device/command',
  123. name: 'command',
  124. icon: 'smile',
  125. component: './device/Command',
  126. },
  127. {
  128. path: '/device/firmware',
  129. name: 'firmware',
  130. icon: 'smile',
  131. component: './device/Firmware',
  132. },
  133. {
  134. path: '/device/alarm',
  135. name: 'alarm',
  136. icon: 'smile',
  137. component: './device/Alarm',
  138. },
  139. ],
  140. },
  141. {
  142. path: '/link',
  143. name: 'link',
  144. icon: 'crown',
  145. routes: [
  146. {
  147. path: '/link',
  148. redirect: '/link/certificate',
  149. },
  150. {
  151. path: '/link/certificate',
  152. name: 'certificate',
  153. icon: 'smile',
  154. component: './link/Certificate',
  155. },
  156. {
  157. path: '/link/gateway',
  158. name: 'gateway',
  159. icon: 'smile',
  160. component: './link/Gateway',
  161. },
  162. {
  163. path: '/link/opcua',
  164. name: 'opcua',
  165. icon: 'smile',
  166. component: './link/Opcua',
  167. },
  168. {
  169. path: '/link/protocol',
  170. name: 'protocol',
  171. icon: 'smile',
  172. component: './link/Protocol',
  173. },
  174. {
  175. path: 'link/type',
  176. name: 'type',
  177. icon: 'smile',
  178. component: './link/Type',
  179. },
  180. ],
  181. },
  182. {
  183. path: '/notice',
  184. name: 'notice',
  185. icon: 'crown',
  186. routes: [
  187. {
  188. path: '/notice',
  189. redirect: '/notice/config',
  190. },
  191. {
  192. path: '/notice/config',
  193. name: 'config',
  194. icon: 'smile',
  195. component: './notice/Config',
  196. },
  197. {
  198. path: '/notice/template',
  199. name: 'template',
  200. icon: 'smile',
  201. component: './notice/Template',
  202. },
  203. ],
  204. },
  205. {
  206. path: '/log',
  207. name: 'log',
  208. icon: 'crown',
  209. routes: [
  210. {
  211. path: '/log',
  212. redirect: '/log/access',
  213. },
  214. {
  215. path: '/log/access',
  216. name: 'access',
  217. icon: 'smile',
  218. component: './log/Access',
  219. },
  220. {
  221. path: '/log/system',
  222. name: 'system',
  223. icon: 'smile',
  224. component: './log/System',
  225. },
  226. ],
  227. },
  228. {
  229. path: '/',
  230. redirect: '/analysis',
  231. },
  232. {
  233. component: './404',
  234. },
  235. ];