diff --git a/src/admin/ai/list.vue b/src/admin/ai/list.vue
new file mode 100644
index 0000000..c39059c
--- /dev/null
+++ b/src/admin/ai/list.vue
@@ -0,0 +1,126 @@
+
+
+ AI 学习分析报告
+
+
+
+
+
+
+
+
+
+ {{ detail.username }}
+ {{ detail.class_name || "-" }}
+ {{ parseTime(detail.create_time, "YYYY-MM-DD HH:mm:ss") }}
+
+
+ {{ detail.analysis }}
+
+
+
+
+
+
+
+
+
diff --git a/src/admin/api.ts b/src/admin/api.ts
index 41844d0..aa17eff 100644
--- a/src/admin/api.ts
+++ b/src/admin/api.ts
@@ -490,3 +490,14 @@ export function getTopACTrend(params: {
}) {
return http.get("admin/problem/top_ac_trend", { params })
}
+
+// AI 学习分析报告
+export function getAIReportList(offset = 0, limit = 10, username = "") {
+ return http.get("admin/ai/reports", {
+ params: { paging: true, offset, limit, username: username || undefined },
+ })
+}
+
+export function getAIReportDetail(id: number) {
+ return http.get("admin/ai/reports", { params: { id } })
+}
diff --git a/src/routes.ts b/src/routes.ts
index dd50748..f1ee90f 100644
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -1,4 +1,4 @@
-import { RouteRecordRaw } from "vue-router"
+import type { RouteRecordRaw } from "vue-router"
export const ojs: RouteRecordRaw = {
path: "/",
@@ -315,5 +315,11 @@ export const admins: RouteRecordRaw = {
props: true,
meta: { requiresTeacherAdmin: true },
},
+ {
+ path: "ai/reports",
+ name: "admin ai reports",
+ component: () => import("admin/ai/list.vue"),
+ meta: { requiresTeacherAdmin: true },
+ },
],
}
diff --git a/src/shared/layout/admin.vue b/src/shared/layout/admin.vue
index e7c5669..1923e46 100644
--- a/src/shared/layout/admin.vue
+++ b/src/shared/layout/admin.vue
@@ -58,6 +58,15 @@ const options = computed(() => {
),
key: "admin problemset list",
},
+ {
+ label: () =>
+ h(
+ RouterLink,
+ { to: "/admin/ai/reports" },
+ { default: () => "AI报告" },
+ ),
+ key: "admin ai reports",
+ },
)
}
@@ -132,6 +141,15 @@ const options = computed(() => {
),
key: "admin tutorial list",
},
+ {
+ label: () =>
+ h(
+ RouterLink,
+ { to: "/admin/ai/reports" },
+ { default: () => "AI报告" },
+ ),
+ key: "admin ai reports",
+ },
)
}
@@ -152,6 +170,7 @@ const active = computed(() => {
if (path.startsWith("/admin/comment")) return "admin comment list"
if (path.startsWith("/admin/announcement")) return "admin announcement list"
if (path.startsWith("/admin/tutorial")) return "admin tutorial list"
+ if (path.startsWith("/admin/ai")) return "admin ai reports"
return route.name as string
})