diff --git a/src/api/examples/usage.ts b/src/api/examples/usage.ts index 0363f0d..64dbce6 100644 --- a/src/api/examples/usage.ts +++ b/src/api/examples/usage.ts @@ -93,13 +93,8 @@ export const searchCoursesExample = async () => { try { const response = await CourseApi.searchCourses({ keyword: 'Vue.js', - category: '前端开发', - level: 'intermediate', - price: 'paid', - rating: 4, - sortBy: 'newest', - page: 1, - pageSize: 10 + limit: '20', + page: 1 }) if (response.code === 200) { diff --git a/src/api/modules/course.ts b/src/api/modules/course.ts index 9d3a3e1..e8cdde2 100644 --- a/src/api/modules/course.ts +++ b/src/api/modules/course.ts @@ -23,7 +23,7 @@ import type { CourseComment, Quiz, LearningProgress, - SearchRequest, + Instructor, } from '../types' diff --git a/src/api/modules/exam.ts b/src/api/modules/exam.ts index 5a1865f..6732202 100644 --- a/src/api/modules/exam.ts +++ b/src/api/modules/exam.ts @@ -333,6 +333,422 @@ export class ExamApi { console.log('✅ 批量添加题目答案成功:', responses) return responses } + + // ========== 试卷管理相关接口 ========== + + /** + * 获取试卷列表 + */ + static async getExamPaperList(params: { + page?: number + pageSize?: number + keyword?: string + category?: string + status?: string + difficulty?: string + creator?: string + } = {}): Promise> { + console.log('🚀 获取试卷列表:', params) + const response = await ApiRequest.get<{ + result: { + records: any[] + total: number + current: number + size: number + } + }>('/aiol/aiolPaper/list', { params }) + console.log('✅ 获取试卷列表成功:', response) + return response + } + + /** + * 获取试卷详情 + */ + static async getExamPaperDetail(id: string): Promise> { + console.log('🚀 获取试卷详情:', id) + const response = await ApiRequest.get(`/aiol/aiolExam/paperDetail/${id}`) + console.log('✅ 获取试卷详情成功:', response) + return response + } + + /** + * 创建试卷 + */ + static async createExamPaper(data: { + name: string + category: string + description?: string + totalScore: number + difficulty: string + duration: number + questions: any[] + }): Promise> { + console.log('🚀 创建试卷:', data) + const response = await ApiRequest.post('/aiol/aiolPaper/add', data) + console.log('✅ 创建试卷成功:', response) + return response + } + + /** + * 更新试卷 + */ + static async updateExamPaper(id: string, data: { + name?: string + category?: string + description?: string + totalScore?: number + difficulty?: string + duration?: number + questions?: any[] + }): Promise> { + console.log('🚀 更新试卷:', { id, data }) + const response = await ApiRequest.put(`/aiol/aiolExam/paperUpdate/${id}`, data) + console.log('✅ 更新试卷成功:', response) + return response + } + + /** + * 删除试卷 + */ + static async deleteExamPaper(id: string): Promise> { + console.log('🚀 删除试卷:', id) + const response = await ApiRequest.delete(`/aiol/aiolExam/paperDelete/${id}`) + console.log('✅ 删除试卷成功:', response) + return response + } + + /** + * 批量删除试卷 + */ + static async batchDeleteExamPapers(ids: string[]): Promise> { + console.log('🚀 批量删除试卷:', ids) + const response = await ApiRequest.post('/aiol/aiolExam/paperBatchDelete', { ids }) + console.log('✅ 批量删除试卷成功:', response) + return response + } + + /** + * 发布试卷 + */ + static async publishExamPaper(id: string, data: { + startTime: string + endTime: string + classIds?: string[] + }): Promise> { + console.log('🚀 发布试卷:', { id, data }) + const response = await ApiRequest.post(`/aiol/aiolExam/paperPublish/${id}`, data) + console.log('✅ 发布试卷成功:', response) + return response + } + + /** + * 取消发布试卷 + */ + static async unpublishExamPaper(id: string): Promise> { + console.log('🚀 取消发布试卷:', id) + const response = await ApiRequest.post(`/aiol/aiolExam/paperUnpublish/${id}`) + console.log('✅ 取消发布试卷成功:', response) + return response + } + + /** + * 结束试卷 + */ + static async endExamPaper(id: string): Promise> { + console.log('🚀 结束试卷:', id) + const response = await ApiRequest.post(`/aiol/aiolExam/paperEnd/${id}`) + console.log('✅ 结束试卷成功:', response) + return response + } + + /** + * 导入试卷 + */ + static async importExamPaper(file: File): Promise> { + console.log('🚀 导入试卷:', file.name) + const formData = new FormData() + formData.append('file', file) + const response = await ApiRequest.post('/aiol/aiolExam/paperImport', formData, { + headers: { + 'Content-Type': 'multipart/form-data' + } + }) + console.log('✅ 导入试卷成功:', response) + return response + } + + /** + * 导出试卷 + */ + static async exportExamPaper(id: string): Promise> { + console.log('🚀 导出试卷:', id) + const response = await ApiRequest.get(`/aiol/aiolExam/paperExport/${id}`, { + responseType: 'blob' + }) + console.log('✅ 导出试卷成功:', response) + return response + } + + /** + * 批量导出试卷 + */ + static async batchExportExamPapers(ids: string[]): Promise> { + console.log('🚀 批量导出试卷:', ids) + const response = await ApiRequest.post('/aiol/aiolExam/paperBatchExport', { ids }, { + responseType: 'blob' + }) + console.log('✅ 批量导出试卷成功:', response) + return response + } + + /** + * 获取试卷分析数据 + */ + static async getExamPaperAnalysis(id: string): Promise + questionAnalysis: Array<{ + questionId: string + correctRate: number + averageScore: number + }> + }>> { + console.log('🚀 获取试卷分析:', id) + const response = await ApiRequest.get<{ + totalStudents: number + submittedCount: number + averageScore: number + passRate: number + scoreDistribution: Array<{ score: number; count: number }> + questionAnalysis: Array<{ + questionId: string + correctRate: number + averageScore: number + }> + }>(`/aiol/aiolExam/paperAnalysis/${id}`) + console.log('✅ 获取试卷分析成功:', response) + return response + } + + // ========== 阅卷中心相关接口 ========== + + /** + * 获取阅卷列表(考试列表) + */ + static async getMarkingList(params: { + page?: number + pageSize?: number + status?: 'all' | 'not-started' | 'in-progress' | 'completed' + examType?: string + className?: string + keyword?: string + } = {}): Promise> { + console.log('🚀 获取阅卷列表:', params) + const response = await ApiRequest.get<{ + result: { + list: any[] + total: number + page: number + pageSize: number + } + }>('/aiol/aiolExam/list', { params }) + console.log('✅ 获取阅卷列表成功:', response) + return response + } + + /** + * 获取考试统计信息 + */ + static async getExamStats(examId: string): Promise> { + console.log('🚀 获取考试统计:', { examId }) + const response = await ApiRequest.get<{ + totalStudents: number + submittedCount: number + gradedCount: number + averageScore: number + passRate: number + }>(`/aiol/aiolExam/stats/${examId}`) + console.log('✅ 获取考试统计成功:', response) + return response + } + + /** + * 获取学生答题列表 + */ + static async getStudentAnswers(examId: string, params: { + page?: number + pageSize?: number + status?: 'all' | 'submitted' | 'not-submitted' + className?: string + keyword?: string + } = {}): Promise> { + console.log('🚀 获取学生答题列表:', { examId, params }) + const response = await ApiRequest.get<{ + result: { + list: any[] + total: number + page: number + pageSize: number + } + }>(`/aiol/aiolExam/students/${examId}`, { params }) + console.log('✅ 获取学生答题列表成功:', response) + return response + } + + /** + * 获取学生答题详情 + */ + static async getStudentAnswerDetail(examId: string, studentId: string): Promise + correctAnswer: string[] + correctAnswerText?: string + explanation?: string + studentAnswer?: string[] + studentTextAnswer?: string + isCorrect?: boolean | null + studentScore?: number + }> + gradingComments?: string + }>> { + console.log('🚀 获取学生答题详情:', { examId, studentId }) + const response = await ApiRequest.get<{ + studentInfo: any + questions: any[] + gradingComments?: string + }>(`/aiol/aiolExam/student/${examId}/${studentId}/answer`) + console.log('✅ 获取学生答题详情成功:', response) + return response + } + + /** + * 批阅试卷 + */ + static async gradeExam(examId: string, studentId: string, data: { + questions: Array<{ + id: string + isCorrect: boolean | null + studentScore: number + }> + gradingComments?: string + totalScore: number + }): Promise> { + console.log('🚀 批阅试卷:', { examId, studentId, data }) + const response = await ApiRequest.post(`/aiol/aiolExam/grade/${examId}/${studentId}`, data) + console.log('✅ 批阅试卷成功:', response) + return response + } + + /** + * 获取班级列表(用于筛选) + */ + static async getClassList(): Promise>> { + console.log('🚀 获取班级列表') + try { + // 尝试多个可能的接口路径 + const possiblePaths = [ + '/aiol/aiolClass/list', + '/aiol/aiolClass/queryList', + '/aiol/aiolClass/page', + '/aiol/aiolClass/queryPage', + '/aiol/aiolExam/classes', + '/aiol/aiolExam/classList' + ] + + for (const path of possiblePaths) { + try { + console.log(`尝试接口路径: ${path}`) + const response = await ApiRequest.get>(path) + console.log(`✅ 获取班级列表成功 (${path}):`, response) + return response + } catch (pathError) { + console.warn(`接口 ${path} 不存在:`, pathError) + continue + } + } + + // 如果所有接口都不存在,返回空数组 + console.warn('所有班级列表接口都不存在,返回空数组') + return { + code: 200, + message: 'success', + data: [] + } + } catch (error) { + console.error('获取班级列表失败:', error) + throw error + } + } + + /** + * 导出考试结果 + */ + static async exportExamResults(examId: string, params: { + className?: string + status?: string + } = {}): Promise { + console.log('🚀 导出考试结果:', { examId, params }) + const response = await ApiRequest.get(`/aiol/aiolExam/export/${examId}`, { + params, + responseType: 'blob' + }) + console.log('✅ 导出考试结果成功:', response) + return response.data + } + + /** + * 发布补考 + */ + static async publishRetakeExam(examId: string, data: { + studentIds: string[] + retakeTime: string + retakeDuration: number + }): Promise> { + console.log('🚀 发布补考:', { examId, data }) + const response = await ApiRequest.post(`/aiol/aiolExam/retake/${examId}`, data) + console.log('✅ 发布补考成功:', response) + return response + } } export default ExamApi \ No newline at end of file diff --git a/src/components/admin/CourseComponents/CourseCategory.vue b/src/components/admin/CourseComponents/CourseCategory.vue index 43f63fb..b26ea01 100644 --- a/src/components/admin/CourseComponents/CourseCategory.vue +++ b/src/components/admin/CourseComponents/CourseCategory.vue @@ -416,11 +416,11 @@ const handleOfflineCourse = (course: CourseDisplayItem) => { name: course.name, description: course.description, status: 2, // 2=已结束状态 - pause_exit: '0', // 默认值 - allow_speed: '0', // 默认值 - show_subtitle: '0' // 默认值 + pause_exit: '1', + allow_speed: '1', + show_subtitle: '1' }; - + await TeachCourseApi.editCourse(updatedData); // 更新本地数据 diff --git a/src/components/admin/CourseComponents/CourseCreate.vue b/src/components/admin/CourseComponents/CourseCreate.vue index 6d94c84..74da6d1 100644 --- a/src/components/admin/CourseComponents/CourseCreate.vue +++ b/src/components/admin/CourseComponents/CourseCreate.vue @@ -188,6 +188,7 @@ import { import '@wangeditor/editor/dist/css/style.css' // @ts-ignore import { Editor, Toolbar } from '@wangeditor/editor-for-vue' +// import TeachCourseApi from '@/api/modules/teachCourse' const router = useRouter() const route = useRoute() diff --git a/src/views/teacher/ExamPages/AddExam.vue b/src/views/teacher/ExamPages/AddExam.vue index f9ee45d..c23a4f9 100644 --- a/src/views/teacher/ExamPages/AddExam.vue +++ b/src/views/teacher/ExamPages/AddExam.vue @@ -289,6 +289,7 @@ import TrueFalseQuestion from '@/components/teacher/TrueFalseQuestion.vue'; import FillBlankQuestion from '@/components/teacher/FillBlankQuestion.vue'; import ShortAnswerQuestion from '@/components/teacher/ShortAnswerQuestion.vue'; import CompositeQuestion from '@/components/teacher/CompositeQuestion.vue'; +import { ExamApi } from '@/api/modules/exam'; // 创建独立的 dialog API const { dialog } = createDiscreteApi(['dialog']) @@ -998,7 +999,7 @@ const getQuestionTypeFromString = (typeString: string) => { }; // 保存试卷 -const saveExam = () => { +const saveExam = async () => { // 验证数据 if (!examForm.title.trim()) { dialog.warning({ @@ -1035,13 +1036,68 @@ const saveExam = () => { return; } - // 这里实现保存逻辑 - console.log('保存试卷数据:', examForm); - dialog.success({ - title: '保存成功', - content: '试卷保存成功!', - positiveText: '确定' - }); + try { + // 准备API数据 + const apiData = { + name: examForm.title, + category: examForm.type === 1 ? '考试' : '练习', + description: examForm.description || '', + totalScore: examForm.totalScore, + difficulty: getDifficultyLevel(examForm.totalScore), + duration: examForm.duration, + questions: formatQuestionsForAPI(examForm.questions) + }; + + console.log('🚀 准备保存试卷数据:', apiData); + + // 调用API创建试卷 + const response = await ExamApi.createExamPaper(apiData); + console.log('✅ 创建试卷成功:', response); + + dialog.success({ + title: '保存成功', + content: '试卷保存成功!', + positiveText: '确定', + onPositiveClick: () => { + // 保存成功后返回试卷列表页面 + router.back(); + } + }); + } catch (error) { + console.error('创建试卷失败:', error); + dialog.error({ + title: '保存失败', + content: '试卷保存失败,请重试', + positiveText: '确定' + }); + } +} + +// 根据总分计算难度等级 +const getDifficultyLevel = (totalScore: number): string => { + if (totalScore <= 60) return 'easy'; + if (totalScore <= 100) return 'medium'; + return 'hard'; +} + +// 格式化题目数据为API需要的格式 +const formatQuestionsForAPI = (questions: any[]): any[] => { + return questions.map((bigQuestion, index) => ({ + id: bigQuestion.id, + title: bigQuestion.title, + description: bigQuestion.description, + sort: index + 1, + totalScore: bigQuestion.totalScore, + subQuestions: bigQuestion.subQuestions.map((subQuestion: any, subIndex: number) => ({ + id: subQuestion.id, + title: subQuestion.title, + type: subQuestion.type, + options: subQuestion.options || [], + correctAnswer: subQuestion.correctAnswer, + score: subQuestion.score, + sort: subIndex + 1 + })) + })); } // 预览试卷 diff --git a/src/views/teacher/ExamPages/ExamLibrary.vue b/src/views/teacher/ExamPages/ExamLibrary.vue index 5abe838..59e1752 100644 --- a/src/views/teacher/ExamPages/ExamLibrary.vue +++ b/src/views/teacher/ExamPages/ExamLibrary.vue @@ -7,28 +7,29 @@ 导入 导出 删除 - - 搜索 + + 搜索 - + \ No newline at end of file diff --git a/src/views/teacher/course/ChapterEditor.vue b/src/views/teacher/course/ChapterEditor.vue index 478a72b..012c8d3 100644 --- a/src/views/teacher/course/ChapterEditor.vue +++ b/src/views/teacher/course/ChapterEditor.vue @@ -320,20 +320,6 @@ const isMobile = ref(false); const isTablet = ref(false); const sidebarCollapsed = ref(false); -// 定义section的类型 -interface Section { - id: number; - lessonName: string; - coursewareName: string; - coursewareUploadOption: string; - coursewareFiles: any[]; - selectedExamOption: string; - homeworkName: string; - uploadedFiles: any[]; - homeworkFiles: any[]; - contentTitle: string; - contentDescription: string; -} // 定义章节的类型 interface Chapter { @@ -665,7 +651,7 @@ const addChapter = async () => { const response = await ChapterApi.createChapter(chapterData); console.log('🔍 创建章节API完整响应:', response); - console.log('🔍 响应状态:', response.status); + console.log('🔍 响应状态:', response.code); console.log('🔍 响应数据:', response.data); console.log('🔍 响应成功标志:', response.data?.success); console.log('🔍 响应消息:', response.data?.message); @@ -764,7 +750,7 @@ const saveChapter = async () => { const response = await ChapterApi.editChapter(chapterData); console.log('🔍 编辑章节完整响应:', response); - console.log('🔍 响应状态:', response.status); + console.log('🔍 响应状态:', response.code); console.log('🔍 响应数据:', response.data); console.log('🔍 响应成功标志:', response.data?.success); console.log('🔍 响应消息:', response.data?.message); @@ -852,7 +838,7 @@ const saveSection = async (section: any) => { // 调用编辑API保存节 const response = await ChapterApi.editChapter(sectionData); console.log('🔍 编辑节完整响应:', response); - console.log('🔍 响应状态:', response.status); + console.log('🔍 响应状态:', response.code); console.log('🔍 响应数据:', response.data); console.log('🔍 响应成功标志:', response.data?.success); console.log('🔍 响应消息:', response.data?.message); @@ -1046,27 +1032,18 @@ const loadChapters = async () => { console.log('🔍 完整API响应:', response); console.log('🔍 响应数据:', response.data); - console.log('🔍 响应状态:', response.status); + console.log('🔍 响应状态:', response.code); console.log('🔍 响应数据类型:', typeof response.data); console.log('🔍 响应数据是否为数组:', Array.isArray(response.data)); - // 处理不同的API响应结构 + // 处理API响应结构 let chapterData = null; - if (response.data && response.data.success && response.data.result) { - chapterData = response.data.result; - console.log('✅ 从服务器加载的章节数据 (result):', chapterData); - } else if (response.data && response.data.list) { + if (response.data && response.data.list) { chapterData = response.data.list; console.log('✅ 从服务器加载的章节数据 (list):', chapterData); - } else if (response.data && response.data.data && response.data.data.list) { - chapterData = response.data.data.list; - console.log('✅ 从服务器加载的章节数据 (data.list):', chapterData); } else if (Array.isArray(response.data)) { chapterData = response.data; console.log('✅ 从服务器加载的章节数据 (array):', chapterData); - } else if (response.data && Array.isArray(response.data)) { - chapterData = response.data; - console.log('✅ 从服务器加载的章节数据 (direct array):', chapterData); } if (chapterData && Array.isArray(chapterData)) { @@ -1083,7 +1060,7 @@ const loadChapters = async () => { console.log('📖 节数据:', sectionsData); // 构建章节结构 - chaptersData.forEach((chapterData: any, index: number) => { + chaptersData.forEach((chapterData: any) => { const chapter: Chapter = { id: chapterData.id, name: chapterData.name, diff --git a/src/views/teacher/course/ChapterManagement.vue b/src/views/teacher/course/ChapterManagement.vue index e9598c9..7ea2874 100644 --- a/src/views/teacher/course/ChapterManagement.vue +++ b/src/views/teacher/course/ChapterManagement.vue @@ -69,7 +69,7 @@ import type { DataTableColumns } from 'naive-ui' import { useRouter, useRoute } from 'vue-router' import ImportModal from '@/components/common/ImportModal.vue' import { ChapterApi } from '@/api' -import type { ChapterQueryParams, CourseSection } from '@/api/types' +import type { ChapterQueryParams } from '@/api/types' import { useUserStore } from '@/stores/user' const router = useRouter() diff --git a/tatus --porcelain b/tatus --porcelain new file mode 100644 index 0000000..29dce84 --- /dev/null +++ b/tatus --porcelain @@ -0,0 +1,194 @@ +diff --git a/src/api/examples/usage.ts b/src/api/examples/usage.ts +index 0363f0d..64dbce6 100644 +--- a/src/api/examples/usage.ts ++++ b/src/api/examples/usage.ts +@@ -93,13 +93,8 @@ export const searchCoursesExample = async () => { + try { + const response = await CourseApi.searchCourses({ + keyword: 'Vue.js', +- category: '前端开发', +- level: 'intermediate', +- price: 'paid', +- rating: 4, +- sortBy: 'newest', +- page: 1, +- pageSize: 10 ++ limit: '20', ++ page: 1 + }) +  + if (response.code === 200) { +diff --git a/src/api/modules/course.ts b/src/api/modules/course.ts +index 9d3a3e1..e8cdde2 100644 +--- a/src/api/modules/course.ts ++++ b/src/api/modules/course.ts +@@ -23,7 +23,7 @@ import type { + CourseComment, + Quiz, + LearningProgress, +- SearchRequest, ++ + Instructor, + } from '../types' +  +diff --git a/src/api/modules/exam.ts b/src/api/modules/exam.ts +index 5a1865f..f7be93a 100644 +--- a/src/api/modules/exam.ts ++++ b/src/api/modules/exam.ts +@@ -333,6 +333,420 @@ export class ExamApi { + console.log('✅ 批量添加题目答案成功:', responses) + return responses + } ++ ++ // ========== 试卷管理相关接口 ========== ++ ++ /** ++ * 获取试卷列表 ++ */ ++ static async getExamPaperList(params: { ++ page?: number ++ pageSize?: number ++ keyword?: string ++ category?: string ++ status?: string ++ difficulty?: string ++ creator?: string ++ } = {}): Promise> { ++ console.log('🚀 获取试卷列表:', params) ++ const response = await ApiRequest.get<{ ++ result: { ++ records: any[] ++ total: number ++ current: number ++ size: number ++ } ++ }>('/aiol/aiolPaper/list', { params }) ++ console.log('✅ 获取试卷列表成功:', response) ++ return response ++ } ++ ++ /** ++ * 获取试卷详情 ++ */ ++ static async getExamPaperDetail(id: string): Promise> { ++ console.log('🚀 获取试卷详情:', id) ++ const response = await ApiRequest.get(`/aiol/aiolExam/paperDetail/${id}`) ++ console.log('✅ 获取试卷详情成功:', response) ++ return response ++ } ++ ++ /** ++ * 创建试卷 ++ */ ++ static async createExamPaper(data: { ++ name: string ++ category: string ++ description?: string ++ totalScore: number ++ difficulty: string ++ duration: number ++ questions: any[] ++ }): Promise> { ++ console.log('🚀 创建试卷:', data) ++ const response = await ApiRequest.post('/aiol/aiolPaper/add', data) ++ console.log('✅ 创建试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 更新试卷 ++ */ ++ static async updateExamPaper(id: string, data: { ++ name?: string ++ category?: string ++ description?: string ++ totalScore?: number ++ difficulty?: string ++ duration?: number ++ questions?: any[] ++ }): Promise> { ++ console.log('🚀 更新试卷:', { id, data }) ++ const response = await ApiRequest.put(`/aiol/aiolExam/paperUpdate/${id}`, data) ++ console.log('✅ 更新试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 删除试卷 ++ */ ++ static async deleteExamPaper(id: string): Promise> { ++ console.log('🚀 删除试卷:', id) ++ const response = await ApiRequest.delete(`/aiol/aiolExam/paperDelete/${id}`) ++ console.log('✅ 删除试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 批量删除试卷 ++ */ ++ static async batchDeleteExamPapers(ids: string[]): Promise> { ++ console.log('🚀 批量删除试卷:', ids) ++ const response = await ApiRequest.post('/aiol/aiolExam/paperBatchDelete', { ids }) ++ console.log('✅ 批量删除试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 发布试卷 ++ */ ++ static async publishExamPaper(id: string, data: { ++ startTime: string ++ endTime: string ++ classIds?: string[] ++ }): Promise> { ++ console.log('🚀 发布试卷:', { id, data }) ++ const response = await ApiRequest.post(`/aiol/aiolExam/paperPublish/${id}`, data) ++ console.log('✅ 发布试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 取消发布试卷 ++ */ ++ static async unpublishExamPaper(id: string): Promise> { ++ console.log('🚀 取消发布试卷:', id) ++ const response = await ApiRequest.post(`/aiol/aiolExam/paperUnpublish/${id}`) ++ console.log('✅ 取消发布试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 结束试卷 ++ */ ++ static async endExamPaper(id: string): Promise> { ++ console.log('🚀 结束试卷:', id) ++ const response = await ApiRequest.post(`/aiol/aiolExam/paperEnd/${id}`) ++ console.log('✅ 结束试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 导入试卷 ++ */ ++ static async importExamPaper(file: File): Promise> { ++ console.log('🚀 导入试卷:', file.name) ++ const formData = new FormData() ++ formData.append('file', file) ++ const response = await ApiRequest.post('/aiol/aiolExam/paperImport', formData, { ++ headers: { ++ 'Content-Type': 'multipart/form-data' ++ } ++ }) ++ console.log('✅ 导入试卷成功:', response) ++ return response ++ } ++ ++ /** ++ * 导出试卷 ++ */ ++ static async exportE \ No newline at end of file