From 26a1b003cd8bac0885d70b17a5811f64adecec1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=82=A5=E7=BE=8A?= <1048382248@qq.com> Date: Fri, 22 Aug 2025 19:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/student.ts | 53 ++++++ src/views/student/edit.vue | 323 ++++++++++++++++-------------------- src/views/student/index.vue | 96 +++++------ 3 files changed, 234 insertions(+), 238 deletions(-) create mode 100644 src/api/student.ts diff --git a/src/api/student.ts b/src/api/student.ts new file mode 100644 index 0000000..42b36c3 --- /dev/null +++ b/src/api/student.ts @@ -0,0 +1,53 @@ +import { http } from "@/utils/http"; +import { Res } from "@/utils/http/types"; +// import type { Res } from "@/utils/http/types"; + +/** + * @description 导入表单 + * @return {object} + */ +export function ImportExamInfo(id: number, file: File) { + let formData = new FormData(); + formData.append("eId", id.toString()); + formData.append("file", file); + return http.request( + "post", + `ExamClassInfo/Import`, + { + data: formData + }, + { + headers: { + "Content-Type": "application/x-www-form-urlencoded" + }, + responseType: "blob" + } + ); +} + +/** + * @description 修改学生拓展信息 + * @return {object} + */ +export function EditStudent(data) { + return http.request>("post", `Student/EditInfo`, { + data + }); +} + +/** + * @description 修改学生拓展信息 + * @return {object} + */ +export function PageList(data) { + return http.request>("post", `Student/PageList`, { + data + }); +} +/** + * @description 获取学生拓展信息 + * @return {object} + */ +export function StudentInfo(uid) { + return http.request>("get", `Student/Info?uid=${uid}`); +} diff --git a/src/views/student/edit.vue b/src/views/student/edit.vue index 44ea81b..bf52070 100644 --- a/src/views/student/edit.vue +++ b/src/views/student/edit.vue @@ -1,31 +1,6 @@