lrf402788946 5 سال پیش
والد
کامیت
9a1c795a9c
5فایلهای تغییر یافته به همراه24 افزوده شده و 1 حذف شده
  1. 1 1
      components/data-table.vue
  2. 1 0
      config/menu-config.js
  3. 11 0
      store/classes.js
  4. 5 0
      store/student.js
  5. 6 0
      store/tea-plan.js

+ 1 - 1
components/data-table.vue

@@ -16,7 +16,7 @@
         <template v-if="item.custom">
           <el-table-column :key="index" align="center" :label="item.label" v-bind="item.options">
             <template v-slot="{ row, $index }">
-              <slot name="custom" v-bind="{ item, row }"></slot>
+              <slot name="custom" v-bind="{ item, row, $index }"></slot>
             </template>
           </el-table-column>
         </template>

+ 1 - 0
config/menu-config.js

@@ -113,6 +113,7 @@ export const center = [
       { path: '/questionnaire/index', name: '问卷管理' },
       { path: '/itembank/index', name: '问卷题库' },
       { path: '/questionstate/index', name: '问卷进度' },
+      { path: '/statistics/question/index', name: '问卷统计' },
     ],
   },
 ];

+ 11 - 0
store/classes.js

@@ -6,6 +6,8 @@ Vue.use(Vuex);
 const api = {
   interface: `/api/train/class`,
   divide: `/api/train/class/divide`,
+  updateHeadTeacher: `/api/train/class/uptea`,
+  addStudent: id => `/api/train/class/upstuclass/${id} `, //id:班级id, ids:学生ID列表
 };
 const state = () => ({});
 const mutations = {};
@@ -36,6 +38,15 @@ const actions = {
     const res = await this.$axios.$post(`${api.divide}`, payload);
     return res;
   },
+  //手动分班
+  async addStudent({ commit }, { id, ids }) {
+    const res = await this.$axios.$post(`${api.addStudent(id)}`, ids);
+    return res;
+  },
+  async upHeadTea({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.updateHeadTeacher}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];

+ 5 - 0
store/student.js

@@ -7,6 +7,7 @@ const api = {
   interface: `/api/train/student`,
   noClass: '/api/train/student/seek',
   bedroom: `/api/train/student/findbedroom`,
+  removeClass: `/api/train/student/deleteclass`, //ids
 };
 const state = () => ({});
 const mutations = {};
@@ -40,6 +41,10 @@ const actions = {
     const res = await this.$axios.$get(`${api.bedroom}`, payload);
     return res;
   },
+  async removeClass({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.removeClass}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];

+ 6 - 0
store/tea-plan.js

@@ -7,6 +7,7 @@ const api = {
   interface: `/api/train/apply`,
   apply: `/api/train/apply/queryteacher`,
   divide: `/api/train/teaplan/divide`, //query: trainplanid
+  findTeacher: `/api/train/teaplan/findteacher`, //planid termid batchid
 };
 const state = () => ({});
 const mutations = {};
@@ -41,6 +42,11 @@ const actions = {
     const res = await this.$axios.$get(`${api.divide}`, payload);
     return res;
   },
+  async findTeacher({ commit }, payload) {
+    //payload是trainplanid
+    const res = await this.$axios.$get(`${api.findTeacher}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];