feat: 新增收集式校验错误弹窗及工位报警语音播报

新增 ErrorListDialog 组件用于统一展示结构化校验错误信息,实现报错一次收全;新增工位报警语音播报功能,通过浏览器 SpeechSynthesis 播放本工位相关报警;调整物料类别及序列号字段文案,移除「其他」类别;新增工单实际开始字段及采集方式配置;优化 AGV 及 PlcSend 页签刷新逻辑;新增看板物料追溯及工位报警接口;删除 PLC 强制写 M 位及相关测试代码;同步数据库字段注释及补丁。
This commit is contained in:
SunYF
2026-10-20 16:36:26 +08:00
parent f743cf21fb
commit b0c048d9aa
126 changed files with 4603 additions and 1639 deletions
+14 -7
View File
@@ -10,6 +10,7 @@ import (
"runtime"
"time"
"bj_power_workstation/internal/alertstream"
"bj_power_workstation/internal/config"
"bj_power_workstation/internal/handler"
"bj_power_workstation/internal/mes"
@@ -117,6 +118,11 @@ func main() {
tm := tightening.NewManager(c.Tightening)
go tm.Run(rootCtx)
// 工位报警事件流(谁受影响谁播报,2026-10-20):长连接 MES SSE,按本机工位过滤后广播给本机前端;
// 断线自动重连;前端 EventSource 订阅 /api/alerts/stream,断线重连后一次性补拉 /api/alerts/station。
am := alertstream.New(mc, c.Station.StationNo)
go am.Run(rootCtx)
// 扫码中间件(键盘 HID 注入):Enable=true 时后台监听 7757,接收网络型扫码枪(iData PAD / 新大陆手机)
// 推送并模拟键盘注入当前光标窗口(任意输入框自动填入,前端无需轮询)。7757 被占用时仅记日志、不影响主程序。
if c.Scanner.Enabled {
@@ -131,13 +137,14 @@ func main() {
pdc := pdfcache.New(c.PdfCache.Dir)
ctx := &svc.ServiceContext{
Config: c,
Store: st,
Mes: mc,
Syncer: sy,
PdfCache: pdc,
WebFS: staticFS,
Tightening: tm,
Config: c,
Store: st,
Mes: mc,
Syncer: sy,
PdfCache: pdc,
WebFS: staticFS,
Tightening: tm,
AlertStream: am,
}
server := rest.MustNewServer(c.RestConf)