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
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:
parent
32189c0fbc
commit
228ee4ba68
@ -83,11 +83,11 @@ export type ClassMonitorSessionsPage = PageResponse<ClassMonitorSessionRow> & {
|
||||
}
|
||||
|
||||
class ClassroomMonitorService {
|
||||
async getClassList() {
|
||||
return await get<PageResponse<ClassroomItem>>('/org/class/list', {
|
||||
current: 1,
|
||||
size: 25,
|
||||
})
|
||||
/** 教师名下班级列表,与 `/api/main/org/class/listByTeacher` 一致 */
|
||||
async getClassList(): Promise<ClassroomItem[]> {
|
||||
const res = await get<any>('/org/class/listByTeacher')
|
||||
const list = Array.isArray(res) ? res : (res?.rows ?? res?.data ?? [])
|
||||
return list as ClassroomItem[]
|
||||
}
|
||||
|
||||
async getCurrent(classId: number | string) {
|
||||
|
||||
@ -56,8 +56,7 @@ onBeforeUnmount(() => {
|
||||
async function loadClassList() {
|
||||
classLoading.value = true
|
||||
try {
|
||||
const data = await classroomMonitorService.getClassList()
|
||||
classList.value = data?.rows ?? []
|
||||
classList.value = await classroomMonitorService.getClassList()
|
||||
} finally {
|
||||
classLoading.value = false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user