uploadquestion.js 708 B

1234567891011121314151617181920212223242526272829
  1. 'use strict';
  2. const _ = require('lodash');
  3. const meta = require('./.uploadquestion.js');
  4. const Controller = require('egg').Controller;
  5. const { CrudController } = require('naf-framework-mongoose/lib/controller');
  6. // 学生上传问卷管理
  7. class UploadquestionController extends Controller {
  8. constructor(ctx) {
  9. super(ctx);
  10. this.service = this.ctx.service.uploadquestion;
  11. }
  12. // 完成度查询
  13. async completion() {
  14. const res = await this.service.completion(this.ctx.query);
  15. this.ctx.ok({ ...res });
  16. }
  17. async index() {
  18. const res = await this.service.query(this.ctx.query);
  19. this.ctx.ok({ ...res });
  20. }
  21. }
  22. module.exports = CrudController(UploadquestionController, meta);