routes.ts 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  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/course/:examPlanId',
  80. component: './exam-center/ExamCourse',
  81. },
  82. // ------------------------------------------------
  83. /** 监测特殊学生审核计划列表 */
  84. {
  85. path: '/exam-c/sp-stu-audit',
  86. component: './exam-center/special-student/special-student-audit',
  87. },
  88. /** 监测特殊学生审核学校列表 */
  89. {
  90. path: '/exam-c/sp-stu-audit/list/:examPlanId',
  91. component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditList',
  92. },
  93. /** 监测特殊学生审核学校主页 */
  94. {
  95. path: '/exam-c/sp-stu-audit/org/:sysOrgId/:examPlanId',
  96. component: './exam-center/special-student/special-student-audit/ExamSpecialStudentAuditOrg',
  97. },
  98. // ------------------------------------------------
  99. /** 监测缺测替补学生审核计划列表 */
  100. {
  101. path: '/exam-c/absent-audit',
  102. component: './exam-center/absent-replace/absent-replace-audit',
  103. },
  104. /** 监测缺测替补学生审核学校列表 */
  105. {
  106. path: '/exam-c/absent-audit/list/:examPlanId',
  107. component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditList',
  108. },
  109. /** 监测缺测替补学生审核学校主页 */
  110. {
  111. path: '/exam-c/absent-audit/org/:sysOrgId/:examPlanId',
  112. component: './exam-center/absent-replace/absent-replace-audit/ExamAbsentReplaceAuditOrg',
  113. },
  114. // ------------------------------------------------
  115. /** 试卷管理 */
  116. {
  117. path: '/exam-c/ep',
  118. component: './exam-center/exam-paper',
  119. },
  120. {
  121. path: '/exam-c/ep/course/:examPlanId',
  122. component: './exam-center/exam-paper/ExamPaperCourseList',
  123. },
  124. {
  125. path: '/exam-c/ep/course/detail/:examPaperId',
  126. component: './exam-center/exam-paper/ExamPaperDetail',
  127. },
  128. // ------------------------------------------------
  129. // 教研员
  130. // ------------------------------------------------
  131. // ------------------------------------------------
  132. /** 双向细目表编制 */
  133. {
  134. path: '/exam-c/tr-twcl',
  135. component: './teaching-research/twcl',
  136. },
  137. {
  138. path: '/exam-c/tr-twcl/course/:examPlanId',
  139. component: './teaching-research/twcl/TwclCourseList',
  140. },
  141. {
  142. path: '/exam-c/tr-twcl/course/detail/:examPaperId',
  143. component: './teaching-research/twcl/TwclDetail',
  144. },
  145. // ------------------------------------------------
  146. /** 问题建议编写 */
  147. {
  148. path: '/exam-c/tr-qs',
  149. component: './teaching-research/suggestion',
  150. },
  151. {
  152. path: '/exam-c/tr-qs/course/:examPlanId',
  153. component: './teaching-research/suggestion/SuggestionCourseList',
  154. },
  155. ],
  156. },
  157. // -------------------------------------------------------------------
  158. // 学校端
  159. // -------------------------------------------------------------------
  160. /** 评估监测 */
  161. {
  162. path: '/exam-s',
  163. routes: [
  164. // {
  165. // path: '/exam-s',
  166. // redirect: '/exam-s/plan',
  167. // },
  168. // ------------------------------------------------
  169. /** 监测计划管理 */
  170. {
  171. path: '/exam-s/plan',
  172. component: './exam-org/OrgExamPlan',
  173. },
  174. /** 监测计划详细 */
  175. {
  176. path: '/exam-s/plan/detail/:id',
  177. component: './exam-org/OrgExamPlanDetail',
  178. },
  179. /** 监测抽样统计 */
  180. {
  181. path: '/exam-s/plan/sample-count/:examDataPublishId',
  182. component: './exam-org/sample/OrgExamSampleCountList',
  183. },
  184. /** 监测抽样名单 */
  185. {
  186. path: '/exam-s/plan/sample-list/:examDataPublishId',
  187. component: './exam-org/sample/OrgExamSampleList',
  188. },
  189. // ------------------------------------------------
  190. /** 监测学生信息上报列表 */
  191. {
  192. path: '/exam-s/stu',
  193. component: './exam-org/student',
  194. },
  195. /** 监测学生信息上报处理 */
  196. {
  197. path: '/exam-s/stu/report/:examPlanId',
  198. component: './exam-org/student/OrgExamStudentReport',
  199. },
  200. /** 监测学生信息批量导入 */
  201. {
  202. path: '/exam-s/stu/import/:examPlanId',
  203. component: './exam-org/student/OrgExamStudentImport',
  204. },
  205. // ------------------------------------------------
  206. /** 监测特殊学生上报列表 */
  207. {
  208. path: '/exam-s/sp-stu',
  209. component: './exam-org/special-student',
  210. },
  211. /** 监测特殊学生上报处理 */
  212. {
  213. path: '/exam-s/sp-stu/report/:examPlanId',
  214. component: './exam-org/special-student/OrgExamSpecialStudentReport',
  215. },
  216. /** 监测特殊学生批量导入 */
  217. {
  218. path: '/exam-s/sp-stu/import/:examPlanId',
  219. component: './exam-org/special-student/OrgExamSpecialStudentImport',
  220. },
  221. // ------------------------------------------------
  222. /** 监测教师信息上报列表 */
  223. {
  224. path: '/exam-s/teacher',
  225. component: './exam-org/teacher',
  226. },
  227. /** 监测教师信息上报处理 */
  228. {
  229. path: '/exam-s/teacher/report/:examPlanId',
  230. component: './exam-org/teacher/OrgExamTeacherReport',
  231. },
  232. /** 监测教师信息批量导入 */
  233. {
  234. path: '/exam-s/teacher/import/:examPlanId',
  235. component: './exam-org/teacher/OrgExamTeacherImport',
  236. },
  237. // ------------------------------------------------
  238. /** 监测教师任教科目上报列表 */
  239. {
  240. path: '/exam-s/t-course',
  241. component: './exam-org/teacher-course',
  242. },
  243. /** 监测教师任教科目上报处理 */
  244. {
  245. path: '/exam-s/t-course/report/:examPlanId',
  246. component: './exam-org/teacher-course/OrgExamTeacherCourseReport',
  247. },
  248. /** 监测教师任教科目批量导入 */
  249. {
  250. path: '/exam-s/t-course/import/:examPlanId',
  251. component: './exam-org/teacher-course/OrgExamTeacherCourseImport',
  252. },
  253. // ------------------------------------------------
  254. /** 缺测替补学生上报列表 */
  255. {
  256. path: '/exam-s/absent',
  257. component: './exam-org/absent-replace',
  258. },
  259. /**缺测替补学生上报处理 */
  260. {
  261. path: '/exam-s/absent/report/:examPlanId',
  262. component: './exam-org/absent-replace/OrgExamAbsentReplaceReport',
  263. },
  264. /** 缺测替补学生批量导入 */
  265. {
  266. path: '/exam-s/absent/import/:examPlanId',
  267. component: './exam-org/absent-replace/OrgExamAbsentReplaceImport',
  268. },
  269. // ------------------------------------------------
  270. /** 校考成绩上报列表 */
  271. {
  272. path: '/exam-s/school-exam-score',
  273. component: './exam-org/school-exam-score',
  274. },
  275. {
  276. path: '/exam-s/school-exam-score/report/:examPlanId',
  277. component: './exam-org/school-exam-score/OrgSchoolExamScoreReport',
  278. },
  279. // ------------------------------------------------
  280. /** 家长问卷进度列表 */
  281. {
  282. path: '/exam-s/questionnaire/patriarch',
  283. component: './exam-org/questionnaire/patriarch',
  284. },
  285. /** 家长问卷进度详情 */
  286. {
  287. path: '/exam-s/questionnaire/patriarch/progress/:examPlanId',
  288. component: './exam-org/questionnaire/patriarch/OrgExamPatriarchProgress',
  289. },
  290. ],
  291. },
  292. // -------------------------------------------------------------------
  293. // 管理端
  294. // -------------------------------------------------------------------
  295. /** 基础数据 */
  296. {
  297. path: '/bd',
  298. routes: [
  299. // {
  300. // path: '/bd',
  301. // redirect: '/bd/grade',
  302. // },
  303. /** 年级 */
  304. {
  305. path: '/bd/grade',
  306. component: './bd/Grade',
  307. },
  308. /** 学科 */
  309. {
  310. path: '/bd/course',
  311. component: './bd/Course',
  312. },
  313. /** 高中选科组合 */
  314. {
  315. path: '/bd/ncee-course-comb',
  316. component: './bd/NceeCourseComb',
  317. },
  318. /** 学期 */
  319. {
  320. path: '/bd/semester',
  321. component: './bd/Semester',
  322. },
  323. /** 基础字典 */
  324. {
  325. path: '/bd/dict',
  326. component: './bd/Dict',
  327. },
  328. ],
  329. },
  330. /** 系统管理 */
  331. {
  332. path: '/sys',
  333. routes: [
  334. // {
  335. // path: '/sys',
  336. // redirect: '/sys/org',
  337. // },
  338. /** 组织机构 */
  339. {
  340. path: '/sys/org',
  341. component: './system/Org',
  342. },
  343. /** 用户管理 */
  344. {
  345. path: '/sys/user',
  346. component: './system/User',
  347. },
  348. /** 角色权限 */
  349. {
  350. path: '/sys/role',
  351. component: './system/Role',
  352. },
  353. /** 功能管理 */
  354. {
  355. path: '/sys/menu',
  356. component: './system/Menu',
  357. },
  358. /** 日志管理 */
  359. {
  360. path: '/sys/log',
  361. routes: [
  362. /** 访问日志 */
  363. {
  364. path: '/sys/log/vis',
  365. component: './system/log/LogVis',
  366. },
  367. /** 操作日志 */
  368. {
  369. path: '/sys/log/op',
  370. component: './system/log/LogOp',
  371. },
  372. /** 异常日志 */
  373. {
  374. path: '/sys/log/ex',
  375. component: './system/log/LogEx',
  376. },
  377. ]
  378. },
  379. ],
  380. },
  381. {
  382. path: '*',
  383. layout: false,
  384. component: './404',
  385. },
  386. ];