liuyu 5 роки тому
батько
коміт
d6248105df
2 змінених файлів з 45 додано та 45 видалено
  1. 44 44
      app/router.js
  2. 1 1
      app/service/trainplan.js

+ 44 - 44
app/router.js

@@ -8,78 +8,78 @@ module.exports = app => {
   router.get('/', controller.home.index);
 
   // 科目表设置路由
-  router.resources('subject', '/api/subject', controller.subject); // index、create、show、destroy
-  router.post('subject', '/api/subject/update/:id', controller.subject.update);
+  router.resources('subject', '/api/train/subject', controller.subject); // index、create、show、destroy
+  router.post('subject', '/api/train/subject/update/:id', controller.subject.update);
 
   // 教师表设置路由
-  router.post('teacher', '/api/teacher', controller.teacher.create);
-  router.delete('teacher', '/api/teacher/:id', controller.teacher.delete);
-  router.post('teacher', '/api/teacher/update/:id', controller.teacher.update);
-  router.get('teacher', '/api/teacher', controller.teacher.query);
-  router.get('teacher', '/api/teacher/show/:id', controller.teacher.show);
+  router.post('teacher', '/api/train/teacher', controller.teacher.create);
+  router.delete('teacher', '/api/train/teacher/:id', controller.teacher.delete);
+  router.post('teacher', '/api/train/teacher/update/:id', controller.teacher.update);
+  router.get('teacher', '/api/train/teacher', controller.teacher.query);
+  router.get('teacher', '/api/train/teacher/show/:id', controller.teacher.show);
 
   // 作业表配置路由
-  router.post('task', '/api/task', controller.task.create);
-  router.delete('task', '/api/task/:id', controller.task.delete);
-  router.post('task', '/api/task/update/:id', controller.task.update);
-  router.get('task', '/api/task', controller.task.query);
-  router.get('task', '/api/task/show/:id', controller.task.show);
+  router.post('task', '/api/train/task', controller.task.create);
+  router.delete('task', '/api/train/task/:id', controller.task.delete);
+  router.post('task', '/api/train/task/update/:id', controller.task.update);
+  router.get('task', '/api/train/task', controller.task.query);
+  router.get('task', '/api/train/task/show/:id', controller.task.show);
 
   // 问卷题库表配置路由
-  router.post('question', '/api/question', controller.question.create);
-  router.delete('question', '/api/question/:id', controller.question.delete);
-  router.post('question', '/api/question/update/:id', controller.question.update);
-  router.get('question', '/api/question', controller.question.query);
-  router.get('question', '/api/question/show/:id', controller.question.show);
+  router.post('question', '/api/train/question', controller.question.create);
+  router.delete('question', '/api/train/question/:id', controller.question.delete);
+  router.post('question', '/api/train/question/update/:id', controller.question.update);
+  router.get('question', '/api/train/question', controller.question.query);
+  router.get('question', '/api/train/question/show/:id', controller.question.show);
 
   // 问卷表配置路由
-  router.post('questionnaire', '/api/questionnaire', controller.questionnaire.create);
-  router.delete('questionnaire', '/api/questionnaire/:id', controller.questionnaire.delete);
-  router.post('questionnaire', '/api/questionnaire/update/:id', controller.questionnaire.update);
-  router.get('questionnaire', '/api/questionnaire', controller.questionnaire.query);
-  router.get('questionnaire', '/api/questionnaire/show/:id', controller.questionnaire.show);
+  router.post('questionnaire', '/api/train/questionnaire', controller.questionnaire.create);
+  router.delete('questionnaire', '/api/train/questionnaire/:id', controller.questionnaire.delete);
+  router.post('questionnaire', '/api/train/questionnaire/update/:id', controller.questionnaire.update);
+  router.get('questionnaire', '/api/train/questionnaire', controller.questionnaire.query);
+  router.get('questionnaire', '/api/train/questionnaire/show/:id', controller.questionnaire.show);
 
   // 学生表设置路由
-  router.resources('student', '/api/student', controller.student); // index、create、show、destroy
-  router.post('student', '/api/student/update/:id', controller.student.update);
+  router.resources('student', '/api/train/student', controller.student); // index、create、show、destroy
+  router.post('student', '/api/train/student/update/:id', controller.student.update);
 
   // 班主任表设置路由
-  router.resources('headteacher', '/api/headteacher', controller.headteacher); // index、create、show、destroy
-  router.post('headteacher', '/api/headteacher/update/:id', controller.headteacher.update);
+  router.resources('headteacher', '/api/train/headteacher', controller.headteacher); // index、create、show、destroy
+  router.post('headteacher', '/api/train/headteacher/update/:id', controller.headteacher.update);
 
   // 寝室表设置路由
-  router.resources('bedroom', '/api/bedroom', controller.bedroom); // index、create、show、destroy
-  router.post('bedroom', '/api/bedroom/update/:id', controller.bedroom.update);
+  router.resources('bedroom', '/api/train/bedroom', controller.bedroom); // index、create、show、destroy
+  router.post('bedroom', '/api/train/bedroom/update/:id', controller.bedroom.update);
 
   // 班级表设置路由
-  router.resources('class', '/api/class', controller.class); // index、create、show、destroy
-  router.post('class', '/api/class/update/:id', controller.class.update);
+  router.resources('class', '/api/train/class', controller.class); // index、create、show、destroy
+  router.post('class', '/api/train/class/update/:id', controller.class.update);
 
   // 部门表设置路由
-  router.resources('department', '/api/department', controller.department); // index、create、show、destroy
-  router.post('department', '/api/department/update/:id', controller.department.update);
+  router.resources('department', '/api/train/department', controller.department); // index、create、show、destroy
+  router.post('department', '/api/train/department/update/:id', controller.department.update);
 
   // 位置表设置路由
-  router.resources('location', '/api/location', controller.location); // index、create、show、destroy
-  router.post('location', '/api/location/update/:id', controller.location.update);
+  router.resources('location', '/api/train/location', controller.location); // index、create、show、destroy
+  router.post('location', '/api/train/location/update/:id', controller.location.update);
 
   // 培训计划表设置路由
-  router.resources('trainplan', '/api/trainplan', controller.trainplan); // index、create、show、destroy
-  router.post('trainplan', '/api/trainplan/update/:id', controller.trainplan.update);
+  router.resources('trainplan', '/api/train/trainplan', controller.trainplan); // index、create、show、destroy
+  router.post('trainplan', '/api/train/trainplan/update/:id', controller.trainplan.update);
 
   // 节假日表设置路由
-  router.resources('festival', '/api/festival', controller.festival); // index、create、show、destroy
-  router.post('festival', '/api/festival/update/:id', controller.festival.update);
+  router.resources('festival', '/api/train/festival', controller.festival); // index、create、show、destroy
+  router.post('festival', '/api/train/festival/update/:id', controller.festival.update);
 
   // 课程表设置路由
-  router.resources('lesson', '/api/lesson', controller.lesson); // index、create、show、destroy
-  router.post('lesson', '/api/lesson/update/:id', controller.lesson.update);
+  router.resources('lesson', '/api/train/lesson', controller.lesson); // index、create、show、destroy
+  router.post('lesson', '/api/train/lesson/update/:id', controller.lesson.update);
 
   // 培训计划学校上报时间表设置路由
-  router.resources('schtime', '/api/schtime', controller.schtime); // index、create、show、destroy
-  router.post('schtime', '/api/schtime/update/:id', controller.schtime.update);
+  router.resources('schtime', '/api/train/schtime', controller.schtime); // index、create、show、destroy
+  router.post('schtime', '/api/train/schtime/update/:id', controller.schtime.update);
 
   // 班主任全年计划表设置路由
-  router.resources('teaplan', '/api/teaplan', controller.teaplan); // index、create、show、destroy
-  router.post('teaplan', '/api/teaplan/update/:id', controller.teaplan.update);
+  router.resources('teaplan', '/api/train/teaplan', controller.teaplan); // index、create、show、destroy
+  router.post('teaplan', '/api/train/teaplan/update/:id', controller.teaplan.update);
 };

+ 1 - 1
app/service/trainplan.js

@@ -33,5 +33,5 @@ class TrainplanService extends CrudService {
 //     return this.tpmodel.create(data);
 //   }
 // }
-
+}
 module.exports = TrainplanService;