add: 邦泽参数配置页(音柱 / 告警结构化配置)

新增「参数配置」页(/config),按客户使用场景而非插件边界组织
aibox_sophon_adapter 与 ip_sound_column 的配置:

- IP 音柱报警:音柱设备 IP(属 ip_sound_column)+ 启用/音量/播报文案
  映射(属 aibox_sophon_adapter);两个插件在同一页配完,保存时按归属
  分别下发并重启对应副本。
- 告警与联动:告警转发、心跳与离线、告警留存、豆包分析、IN2 联动。
- 未开放数据库、数据目录、MediaMTX、MQTT 通道等部署类配置,页面脚注
  说明;仍可用 Worker 管理的原始编辑器维护。

关键实现约束(见 src/config/configEdits.ts):
- 后端对 [workers.config] 只做顶层浅合并,被改动的嵌套节必须整节提交,
  否则改一个音量会清掉同级的 enabled/tts(已用真实接口复现)。
- 区块开关默认值取自插件代码默认值,避免「配置里没有该键时开关显示为关
  且被判为已改动」而在改其它字段时误关功能。
- 数值字段留空直接拦下,不把 NaN 下发成 null 触发插件侧回滚。

其他:
- tts 映射的违规类型候选来自历史告警记录(list_alarms),手写拼错不易察觉。
- 登录态抽成 useAdminAuth 与 Worker 管理页共用,token 互通。
- Worker 管理弹窗对这两个插件给出跳转提示,原始编辑器保留为应急通道。
This commit is contained in:
2026-09-18 10:00:32 +08:00
parent 55fe2621f8
commit 5b91548246
11 changed files with 1761 additions and 47 deletions
+14
View File
@@ -13,6 +13,8 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
ElContainer: typeof import('element-plus/es')['ElContainer']
@@ -31,13 +33,18 @@ declare module 'vue' {
ElOption: typeof import('element-plus/es')['ElOption']
ElPagination: typeof import('element-plus/es')['ElPagination']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
ElTabPane: typeof import('element-plus/es')['ElTabPane']
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElUpload: typeof import('element-plus/es')['ElUpload']
HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
PluginConfigForm: typeof import('./src/components/PluginConfigForm.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
TtsMapEditor: typeof import('./src/components/TtsMapEditor.vue')['default']
WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
}
export interface GlobalDirectives {
@@ -48,6 +55,8 @@ declare module 'vue' {
// For TSX support
declare global {
const ElAlert: typeof import('element-plus/es')['ElAlert']
const ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
const ElBadge: typeof import('element-plus/es')['ElBadge']
const ElButton: typeof import('element-plus/es')['ElButton']
const ElCard: typeof import('element-plus/es')['ElCard']
const ElContainer: typeof import('element-plus/es')['ElContainer']
@@ -66,12 +75,17 @@ declare global {
const ElOption: typeof import('element-plus/es')['ElOption']
const ElPagination: typeof import('element-plus/es')['ElPagination']
const ElSelect: typeof import('element-plus/es')['ElSelect']
const ElSwitch: typeof import('element-plus/es')['ElSwitch']
const ElTable: typeof import('element-plus/es')['ElTable']
const ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
const ElTabPane: typeof import('element-plus/es')['ElTabPane']
const ElTabs: typeof import('element-plus/es')['ElTabs']
const ElTag: typeof import('element-plus/es')['ElTag']
const ElUpload: typeof import('element-plus/es')['ElUpload']
const HelloWorld: typeof import('./src/components/HelloWorld.vue')['default']
const PluginConfigForm: typeof import('./src/components/PluginConfigForm.vue')['default']
const RouterLink: typeof import('vue-router')['RouterLink']
const RouterView: typeof import('vue-router')['RouterView']
const TtsMapEditor: typeof import('./src/components/TtsMapEditor.vue')['default']
const WelcomeItem: typeof import('./src/components/WelcomeItem.vue')['default']
}