|
@@ -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 = [];
|