fix: 删除 teacher.ts 中重复的函数声明
删除了重复的 dashboard 相关函数: - getTeacherDashboard - getTeacherLessonTrend - getTeacherCourseUsage - getTeacherTodayLessons - getTeacherRecommendedCourses - getTeacherWeeklyStats 这些函数在文件中已经存在,之前的编辑造成了重复。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3e779856bb
commit
5b1c6f590b
@ -747,77 +747,3 @@ export const getMonthlyTaskStats = (months?: number) => {
|
|||||||
return api.teacherTaskControllerGetMonthlyStats(params) as any;
|
return api.teacherTaskControllerGetMonthlyStats(params) as any;
|
||||||
};
|
};
|
||||||
|
|
||||||
// ==================== 教师控制台 API ====================
|
|
||||||
|
|
||||||
export interface DashboardStats {
|
|
||||||
classCount: number;
|
|
||||||
studentCount: number;
|
|
||||||
lessonCount: number;
|
|
||||||
courseCount: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TodayLesson {
|
|
||||||
id: number;
|
|
||||||
classId: number;
|
|
||||||
className: string;
|
|
||||||
courseId: number;
|
|
||||||
courseName: string;
|
|
||||||
scheduledTime: string;
|
|
||||||
status: 'PENDING' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELLED';
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RecommendedCourse {
|
|
||||||
id: number;
|
|
||||||
name: string;
|
|
||||||
coverImagePath?: string;
|
|
||||||
gradeTags: string[];
|
|
||||||
domainTags: string[];
|
|
||||||
duration: number;
|
|
||||||
publishedAt: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RecentActivity {
|
|
||||||
id: number;
|
|
||||||
type: 'lesson' | 'feedback' | 'task';
|
|
||||||
title: string;
|
|
||||||
description: string;
|
|
||||||
time: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TeacherDashboardResponse {
|
|
||||||
stats: DashboardStats;
|
|
||||||
todayLessons: TodayLesson[];
|
|
||||||
recommendedCourses: RecommendedCourse[];
|
|
||||||
recentActivities: RecentActivity[];
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取教师控制台数据
|
|
||||||
export function getTeacherDashboard(): Promise<TeacherDashboardResponse> {
|
|
||||||
return api.teacherCourseControllerGetDashboard() as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取授课趋势
|
|
||||||
export function getTeacherLessonTrend(months: number = 6): Promise<any[]> {
|
|
||||||
const params: TeacherCourseControllerGetLessonTrendParams = { months: String(months) };
|
|
||||||
return api.teacherCourseControllerGetLessonTrend(params) as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取课程使用情况
|
|
||||||
export function getTeacherCourseUsage(): Promise<any[]> {
|
|
||||||
return api.teacherCourseControllerGetCourseUsage() as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取今日课程
|
|
||||||
export function getTeacherTodayLessons(): Promise<TodayLesson[]> {
|
|
||||||
return api.teacherCourseControllerGetTodayLessons() as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取推荐课程
|
|
||||||
export function getTeacherRecommendedCourses(): Promise<RecommendedCourse[]> {
|
|
||||||
return api.teacherCourseControllerGetRecommend() as any;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取周统计数据
|
|
||||||
export function getTeacherWeeklyStats(): Promise<any> {
|
|
||||||
return api.teacherCourseControllerGetWeekly() as any;
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user