feat:增加面授课成绩导入

This commit is contained in:
lixg
2023-01-04 15:04:21 +08:00
parent 9b3f9e47ee
commit 78119e4093
5 changed files with 130 additions and 22 deletions

View File

@@ -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);
}

View File

@@ -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);