router.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  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/timeCollate', controller.lesson.timeCollate);
  266. // 课程表设置路由
  267. router.get('/api/train/lesson/teaclass', controller.lesson.teaclass);
  268. router.post(
  269. 'lesson',
  270. '/api/train/lesson/uplessones',
  271. controller.lesson.uplessones
  272. );
  273. router.get('/api/train/lesson/classbyteaid', controller.lesson.classbyteaid); // 根据计划id与教师id查询班级信息
  274. router.resources('lesson', '/api/train/lesson', controller.lesson); // index、create、show、destroy
  275. router.post(
  276. 'lesson',
  277. '/api/train/lesson/update/:id',
  278. controller.lesson.update
  279. );
  280. router.post(
  281. 'lesson',
  282. '/api/train/lesson/autolesson/:id',
  283. controller.lesson.autolesson
  284. ); // 自动排课
  285. router.post('lesson', '/api/train/lesson/check', controller.lesson.check); // 确定(锁死)课表
  286. // 培训计划学校上报时间表设置路由
  287. router.resources('schtime', '/api/train/schtime', controller.schtime); // index、create、show、destroy
  288. router.post(
  289. 'schtime',
  290. '/api/train/schtime/update/:id',
  291. controller.schtime.update
  292. );
  293. router.post(
  294. 'schtime',
  295. '/api/train/schtime/updateschtimes',
  296. controller.schtime.updateschtimes
  297. );
  298. // 班主任全年计划表设置路由
  299. router.get('teaplan', '/api/train/teaplan/divide', controller.teaplan.divide);
  300. router.get(
  301. 'teaplan',
  302. '/api/train/teaplan/findteacher',
  303. controller.teaplan.findteacher
  304. );
  305. router.resources('teaplan', '/api/train/teaplan', controller.teaplan); // index、create、show、destroy
  306. router.post(
  307. 'teaplan',
  308. '/api/train/teaplan/update/:id',
  309. controller.teaplan.update
  310. );
  311. // 计划自动排教师
  312. router.post('apply', '/api/train/apply/arrange', controller.apply.arrange);
  313. // 计划自动排教师
  314. router.post('apply', '/api/train/apply/sendmsg/:planid', controller.apply.sendmsg);
  315. // 计划自动排教师
  316. router.post('apply', '/api/train/apply/confirm/:planid', controller.apply.confirm);
  317. // 教师申请讲课表设置路由
  318. router.get(
  319. 'apply',
  320. '/api/train/apply/queryteacher',
  321. controller.apply.queryteacher
  322. );
  323. router.resources('apply', '/api/train/apply', controller.apply); // index、create、show、destroy
  324. router.post('apply', '/api/train/apply/update/:id', controller.apply.update);
  325. // 请假表设置路由
  326. router.resources('leave', '/api/train/leave', controller.leave); // index、create、show、destroy
  327. router.post('leave', '/api/train/leave/update/:id', controller.leave.update);
  328. // 分组表设置路由
  329. // 还原小组锁定
  330. router.get('group', '/api/train/group/returns/:classid', controller.group.returns);
  331. router.resources('group', '/api/train/group', controller.group); // index、create、show、destroy
  332. router.post('group', '/api/train/group/update/:id', controller.group.update);
  333. router.post('group', '/api/train/group/insert', controller.group.insert);
  334. router.post('group', '/api/train/group/exit', controller.group.exit);
  335. router.post('group', '/api/train/group/sethead', controller.group.sethead);
  336. router.post(
  337. 'group',
  338. '/api/train/group/findbystuid',
  339. controller.group.findbystuid
  340. );
  341. // 培训心得表设置路由
  342. router.get('/api/train/experience/docx', controller.experience.docx); // index、create、show、destroy
  343. router.resources('experience', '/api/train/experience', controller.experience); // index、create、show、destroy
  344. router.post('experience', '/api/train/experience/update/:id', controller.experience.update);
  345. // 职责说明表设置路由
  346. router.resources('duty', '/api/train/duty', controller.duty); // index、create、show、destroy
  347. router.post('duty', '/api/train/duty/update/:id', controller.duty.update);
  348. // 学生上传作业表设置路由
  349. router.resources(
  350. 'uploadtask',
  351. '/api/train/uploadtask',
  352. controller.uploadtask
  353. ); // index、create、show、destroy
  354. router.post(
  355. 'uploadtask',
  356. '/api/train/uploadtask/update/:id',
  357. controller.uploadtask.update
  358. );
  359. // 学生上传问卷表设置路由
  360. router.get(
  361. '/api/train/uploadquestion/completion',
  362. controller.uploadquestion.completion
  363. ); // 统计完成度
  364. router.resources(
  365. 'uploadquestion',
  366. '/api/train/uploadquestion',
  367. controller.uploadquestion
  368. ); // index、create、show、destroy
  369. router.post(
  370. 'uploadquestion',
  371. '/api/train/uploadquestion/update/:id',
  372. controller.uploadquestion.update
  373. );
  374. // 考勤表设置路由
  375. router.get('/api/train/attendance/wxauth', controller.attendance.wxauth); // 统计完成度
  376. router.resources(
  377. 'attendance',
  378. '/api/train/attendance',
  379. controller.attendance
  380. ); // index、create、show、destroy
  381. router.post(
  382. 'attendance',
  383. '/api/train/attendance/update/:id',
  384. controller.attendance.update
  385. );
  386. router.post(
  387. 'attendance',
  388. '/api/train/attendance/attendancecreate',
  389. controller.attendance.attendancecreate
  390. );
  391. router.post(
  392. 'attendance',
  393. '/api/train/attendance/attendancecreateList',
  394. controller.attendance.attendancecreateList
  395. );
  396. // 学校上传学生名单
  397. router.resources('school', '/api/train/school', controller.school); // index、create、show、destroy
  398. router.post(
  399. 'school',
  400. '/api/train/school/update/:id',
  401. controller.school.update
  402. );
  403. router.post('/api/train/school/import', controller.school.stuimport); // 名单上传
  404. // 民族表设置路由
  405. router.resources('nation', '/api/train/nation', controller.nation); // index、create、show、destroy
  406. router.post(
  407. 'nation',
  408. '/api/train/nation/update/:id',
  409. controller.nation.update
  410. );
  411. // 行政区划表设置路由
  412. router.resources('region', '/api/train/region', controller.region); // index、create、show、destroy
  413. router.post('region', '/api/train/region/update/:id', controller.region.update);
  414. // 用户表设置路由
  415. router.get('/api/train/user/schoolregister', controller.user.schoolregister); // 学校账号一键生成
  416. router.resources('user', '/api/train/user', controller.user); // index、create、show、destroy
  417. router.post('user', '/api/train/user/update/:id', controller.user.update);
  418. router.post('user', '/api/train/user/register', controller.user.register); // 学校注册
  419. router.post('user', '/api/train/user/bind', controller.user.bind); // 学生微信绑定
  420. router.post('user', '/api/train/user/userbind', controller.user.userbind); // 其他用户微信绑定
  421. router.post('user', '/api/train/user/appbind', controller.user.appbind); // 绑定小程序openid
  422. // 行政区划表设置路由
  423. router.resources('termquest', '/api/train/termquest', controller.termquest); // index、create、show、destroy
  424. router.post('termquest', '/api/train/termquest/update/:id', controller.termquest.update);
  425. // 微信端访问地址
  426. router.get('/api/train/auth', controller.weixin.auth); // 微信登录
  427. router.get('/api/train/appAuth', controller.weixin.appAuth); // 微信登录
  428. // 微信端访问地址
  429. router.get('/api/train/authtest', controller.weixin.authTest); // 微信登录测试
  430. // pc端登录
  431. router.post('/api/train/login', controller.login.login); // 登录
  432. // 微信端登录
  433. router.get('/api/train/qrcode', controller.login.qrcode); // 登录
  434. router.post('/api/train/wxcheck', controller.login.wxcheck); // 微信检查登录
  435. router.post('/api/train/wxlogin', controller.login.wxlogin); // 登录
  436. // 计算教师的分数
  437. router.get('score', '/api/train/score/computed', controller.score.computedScore);
  438. // 计算所有教师的分数
  439. router.get('score', '/api/train/score/allComputed', controller.score.computedAllTeacherScore);
  440. // 评分表设置路由
  441. router.resources('score', '/api/train/score', controller.score); // index、create、show、destroy
  442. router.post('score', '/api/train/score/update/:id', controller.score.update);
  443. // 上传资料表设置路由
  444. router.resources('material', '/api/train/material', controller.material); // index、create、show、destroy
  445. router.post(
  446. 'material',
  447. '/api/train/material/update/:id',
  448. controller.material.update
  449. );
  450. // 资料评分表设置路由
  451. router.resources(
  452. 'materialscore',
  453. '/api/train/materialscore',
  454. controller.materialscore
  455. ); // index、create、show、destroy
  456. router.post(
  457. 'materialscore',
  458. '/api/train/materialscore/update/:id',
  459. controller.materialscore.update
  460. );
  461. // 教师在线表设置路由
  462. router.resources('online', '/api/train/online', controller.online); // index、create、show、destroy
  463. router.post(
  464. 'online',
  465. '/api/train/online/update/:id',
  466. controller.online.update
  467. );
  468. // 聊天房间表设置路由
  469. router.resources('room', '/api/train/room', controller.room); // index、create、show、destroy
  470. router.post('room', '/api/train/room/update/:id', controller.room.update);
  471. // 聊天记录表设置路由
  472. router.resources('record', '/api/train/record', controller.record); // index、create、show、destroy
  473. router.post(
  474. 'record',
  475. '/api/train/record/update/:id',
  476. controller.record.update
  477. );
  478. // 通知表设置路由
  479. router.resources('notice', '/api/train/notice', controller.notice); // index、create、show、destroy
  480. router.post(
  481. 'notice',
  482. '/api/train/notice/update/:id',
  483. controller.notice.update
  484. );
  485. router.post('notice', '/api/train/notice/look', controller.notice.look);
  486. router.post('notice', '/api/train/notice/resend', controller.notice.resend);
  487. // 课程模板表设置路由
  488. router.resources(
  489. 'lessonmode',
  490. '/api/train/lessonmode',
  491. controller.lessonmode
  492. ); // index、create、show、destroy
  493. router.post(
  494. 'lessonmode',
  495. '/api/train/lessonmode/update/:id',
  496. controller.lessonmode.update
  497. );
  498. // 全年计划模板表设置路由
  499. router.resources(
  500. 'trainmodel',
  501. '/api/train/trainmodel',
  502. controller.trainmodel
  503. ); // index、create、show、destroy
  504. router.post(
  505. 'trainmodel',
  506. '/api/train/trainmodel/update/:id',
  507. controller.trainmodel.update
  508. );
  509. // 统计查询设置路由
  510. router.get('/api/train/count/countstudent', controller.count.countstudent);
  511. // 按学校统计查询设置路由
  512. router.get('/api/train/count/countschstu/:id', controller.count.countschstu);
  513. // 班级类型表配置路由
  514. router.resources('classtype', '/api/train/classtype', controller.classtype); // index、create、show、destroy
  515. router.post(
  516. 'classtype',
  517. '/api/train/classtype/update/:id',
  518. controller.classtype.update
  519. );
  520. // 学校上传任务表设置路由
  521. router.resources('job', '/api/train/job', controller.job); // index、create、show、destroy
  522. router.post('job', '/api/train/job/update/:id', controller.job.update);
  523. // 消息表设置路由
  524. router.resources('message', '/api/train/message', controller.message); // index、create、show、destroy
  525. router.post(
  526. 'message',
  527. '/api/train/message/update/:id',
  528. controller.message.update
  529. );
  530. // 直播房间
  531. router.resources('liveroom', '/api/train/liveroom', controller.liveroom); // index、create、show、destroy
  532. router.post(
  533. 'liveroom',
  534. '/api/train/liveroom/update/:id',
  535. controller.liveroom.update
  536. );
  537. // 通知看直播
  538. router.post(
  539. 'liveroom',
  540. '/api/train/liveroom/sendmsg',
  541. controller.liveroom.sendmsg
  542. );
  543. // 监听人数
  544. router.post(
  545. 'liveroom',
  546. '/api/train/liveroom/personcount',
  547. controller.liveroom.personcount
  548. );
  549. // 培训视频
  550. router.resources(
  551. 'trainvideo',
  552. '/api/train/trainvideo',
  553. controller.trainvideo
  554. ); // index、create、show、destroy
  555. router.post(
  556. 'trainvideo',
  557. '/api/train/trainvideo/update/:id',
  558. controller.trainvideo.update
  559. );
  560. // 答疑申请(教师)
  561. router.resources('answerapply', '/api/train/answerapply', controller.answerapply); // index、create、show、destroy
  562. router.post(
  563. 'answerapply',
  564. '/api/train/answerapply/update/:id',
  565. controller.answerapply.update
  566. );
  567. // 答疑房间
  568. router.resources('chatroom', '/api/train/chatroom', controller.chatroom); // index、create、show、destroy
  569. router.post(
  570. 'chatroom',
  571. '/api/train/chatroom/update/:id',
  572. controller.chatroom.update
  573. );
  574. // 答疑对话
  575. router.resources(
  576. 'answerchat',
  577. '/api/train/answerchat',
  578. controller.answerchat
  579. ); // index、create、show、destroy
  580. router.post(
  581. 'answerchat',
  582. '/api/train/answerchat/update/:id',
  583. controller.answerchat.update
  584. );
  585. // 个人分groupscore
  586. router.resources(
  587. 'personalscore',
  588. '/api/train/personalscore',
  589. controller.personalscore
  590. ); // index、create、show、destroy
  591. router.post(
  592. 'personalscore',
  593. '/api/train/personalscore/update/:id',
  594. controller.personalscore.update
  595. );
  596. // 上分(混合操作,有添加,也有修改)
  597. router.post(
  598. 'personalscore',
  599. '/api/train/personalscore/opera',
  600. controller.personalscore.opera
  601. );
  602. router.resources(
  603. 'groupscore',
  604. '/api/train/groupscore',
  605. controller.groupscore
  606. ); // index、create、show、destroy
  607. router.post(
  608. 'groupscore',
  609. '/api/train/groupscore/update/:id',
  610. controller.groupscore.update
  611. );
  612. // 组上分(混合操作,有添加,也有修改)
  613. router.post(
  614. 'groupscore',
  615. '/api/train/groupscore/opera',
  616. controller.groupscore.opera
  617. );
  618. // 证书检验
  619. router.get('/api/train/cerconfirm', controller.cerconfirm.index);
  620. // 工具方法
  621. router.post('/api/train/util', controller.util.utilMethod);
  622. // 新人才报
  623. router.get('talented', '/api/train/talented/export', controller.talented.export);
  624. router.resources('talented', '/api/train/talented', controller.talented); // index、create、show、destroy
  625. router.post('talented', '/api/train/talented/update/:id', controller.talented.update);
  626. // 问卷导出
  627. router.post('questionnaire', '/api/train/questionnaire/export', controller.questionnaire.export);
  628. // 作业导出
  629. router.post('task', '/api/train/task/export', controller.task.export);
  630. // 学生证书打印状态更改
  631. router.post('student', '/api/train/student/printcert', controller.student.printCert);
  632. // 日志
  633. router.get('/api/train/logs', controller.logs.index);
  634. // 教师首页,根据计划id和教师id查教师的安排(已确定的,不是预课表)
  635. router.get('/api/train/teaIndex', controller.lesson.teaIndex);
  636. };