Merge branch 'main' of https://gitlab.lingxixue.com/dmg/lingxixue-admin
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:
commit
2137559c62
@ -259,15 +259,15 @@ function formatTime(time?: number | string) {
|
|||||||
return date.toLocaleString()
|
return date.toLocaleString()
|
||||||
}
|
}
|
||||||
|
|
||||||
/** teacher-electron 注入:打开独立屏幕共享窗口 */
|
/** teacher-electron:打开课堂管控窗口(教师推屏 + 学员屏幕监控) */
|
||||||
async function openTeacherScreenShareWindow(item: ClassroomItem) {
|
async function openClassroomControlWindow(item: ClassroomItem) {
|
||||||
const api = window.teacherApi
|
const api = window.teacherApi
|
||||||
if (!api?.openScreenShareWindow) {
|
if (!api?.openScreenShareWindow) {
|
||||||
hud.warning('请在教师端桌面客户端中使用「共享屏幕」')
|
hud.warning('请在教师端桌面客户端中使用「课堂管控」')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
await hud.load({
|
await hud.load({
|
||||||
option: '准备共享屏幕',
|
option: '准备课堂管控',
|
||||||
task: async () => {
|
task: async () => {
|
||||||
try {
|
try {
|
||||||
const page = await classStudentService.findPage(1, 999, {
|
const page = await classStudentService.findPage(1, 999, {
|
||||||
@ -281,34 +281,7 @@ async function openTeacherScreenShareWindow(item: ClassroomItem) {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: async () => {
|
error: async () => {
|
||||||
hud.error('打开屏幕共享窗口失败')
|
hud.error('打开课堂管控窗口失败')
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/** teacher-electron:学员 JPEG 截屏监控窗口 */
|
|
||||||
async function openStudentScreenMonitorWindow(item: ClassroomItem) {
|
|
||||||
const openMon = window.teacherApi?.openStudentScreenMonitorWindow
|
|
||||||
if (!openMon) {
|
|
||||||
hud.warning('请在教师端桌面客户端中使用「屏幕监控」')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
await hud.load({
|
|
||||||
option: '准备屏幕监控',
|
|
||||||
task: async () => {
|
|
||||||
try {
|
|
||||||
const page = await classStudentService.findPage(1, 999, {
|
|
||||||
classId: item.id,
|
|
||||||
})
|
|
||||||
const rows = (page as any)?.data?.rows ?? page?.rows ?? []
|
|
||||||
await openMon(rows, item.name ?? '', item.id)
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error)
|
|
||||||
throw error
|
|
||||||
}
|
|
||||||
},
|
|
||||||
error: async () => {
|
|
||||||
hud.error('打开屏幕监控窗口失败')
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -332,17 +305,8 @@ async function openStudentScreenMonitorWindow(item: ClassroomItem) {
|
|||||||
<span class="class-name">{{ item.name }}</span>
|
<span class="class-name">{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="class-row-actions">
|
<div class="class-row-actions">
|
||||||
<el-button
|
<el-button type="primary" @click="openClassroomControlWindow(item)">
|
||||||
type="primary"
|
课堂管控
|
||||||
@click="openTeacherScreenShareWindow(item)"
|
|
||||||
>
|
|
||||||
共享屏幕
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
@click="openStudentScreenMonitorWindow(item)"
|
|
||||||
>
|
|
||||||
屏幕监控
|
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user