You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

routes.ts 8.8 kB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392
  1. /**
  2. * @name umi 的路由配置
  3. * @description 只支持 path,component,routes,redirect,wrappers,name,icon 的配置
  4. * @param path path 只支持两种占位符配置,第一种是动态参数 :id 的形式,第二种是 * 通配符,通配符只能出现路由字符串的最后。
  5. * @param component 配置 location 和 path 匹配后用于渲染的 React 组件路径。可以是绝对路径,也可以是相对路径,如果是相对路径,会从 src/pages 开始找起。
  6. * @param routes 配置子路由,通常在需要为多个路径增加 layout 组件时使用。
  7. * @param redirect 配置路由跳转
  8. * @param wrappers 配置路由组件的包装组件,通过包装组件可以为当前的路由组件组合进更多的功能。 比如,可以用于路由级别的权限校验
  9. * @param name 配置路由的标题,默认读取国际化文件 menu.ts 中 menu.xxxx 的值,如配置 name 为 login,则读取 menu.ts 中 menu.login 的取值作为标题
  10. * @param icon 配置路由的图标,取值参考 https://ant.design/components/icon-cn, 注意去除风格后缀和大小写,如想要配置图标为 <StepBackwardOutlined /> 则取值应为 stepBackward 或 StepBackward,如想要配置图标为 <UserOutlined /> 则取值应为 user 或者 User
  11. * @doc https://umijs.org/docs/guides/routes
  12. */
  13. export default [
  14. {
  15. path: '/',
  16. redirect: '/workspace',
  17. },
  18. {
  19. name: '工作空间',
  20. path: '/workspace',
  21. routes: [
  22. {
  23. name: '工作空间',
  24. path: '',
  25. key: 'workspace',
  26. component: './Workspace/index',
  27. },
  28. ],
  29. },
  30. {
  31. path: '/user',
  32. layout: false,
  33. routes: [
  34. {
  35. name: 'login',
  36. path: '/user/login',
  37. component: './User/Login',
  38. },
  39. ],
  40. },
  41. {
  42. path: '/account',
  43. name: '用户中心',
  44. routes: [
  45. {
  46. name: '用户中心',
  47. path: '/account/center',
  48. component: './User/Center',
  49. },
  50. {
  51. name: '用户设置',
  52. path: '/account/settings',
  53. component: './User/Settings',
  54. },
  55. ],
  56. },
  57. {
  58. name: '数据准备',
  59. path: '/datasetPreparation',
  60. routes: [
  61. {
  62. path: '',
  63. redirect: '/datasetPreparation/datasetAnnotation',
  64. },
  65. {
  66. name: '数据标注',
  67. path: 'datasetAnnotation',
  68. component: './DatasetPreparation/DatasetAnnotation/index',
  69. },
  70. ],
  71. },
  72. {
  73. name: '开发环境',
  74. path: '/developmentEnvironment',
  75. routes: [
  76. {
  77. name: '开发环境',
  78. path: '',
  79. component: './DevelopmentEnvironment/List',
  80. },
  81. {
  82. name: '创建开发环境',
  83. path: 'create',
  84. component: './DevelopmentEnvironment/Create',
  85. },
  86. {
  87. name: '开发环境详情',
  88. path: 'editor',
  89. component: './DevelopmentEnvironment/Editor',
  90. },
  91. ],
  92. },
  93. {
  94. name: '流水线',
  95. path: '/pipeline',
  96. routes: [
  97. {
  98. path: '',
  99. redirect: '/pipeline/template',
  100. },
  101. {
  102. name: '流水线模板',
  103. path: '/pipeline/template',
  104. routes: [
  105. {
  106. name: '流水线模板',
  107. path: '',
  108. component: './Pipeline/index',
  109. },
  110. {
  111. name: '流水线详情',
  112. path: 'info/:id',
  113. component: './Pipeline/Info/index',
  114. },
  115. ],
  116. },
  117. {
  118. name: '实验',
  119. path: 'experiment',
  120. routes: [
  121. {
  122. name: '实验',
  123. path: '',
  124. component: './Experiment/index',
  125. },
  126. {
  127. name: '实验实例',
  128. path: 'instance/:workflowId/:id',
  129. component: './Experiment/Info/index',
  130. },
  131. {
  132. name: '实验对比',
  133. path: 'compare',
  134. component: './Experiment/Comparison/index',
  135. },
  136. ],
  137. },
  138. ],
  139. },
  140. {
  141. name: 'AI资产',
  142. path: '/dataset',
  143. routes: [
  144. {
  145. path: '',
  146. redirect: '/dataset/dataset',
  147. },
  148. {
  149. name: '数据集',
  150. path: 'dataset',
  151. routes: [
  152. {
  153. name: '数据集',
  154. path: '',
  155. component: './Dataset/index',
  156. },
  157. {
  158. name: '数据集简介',
  159. path: 'info/:id',
  160. component: './Dataset/intro',
  161. },
  162. ],
  163. },
  164. {
  165. name: '模型',
  166. path: 'model',
  167. routes: [
  168. {
  169. name: '模型',
  170. path: '',
  171. component: './Model/index',
  172. },
  173. {
  174. name: '模型简介',
  175. path: 'info/:id',
  176. component: './Model/intro',
  177. },
  178. ],
  179. },
  180. {
  181. name: '镜像',
  182. path: 'mirror',
  183. routes: [
  184. {
  185. name: '镜像',
  186. path: '',
  187. component: './Mirror/List',
  188. },
  189. {
  190. name: '镜像详情',
  191. path: 'info/:id',
  192. component: './Mirror/Info',
  193. },
  194. {
  195. name: '创建镜像',
  196. path: 'create',
  197. component: './Mirror/Create',
  198. },
  199. ],
  200. },
  201. {
  202. name: '代码配置',
  203. path: 'codeConfig',
  204. routes: [
  205. {
  206. name: '代码配置',
  207. path: '',
  208. component: './CodeConfig/List',
  209. },
  210. ],
  211. },
  212. ],
  213. },
  214. {
  215. name: '模型部署',
  216. path: '/modelDeployment',
  217. routes: [
  218. {
  219. name: '模型部署',
  220. path: '',
  221. component: './ModelDeployment/List',
  222. },
  223. {
  224. name: '模型部署详情',
  225. path: 'info/:id',
  226. component: './ModelDeployment/Info',
  227. },
  228. {
  229. name: '创建推理服务',
  230. path: 'create',
  231. component: './ModelDeployment/Create',
  232. },
  233. ],
  234. },
  235. {
  236. name: '应用开发',
  237. path: '/appsDeployment',
  238. routes: [
  239. {
  240. name: '应用开发',
  241. path: '',
  242. key: 'appsDeployment',
  243. component: './Application',
  244. },
  245. ],
  246. },
  247. {
  248. name: '监控运维',
  249. path: '/see',
  250. routes: [
  251. {
  252. name: '监控运维',
  253. path: '',
  254. key: 'see',
  255. component: './missingPage.jsx',
  256. },
  257. ],
  258. },
  259. {
  260. name: '资源',
  261. path: '/readad',
  262. routes: [
  263. {
  264. name: '资源',
  265. path: '',
  266. key: 'readad',
  267. component: './missingPage.jsx',
  268. },
  269. ],
  270. },
  271. {
  272. name: '组件',
  273. path: '/compent',
  274. routes: [
  275. {
  276. name: '组件',
  277. path: '',
  278. key: 'compent',
  279. component: './missingPage.jsx',
  280. },
  281. ],
  282. },
  283. {
  284. name: 'monitor',
  285. path: '/monitor',
  286. routes: [
  287. {
  288. name: '任务日志',
  289. path: '/monitor/job-log/index/:id',
  290. component: './Monitor/JobLog',
  291. },
  292. ],
  293. },
  294. {
  295. name: 'tool',
  296. path: '/tool',
  297. routes: [
  298. {
  299. name: '导入表',
  300. path: '/tool/gen/import',
  301. component: './Tool/Gen/import',
  302. },
  303. {
  304. name: '编辑表',
  305. path: '/tool/gen/edit',
  306. component: './Tool/Gen/edit',
  307. },
  308. ],
  309. },
  310. {
  311. name: '系统管理',
  312. path: '/system',
  313. routes: [
  314. {
  315. path: '',
  316. redirect: '/system/user',
  317. },
  318. {
  319. name: '用户管理',
  320. path: 'user',
  321. component: './System/User',
  322. },
  323. {
  324. name: '角色管理',
  325. path: 'role',
  326. component: './System/Role',
  327. },
  328. {
  329. name: '定时任务',
  330. path: 'job',
  331. component: './Monitor/Job',
  332. },
  333. {
  334. name: '菜单管理',
  335. path: 'menu',
  336. component: './System/Menu',
  337. },
  338. {
  339. name: '部门管理',
  340. path: 'dept',
  341. component: './System/Dept',
  342. },
  343. {
  344. name: '岗位管理',
  345. path: 'post',
  346. component: './System/Post',
  347. },
  348. {
  349. name: '字典管理',
  350. path: 'dict',
  351. component: './System/Dict',
  352. },
  353. {
  354. name: '字典数据',
  355. path: 'dict-data/index/:id',
  356. component: './System/DictData',
  357. },
  358. {
  359. name: '分配用户',
  360. path: 'role-auth/user/:id',
  361. component: './System/Role/authUser',
  362. },
  363. {
  364. name: '日志',
  365. path: 'log',
  366. routes: [
  367. {
  368. path: '',
  369. redirect: '/system/log/operlog',
  370. },
  371. ],
  372. },
  373. ],
  374. },
  375. {
  376. name: 'docs',
  377. path: '/docs',
  378. routes: [
  379. {
  380. name: '使用指南',
  381. path: '',
  382. key: 'docs',
  383. component: './Docs/index',
  384. },
  385. ],
  386. },
  387. {
  388. path: '*',
  389. layout: false,
  390. component: './404',
  391. },
  392. ];