Learn.Archives.Web/src/api/student.ts

85 lines
1.6 KiB
TypeScript

import { http } from "@/utils/http";
import { Res } from "@/utils/http/types";
// import type { Res } from "@/utils/http/types";
/**
* @description 导入表单
* @return {object}
*/
export function ImportTeacher(file: File) {
let formData = new FormData();
formData.append("file", file);
return http.request<any>(
"post",
`Student/ImportTeacher`,
{
data: formData
},
{
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
responseType: "blob"
}
);
}
/**
* @description 导入表单
* @return {object}
*/
export function ImportStudent(file: File) {
let formData = new FormData();
formData.append("file", file);
return http.request<any>(
"post",
`Student/Import`,
{
data: formData
},
{
headers: {
"Content-Type": "application/x-www-form-urlencoded"
},
responseType: "blob"
}
);
}
/**
* @description 修改学生拓展信息
* @return {object}
*/
export function EditStudent(data) {
return http.request<Res<any>>("post", `Student/EditInfo`, {
data
});
}
/**
* @description PageList
* @return {object}
*/
export function PageList(data) {
return http.request<Res<any>>("post", `Student/PageList`, {
data
});
}
/**
* @description StudentInfo
* @return {object}
*/
export function StudentInfo(uid) {
return http.request<Res<any>>("get", `Student/Info?uid=${uid}`);
}
/**
* @description 通过职位信息获取职位id
* @return {object}
*/
export function PosititonIds(data:any[]) {
return http.request<Res<number[]>>("post", `Student/PosititonIds`, {
data
});
}