router.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  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. // 批量修改寝室(新)
  160. router.post('bedroom', '/api/train/bedroom/batch', controller.bedroom.updateStudent);
  161. // 寝室表设置路由
  162. router.get('/api/train/bedroom/student/:id', controller.bedroom.roomstu); // 根据班级id查询寝室信息
  163. router.resources('bedroom', '/api/train/bedroom', controller.bedroom); // index、create、show、destroy
  164. router.post(
  165. 'bedroom',
  166. '/api/train/bedroom/update/:id',
  167. controller.bedroom.update
  168. );
  169. router.post('bedroom', '/api/train/bedroom/apart', controller.bedroom.apart);
  170. router.post(
  171. 'bedroom',
  172. '/api/train/bedroom/ibeacon',
  173. controller.bedroom.ibeacon
  174. );
  175. // 模板设置班级
  176. router.get('class', '/api/train/class/settemplate', controller.class.toSetClassSetting);
  177. // 班级表设置路由
  178. router.get(
  179. 'class',
  180. '/api/train/class/classinfo/:id',
  181. controller.class.classinfo
  182. );
  183. router.post(
  184. 'class',
  185. '/api/train/class/upclasses',
  186. controller.class.upclasses
  187. );
  188. router.post('class', '/api/train/class/notice', controller.class.notice);
  189. router.resources('class', '/api/train/class', controller.class); // index、create、show、destroy
  190. router.post('class', '/api/train/class/update/:id', controller.class.update);
  191. router.post('class', '/api/train/class/divide', controller.class.divide);
  192. router.post('class', '/api/train/class/uptea', controller.class.uptea);
  193. router.post(
  194. 'class',
  195. '/api/train/class/upstuclass/:id',
  196. controller.class.studentupclass
  197. ); // 学生修改班级
  198. // 部门表设置路由
  199. router.resources(
  200. 'department',
  201. '/api/train/department',
  202. controller.department
  203. ); // index、create、show、destroy
  204. router.post(
  205. 'department',
  206. '/api/train/department/update/:id',
  207. controller.department.update
  208. );
  209. // 位置表设置路由
  210. router.resources('location', '/api/train/location', controller.location); // index、create、show、destroy
  211. router.post(
  212. 'location',
  213. '/api/train/location/update/:id',
  214. controller.location.update
  215. );
  216. // 培训计划表设置路由
  217. router.resources('trainplan', '/api/train/trainplan', controller.trainplan); // index、create、show、destroy
  218. router.post(
  219. 'trainplan',
  220. '/api/train/trainplan/update/:id',
  221. controller.trainplan.update
  222. );
  223. router.post(
  224. '/api/train/trainplan/exportExcel',
  225. controller.trainplan.exportExcel
  226. ); // 导出
  227. router.post(
  228. '/api/train/trainplan/exportSchool',
  229. controller.trainplan.exportSchool
  230. ); // 导出计划学校
  231. router.post(
  232. '/api/train/trainplan/exportPlan',
  233. controller.trainplan.exportPlan
  234. ); // 导出计划日历
  235. router.post(
  236. '/api/train/trainplan/updateclass',
  237. controller.trainplan.updateclass
  238. );
  239. router.post(
  240. '/api/train/trainplan/updatereteacher',
  241. controller.trainplan.updatereteacher
  242. );
  243. // 培训计划年度批次表设置路由
  244. router.resources(
  245. 'trainplanyear',
  246. '/api/train/trainplanyear',
  247. controller.trainplanyear
  248. ); // index、create、show、destroy
  249. router.post(
  250. 'trainplanyear',
  251. '/api/train/trainplanyear/update/:id',
  252. controller.trainplanyear.update
  253. );
  254. // 节假日表设置路由
  255. router.resources('festival', '/api/train/festival', controller.festival); // index、create、show、destroy
  256. router.post(
  257. 'festival',
  258. '/api/train/festival/update/:id',
  259. controller.festival.update
  260. );
  261. // 新自动排课表
  262. router.post('/api/train/lesson/newarrange', controller.lesson.newArrange);
  263. // 课程表设置路由
  264. router.get('/api/train/lesson/teaclass', controller.lesson.teaclass);
  265. router.post(
  266. 'lesson',
  267. '/api/train/lesson/uplessones',
  268. controller.lesson.uplessones
  269. );
  270. router.get('/api/train/lesson/classbyteaid', controller.lesson.classbyteaid); // 根据计划id与教师id查询班级信息
  271. router.resources('lesson', '/api/train/lesson', controller.lesson); // index、create、show、destroy
  272. router.post(
  273. 'lesson',
  274. '/api/train/lesson/update/:id',
  275. controller.lesson.update
  276. );
  277. router.post(
  278. 'lesson',
  279. '/api/train/lesson/autolesson/:id',
  280. controller.lesson.autolesson
  281. ); // 自动排课
  282. router.post('lesson', '/api/train/lesson/check', controller.lesson.check); // 确定(锁死)课表
  283. // 培训计划学校上报时间表设置路由
  284. router.resources('schtime', '/api/train/schtime', controller.schtime); // index、create、show、destroy
  285. router.post(
  286. 'schtime',
  287. '/api/train/schtime/update/:id',
  288. controller.schtime.update
  289. );
  290. router.post(
  291. 'schtime',
  292. '/api/train/schtime/updateschtimes',
  293. controller.schtime.updateschtimes
  294. );
  295. // 班主任全年计划表设置路由
  296. router.get('teaplan', '/api/train/teaplan/divide', controller.teaplan.divide);
  297. router.get(
  298. 'teaplan',
  299. '/api/train/teaplan/findteacher',
  300. controller.teaplan.findteacher
  301. );
  302. router.resources('teaplan', '/api/train/teaplan', controller.teaplan); // index、create、show、destroy
  303. router.post(
  304. 'teaplan',
  305. '/api/train/teaplan/update/:id',
  306. controller.teaplan.update
  307. );
  308. // 计划自动排教师
  309. router.post('apply', '/api/train/apply/arrange', controller.apply.arrange);
  310. // 计划自动排教师
  311. router.post('apply', '/api/train/apply/sendmsg/:planid', controller.apply.sendmsg);
  312. // 计划自动排教师
  313. router.post('apply', '/api/train/apply/confirm/:planid', controller.apply.confirm);
  314. // 教师申请讲课表设置路由
  315. router.get(
  316. 'apply',
  317. '/api/train/apply/queryteacher',
  318. controller.apply.queryteacher
  319. );
  320. router.resources('apply', '/api/train/apply', controller.apply); // index、create、show、destroy
  321. router.post('apply', '/api/train/apply/update/:id', controller.apply.update);
  322. // 请假表设置路由
  323. router.resources('leave', '/api/train/leave', controller.leave); // index、create、show、destroy
  324. router.post('leave', '/api/train/leave/update/:id', controller.leave.update);
  325. // 分组表设置路由
  326. // 还原小组锁定
  327. router.get('group', '/api/train/group/returns/:classid', controller.group.returns);
  328. router.resources('group', '/api/train/group', controller.group); // index、create、show、destroy
  329. router.post('group', '/api/train/group/update/:id', controller.group.update);
  330. router.post('group', '/api/train/group/insert', controller.group.insert);
  331. router.post('group', '/api/train/group/exit', controller.group.exit);
  332. router.post('group', '/api/train/group/sethead', controller.group.sethead);
  333. router.post(
  334. 'group',
  335. '/api/train/group/findbystuid',
  336. controller.group.findbystuid
  337. );
  338. // 培训心得表设置路由
  339. router.get('/api/train/experience/docx', controller.experience.docx); // index、create、show、destroy
  340. router.resources('experience', '/api/train/experience', controller.experience); // index、create、show、destroy
  341. router.post('experience', '/api/train/experience/update/:id', controller.experience.update);
  342. // 职责说明表设置路由
  343. router.resources('duty', '/api/train/duty', controller.duty); // index、create、show、destroy
  344. router.post('duty', '/api/train/duty/update/:id', controller.duty.update);
  345. // 学生上传作业表设置路由
  346. router.resources(
  347. 'uploadtask',
  348. '/api/train/uploadtask',
  349. controller.uploadtask
  350. ); // index、create、show、destroy
  351. router.post(
  352. 'uploadtask',
  353. '/api/train/uploadtask/update/:id',
  354. controller.uploadtask.update
  355. );
  356. // 学生上传问卷表设置路由
  357. router.get(
  358. '/api/train/uploadquestion/completion',
  359. controller.uploadquestion.completion
  360. ); // 统计完成度
  361. router.resources(
  362. 'uploadquestion',
  363. '/api/train/uploadquestion',
  364. controller.uploadquestion
  365. ); // index、create、show、destroy
  366. router.post(
  367. 'uploadquestion',
  368. '/api/train/uploadquestion/update/:id',
  369. controller.uploadquestion.update
  370. );
  371. // 考勤表设置路由
  372. router.get('/api/train/attendance/wxauth', controller.attendance.wxauth); // 统计完成度
  373. router.resources(
  374. 'attendance',
  375. '/api/train/attendance',
  376. controller.attendance
  377. ); // index、create、show、destroy
  378. router.post(
  379. 'attendance',
  380. '/api/train/attendance/update/:id',
  381. controller.attendance.update
  382. );
  383. router.post(
  384. 'attendance',
  385. '/api/train/attendance/attendancecreate',
  386. controller.attendance.attendancecreate
  387. );
  388. router.post(
  389. 'attendance',
  390. '/api/train/attendance/attendancecreateList',
  391. controller.attendance.attendancecreateList
  392. );
  393. // 学校上传学生名单
  394. router.resources('school', '/api/train/school', controller.school); // index、create、show、destroy
  395. router.post(
  396. 'school',
  397. '/api/train/school/update/:id',
  398. controller.school.update
  399. );
  400. router.post('/api/train/school/import', controller.school.stuimport); // 名单上传
  401. // 民族表设置路由
  402. router.resources('nation', '/api/train/nation', controller.nation); // index、create、show、destroy
  403. router.post(
  404. 'nation',
  405. '/api/train/nation/update/:id',
  406. controller.nation.update
  407. );
  408. // 行政区划表设置路由
  409. router.resources('region', '/api/train/region', controller.region); // index、create、show、destroy
  410. router.post('region', '/api/train/region/update/:id', controller.region.update);
  411. // 用户表设置路由
  412. router.get('/api/train/user/schoolregister', controller.user.schoolregister); // 学校账号一键生成
  413. router.resources('user', '/api/train/user', controller.user); // index、create、show、destroy
  414. router.post('user', '/api/train/user/update/:id', controller.user.update);
  415. router.post('user', '/api/train/user/register', controller.user.register); // 学校注册
  416. router.post('user', '/api/train/user/bind', controller.user.bind); // 学生微信绑定
  417. router.post('user', '/api/train/user/userbind', controller.user.userbind); // 其他用户微信绑定
  418. router.post('user', '/api/train/user/appbind', controller.user.appbind); // 绑定小程序openid
  419. // 行政区划表设置路由
  420. router.resources('termquest', '/api/train/termquest', controller.termquest); // index、create、show、destroy
  421. router.post('termquest', '/api/train/termquest/update/:id', controller.termquest.update);
  422. // 微信端访问地址
  423. router.get('/api/train/auth', controller.weixin.auth); // 微信登录
  424. router.get('/api/train/appAuth', controller.weixin.appAuth); // 微信登录
  425. // 微信端访问地址
  426. router.get('/api/train/authtest', controller.weixin.authTest); // 微信登录测试
  427. // pc端登录
  428. router.post('/api/train/login', controller.login.login); // 登录
  429. // 微信端登录
  430. router.get('/api/train/qrcode', controller.login.qrcode); // 登录
  431. router.post('/api/train/wxcheck', controller.login.wxcheck); // 微信检查登录
  432. router.post('/api/train/wxlogin', controller.login.wxlogin); // 登录
  433. // 计算教师的分数
  434. router.get('score', '/api/train/score/computed', controller.score.computedScore);
  435. // 评分表设置路由
  436. router.resources('score', '/api/train/score', controller.score); // index、create、show、destroy
  437. router.post('score', '/api/train/score/update/:id', controller.score.update);
  438. // 上传资料表设置路由
  439. router.resources('material', '/api/train/material', controller.material); // index、create、show、destroy
  440. router.post(
  441. 'material',
  442. '/api/train/material/update/:id',
  443. controller.material.update
  444. );
  445. // 资料评分表设置路由
  446. router.resources(
  447. 'materialscore',
  448. '/api/train/materialscore',
  449. controller.materialscore
  450. ); // index、create、show、destroy
  451. router.post(
  452. 'materialscore',
  453. '/api/train/materialscore/update/:id',
  454. controller.materialscore.update
  455. );
  456. // 教师在线表设置路由
  457. router.resources('online', '/api/train/online', controller.online); // index、create、show、destroy
  458. router.post(
  459. 'online',
  460. '/api/train/online/update/:id',
  461. controller.online.update
  462. );
  463. // 聊天房间表设置路由
  464. router.resources('room', '/api/train/room', controller.room); // index、create、show、destroy
  465. router.post('room', '/api/train/room/update/:id', controller.room.update);
  466. // 聊天记录表设置路由
  467. router.resources('record', '/api/train/record', controller.record); // index、create、show、destroy
  468. router.post(
  469. 'record',
  470. '/api/train/record/update/:id',
  471. controller.record.update
  472. );
  473. // 通知表设置路由
  474. router.resources('notice', '/api/train/notice', controller.notice); // index、create、show、destroy
  475. router.post(
  476. 'notice',
  477. '/api/train/notice/update/:id',
  478. controller.notice.update
  479. );
  480. router.post('notice', '/api/train/notice/look', controller.notice.look);
  481. router.post('notice', '/api/train/notice/resend', controller.notice.resend);
  482. // 课程模板表设置路由
  483. router.resources(
  484. 'lessonmode',
  485. '/api/train/lessonmode',
  486. controller.lessonmode
  487. ); // index、create、show、destroy
  488. router.post(
  489. 'lessonmode',
  490. '/api/train/lessonmode/update/:id',
  491. controller.lessonmode.update
  492. );
  493. // 全年计划模板表设置路由
  494. router.resources(
  495. 'trainmodel',
  496. '/api/train/trainmodel',
  497. controller.trainmodel
  498. ); // index、create、show、destroy
  499. router.post(
  500. 'trainmodel',
  501. '/api/train/trainmodel/update/:id',
  502. controller.trainmodel.update
  503. );
  504. // 统计查询设置路由
  505. router.get('/api/train/count/countstudent', controller.count.countstudent);
  506. // 按学校统计查询设置路由
  507. router.get('/api/train/count/countschstu/:id', controller.count.countschstu);
  508. // 班级类型表配置路由
  509. router.resources('classtype', '/api/train/classtype', controller.classtype); // index、create、show、destroy
  510. router.post(
  511. 'classtype',
  512. '/api/train/classtype/update/:id',
  513. controller.classtype.update
  514. );
  515. // 学校上传任务表设置路由
  516. router.resources('job', '/api/train/job', controller.job); // index、create、show、destroy
  517. router.post('job', '/api/train/job/update/:id', controller.job.update);
  518. // 消息表设置路由
  519. router.resources('message', '/api/train/message', controller.message); // index、create、show、destroy
  520. router.post(
  521. 'message',
  522. '/api/train/message/update/:id',
  523. controller.message.update
  524. );
  525. // 直播房间
  526. router.resources('liveroom', '/api/train/liveroom', controller.liveroom); // index、create、show、destroy
  527. router.post(
  528. 'liveroom',
  529. '/api/train/liveroom/update/:id',
  530. controller.liveroom.update
  531. );
  532. // 通知看直播
  533. router.post(
  534. 'liveroom',
  535. '/api/train/liveroom/sendmsg',
  536. controller.liveroom.sendmsg
  537. );
  538. // 监听人数
  539. router.post(
  540. 'liveroom',
  541. '/api/train/liveroom/personcount',
  542. controller.liveroom.personcount
  543. );
  544. // 培训视频
  545. router.resources(
  546. 'trainvideo',
  547. '/api/train/trainvideo',
  548. controller.trainvideo
  549. ); // index、create、show、destroy
  550. router.post(
  551. 'trainvideo',
  552. '/api/train/trainvideo/update/:id',
  553. controller.trainvideo.update
  554. );
  555. // 答疑申请(教师)
  556. router.resources('answerapply', '/api/train/answerapply', controller.answerapply); // index、create、show、destroy
  557. router.post(
  558. 'answerapply',
  559. '/api/train/answerapply/update/:id',
  560. controller.answerapply.update
  561. );
  562. // 答疑房间
  563. router.resources('chatroom', '/api/train/chatroom', controller.chatroom); // index、create、show、destroy
  564. router.post(
  565. 'chatroom',
  566. '/api/train/chatroom/update/:id',
  567. controller.chatroom.update
  568. );
  569. // 答疑对话
  570. router.resources(
  571. 'answerchat',
  572. '/api/train/answerchat',
  573. controller.answerchat
  574. ); // index、create、show、destroy
  575. router.post(
  576. 'answerchat',
  577. '/api/train/answerchat/update/:id',
  578. controller.answerchat.update
  579. );
  580. // 个人分groupscore
  581. router.resources(
  582. 'personalscore',
  583. '/api/train/personalscore',
  584. controller.personalscore
  585. ); // index、create、show、destroy
  586. router.post(
  587. 'personalscore',
  588. '/api/train/personalscore/update/:id',
  589. controller.personalscore.update
  590. );
  591. // 上分(混合操作,有添加,也有修改)
  592. router.post(
  593. 'personalscore',
  594. '/api/train/personalscore/opera',
  595. controller.personalscore.opera
  596. );
  597. router.resources(
  598. 'groupscore',
  599. '/api/train/groupscore',
  600. controller.groupscore
  601. ); // index、create、show、destroy
  602. router.post(
  603. 'groupscore',
  604. '/api/train/groupscore/update/:id',
  605. controller.groupscore.update
  606. );
  607. // 组上分(混合操作,有添加,也有修改)
  608. router.post(
  609. 'groupscore',
  610. '/api/train/groupscore/opera',
  611. controller.groupscore.opera
  612. );
  613. // 证书检验
  614. router.get('/api/train/cerconfirm', controller.cerconfirm.index);
  615. // 工具方法
  616. router.post('/api/train/util', controller.util.utilMethod);
  617. // 新人才报
  618. router.get('talented', '/api/train/talented/export', controller.talented.export);
  619. router.resources('talented', '/api/train/talented', controller.talented); // index、create、show、destroy
  620. router.post('talented', '/api/train/talented/update/:id', controller.talented.update);
  621. // 问卷导出
  622. router.post('questionnaire', '/api/train/questionnaire/export', controller.questionnaire.export);
  623. // 作业导出
  624. router.post('task', '/api/train/task/export', controller.task.export);
  625. // 学生证书打印状态更改
  626. router.post('student', '/api/train/student/printcert', controller.student.printCert);
  627. // 日志
  628. router.get('/api/train/logs', controller.logs.index);
  629. };