lrf402788946 4 anni fa
parent
commit
1ebc4bba23
2 ha cambiato i file con 11 aggiunte e 0 eliminazioni
  1. 6 0
      store/student.js
  2. 5 0
      store/task.js

+ 6 - 0
store/student.js

@@ -15,6 +15,7 @@ const api = {
   computedIsFine: `/api/train/student/finestudent`,
   export: `/api/train/student/export`,
   printCert: `/api/train/student/printcert`,
+  schoolStudent: `/api/train/student/school`,
 };
 const state = () => ({});
 const mutations = {};
@@ -82,6 +83,11 @@ const actions = {
     const res = await this.$axios.$post(`${api.printCert}`, { ids: payload });
     return res;
   },
+  // 学校上传学生情况
+  async schoolStudent({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.schoolStudent}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];

+ 5 - 0
store/task.js

@@ -5,6 +5,7 @@ import axios from 'axios';
 Vue.use(Vuex);
 const api = {
   interface: `/api/train/task`,
+  export: `/api/train/task/export`,
 };
 const state = () => ({});
 const mutations = {};
@@ -30,6 +31,10 @@ const actions = {
     const res = await this.$axios.$delete(`${api.interface}/${payload}`);
     return res;
   },
+  async export({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.export}`, payload);
+    return res;
+  },
   async mergeRequest({ commit, dispatch }, { method, data }) {
     let toRequest = () => {
       let res = [];