题库导入功能完成,考试计划功能完成。

This commit is contained in:
2025-12-19 00:58:58 +08:00
parent ba252b2f56
commit 465d4d7b4a
27 changed files with 1851 additions and 177 deletions

View File

@@ -105,6 +105,25 @@ export class AdminController {
}
}
// 获取活跃任务统计数据
static async getActiveTasksStats(req: Request, res: Response) {
try {
const { ExamTaskModel } = await import('../models/examTask');
const stats = await ExamTaskModel.getActiveTasksWithStats();
res.json({
success: true,
data: stats
});
} catch (error: any) {
console.error('获取活跃任务统计数据失败:', error);
res.status(500).json({
success: false,
message: error.message || '获取活跃任务统计数据失败'
});
}
}
// 修改管理员密码
static async updatePassword(req: Request, res: Response) {
try {