fix: 监控页面改为自己绑定的班级
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CI / CI OK (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled

This commit is contained in:
shawko 2026-05-11 10:56:40 +08:00
parent 32189c0fbc
commit 228ee4ba68
2 changed files with 6 additions and 7 deletions

View File

@ -83,11 +83,11 @@ export type ClassMonitorSessionsPage = PageResponse<ClassMonitorSessionRow> & {
} }
class ClassroomMonitorService { class ClassroomMonitorService {
async getClassList() { /** 教师名下班级列表,与 `/api/main/org/class/listByTeacher` 一致 */
return await get<PageResponse<ClassroomItem>>('/org/class/list', { async getClassList(): Promise<ClassroomItem[]> {
current: 1, const res = await get<any>('/org/class/listByTeacher')
size: 25, const list = Array.isArray(res) ? res : (res?.rows ?? res?.data ?? [])
}) return list as ClassroomItem[]
} }
async getCurrent(classId: number | string) { async getCurrent(classId: number | string) {

View File

@ -56,8 +56,7 @@ onBeforeUnmount(() => {
async function loadClassList() { async function loadClassList() {
classLoading.value = true classLoading.value = true
try { try {
const data = await classroomMonitorService.getClassList() classList.value = await classroomMonitorService.getClassList()
classList.value = data?.rows ?? []
} finally { } finally {
classLoading.value = false classLoading.value = false
} }