评阅页直接运行学生的程序;离开页面时结束正在运行的程序
CI/CD / test (push) Canceled after 0s
CI/CD / deploy (push) Canceled after 0s

- 运行区(窗体桌面、提示框、虚拟实训台、编译错误和控制台输出)抽成 RunArea 组件,实验页和评阅页共用
- 评阅页代码区加"运行"标签页:运行学生提交的代码,可以操作窗体和实训台;换学生时自动停止并清空;
  点编译错误跳到对应代码;原来的按钮改为"在新标签页运行"
- 运行会话加 close():离开实验页、评阅页时断开连接,服务器随即结束程序(之前要等 60 分钟超时)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 5.5 committed 2026-10-22 20:12:31 +08:00
1 parent 91237b85b8
commit 8a92354fe4
4 files changed
+215 -113

No files matched your search

+6 -1
View File
@@ -187,7 +187,12 @@ export function createRunSession() {
}
}
return { state, connect, run, stop, act, replyMessageBox, setBoard, resetBoard }
/** 离开页面时断开连接:服务器随即结束正在运行的程序 */
function close() {
socket?.close()
}
return { state, connect, run, stop, act, replyMessageBox, setBoard, resetBoard, close }
}
export type RunSession = ReturnType<typeof createRunSession>