trainplan.js 1009 B

12345678910111213141516171819202122232425262728293031323334353637
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.trainplan.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 培训计划管理
  7. class TrainplanController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.trainplan;
  11. }
  12. // 导出exportExcel
  13. async exportExcel() {
  14. const data = await this.service.exportExcel(this.ctx.request.body);
  15. this.ctx.ok({ data });
  16. }
  17. // 导出exportSchool学校大表
  18. async exportSchool() {
  19. const data = await this.service.exportSchool(this.ctx.request.body);
  20. this.ctx.ok({ data });
  21. }
  22. async updateclass() {
  23. const data = await this.service.updateclass(this.ctx.request.body);
  24. this.ctx.ok({ data });
  25. }
  26. async updatereteacher() {
  27. const data = await this.service.updatereteacher(this.ctx.request.body);
  28. this.ctx.ok({ data });
  29. }
  30. }
  31. module.exports = CrudController(TrainplanController, meta);