feat: 增加班级id
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
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (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
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
parent
ffacb4d300
commit
055ff4c0d1
@ -150,6 +150,31 @@ class ClassroomMonitorService {
|
||||
`/school/classMonitor/heartbeat?classId=${encodeURIComponent(String(classId))}`,
|
||||
)
|
||||
}
|
||||
|
||||
/** 教师共享屏幕测试:开启 */
|
||||
async startTeacherShareScreen(
|
||||
classId: number | string,
|
||||
ip: string,
|
||||
port: number,
|
||||
) {
|
||||
return await post('/school/teacherScreenShare/startTeacherShareScreen', {
|
||||
classId,
|
||||
ip,
|
||||
port,
|
||||
})
|
||||
}
|
||||
|
||||
/** 教师共享屏幕测试:结束 */
|
||||
async stopTeacherShareScreen(classId: number | string) {
|
||||
return await post('/school/teacherScreenShare/stopTeacherShareScreen', {
|
||||
classId,
|
||||
})
|
||||
}
|
||||
|
||||
/** 教师共享屏幕测试:心跳(建议每 60 秒) */
|
||||
async teacherShareScreenHeartbeat(classId: number | string) {
|
||||
return await post('/school/teacherScreenShare/heartbeat', { classId })
|
||||
}
|
||||
}
|
||||
|
||||
export const classroomMonitorService = new ClassroomMonitorService()
|
||||
|
||||
6
playground/src/types/global.d.ts
vendored
6
playground/src/types/global.d.ts
vendored
@ -8,15 +8,17 @@ interface Window {
|
||||
teacherApi?: {
|
||||
startSfu: () => Promise<{ port: number; already?: boolean }>
|
||||
stopSfu: () => Promise<void>
|
||||
/** 可选传入班级学员列表与班级名称;名称用于教师端共享窗口标题「{名称} - 屏幕共享」。 */
|
||||
/** 可选传入班级学员列表、班级名称与班级 id;名称用于教师端共享窗口标题「{名称} - 屏幕共享」,id 用于教师端业务与心跳。 */
|
||||
openScreenShareWindow: (
|
||||
classStudentRows?: unknown[],
|
||||
className?: string,
|
||||
classId?: string | number,
|
||||
) => Promise<void>
|
||||
/** 打开学员屏幕监控独立窗口(teacher-electron) */
|
||||
/** 打开学员屏幕监控独立窗口(teacher-electron);名称用于窗口标题,班级 id 下发至监控页。 */
|
||||
openStudentScreenMonitorWindow?: (
|
||||
classStudentRows?: unknown[],
|
||||
className?: string,
|
||||
classId?: string | number,
|
||||
) => Promise<void>
|
||||
setShareClassStudentsListener?: (
|
||||
cb: ((rows: unknown[]) => void) | null,
|
||||
|
||||
@ -45,6 +45,7 @@ const studentSnapshotPreviewList = computed(() => {
|
||||
})
|
||||
const SNAPSHOT_REFRESH_INTERVAL = 5000
|
||||
const MONITOR_HEARTBEAT_INTERVAL = 60 * 1000
|
||||
|
||||
let snapshotRefreshTimer: ReturnType<typeof setInterval> | undefined
|
||||
let heartbeatTimer: ReturnType<typeof setInterval> | undefined
|
||||
|
||||
@ -273,10 +274,10 @@ async function openTeacherScreenShareWindow(item: ClassroomItem) {
|
||||
classId: item.id,
|
||||
})
|
||||
const rows = (page as any)?.data?.rows ?? page?.rows ?? []
|
||||
await api.openScreenShareWindow(rows, item.name ?? '')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
throw e
|
||||
await api.openScreenShareWindow(rows, item.name ?? '', item.id)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
error: async () => {
|
||||
@ -300,10 +301,10 @@ async function openStudentScreenMonitorWindow(item: ClassroomItem) {
|
||||
classId: item.id,
|
||||
})
|
||||
const rows = (page as any)?.data?.rows ?? page?.rows ?? []
|
||||
await openMon(rows, item.name ?? '')
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
throw e
|
||||
await openMon(rows, item.name ?? '', item.id)
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
throw error
|
||||
}
|
||||
},
|
||||
error: async () => {
|
||||
|
||||
@ -33,8 +33,8 @@ export default defineConfig(async () => {
|
||||
open: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://43.136.52.196:9053',
|
||||
// target: 'https://admin.lingxixue.com',
|
||||
// target: 'http://43.136.52.196:9053',
|
||||
target: 'https://tiku.lingxixue.com',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user