diff --git a/.claude/settings.local.json b/.claude/settings.local.json index 4f9b308..4ffc571 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -4,7 +4,8 @@ "Bash(mvn compile:*)", "Bash(sed:*)", "Bash(grep:*)", - "Bash(export:*)" + "Bash(export:*)", + "Bash(git:*)" ] } } diff --git a/reading-platform-frontend/src/components/course-edit/Step1BasicInfo.vue b/reading-platform-frontend/src/components/course-edit/Step1BasicInfo.vue index 345cac2..f346e1f 100644 --- a/reading-platform-frontend/src/components/course-edit/Step1BasicInfo.vue +++ b/reading-platform-frontend/src/components/course-edit/Step1BasicInfo.vue @@ -133,7 +133,7 @@ import type { Theme } from '@/api/theme'; interface BasicInfoData { name: string; - themeId: number | undefined; + themeId: number | string | undefined; grades: string[]; pictureBookName: string; coreContent: string; diff --git a/reading-platform-frontend/src/components/course-edit/Step4IntroLesson.vue b/reading-platform-frontend/src/components/course-edit/Step4IntroLesson.vue index c2a8a3f..1e06a62 100644 --- a/reading-platform-frontend/src/components/course-edit/Step4IntroLesson.vue +++ b/reading-platform-frontend/src/components/course-edit/Step4IntroLesson.vue @@ -63,7 +63,7 @@ import { getLessonByType, createLesson, updateLesson, deleteLesson as deleteLess import { parseAssessmentDataForDisplay } from '@/utils/assessmentData'; interface Props { - courseId: number; + courseId: number | string; } const props = defineProps(); diff --git a/reading-platform-frontend/src/components/course-edit/Step5CollectiveLesson.vue b/reading-platform-frontend/src/components/course-edit/Step5CollectiveLesson.vue index f3a0406..b0a19cc 100644 --- a/reading-platform-frontend/src/components/course-edit/Step5CollectiveLesson.vue +++ b/reading-platform-frontend/src/components/course-edit/Step5CollectiveLesson.vue @@ -63,7 +63,7 @@ import { getLessonByType, createLesson as createLessonApi, updateLesson, deleteL import { parseAssessmentDataForDisplay } from '@/utils/assessmentData'; interface Props { - courseId: number; + courseId: number | string; courseName: string; } diff --git a/reading-platform-frontend/src/components/course-edit/Step6DomainLessons.vue b/reading-platform-frontend/src/components/course-edit/Step6DomainLessons.vue index 51461db..83d702e 100644 --- a/reading-platform-frontend/src/components/course-edit/Step6DomainLessons.vue +++ b/reading-platform-frontend/src/components/course-edit/Step6DomainLessons.vue @@ -106,7 +106,7 @@ interface DomainConfig { } interface Props { - courseId: number; + courseId: number | string; courseName: string; } diff --git a/reading-platform-frontend/src/components/course/LessonConfigPanel.vue b/reading-platform-frontend/src/components/course/LessonConfigPanel.vue index 02ca34b..03c78d9 100644 --- a/reading-platform-frontend/src/components/course/LessonConfigPanel.vue +++ b/reading-platform-frontend/src/components/course/LessonConfigPanel.vue @@ -200,7 +200,7 @@ import LessonStepsEditor from './LessonStepsEditor.vue'; import type { StepData } from './LessonStepsEditor.vue'; export interface LessonData { - id?: number; + id?: number | string; tempId?: string; lessonType: string; name: string; diff --git a/reading-platform-frontend/src/components/course/LessonStepsEditor.vue b/reading-platform-frontend/src/components/course/LessonStepsEditor.vue index 14c7f2d..86043a8 100644 --- a/reading-platform-frontend/src/components/course/LessonStepsEditor.vue +++ b/reading-platform-frontend/src/components/course/LessonStepsEditor.vue @@ -95,7 +95,7 @@ import { } from '@ant-design/icons-vue'; export interface StepData { - id?: number; + id?: number | string; tempId?: string; name: string; content: string; diff --git a/reading-platform-frontend/src/views/admin/collections/CollectionListView.vue b/reading-platform-frontend/src/views/admin/collections/CollectionListView.vue index 0ab9d57..7497f05 100644 --- a/reading-platform-frontend/src/views/admin/collections/CollectionListView.vue +++ b/reading-platform-frontend/src/views/admin/collections/CollectionListView.vue @@ -163,7 +163,7 @@ const fetchData = async () => { ...(filters.status ? { status: filters.status } : {}), }); dataSource.value = data.items; - pagination.total = data.total; + pagination.total = Number(data.total); } catch (error) { console.error('获取套餐列表失败', error); message.error('获取套餐列表失败'); diff --git a/reading-platform-frontend/src/views/admin/courses/CourseListView.vue b/reading-platform-frontend/src/views/admin/courses/CourseListView.vue index 1babe60..98e590c 100644 --- a/reading-platform-frontend/src/views/admin/courses/CourseListView.vue +++ b/reading-platform-frontend/src/views/admin/courses/CourseListView.vue @@ -267,7 +267,7 @@ const fetchCourses = async () => { // API 已统一返回 { items, total, page, pageSize } courses.value = (data as any).items || []; - pagination.total = (data as any).total || 0; + pagination.total = Number((data as any).total) || 0; console.log('📊 课程列表数据:', courses.value, '总数:', pagination.total); } catch (error) { console.error('获取课程包列表失败:', error); diff --git a/reading-platform-frontend/src/views/admin/courses/CourseReviewView.vue b/reading-platform-frontend/src/views/admin/courses/CourseReviewView.vue index b9b9406..20c2219 100644 --- a/reading-platform-frontend/src/views/admin/courses/CourseReviewView.vue +++ b/reading-platform-frontend/src/views/admin/courses/CourseReviewView.vue @@ -250,7 +250,7 @@ const fetchCourses = async () => { // 已驳回的课程不显示「通过」,待审核的默认通过(能提交的已过基本验证) validationPassed: item.status !== 'REJECTED', })); - pagination.total = data.total || 0; + pagination.total = Number(data.total) || 0; } catch (error) { console.error('获取审核列表失败:', error); message.error('获取审核列表失败'); diff --git a/reading-platform-frontend/src/views/admin/courses/components/Step1BasicInfo.vue b/reading-platform-frontend/src/views/admin/courses/components/Step1BasicInfo.vue index 4ba0ace..07fa3f2 100644 --- a/reading-platform-frontend/src/views/admin/courses/components/Step1BasicInfo.vue +++ b/reading-platform-frontend/src/views/admin/courses/components/Step1BasicInfo.vue @@ -130,7 +130,7 @@ import type { Theme } from '@/api/theme'; interface BasicInfoData { name: string; - themeId: number | undefined; + themeId: number | string | undefined; grades: string[]; pictureBookName: string; coreContent: string; diff --git a/reading-platform-frontend/src/views/admin/courses/components/Step4IntroLesson.vue b/reading-platform-frontend/src/views/admin/courses/components/Step4IntroLesson.vue index 99f2879..699900e 100644 --- a/reading-platform-frontend/src/views/admin/courses/components/Step4IntroLesson.vue +++ b/reading-platform-frontend/src/views/admin/courses/components/Step4IntroLesson.vue @@ -58,7 +58,7 @@ import type { LessonData } from '@/components/course/LessonConfigPanel.vue'; import { getLessonByType, createLesson, updateLesson, deleteLesson as deleteLessonApi } from '@/api/lesson'; interface Props { - courseId: number; + courseId: number | string; } const props = defineProps(); diff --git a/reading-platform-frontend/src/views/admin/courses/components/Step5CollectiveLesson.vue b/reading-platform-frontend/src/views/admin/courses/components/Step5CollectiveLesson.vue index d8c9cb2..98a3c14 100644 --- a/reading-platform-frontend/src/views/admin/courses/components/Step5CollectiveLesson.vue +++ b/reading-platform-frontend/src/views/admin/courses/components/Step5CollectiveLesson.vue @@ -58,7 +58,7 @@ import type { LessonData } from '@/components/course/LessonConfigPanel.vue'; import { getLessonByType, createLesson as createLessonApi, updateLesson, deleteLesson as deleteLessonApi } from '@/api/lesson'; interface Props { - courseId: number; + courseId: number | string; courseName: string; } diff --git a/reading-platform-frontend/src/views/admin/courses/components/Step6DomainLessons.vue b/reading-platform-frontend/src/views/admin/courses/components/Step6DomainLessons.vue index 4b86b96..fa22017 100644 --- a/reading-platform-frontend/src/views/admin/courses/components/Step6DomainLessons.vue +++ b/reading-platform-frontend/src/views/admin/courses/components/Step6DomainLessons.vue @@ -101,7 +101,7 @@ interface DomainConfig { } interface Props { - courseId: number; + courseId: number | string; courseName: string; } diff --git a/reading-platform-frontend/src/views/admin/packages/PackageReviewView.vue b/reading-platform-frontend/src/views/admin/packages/PackageReviewView.vue index 31061b3..4bd4591 100644 --- a/reading-platform-frontend/src/views/admin/packages/PackageReviewView.vue +++ b/reading-platform-frontend/src/views/admin/packages/PackageReviewView.vue @@ -218,7 +218,7 @@ const fetchPackages = async () => { pageSize: pagination.pageSize, }) as any; packages.value = res.list || []; - pagination.total = res.total || 0; + pagination.total = Number(res.total) || 0; } catch (error) { console.error('获取套餐列表失败:', error); message.error('获取套餐列表失败'); diff --git a/reading-platform-frontend/src/views/admin/resources/ResourceListView.vue b/reading-platform-frontend/src/views/admin/resources/ResourceListView.vue index 3d94616..8d64112 100644 --- a/reading-platform-frontend/src/views/admin/resources/ResourceListView.vue +++ b/reading-platform-frontend/src/views/admin/resources/ResourceListView.vue @@ -511,7 +511,7 @@ const fetchItems = async () => { ...filters, }); items.value = result?.list ?? []; - pagination.total = result?.total ?? 0; + pagination.total = Number(result?.total) ?? 0; } catch (error) { message.error('获取资源列表失败'); } finally { diff --git a/reading-platform-frontend/src/views/admin/tenants/TenantListView.vue b/reading-platform-frontend/src/views/admin/tenants/TenantListView.vue index cdaaa68..0a87894 100644 --- a/reading-platform-frontend/src/views/admin/tenants/TenantListView.vue +++ b/reading-platform-frontend/src/views/admin/tenants/TenantListView.vue @@ -483,7 +483,7 @@ const loadData = async () => { collectionId: searchForm.collectionId, }); tenants.value = res.list; - pagination.total = res.total; + pagination.total = Number(res.total); } catch (error) { console.error('加载租户列表失败', error); } finally { diff --git a/reading-platform-frontend/src/views/school/classes/ClassListView.vue b/reading-platform-frontend/src/views/school/classes/ClassListView.vue index 1534ee5..2f9d1dd 100644 --- a/reading-platform-frontend/src/views/school/classes/ClassListView.vue +++ b/reading-platform-frontend/src/views/school/classes/ClassListView.vue @@ -569,7 +569,7 @@ const loadClassStudents = async (classId: number) => { pageSize: studentsPagination.pageSize, }); classStudents.value = result.list; - studentsPagination.total = result.total; + studentsPagination.total = Number(result.total); } catch (error) { console.error('Failed to load class students:', error); } finally { diff --git a/reading-platform-frontend/src/views/school/courses/CourseListView.vue b/reading-platform-frontend/src/views/school/courses/CourseListView.vue index 8ea2c29..e216b80 100644 --- a/reading-platform-frontend/src/views/school/courses/CourseListView.vue +++ b/reading-platform-frontend/src/views/school/courses/CourseListView.vue @@ -246,7 +246,7 @@ const loading = ref(false); const authLoading = ref(false); const authModalVisible = ref(false); const searchKeyword = ref(''); -const selectedCourseIds = ref([]); +const selectedCourseIds = ref<(number | string)[]>([]); // 筛选条件(参考教师端) const filters = reactive({ @@ -401,7 +401,7 @@ const searchCourses = () => { }, 500); }; -const toggleCourseSelection = (id: number) => { +const toggleCourseSelection = (id: number | string) => { const index = selectedCourseIds.value.indexOf(id); if (index > -1) { selectedCourseIds.value.splice(index, 1); diff --git a/reading-platform-frontend/src/views/school/feedback/FeedbackView.vue b/reading-platform-frontend/src/views/school/feedback/FeedbackView.vue index 655b9c2..7bf5491 100644 --- a/reading-platform-frontend/src/views/school/feedback/FeedbackView.vue +++ b/reading-platform-frontend/src/views/school/feedback/FeedbackView.vue @@ -330,7 +330,7 @@ const fetchFeedbacks = async () => { teacherId: filters.teacherId, }); feedbacks.value = result.list; - pagination.total = result.total; + pagination.total = Number(result.total); } catch (error) { message.error('获取反馈列表失败'); } finally { diff --git a/reading-platform-frontend/src/views/school/parents/ParentListView.vue b/reading-platform-frontend/src/views/school/parents/ParentListView.vue index 52e35e0..242c5b2 100644 --- a/reading-platform-frontend/src/views/school/parents/ParentListView.vue +++ b/reading-platform-frontend/src/views/school/parents/ParentListView.vue @@ -449,7 +449,7 @@ const loadParents = async () => { keyword: searchKeyword.value || undefined, }); parents.value = result.list; - pagination.total = result.total; + pagination.total = Number(result.total); } catch (error) { console.error('Failed to load parents:', error); } finally { @@ -684,7 +684,7 @@ const loadStudentsForSelect = async () => { classId: studentClassFilter.value || undefined, }); studentTableData.value = result.list; - studentPagination.total = result.total; + studentPagination.total = Number(result.total); } catch (error) { console.error('Failed to load students:', error); studentTableData.value = []; diff --git a/reading-platform-frontend/src/views/school/settings/OperationLogView.vue b/reading-platform-frontend/src/views/school/settings/OperationLogView.vue index 1fa6e30..8b5e607 100644 --- a/reading-platform-frontend/src/views/school/settings/OperationLogView.vue +++ b/reading-platform-frontend/src/views/school/settings/OperationLogView.vue @@ -219,7 +219,7 @@ const loadLogs = async () => { ...filters, }); logs.value = res.list; - pagination.total = res.total; + pagination.total = Number(res.total); } catch (error) { message.error('加载日志失败'); } finally { @@ -241,7 +241,7 @@ const loadModules = async () => { const loadStats = async () => { try { const res = await getOperationLogStats(filters.startDate, filters.endDate); - stats.total = res.total; + stats.total = Number(res.total); stats.modules = res.modules || []; } catch (error) { console.error('加载统计失败', error); diff --git a/reading-platform-frontend/src/views/school/students/StudentListView.vue b/reading-platform-frontend/src/views/school/students/StudentListView.vue index 15a4ce8..3ff003c 100644 --- a/reading-platform-frontend/src/views/school/students/StudentListView.vue +++ b/reading-platform-frontend/src/views/school/students/StudentListView.vue @@ -444,7 +444,7 @@ const loadStudents = async () => { keyword: searchKeyword.value || undefined, }); students.value = result.list; - pagination.total = result.total; + pagination.total = Number(result.total); } catch (error) { console.error('Failed to load students:', error); } finally { diff --git a/reading-platform-frontend/src/views/school/teachers/TeacherListView.vue b/reading-platform-frontend/src/views/school/teachers/TeacherListView.vue index 3223f33..25b68da 100644 --- a/reading-platform-frontend/src/views/school/teachers/TeacherListView.vue +++ b/reading-platform-frontend/src/views/school/teachers/TeacherListView.vue @@ -329,7 +329,7 @@ const loadTeachers = async () => { keyword: searchKeyword.value || undefined, }); teachers.value = result.list; - pagination.total = result.total; + pagination.total = Number(result.total); } catch (error) { console.error('Failed to load teachers:', error); } finally { diff --git a/reading-platform-frontend/src/views/teacher/courses/CourseListView.vue b/reading-platform-frontend/src/views/teacher/courses/CourseListView.vue index 6a42a5c..85fbd75 100644 --- a/reading-platform-frontend/src/views/teacher/courses/CourseListView.vue +++ b/reading-platform-frontend/src/views/teacher/courses/CourseListView.vue @@ -322,7 +322,7 @@ const loadCourses = async () => { pictureUrl: item.coverImagePath ?? item.pictureUrl, }; }); - pagination.total = data.total || 0; + pagination.total = Number(data.total) || 0; } catch (error: any) { message.error(error.message || '获取课程列表失败'); } finally { diff --git a/reading-platform-frontend/src/views/teacher/courses/PrepareModeView.vue b/reading-platform-frontend/src/views/teacher/courses/PrepareModeView.vue index 0611661..1213c99 100644 --- a/reading-platform-frontend/src/views/teacher/courses/PrepareModeView.vue +++ b/reading-platform-frontend/src/views/teacher/courses/PrepareModeView.vue @@ -109,7 +109,7 @@ const loading = ref(false); // 导航状态 const selectedSection = ref<'overview' | 'lesson'>('overview'); -const selectedLessonId = ref(null); +const selectedLessonId = ref(null); const selectedItem = ref('basic'); const selectedStep = ref(null); diff --git a/reading-platform-frontend/src/views/teacher/courses/components/LessonCard.vue b/reading-platform-frontend/src/views/teacher/courses/components/LessonCard.vue index 43eadb5..7470d18 100644 --- a/reading-platform-frontend/src/views/teacher/courses/components/LessonCard.vue +++ b/reading-platform-frontend/src/views/teacher/courses/components/LessonCard.vue @@ -88,7 +88,7 @@ import { const props = defineProps<{ lesson: any; - courseId: number; + courseId: number | string; lessonType: string; index: number; }>(); diff --git a/reading-platform-frontend/src/views/teacher/courses/components/PrepareNavigation.vue b/reading-platform-frontend/src/views/teacher/courses/components/PrepareNavigation.vue index cbfd0e2..87935f7 100644 --- a/reading-platform-frontend/src/views/teacher/courses/components/PrepareNavigation.vue +++ b/reading-platform-frontend/src/views/teacher/courses/components/PrepareNavigation.vue @@ -278,7 +278,7 @@ const props = defineProps<{ course: any; lessons: any[]; selectedSection: 'overview' | 'lesson'; - selectedLessonId: number | null; + selectedLessonId: number | string | null; selectedItem: string; }>(); diff --git a/reading-platform-frontend/src/views/teacher/courses/components/SelectLessonsModal.vue b/reading-platform-frontend/src/views/teacher/courses/components/SelectLessonsModal.vue index 27b3cfc..dc89d5f 100644 --- a/reading-platform-frontend/src/views/teacher/courses/components/SelectLessonsModal.vue +++ b/reading-platform-frontend/src/views/teacher/courses/components/SelectLessonsModal.vue @@ -117,7 +117,7 @@ const props = defineProps<{ const emit = defineEmits<{ 'update:open': [value: boolean]; - 'confirm': [lessonIds: number[], mode: string]; + 'confirm': [lessonIds: (number | string)[], mode: string]; }>(); const visible = computed({ @@ -126,7 +126,7 @@ const visible = computed({ }); const selectionMode = ref<'all' | 'custom'>('all'); -const selectedLessonIds = ref([]); +const selectedLessonIds = ref<(number | string)[]>([]); // 按类型分组课程 const introductionLesson = computed(() => diff --git a/reading-platform-frontend/src/views/teacher/feedback/FeedbackView.vue b/reading-platform-frontend/src/views/teacher/feedback/FeedbackView.vue index 94745a5..833f298 100644 --- a/reading-platform-frontend/src/views/teacher/feedback/FeedbackView.vue +++ b/reading-platform-frontend/src/views/teacher/feedback/FeedbackView.vue @@ -308,7 +308,7 @@ const fetchFeedbacks = async () => { pageSize: pagination.pageSize, }); feedbacks.value = result.items; - pagination.total = result.total; + pagination.total = Number(result.total); } catch (error) { message.error('获取反馈列表失败'); } finally { diff --git a/reading-platform-frontend/src/views/teacher/growth/GrowthRecordView.vue b/reading-platform-frontend/src/views/teacher/growth/GrowthRecordView.vue index d46b8d3..b987aa1 100644 --- a/reading-platform-frontend/src/views/teacher/growth/GrowthRecordView.vue +++ b/reading-platform-frontend/src/views/teacher/growth/GrowthRecordView.vue @@ -335,7 +335,7 @@ const loadRecords = async () => { keyword: filters.keyword || undefined, }); records.value = res.list || []; - pagination.total = res.total || 0; + pagination.total = Number(res.total) || 0; } catch (error) { message.error('加载档案失败'); } finally { diff --git a/reading-platform-frontend/src/views/teacher/school-courses/components/Step4IntroLesson.vue b/reading-platform-frontend/src/views/teacher/school-courses/components/Step4IntroLesson.vue index c5ce3ae..634f936 100644 --- a/reading-platform-frontend/src/views/teacher/school-courses/components/Step4IntroLesson.vue +++ b/reading-platform-frontend/src/views/teacher/school-courses/components/Step4IntroLesson.vue @@ -11,7 +11,7 @@ import Step4IntroLessonAdmin from '@/components/course-edit/Step4IntroLesson.vue'; defineProps<{ - schoolCourseId: number; + schoolCourseId: number | string; lessonData?: any; }>(); diff --git a/reading-platform-frontend/src/views/teacher/school-courses/components/Step5CollectiveLesson.vue b/reading-platform-frontend/src/views/teacher/school-courses/components/Step5CollectiveLesson.vue index 889be27..cbf98ab 100644 --- a/reading-platform-frontend/src/views/teacher/school-courses/components/Step5CollectiveLesson.vue +++ b/reading-platform-frontend/src/views/teacher/school-courses/components/Step5CollectiveLesson.vue @@ -12,7 +12,7 @@ import Step5CollectiveLessonAdmin from '@/components/course-edit/Step5CollectiveLesson.vue'; defineProps<{ - schoolCourseId: number; + schoolCourseId: number | string; lessonData?: any; }>(); diff --git a/reading-platform-frontend/src/views/teacher/school-courses/components/Step6DomainLessons.vue b/reading-platform-frontend/src/views/teacher/school-courses/components/Step6DomainLessons.vue index ad5c822..d9a9e6f 100644 --- a/reading-platform-frontend/src/views/teacher/school-courses/components/Step6DomainLessons.vue +++ b/reading-platform-frontend/src/views/teacher/school-courses/components/Step6DomainLessons.vue @@ -12,7 +12,7 @@ import Step6DomainLessonsAdmin from '@/components/course-edit/Step6DomainLessons.vue'; defineProps<{ - schoolCourseId: number; + schoolCourseId: number | string; domainLessons?: { LANGUAGE?: any; HEALTH?: any;