routes.ts 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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. {
  16. path: '/login',
  17. layout: false,
  18. component: './auth/Login',
  19. },
  20. /** 工作台 */
  21. {
  22. path: '/wb',
  23. component: './Workbench',
  24. },
  25. /** 根目录跳工作台 */
  26. {
  27. path: '/',
  28. redirect: '/wb',
  29. },
  30. // -------------------------------------------------------------------
  31. // 监管端
  32. // -------------------------------------------------------------------
  33. /** 基础资料 */
  34. {
  35. path: '/base-s',
  36. routes: [
  37. // {
  38. // path: '/base-s',
  39. // redirect: '/base-s/class',
  40. // },
  41. /** 学校班级 */
  42. {
  43. path: '/base-s/class',
  44. component: './base-org/SchoolClass',
  45. },
  46. ],
  47. },
  48. /** 监测管理 */
  49. {
  50. path: '/exam-c',
  51. routes: [
  52. // {
  53. // path: '/exam-c',
  54. // redirect: '/exam-c/plan',
  55. // },
  56. // ------------------------------------------------
  57. /** 监测计划管理 */
  58. {
  59. path: '/exam-c/plan',
  60. component: './exam-center/ExamPlan',
  61. },
  62. /** 监测计划详细 */
  63. {
  64. path: '/exam-c/plan/detail/:id',
  65. component: './exam-center/ExamPlanDetail',
  66. },
  67. /** 监测结果管理 */
  68. {
  69. path: '/exam-c/plan/result/:examPlanId/:publishId',
  70. component: './exam-center/ExamResultDetail',
  71. },
  72. /** 监测抽样详细 */
  73. {
  74. path: '/exam-c/plan/sample/detail/:id',
  75. component: './exam-center/sample/ExamSampleDetail',
  76. },
  77. /** 监测抽样名单 */
  78. {
  79. path: '/exam-c/plan/sample/stu-list/:id',
  80. component: './exam-center/sample/ExamSampleStudent',
  81. },
  82. /** 监测抽样统计 */
  83. {
  84. path: '/exam-c/plan/sample/count/:id',
  85. component: './exam-center/sample/ExamSampleCount',
  86. },
  87. /** 监测科目管理*/
  88. {
  89. path: '/exam-c/plan/course/:examPlanId',
  90. component: './exam-center/ExamCourse',
  91. },
  92. // ------------------------------------------------
  93. /** 监测特殊学生管理计划列表 */
  94. {
  95. path: '/exam-c/sp-stu',
  96. component: './exam-center/special-student',
  97. },
  98. /** 监测特殊学生列表 */
  99. {
  100. path: '/exam-c/sp-stu/list/:examPlanId',
  101. component: './exam-center/special-student/SpecialStudentList',
  102. },
  103. /** 监测特殊学生审核计划列表 */
  104. {
  105. path: '/exam-c/sp-stu-audit',
  106. component: './exam-center/special-student/special-student-audit',
  107. },
  108. /** 监测特殊学生审核学校列表 */
  109. {
  110. path: '/exam-c/sp-stu-audit/list/:examPlanId',
  111. component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditList',
  112. },
  113. /** 监测特殊学生审核学校主页 */
  114. {
  115. path: '/exam-c/sp-stu-audit/org/:sysOrgId/:examPlanId',
  116. component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditOrg',
  117. },
  118. // ------------------------------------------------
  119. /** 监测缺测替补学生管理计划列表 */
  120. {
  121. path: '/exam-c/absent',
  122. component: './exam-center/absent-replace',
  123. },
  124. /** 监测缺测替补学生列表 */
  125. {
  126. path: '/exam-c/absent/list/:examPlanId',
  127. component: './exam-center/absent-replace/AbsentReplaceList',
  128. },
  129. /** 监测缺测替补学生审核计划列表 */
  130. {
  131. path: '/exam-c/absent-audit',
  132. component: './exam-center/absent-replace/absent-replace-audit',
  133. },
  134. /** 监测缺测替补学生审核学校列表 */
  135. {
  136. path: '/exam-c/absent-audit/list/:examPlanId',
  137. component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditList',
  138. },
  139. /** 监测缺测替补学生审核学校主页 */
  140. {
  141. path: '/exam-c/absent-audit/org/:sysOrgId/:examPlanId',
  142. component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditOrg',
  143. },
  144. // ------------------------------------------------
  145. /** 试卷管理 */
  146. {
  147. path: '/exam-c/ep',
  148. component: './exam-center/exam-paper',
  149. },
  150. {
  151. path: '/exam-c/ep/course/:examPlanId',
  152. component: './exam-center/exam-paper/ExamPaperCourseList',
  153. },
  154. {
  155. path: '/exam-c/ep/course/detail/:examPaperId',
  156. component: './exam-center/exam-paper/ExamPaperDetail',
  157. },
  158. // ------------------------------------------------
  159. // 教研员
  160. // ------------------------------------------------
  161. // ------------------------------------------------
  162. /** 双向细目表编制 */
  163. {
  164. path: '/exam-c/tr-twcl',
  165. component: './teaching-research/twcl',
  166. },
  167. {
  168. path: '/exam-c/tr-twcl/course/:examPlanId',
  169. component: './teaching-research/twcl/TwclCourseList',
  170. },
  171. {
  172. path: '/exam-c/tr-twcl/course/detail/:examPaperId',
  173. component: './teaching-research/twcl/TwclDetail',
  174. },
  175. // ------------------------------------------------
  176. /** 问题建议编写 */
  177. {
  178. path: '/exam-c/tr-qs',
  179. component: './teaching-research/suggestion',
  180. },
  181. {
  182. path: '/exam-c/tr-qs/course/:examPlanId',
  183. component: './teaching-research/suggestion/SuggestionCourseList',
  184. },
  185. ],
  186. },
  187. /** 高中分析 */
  188. {
  189. path: '/ncee',
  190. routes: [
  191. // ------------------------------------------------
  192. /** 分析计划管理 */
  193. {
  194. path: '/ncee/plan',
  195. component: './ncee/NceePlan',
  196. },
  197. /** 分析计划详情 */
  198. {
  199. path: '/ncee/plan/detail/:id',
  200. component: './ncee/NceePlanDetail',
  201. },
  202. ],
  203. },
  204. // -------------------------------------------------------------------
  205. // 学校端
  206. // -------------------------------------------------------------------
  207. /** 评估监测 */
  208. {
  209. path: '/exam-s',
  210. routes: [
  211. // {
  212. // path: '/exam-s',
  213. // redirect: '/exam-s/plan',
  214. // },
  215. // ------------------------------------------------
  216. /** 监测计划管理 */
  217. {
  218. path: '/exam-s/plan',
  219. component: './exam-org/OrgExamPlan',
  220. },
  221. /** 监测计划详细 */
  222. {
  223. path: '/exam-s/plan/detail/:id',
  224. component: './exam-org/OrgExamPlanDetail',
  225. },
  226. /** 监测抽样统计 */
  227. {
  228. path: '/exam-s/plan/sample-count/:examDataPublishId',
  229. component: './exam-org/sample/OrgExamSampleCountList',
  230. },
  231. /** 监测抽样名单 */
  232. {
  233. path: '/exam-s/plan/sample-list/:examDataPublishId',
  234. component: './exam-org/sample/OrgExamSampleList',
  235. },
  236. // ------------------------------------------------
  237. /** 监测学生信息上报列表 */
  238. {
  239. path: '/exam-s/stu',
  240. component: './exam-org/student',
  241. },
  242. /** 监测学生信息上报处理 */
  243. {
  244. path: '/exam-s/stu/report/:examPlanId',
  245. component: './exam-org/student/OrgExamStudentReport',
  246. },
  247. /** 监测学生信息批量导入 */
  248. {
  249. path: '/exam-s/stu/import/:examPlanId',
  250. component: './exam-org/student/OrgExamStudentImport',
  251. },
  252. // ------------------------------------------------
  253. /** 监测特殊学生上报列表 */
  254. {
  255. path: '/exam-s/sp-stu',
  256. component: './exam-org/special-student',
  257. },
  258. /** 监测特殊学生上报处理 */
  259. {
  260. path: '/exam-s/sp-stu/report/:examPlanId',
  261. component: './exam-org/special-student/OrgExamSpecialStudentReport',
  262. },
  263. /** 监测特殊学生批量导入 */
  264. {
  265. path: '/exam-s/sp-stu/import/:examPlanId',
  266. component: './exam-org/special-student/OrgExamSpecialStudentImport',
  267. },
  268. // ------------------------------------------------
  269. /** 监测教师信息上报列表 */
  270. {
  271. path: '/exam-s/teacher',
  272. component: './exam-org/teacher',
  273. },
  274. /** 监测教师信息上报处理 */
  275. {
  276. path: '/exam-s/teacher/report/:examPlanId',
  277. component: './exam-org/teacher/OrgExamTeacherReport',
  278. },
  279. /** 监测教师信息批量导入 */
  280. {
  281. path: '/exam-s/teacher/import/:examPlanId',
  282. component: './exam-org/teacher/OrgExamTeacherImport',
  283. },
  284. // ------------------------------------------------
  285. /** 监测教师任教科目上报列表 */
  286. {
  287. path: '/exam-s/t-course',
  288. component: './exam-org/teacher-course',
  289. },
  290. /** 监测教师任教科目上报处理 */
  291. {
  292. path: '/exam-s/t-course/report/:examPlanId',
  293. component: './exam-org/teacher-course/OrgExamTeacherCourseReport',
  294. },
  295. /** 监测教师任教科目批量导入 */
  296. {
  297. path: '/exam-s/t-course/import/:examPlanId',
  298. component: './exam-org/teacher-course/OrgExamTeacherCourseImport',
  299. },
  300. // ------------------------------------------------
  301. /** 缺测替补学生上报列表 */
  302. {
  303. path: '/exam-s/absent',
  304. component: './exam-org/absent-replace',
  305. },
  306. /**缺测替补学生上报处理 */
  307. {
  308. path: '/exam-s/absent/report/:examPlanId',
  309. component: './exam-org/absent-replace/OrgExamAbsentReplaceReport',
  310. },
  311. /** 缺测替补学生批量导入 */
  312. {
  313. path: '/exam-s/absent/import/:examPlanId',
  314. component: './exam-org/absent-replace/OrgExamAbsentReplaceImport',
  315. },
  316. // ------------------------------------------------
  317. /** 校考成绩上报列表 */
  318. {
  319. path: '/exam-s/school-exam-score',
  320. component: './exam-org/school-exam-score',
  321. },
  322. {
  323. path: '/exam-s/school-exam-score/report/:examPlanId',
  324. component: './exam-org/school-exam-score/OrgSchoolExamScoreReport',
  325. },
  326. // ------------------------------------------------
  327. /** 家长问卷进度列表 */
  328. {
  329. path: '/exam-s/questionnaire/patriarch',
  330. component: './exam-org/questionnaire/patriarch',
  331. },
  332. /** 家长问卷进度详情 */
  333. {
  334. path: '/exam-s/questionnaire/patriarch/progress/:examPlanId',
  335. component: './exam-org/questionnaire/patriarch/OrgExamPatriarchProgress',
  336. },
  337. // ------------------------------------------------
  338. /** 缺测替补抽取列表 */
  339. {
  340. path: '/exam-s/replace',
  341. component: './exam-org/sample-replace',
  342. },
  343. {
  344. path: '/exam-s/replace/list/:examPlanId/:examDataPublishId',
  345. component: './exam-org/sample-replace/OrgExamSampleReplaceList',
  346. },
  347. ],
  348. },
  349. // -------------------------------------------------------------------
  350. // 管理端
  351. // -------------------------------------------------------------------
  352. /** 基础数据 */
  353. {
  354. path: '/bd',
  355. routes: [
  356. // {
  357. // path: '/bd',
  358. // redirect: '/bd/grade',
  359. // },
  360. /** 年级 */
  361. {
  362. path: '/bd/grade',
  363. component: './bd/Grade',
  364. },
  365. /** 学科 */
  366. {
  367. path: '/bd/course',
  368. component: './bd/Course',
  369. },
  370. /** 高中选科组合 */
  371. {
  372. path: '/bd/ncee-course-comb',
  373. component: './bd/NceeCourseComb',
  374. },
  375. /** 学期 */
  376. {
  377. path: '/bd/semester',
  378. component: './bd/Semester',
  379. },
  380. /** 基础字典 */
  381. {
  382. path: '/bd/dict',
  383. component: './bd/Dict',
  384. },
  385. ],
  386. },
  387. /** 系统管理 */
  388. {
  389. path: '/sys',
  390. routes: [
  391. // {
  392. // path: '/sys',
  393. // redirect: '/sys/org',
  394. // },
  395. /** 组织机构 */
  396. {
  397. path: '/sys/org',
  398. component: './system/Org',
  399. },
  400. /** 用户管理 */
  401. {
  402. path: '/sys/user',
  403. component: './system/User',
  404. },
  405. /** 角色权限 */
  406. {
  407. path: '/sys/role',
  408. component: './system/Role',
  409. },
  410. /** 功能管理 */
  411. {
  412. path: '/sys/menu',
  413. component: './system/Menu',
  414. },
  415. /** 日志管理 */
  416. {
  417. path: '/sys/log',
  418. routes: [
  419. /** 访问日志 */
  420. {
  421. path: '/sys/log/vis',
  422. component: './system/log/LogVis',
  423. },
  424. /** 操作日志 */
  425. {
  426. path: '/sys/log/op',
  427. component: './system/log/LogOp',
  428. },
  429. /** 异常日志 */
  430. {
  431. path: '/sys/log/ex',
  432. component: './system/log/LogEx',
  433. },
  434. ]
  435. },
  436. ],
  437. },
  438. {
  439. path: '*',
  440. layout: false,
  441. component: './404',
  442. },
  443. ];