routes.ts 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. import { MenuDataItem } from '@ant-design/pro-layout'
  2. const routes: MenuDataItem[] = [
  3. {
  4. path: '/user',
  5. layout: false,
  6. routes: [
  7. {
  8. path: '/user',
  9. routes: [
  10. {
  11. name: 'login',
  12. path: '/user/login',
  13. component: './user/Login'
  14. }
  15. ]
  16. },
  17. {
  18. component: './404'
  19. }
  20. ]
  21. },
  22. {
  23. path: '/',
  24. redirect: '/project/management'
  25. },
  26. {
  27. path: '/project',
  28. name: 'project',
  29. icon: 'AppstoreOutlined',
  30. routes: [
  31. {
  32. path: '/project',
  33. redirect: '/project/management'
  34. },
  35. {
  36. path: '/project/management',
  37. name: 'management',
  38. access: 'authRouteFilter',
  39. hideChildrenInMenu: true,
  40. routes: [
  41. {
  42. path: '/project/management',
  43. redirect: '/project/management/list'
  44. },
  45. {
  46. path: '/project/management/list',
  47. name: 'management-list',
  48. access: 'authRouteFilter',
  49. component: './Project/Management/List'
  50. },
  51. {
  52. path: '/project/management/:id',
  53. name: 'management-detail',
  54. access: 'authRouteFilter',
  55. component: './Project/Management/Detail'
  56. }
  57. ]
  58. },
  59. {
  60. path: '/project/approval',
  61. name: 'approval',
  62. access: 'authRouteFilter',
  63. component: './Project/Approval'
  64. },
  65. {
  66. path: '/project/verification',
  67. name: 'verification',
  68. access: 'authRouteFilter',
  69. component: './Project/Verification'
  70. }
  71. ]
  72. },
  73. {
  74. path: 'institutions',
  75. name: 'institutions',
  76. icon: 'BankOutlined',
  77. routes: [
  78. {
  79. path: '/institutions',
  80. redirect: '/institutions/company'
  81. },
  82. {
  83. path: 'company',
  84. name: 'company',
  85. hideChildrenInMenu: true,
  86. routes: [
  87. {
  88. path: '/institutions/company',
  89. redirect: '/institutions/company/list'
  90. },
  91. {
  92. path: 'list',
  93. name: 'company-list',
  94. access: 'authRouteFilter',
  95. component: './Institutions/Company/List'
  96. },
  97. {
  98. path: ':id',
  99. name: 'company-detail',
  100. access: 'authRouteFilter',
  101. component: './Institutions/Company/Detail'
  102. }
  103. ]
  104. },
  105. {
  106. path: 'staff',
  107. name: 'staff',
  108. access: 'authRouteFilter',
  109. component: './Institutions/Staff'
  110. },
  111. {
  112. path: 'restrict',
  113. name: 'restrict',
  114. access: 'authRouteFilter',
  115. component: './Institutions/Restrict'
  116. }
  117. ]
  118. },
  119. {
  120. path: 'business',
  121. name: 'business',
  122. icon: 'Audit',
  123. routes: [
  124. {
  125. path: '/business',
  126. redirect: '/business/inventory'
  127. },
  128. {
  129. path: 'inventory',
  130. name: 'inventory',
  131. access: 'authRouteFilter',
  132. component: './Business/Inventory'
  133. },
  134. {
  135. path: 'rules',
  136. name: 'rules',
  137. access: 'authRouteFilter',
  138. component: './Business/RulesSet'
  139. },
  140. {
  141. path: 'process',
  142. name: 'process',
  143. access: 'authRouteFilter',
  144. component: './Business/Process'
  145. }
  146. ]
  147. },
  148. {
  149. path: '/schema',
  150. name: 'schema',
  151. icon: 'ControlOutlined',
  152. routes: [
  153. {
  154. path: 'base',
  155. name: 'base',
  156. access: 'authRouteFilter',
  157. icon: 'icon-schema',
  158. component: './Schema/Base/index.tsx'
  159. },
  160. {
  161. path: 'base/:id',
  162. name: 'baseDetail',
  163. access: 'authRouteFilter',
  164. component: './Schema/Base/detail.tsx',
  165. hideInMenu: true
  166. },
  167. {
  168. path: 'option',
  169. name: 'option',
  170. access: 'authRouteFilter',
  171. component: './Schema/Option'
  172. },
  173. {
  174. path: 'budget',
  175. name: 'budget',
  176. access: 'authRouteFilter',
  177. component: './Schema/Budget'
  178. },
  179. {
  180. path: 'budget/:id',
  181. name: 'budgetDetail',
  182. component: './Schema/Budget/detail',
  183. hideInMenu: true
  184. }
  185. ]
  186. },
  187. {
  188. path: 'permission',
  189. name: 'permission',
  190. icon: 'UserOutlined',
  191. routes: [
  192. {
  193. path: '/permission',
  194. redirect: '/permission/role'
  195. },
  196. {
  197. path: 'role',
  198. name: 'role',
  199. access: 'authRouteFilter',
  200. component: './Permission/Role'
  201. }
  202. ]
  203. },
  204. {
  205. path: 'system',
  206. name: 'system',
  207. icon: 'SettingOutlined',
  208. routes: [
  209. {
  210. path: '/system',
  211. redirect: '/system/admin'
  212. },
  213. // {
  214. // path: 'setting',
  215. // name: 'setting',
  216. // component: './System/Setting'
  217. // },
  218. {
  219. path: 'admin',
  220. name: 'admin',
  221. access: 'authRouteFilter',
  222. component: './System/Admin'
  223. }
  224. ]
  225. },
  226. {
  227. component: './404'
  228. }
  229. ]
  230. export default routes