|
@@ -12,6 +12,8 @@ const api = {
|
|
|
util: `/api/train/util`,
|
|
|
taskupload: `/files/task/upload`,
|
|
|
exportExcel: `/api/train/exportExcel`,
|
|
|
+ schoolDownload: `/api/train/schoolDownload`,
|
|
|
+ schoolImport: `/api/train/schoolImport`,
|
|
|
};
|
|
|
const state = () => ({});
|
|
|
const mutations = {};
|
|
@@ -36,6 +38,14 @@ const actions = {
|
|
|
const res = await this.$axios.$post(`${api.exportExcel}`, payload);
|
|
|
return res;
|
|
|
},
|
|
|
+ async schoolDownload({ commit }, payload) {
|
|
|
+ const res = await this.$axios.$post(`${api.schoolDownload}`, payload);
|
|
|
+ return res;
|
|
|
+ },
|
|
|
+ async schoolImport({ commit }, payload) {
|
|
|
+ const res = await this.$axios.$post(`${api.schoolImport}`, { filepath: payload });
|
|
|
+ return res;
|
|
|
+ },
|
|
|
async upload({ commit }, { file, uri }) {
|
|
|
// const res = await this.$axios.$post(`${api.taskupload}`, payload, null, { 'Content-Type': 'multipart/form-data' });
|
|
|
let param = new FormData(); //创建form对象
|