From f80fcb7025b37c81e7a3d2b45a02dcd829b9caab Mon Sep 17 00:00:00 2001 From: yuk255 Date: Mon, 22 Sep 2025 22:26:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BD=9C=E4=B8=9A=E7=BC=96=E8=BE=91?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=9B=BF=E6=8D=A2;=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2,=E5=9B=9E=E6=98=BE=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/teachCourse.ts | 78 +- src/components/ExamPaperLibraryModal.vue | 10 +- src/components/MessageComponent.vue | 2 +- src/views/teacher/AdminDashboard.vue | 73 +- src/views/teacher/ExamPages/ExamLibrary.vue | 2 +- .../teacher/certificate/CertificateDetail.vue | 4 +- .../certificate/CertificateManagement.vue | 4 +- src/views/teacher/course/ChapterEditor.vue | 665 ++++++++---------- .../teacher/course/ChapterManagement.vue | 9 +- src/views/teacher/course/CourseDetail.vue | 4 +- src/views/teacher/course/CourseEditor.vue | 2 +- .../course/DiscussionRepliesManagement.vue | 17 +- .../statistics/StatisticsManagement.vue | 2 +- 13 files changed, 461 insertions(+), 411 deletions(-) diff --git a/src/api/modules/teachCourse.ts b/src/api/modules/teachCourse.ts index 0f2f2bb..2b9e716 100644 --- a/src/api/modules/teachCourse.ts +++ b/src/api/modules/teachCourse.ts @@ -505,6 +505,63 @@ export class TeachCourseApi { throw error } } + + /** + * 查询视频章节 + */ + static async getSectionVideo(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_video/${sectionId}`) + console.log('📑 查询小节绑定的视频响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的视频失败:', error) + throw error + } + } + + /** + * 查询文档章节 + */ + static async getSectionDocument(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_document/${sectionId}`) + console.log('📑 查询小节绑定的文档响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的文档失败:', error) + throw error + } + } + + /** + * 查询考试章节 + */ + static async getSectionExam(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_exam/${sectionId}`) + console.log('📑 查询小节绑定的考试响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的考试失败:', error) + throw error + } + } + + /** + * 查询作业章节 + */ + static async getSectionHomeWork(courseId:string,sectionId: string): Promise> { + try { + const response = await ApiRequest.get<{ result: any }>(`/aiol/aiolCourse/${courseId}/section_homework/${sectionId}`) + console.log('📑 查询小节绑定的作业响应:', response) + return response + } catch (error) { + console.error('❌ 查询小节绑定的作业失败:', error) + throw error + } + } + } // 作业相关类型定义 @@ -603,9 +660,9 @@ export class HomeworkApi { */ static async editHomework(data: EditHomeworkRequest): Promise> { try { - console.log('🚀 发送编辑作业请求:', { url: '/aiol/aiolHomework/edit', data }) + console.log('🚀 发送编辑作业请求:', { url: '/aiol/aiolHomework/teacher_edit', data }) - const response = await ApiRequest.put('/aiol/aiolHomework/edit', data) + const response = await ApiRequest.post('/aiol/aiolHomework/teacher_edit', data) console.log('✏️ 编辑作业响应:', response) return response @@ -1079,4 +1136,21 @@ class DiscussionApi { throw error } } + + /** + * 评论取消置顶 + */ + static async untopComment(commentId: string): Promise { + try { + console.log('🚀 发送评论取消置顶请求:', { url: `/aiol/aiolComment/untop/${commentId}`, commentId }) + + const response = await ApiRequest.get(`/aiol/aiolComment/untop/${commentId}`) + + console.log('👍 评论取消置顶响应:', response) + return response + } catch (error) { + console.error('❌ 评论取消置顶失败:', error) + throw error + } + } } \ No newline at end of file diff --git a/src/components/ExamPaperLibraryModal.vue b/src/components/ExamPaperLibraryModal.vue index 3ef559b..a57629b 100644 --- a/src/components/ExamPaperLibraryModal.vue +++ b/src/components/ExamPaperLibraryModal.vue @@ -16,7 +16,7 @@ -->
- +
已全部加载,共{{ totalCount }}份考试/练习 @@ -70,14 +70,14 @@
-
+