diff --git a/src/api/config.js b/src/api/config.js index 8035a778..28c9621b 100644 --- a/src/api/config.js +++ b/src/api/config.js @@ -2,11 +2,11 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-21 14:32:52 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-17 21:00:28 + * @LastEditTime: 2023-01-04 13:49:54 * @FilePath: /fe-manage/src/api/config.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ -import {message} from "ant-design-vue"; +import { message } from "ant-design-vue"; import axios from "axios"; import router from "@/router"; // import { getCookie } from '../api/method' @@ -15,12 +15,13 @@ import router from "@/router"; // axios.defaults.headers.post["Content-Type"] = // "application/x-www-form-urlencoded"; export const FILE_UPLOAD_URL = process.env.VUE_APP_BASE_API + '/file/upload' +export const BATCH_IMPORT_SCORE = process.env.VUE_APP_BASE_API + '/admin/offcourse/batchImportScore' axios.defaults.withCredentials = true; const http = axios.create({ baseURL: process.env.VUE_APP_BASE_API, timeout: 1000 * 15, // headers: { "Content-Type": "multipart/form-data" }, - headers: {"Content-Type": "application/json"}, + headers: { "Content-Type": "application/json" }, }); http.interceptors.request.use( @@ -50,14 +51,14 @@ http.interceptors.response.use( (response) => { // console.log('response', response) const { - data: {code, msg}, + data: { code, msg }, } = response; // console.log('code', code) if (code === 0 || code === 200) { return response; } else { if (code === 1000) { - process.env.NODE_ENV === 'development' ? router.push({path: 'login'}) : (window.location.href = process.env.VUE_APP_LOGIN_URL) + process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VUE_APP_LOGIN_URL) } console.log("api %o", msg); } diff --git a/src/api/index1.js b/src/api/index1.js index c45056c3..8e17b559 100644 --- a/src/api/index1.js +++ b/src/api/index1.js @@ -2,7 +2,7 @@ * @Author: lixg lixg@dongwu-inc.com * @Date: 2022-11-04 22:45:31 * @LastEditors: lixg lixg@dongwu-inc.com - * @LastEditTime: 2022-12-08 20:20:26 + * @LastEditTime: 2023-01-04 12:36:46 * @FilePath: /fe-manage/src/api/index1.js * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -44,7 +44,7 @@ import qs from "qs"; //上传文件 export const uploadFile = (obj) => - http.post("/test/testRequest", qs.stringify({obj})); + http.post("/test/testRequest", qs.stringify({ obj })); // 接口-请求 @@ -56,7 +56,7 @@ export const getLearnPath = (obj) => http.post("/admin/router/list", obj); export const handleLearnPath = (obj) => http.post("/admin/router/handle", obj); //获取路径图统计数据 export const getLearnCount = (routerId) => - http.get("/admin/router/getCount", {params: {routerId: routerId}}); + http.get("/admin/router/getCount", { params: { routerId: routerId } }); //新建或编辑关卡 export const editChapter = (obj) => http.post("/admin/router/editChapter", obj); @@ -111,7 +111,7 @@ export const searchUsersByOrgId = (obj) => http.post('/admin/router/searchUsersB //获取组织信息(修改版) export const getOrgInfo = (obj) => http.post('/admin/orgStruct/getOrgInfo', obj) -export const getOrgTreeInfo = (obj) => http.get('/org/initOrg', {params: obj}) +export const getOrgTreeInfo = (obj) => http.get('/org/initOrg', { params: obj }) //获取员工(修改版) export const getMemberInfo = (obj) => http.post('/admin/orgStruct/getMemberInfo', obj) //获取受众(修改版) @@ -121,7 +121,7 @@ export const optionAuthPerm = (obj) => http.post('/admin/AuthPerm/optionAuthPerm //获取学员列表 export const getStuList = (obj) => http.post('/admin/orgStruct/getStudentRef', obj) //获取用户登录 -export const getUser = () => http.post('/admin/CheckUser/login', {withCredentials: true}) +export const getUser = () => http.post('/admin/CheckUser/login', { withCredentials: true }) //公共信息--------------------------------------------------- //添加项目学员 @@ -133,7 +133,7 @@ export const addStudentCourse = (obj) => http.post("/admin/offcourse/addStudent" export const orgtree = () => http.get("/org/tree"); export const saveStu = obj => http.post("/admin/student/addStudent", obj); export const moveStudent = obj => http.post("/admin/student/moveStudent", obj); -export const getStuPage = obj => http.get("/admin/student/getStudent", {params: obj}); +export const getStuPage = obj => http.get("/admin/student/getStudent", { params: obj }); export const delStudentList = obj => http.post("/admin/student/delStudent", obj); export const validateName = obj => http.post("/admin/validate/validateName", obj); @@ -154,3 +154,7 @@ export const noticeList = (projectId) => // }) // export const choiceEvaluation = (obj) => http.post('/evaluation/choiceEvaluation', obj); + +// //面授课批量导入成绩 +export const batchImportScore = (offcoursePlanId, obj) => + http.post(`/admin/offcourse/batchImportScore?offcoursePlanId=${offcoursePlanId}`, obj); \ No newline at end of file diff --git a/src/components/drawers/ExportScore.vue b/src/components/drawers/ExportScore.vue index f782d44e..8848d054 100644 --- a/src/components/drawers/ExportScore.vue +++ b/src/components/drawers/ExportScore.vue @@ -25,11 +25,26 @@
点击或将文件拖拽到此处上传
+支持扩展名:.xls/.xlsx
+