router.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682
  1. 'use strict';
  2. /**
  3. * @param {Egg.Application} app - egg application
  4. */
  5. module.exports = app => {
  6. const { router, controller } = app;
  7. router.get('/', controller.home.index);
  8. // 共通查询单条记录方法
  9. router.get('/api/train/common/findone/:modelname', controller.common.findone);
  10. // 共通批量查询方法
  11. router.post(
  12. '/api/train/common/findbyids/:modelname',
  13. controller.common.findbyids
  14. );
  15. // 共通查询表
  16. router.get('/api/train/common/findbymodel', controller.common.findbymodel);
  17. router.get('/api/train/common/findyear', controller.common.findyear);
  18. // 基础设置表路由
  19. router.get('/api/train/setting/termlist', controller.setting.termList); // 请求所有期
  20. router.get('/api/train/setting/findone', controller.setting.findone);
  21. router.resources('setting', '/api/train/setting', controller.setting); // index、create、show、destroy
  22. router.post(
  23. 'setting',
  24. '/api/train/setting/update/:id',
  25. controller.setting.update
  26. );
  27. // 科目表设置路由
  28. router.resources('subject', '/api/train/subject', controller.subject); // index、create、show、destroy
  29. router.post(
  30. 'subject',
  31. '/api/train/subject/update/:id',
  32. controller.subject.update
  33. );
  34. // 教师表设置路由
  35. router.post('teacher', '/api/train/teacher/export', controller.teacher.export);
  36. router.get('teacher', '/api/train/teacher/show/:id', controller.teacher.show);
  37. router.resources('teacher', '/api/train/teacher', controller.teacher); // index、create、show、destroy
  38. router.post(
  39. 'teacher',
  40. '/api/train/teacher/update/:id',
  41. controller.teacher.update
  42. );
  43. router.post(
  44. 'teacher',
  45. '/api/train/teacher/status',
  46. controller.teacher.status
  47. );
  48. router.post('/api/train/teacher/teaimport', controller.teacher.teaimport);
  49. router.post('/api/train/teacher/fetchteachers', controller.teacher.fetchteachers);
  50. // 作业表配置路由
  51. router.resources('task', '/api/train/task', controller.task); // index、create、show、destroy
  52. router.post('task', '/api/train/task/update/:id', controller.task.update);
  53. // 问卷题库表配置路由
  54. router.resources('question', '/api/train/question', controller.question); // index、create、show、destroy
  55. router.post(
  56. 'question',
  57. '/api/train/question/update/:id',
  58. controller.question.update
  59. );
  60. // 问卷表配置路由
  61. router.post(
  62. 'questionnaire',
  63. '/api/train/questionnaire',
  64. controller.questionnaire.create
  65. );
  66. router.delete(
  67. 'questionnaire',
  68. '/api/train/questionnaire/:id',
  69. controller.questionnaire.delete
  70. );
  71. router.post(
  72. 'questionnaire',
  73. '/api/train/questionnaire/update/:id',
  74. controller.questionnaire.update
  75. );
  76. router.get(
  77. 'questionnaire',
  78. '/api/train/questionnaire',
  79. controller.questionnaire.query
  80. );
  81. router.get(
  82. 'questionnaire',
  83. '/api/train/questionnaire/show/:id',
  84. controller.questionnaire.show
  85. );
  86. // 查询学校是否上报学生
  87. router.get('student', '/api/train/student/school', controller.student.getSchoolStudent);
  88. // 班级学生排号
  89. router.get('sutdent', '/api/train/student/arrangeNumber', controller.student.arrangeNumber);
  90. // 建立导出学生的任务
  91. router.post(
  92. 'student',
  93. '/api/train/student/export',
  94. controller.student.toExport
  95. );
  96. // 导出学生
  97. router.post(
  98. 'student',
  99. '/api/train/mission/student/export',
  100. controller.student.exportStudent
  101. );
  102. // 学生表设置路由
  103. router.get(
  104. 'sutdent',
  105. '/api/train/student/finestudent/:id',
  106. controller.student.finestudent
  107. );
  108. router.get(
  109. 'sutdent',
  110. '/api/train/student/findscore',
  111. controller.student.findscore
  112. );
  113. router.get(
  114. 'sutdent',
  115. '/api/train/student/findbedroom',
  116. controller.student.findbedroom
  117. );
  118. router.get('sutdent', '/api/train/student/seek', controller.student.seek);
  119. router.resources('student', '/api/train/student', controller.student); // index、create、show、destroy
  120. router.post(
  121. 'student',
  122. '/api/train/student/update/:id',
  123. controller.student.update
  124. );
  125. router.post('student', '/api/train/student/upjob', controller.student.upjob);
  126. router.post(
  127. 'student',
  128. '/api/train/student/deleteclass',
  129. controller.student.deleteclass
  130. ); // 删除学生班级
  131. router.post(
  132. 'student',
  133. '/api/train/student/findbystuids',
  134. controller.student.findbystuids
  135. );
  136. router.post(
  137. 'student',
  138. '/api/train/student/deletestus',
  139. controller.student.deletestus
  140. ); // 删除学生多条
  141. router.post(
  142. 'student',
  143. '/api/train/student/updatabedroom',
  144. controller.student.updatabedroom
  145. ); // 批量学生寝室号
  146. // 班主任表设置路由
  147. router.resources(
  148. 'headteacher',
  149. '/api/train/headteacher',
  150. controller.headteacher
  151. ); // index、create、show、destroy
  152. router.post(
  153. 'headteacher',
  154. '/api/train/headteacher/update/:id',
  155. controller.headteacher.update
  156. );
  157. // 查询该期还可以使用的寝室
  158. router.get('bedroom', '/api/train/bedroom/assignroom', controller.bedroom.getAssignRoom);
  159. router.post('bedroom', '/api/train/bedroom/restore/:id', controller.bedroom.restore);
  160. // 批量修改寝室(新)
  161. router.post('bedroom', '/api/train/bedroom/batch', controller.bedroom.updateStudent);
  162. // 寝室表设置路由
  163. router.get('/api/train/bedroom/student/:id', controller.bedroom.roomstu); // 根据班级id查询寝室信息
  164. router.resources('bedroom', '/api/train/bedroom', controller.bedroom); // index、create、show、destroy
  165. router.post(
  166. 'bedroom',
  167. '/api/train/bedroom/update/:id',
  168. controller.bedroom.update
  169. );
  170. router.post('bedroom', '/api/train/bedroom/apart', controller.bedroom.apart);
  171. router.post(
  172. 'bedroom',
  173. '/api/train/bedroom/ibeacon',
  174. controller.bedroom.ibeacon
  175. );
  176. // 模板设置班级
  177. router.get('class', '/api/train/class/settemplate', controller.class.toSetClassSetting);
  178. // 班级表设置路由
  179. router.get(
  180. 'class',
  181. '/api/train/class/classinfo/:id',
  182. controller.class.classinfo
  183. );
  184. router.post(
  185. 'class',
  186. '/api/train/class/upclasses',
  187. controller.class.upclasses
  188. );
  189. router.post('class', '/api/train/class/notice', controller.class.notice);
  190. router.resources('class', '/api/train/class', controller.class); // index、create、show、destroy
  191. router.post('class', '/api/train/class/update/:id', controller.class.update);
  192. router.post('class', '/api/train/class/divide', controller.class.divide);
  193. router.post('class', '/api/train/class/uptea', controller.class.uptea);
  194. router.post(
  195. 'class',
  196. '/api/train/class/upstuclass/:id',
  197. controller.class.studentupclass
  198. ); // 学生修改班级
  199. // 部门表设置路由
  200. router.resources(
  201. 'department',
  202. '/api/train/department',
  203. controller.department
  204. ); // index、create、show、destroy
  205. router.post(
  206. 'department',
  207. '/api/train/department/update/:id',
  208. controller.department.update
  209. );
  210. // 位置表设置路由
  211. router.resources('location', '/api/train/location', controller.location); // index、create、show、destroy
  212. router.post(
  213. 'location',
  214. '/api/train/location/update/:id',
  215. controller.location.update
  216. );
  217. // 培训计划表设置路由
  218. router.resources('trainplan', '/api/train/trainplan', controller.trainplan); // index、create、show、destroy
  219. router.post(
  220. 'trainplan',
  221. '/api/train/trainplan/update/:id',
  222. controller.trainplan.update
  223. );
  224. router.post(
  225. '/api/train/trainplan/exportExcel',
  226. controller.trainplan.exportExcel
  227. ); // 导出
  228. router.post(
  229. '/api/train/trainplan/exportSchool',
  230. controller.trainplan.exportSchool
  231. ); // 导出计划学校
  232. router.post(
  233. '/api/train/trainplan/exportPlan',
  234. controller.trainplan.exportPlan
  235. ); // 导出计划日历
  236. router.post(
  237. '/api/train/trainplan/updateclass',
  238. controller.trainplan.updateclass
  239. );
  240. router.post(
  241. '/api/train/trainplan/updatereteacher',
  242. controller.trainplan.updatereteacher
  243. );
  244. // 培训计划年度批次表设置路由
  245. router.resources(
  246. 'trainplanyear',
  247. '/api/train/trainplanyear',
  248. controller.trainplanyear
  249. ); // index、create、show、destroy
  250. router.post(
  251. 'trainplanyear',
  252. '/api/train/trainplanyear/update/:id',
  253. controller.trainplanyear.update
  254. );
  255. // 节假日表设置路由
  256. router.resources('festival', '/api/train/festival', controller.festival); // index、create、show、destroy
  257. router.post(
  258. 'festival',
  259. '/api/train/festival/update/:id',
  260. controller.festival.update
  261. );
  262. // 新自动排课表
  263. router.post('/api/train/lesson/newarrange', controller.lesson.newArrange);
  264. // 课程表设置路由
  265. router.get('/api/train/lesson/teaclass', controller.lesson.teaclass);
  266. router.post(
  267. 'lesson',
  268. '/api/train/lesson/uplessones',
  269. controller.lesson.uplessones
  270. );
  271. router.get('/api/train/lesson/classbyteaid', controller.lesson.classbyteaid); // 根据计划id与教师id查询班级信息
  272. router.resources('lesson', '/api/train/lesson', controller.lesson); // index、create、show、destroy
  273. router.post(
  274. 'lesson',
  275. '/api/train/lesson/update/:id',
  276. controller.lesson.update
  277. );
  278. router.post(
  279. 'lesson',
  280. '/api/train/lesson/autolesson/:id',
  281. controller.lesson.autolesson
  282. ); // 自动排课
  283. router.post('lesson', '/api/train/lesson/check', controller.lesson.check); // 确定(锁死)课表
  284. // 培训计划学校上报时间表设置路由
  285. router.resources('schtime', '/api/train/schtime', controller.schtime); // index、create、show、destroy
  286. router.post(
  287. 'schtime',
  288. '/api/train/schtime/update/:id',
  289. controller.schtime.update
  290. );
  291. router.post(
  292. 'schtime',
  293. '/api/train/schtime/updateschtimes',
  294. controller.schtime.updateschtimes
  295. );
  296. // 班主任全年计划表设置路由
  297. router.get('teaplan', '/api/train/teaplan/divide', controller.teaplan.divide);
  298. router.get(
  299. 'teaplan',
  300. '/api/train/teaplan/findteacher',
  301. controller.teaplan.findteacher
  302. );
  303. router.resources('teaplan', '/api/train/teaplan', controller.teaplan); // index、create、show、destroy
  304. router.post(
  305. 'teaplan',
  306. '/api/train/teaplan/update/:id',
  307. controller.teaplan.update
  308. );
  309. // 计划自动排教师
  310. router.post('apply', '/api/train/apply/arrange', controller.apply.arrange);
  311. // 计划自动排教师
  312. router.post('apply', '/api/train/apply/sendmsg/:planid', controller.apply.sendmsg);
  313. // 计划自动排教师
  314. router.post('apply', '/api/train/apply/confirm/:planid', controller.apply.confirm);
  315. // 教师申请讲课表设置路由
  316. router.get(
  317. 'apply',
  318. '/api/train/apply/queryteacher',
  319. controller.apply.queryteacher
  320. );
  321. router.resources('apply', '/api/train/apply', controller.apply); // index、create、show、destroy
  322. router.post('apply', '/api/train/apply/update/:id', controller.apply.update);
  323. // 请假表设置路由
  324. router.resources('leave', '/api/train/leave', controller.leave); // index、create、show、destroy
  325. router.post('leave', '/api/train/leave/update/:id', controller.leave.update);
  326. // 分组表设置路由
  327. // 还原小组锁定
  328. router.get('group', '/api/train/group/returns/:classid', controller.group.returns);
  329. router.resources('group', '/api/train/group', controller.group); // index、create、show、destroy
  330. router.post('group', '/api/train/group/update/:id', controller.group.update);
  331. router.post('group', '/api/train/group/insert', controller.group.insert);
  332. router.post('group', '/api/train/group/exit', controller.group.exit);
  333. router.post('group', '/api/train/group/sethead', controller.group.sethead);
  334. router.post(
  335. 'group',
  336. '/api/train/group/findbystuid',
  337. controller.group.findbystuid
  338. );
  339. // 培训心得表设置路由
  340. router.get('/api/train/experience/docx', controller.experience.docx); // index、create、show、destroy
  341. router.resources('experience', '/api/train/experience', controller.experience); // index、create、show、destroy
  342. router.post('experience', '/api/train/experience/update/:id', controller.experience.update);
  343. // 职责说明表设置路由
  344. router.resources('duty', '/api/train/duty', controller.duty); // index、create、show、destroy
  345. router.post('duty', '/api/train/duty/update/:id', controller.duty.update);
  346. // 学生上传作业表设置路由
  347. router.resources(
  348. 'uploadtask',
  349. '/api/train/uploadtask',
  350. controller.uploadtask
  351. ); // index、create、show、destroy
  352. router.post(
  353. 'uploadtask',
  354. '/api/train/uploadtask/update/:id',
  355. controller.uploadtask.update
  356. );
  357. // 学生上传问卷表设置路由
  358. router.get(
  359. '/api/train/uploadquestion/completion',
  360. controller.uploadquestion.completion
  361. ); // 统计完成度
  362. router.resources(
  363. 'uploadquestion',
  364. '/api/train/uploadquestion',
  365. controller.uploadquestion
  366. ); // index、create、show、destroy
  367. router.post(
  368. 'uploadquestion',
  369. '/api/train/uploadquestion/update/:id',
  370. controller.uploadquestion.update
  371. );
  372. // 考勤表设置路由
  373. router.get('/api/train/attendance/wxauth', controller.attendance.wxauth); // 统计完成度
  374. router.resources(
  375. 'attendance',
  376. '/api/train/attendance',
  377. controller.attendance
  378. ); // index、create、show、destroy
  379. router.post(
  380. 'attendance',
  381. '/api/train/attendance/update/:id',
  382. controller.attendance.update
  383. );
  384. router.post(
  385. 'attendance',
  386. '/api/train/attendance/attendancecreate',
  387. controller.attendance.attendancecreate
  388. );
  389. router.post(
  390. 'attendance',
  391. '/api/train/attendance/attendancecreateList',
  392. controller.attendance.attendancecreateList
  393. );
  394. // 学校上传学生名单
  395. router.resources('school', '/api/train/school', controller.school); // index、create、show、destroy
  396. router.post(
  397. 'school',
  398. '/api/train/school/update/:id',
  399. controller.school.update
  400. );
  401. router.post('/api/train/school/import', controller.school.stuimport); // 名单上传
  402. // 民族表设置路由
  403. router.resources('nation', '/api/train/nation', controller.nation); // index、create、show、destroy
  404. router.post(
  405. 'nation',
  406. '/api/train/nation/update/:id',
  407. controller.nation.update
  408. );
  409. // 行政区划表设置路由
  410. router.resources('region', '/api/train/region', controller.region); // index、create、show、destroy
  411. router.post('region', '/api/train/region/update/:id', controller.region.update);
  412. // 用户表设置路由
  413. router.get('/api/train/user/schoolregister', controller.user.schoolregister); // 学校账号一键生成
  414. router.resources('user', '/api/train/user', controller.user); // index、create、show、destroy
  415. router.post('user', '/api/train/user/update/:id', controller.user.update);
  416. router.post('user', '/api/train/user/register', controller.user.register); // 学校注册
  417. router.post('user', '/api/train/user/bind', controller.user.bind); // 学生微信绑定
  418. router.post('user', '/api/train/user/userbind', controller.user.userbind); // 其他用户微信绑定
  419. router.post('user', '/api/train/user/appbind', controller.user.appbind); // 绑定小程序openid
  420. // 行政区划表设置路由
  421. router.resources('termquest', '/api/train/termquest', controller.termquest); // index、create、show、destroy
  422. router.post('termquest', '/api/train/termquest/update/:id', controller.termquest.update);
  423. // 微信端访问地址
  424. router.get('/api/train/auth', controller.weixin.auth); // 微信登录
  425. router.get('/api/train/appAuth', controller.weixin.appAuth); // 微信登录
  426. // 微信端访问地址
  427. router.get('/api/train/authtest', controller.weixin.authTest); // 微信登录测试
  428. // pc端登录
  429. router.post('/api/train/login', controller.login.login); // 登录
  430. // 微信端登录
  431. router.get('/api/train/qrcode', controller.login.qrcode); // 登录
  432. router.post('/api/train/wxcheck', controller.login.wxcheck); // 微信检查登录
  433. router.post('/api/train/wxlogin', controller.login.wxlogin); // 登录
  434. // 计算教师的分数
  435. router.get('score', '/api/train/score/computed', controller.score.computedScore);
  436. // 评分表设置路由
  437. router.resources('score', '/api/train/score', controller.score); // index、create、show、destroy
  438. router.post('score', '/api/train/score/update/:id', controller.score.update);
  439. // 上传资料表设置路由
  440. router.resources('material', '/api/train/material', controller.material); // index、create、show、destroy
  441. router.post(
  442. 'material',
  443. '/api/train/material/update/:id',
  444. controller.material.update
  445. );
  446. // 资料评分表设置路由
  447. router.resources(
  448. 'materialscore',
  449. '/api/train/materialscore',
  450. controller.materialscore
  451. ); // index、create、show、destroy
  452. router.post(
  453. 'materialscore',
  454. '/api/train/materialscore/update/:id',
  455. controller.materialscore.update
  456. );
  457. // 教师在线表设置路由
  458. router.resources('online', '/api/train/online', controller.online); // index、create、show、destroy
  459. router.post(
  460. 'online',
  461. '/api/train/online/update/:id',
  462. controller.online.update
  463. );
  464. // 聊天房间表设置路由
  465. router.resources('room', '/api/train/room', controller.room); // index、create、show、destroy
  466. router.post('room', '/api/train/room/update/:id', controller.room.update);
  467. // 聊天记录表设置路由
  468. router.resources('record', '/api/train/record', controller.record); // index、create、show、destroy
  469. router.post(
  470. 'record',
  471. '/api/train/record/update/:id',
  472. controller.record.update
  473. );
  474. // 通知表设置路由
  475. router.resources('notice', '/api/train/notice', controller.notice); // index、create、show、destroy
  476. router.post(
  477. 'notice',
  478. '/api/train/notice/update/:id',
  479. controller.notice.update
  480. );
  481. router.post('notice', '/api/train/notice/look', controller.notice.look);
  482. router.post('notice', '/api/train/notice/resend', controller.notice.resend);
  483. // 课程模板表设置路由
  484. router.resources(
  485. 'lessonmode',
  486. '/api/train/lessonmode',
  487. controller.lessonmode
  488. ); // index、create、show、destroy
  489. router.post(
  490. 'lessonmode',
  491. '/api/train/lessonmode/update/:id',
  492. controller.lessonmode.update
  493. );
  494. // 全年计划模板表设置路由
  495. router.resources(
  496. 'trainmodel',
  497. '/api/train/trainmodel',
  498. controller.trainmodel
  499. ); // index、create、show、destroy
  500. router.post(
  501. 'trainmodel',
  502. '/api/train/trainmodel/update/:id',
  503. controller.trainmodel.update
  504. );
  505. // 统计查询设置路由
  506. router.get('/api/train/count/countstudent', controller.count.countstudent);
  507. // 按学校统计查询设置路由
  508. router.get('/api/train/count/countschstu/:id', controller.count.countschstu);
  509. // 班级类型表配置路由
  510. router.resources('classtype', '/api/train/classtype', controller.classtype); // index、create、show、destroy
  511. router.post(
  512. 'classtype',
  513. '/api/train/classtype/update/:id',
  514. controller.classtype.update
  515. );
  516. // 学校上传任务表设置路由
  517. router.resources('job', '/api/train/job', controller.job); // index、create、show、destroy
  518. router.post('job', '/api/train/job/update/:id', controller.job.update);
  519. // 消息表设置路由
  520. router.resources('message', '/api/train/message', controller.message); // index、create、show、destroy
  521. router.post(
  522. 'message',
  523. '/api/train/message/update/:id',
  524. controller.message.update
  525. );
  526. // 直播房间
  527. router.resources('liveroom', '/api/train/liveroom', controller.liveroom); // index、create、show、destroy
  528. router.post(
  529. 'liveroom',
  530. '/api/train/liveroom/update/:id',
  531. controller.liveroom.update
  532. );
  533. // 通知看直播
  534. router.post(
  535. 'liveroom',
  536. '/api/train/liveroom/sendmsg',
  537. controller.liveroom.sendmsg
  538. );
  539. // 监听人数
  540. router.post(
  541. 'liveroom',
  542. '/api/train/liveroom/personcount',
  543. controller.liveroom.personcount
  544. );
  545. // 培训视频
  546. router.resources(
  547. 'trainvideo',
  548. '/api/train/trainvideo',
  549. controller.trainvideo
  550. ); // index、create、show、destroy
  551. router.post(
  552. 'trainvideo',
  553. '/api/train/trainvideo/update/:id',
  554. controller.trainvideo.update
  555. );
  556. // 答疑申请(教师)
  557. router.resources('answerapply', '/api/train/answerapply', controller.answerapply); // index、create、show、destroy
  558. router.post(
  559. 'answerapply',
  560. '/api/train/answerapply/update/:id',
  561. controller.answerapply.update
  562. );
  563. // 答疑房间
  564. router.resources('chatroom', '/api/train/chatroom', controller.chatroom); // index、create、show、destroy
  565. router.post(
  566. 'chatroom',
  567. '/api/train/chatroom/update/:id',
  568. controller.chatroom.update
  569. );
  570. // 答疑对话
  571. router.resources(
  572. 'answerchat',
  573. '/api/train/answerchat',
  574. controller.answerchat
  575. ); // index、create、show、destroy
  576. router.post(
  577. 'answerchat',
  578. '/api/train/answerchat/update/:id',
  579. controller.answerchat.update
  580. );
  581. // 个人分groupscore
  582. router.resources(
  583. 'personalscore',
  584. '/api/train/personalscore',
  585. controller.personalscore
  586. ); // index、create、show、destroy
  587. router.post(
  588. 'personalscore',
  589. '/api/train/personalscore/update/:id',
  590. controller.personalscore.update
  591. );
  592. // 上分(混合操作,有添加,也有修改)
  593. router.post(
  594. 'personalscore',
  595. '/api/train/personalscore/opera',
  596. controller.personalscore.opera
  597. );
  598. router.resources(
  599. 'groupscore',
  600. '/api/train/groupscore',
  601. controller.groupscore
  602. ); // index、create、show、destroy
  603. router.post(
  604. 'groupscore',
  605. '/api/train/groupscore/update/:id',
  606. controller.groupscore.update
  607. );
  608. // 组上分(混合操作,有添加,也有修改)
  609. router.post(
  610. 'groupscore',
  611. '/api/train/groupscore/opera',
  612. controller.groupscore.opera
  613. );
  614. // 证书检验
  615. router.get('/api/train/cerconfirm', controller.cerconfirm.index);
  616. // 工具方法
  617. router.post('/api/train/util', controller.util.utilMethod);
  618. // 新人才报
  619. router.get('talented', '/api/train/talented/export', controller.talented.export);
  620. router.resources('talented', '/api/train/talented', controller.talented); // index、create、show、destroy
  621. router.post('talented', '/api/train/talented/update/:id', controller.talented.update);
  622. // 问卷导出
  623. router.post('questionnaire', '/api/train/questionnaire/export', controller.questionnaire.export);
  624. // 作业导出
  625. router.post('task', '/api/train/task/export', controller.task.export);
  626. // 学生证书打印状态更改
  627. router.post('student', '/api/train/student/printcert', controller.student.printCert);
  628. // 日志
  629. router.get('/api/train/logs', controller.logs.index);
  630. };