feat: 复盘报表视图与 CSV 导出(manager 专属)

This commit is contained in:
ABAPPLO
2026-09-01 17:46:11 +08:00
parent 3e4269729c
commit 4c1ff2d5b8
6 changed files with 639 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import {
ensureSchema,
getDashboardData,
getRawDb,
getTaskReportData,
uid,
} from "../../../lib/mvp-db";
import {
@@ -801,6 +802,9 @@ export async function POST(request: Request) {
} else if (body.action === "task_push_logs") {
const logs = await listTaskPushLogs(db, String(body.taskId ?? "").trim());
return Response.json({ logs });
} else if (body.action === "task_report_list") {
if (!isManagerRequest(request)) return adminForbidden();
return Response.json({ reports: await getTaskReportData(db) });
} else if (body.action === "refresh_account_fields") {
const status = startAccountFieldRefresh(
db,