feat(target-lists): 新增黑白名单管理与实时告警功能

- rid-shared 新增 target_lists 模块,定义名单数据契约
- 地图适配器支持按名单类型着色渲染目标(白/黑/未知)
- 新增名单筛选器与目标目录过滤联动
- 实时详情面板支持加入/编辑白名单与黑名单操作
- 新增黑名单命中告警横幅与事件日志高亮
- 新增名单管理浮层(Manager 组件)与徽章展示
- 底图默认切换为影像图,相机初始俯仰角归零
- color-scheme 切换为 dark,新增 glass/workbench 样式
```
This commit is contained in:
2026-10-23 09:12:50 +08:00
parent 3cf50f2e8b
commit df9e8bdeb5
24 changed files with 1481 additions and 120 deletions
+8 -8
View File
@@ -1,14 +1,17 @@
<div class="registry-workspace">
<aside class="history-panel" aria-labelledby="history-title"><header class="history-heading"><h2 id="history-title">本地档案</h2><button id="refresh-list" type="button" aria-label="刷新记录" title="刷新记录">↻</button></header>
<aside class="history-panel" aria-labelledby="history-title"><header class="history-heading"><h2 id="history-title">本地档案</h2><button id="refresh-list" type="button" aria-label="刷新记录" title="刷新记录">↻</button></header><div class="history-content">
<div class="history-search"><input id="history-query" type="search" maxlength="60" autocomplete="off" aria-label="搜索登记档案" placeholder="搜索 SN、FPV 编号或机型"><span id="search-count" aria-live="polite"></span></div>
<button id="new-registration" type="button" class="primary">+ 新建设备登记</button>
<div class="history-toolbar"><button id="selection-toggle" type="button" aria-pressed="false">选择</button><div class="export-controls"><button id="export-toggle" type="button" disabled aria-expanded="false" aria-controls="export-options">导出⌄</button><div id="export-options" class="registry-popup" hidden><button id="export-archive" type="button" disabled>导出档案包</button><button id="export-excel" type="button" disabled>导出 Excel</button><p>仅导出当前页已选档案</p></div></div></div>
<div id="selection-controls" hidden><label class="select-all"><input id="select-all" type="checkbox">全选当前页 <span id="selected-count">(0)</span></label></div>
<p class="history-message" id="history-message" role="status"></p><div id="history-empty" class="history-empty">正在读取档案…</div><div id="history-cards" class="history-cards"></div>
<nav class="pagination" aria-label="档案分页"><span id="page-status" aria-live="polite"></span><div><button id="previous-page" type="button">上一页</button><button id="next-page" type="button">下一页</button></div></nav>
</div><nav class="pagination" aria-label="档案分页"><span id="page-status" aria-live="polite"></span><div><button id="previous-page" type="button">上一页</button><button id="next-page" type="button">下一页</button></div></nav>
<p id="archive-warning" class="archive-warning" role="status" hidden><span id="archive-warning-text"></span> <button id="retry-archive" type="button">重试同步</button></p></aside>
<div class="registration-scroll"><div class="registration-main"><header class="registration-heading"><div><h1 id="register-title">新建设备登记</h1><p>填写设备信息,生成本机登记二维码</p></div><span></span></header>
<section class="result-panel registry-group" aria-labelledby="result-title" id="registration-result" tabindex="-1"><h2 id="result-title">二维码与核验</h2>
<section class="registration-editor" aria-labelledby="register-title"><header class="registration-heading"><div><h1 id="register-title">新建设备登记</h1><p>填写设备信息,生成本机登记二维码</p></div><span></span></header>
<form id="register-form" aria-labelledby="register-title"><div class="registration-fields-scroll"><section class="registry-group"><div class="registry-group-heading"><h2>设备身份</h2><span>仅模块 SN 必填</span></div><div class="registration-fields"><div class="registration-field full"><label for="serial-no">模块 SN <span aria-hidden="true">*</span></label><input id="serial-no" name="serialNo" required maxlength="40" autocomplete="off" pattern="[A-Za-z0-9-]{6,40}" placeholder="输入完整模块序列号"></div><div class="registration-field"><label for="model-name">机型 <small>选填</small></label><input id="model-name" name="modelName" maxlength="60" placeholder="例如:5 寸穿越机"></div><div class="registration-field"><label for="owner-name">登记人 / 备注 <small>选填</small></label><input id="owner-name" name="ownerName" maxlength="40" placeholder="方便后续查找"></div></div><p class="registry-help">SN 需与上位机模块一致;相同 SN 再次保存将更新原档案。</p></section>
<section class="registry-group"><div class="registry-group-heading"><h2>登记编号</h2><span>自动生成或手动填写</span></div><div class="registration-number"><div class="registration-field"><label for="uas-code">FPV 编号 <small>选填</small></label><div class="registration-prefix"><span aria-hidden="true">FPV</span><input id="uas-code" name="uasDigits" maxlength="8" inputmode="numeric" pattern="[0-9]{8}" aria-describedby="fpv-hint" placeholder="8 位数字 · 留空自动生成"></div></div><p id="fpv-hint" class="registry-help">已有编号仅填写后 8 位数字。<br>留空时,保存后自动生成。</p></div></section>
<section class="registry-group"><div class="registry-group-heading"><h2>设备照片</h2><span>选填 · 最多 2 张</span></div><div class="registration-photos"><div class="photo-slot"><input id="photo-1" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="0" hidden><button type="button" class="photo-pick" data-photo-choose="0" aria-label="添加照片 1"><img id="slot-preview-0" alt="照片 1预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>添加照片 1</strong><span id="slot-name-0">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="0" id="slot-remove-0" hidden>移除照片</button></div><button type="button" data-photo-keep="0" id="slot-keep-0" hidden>保留原选择</button><p id="slot-status-0" class="photo-status" role="status"></p></div><div class="photo-slot"><input id="photo-2" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="1" hidden><button type="button" class="photo-pick" data-photo-choose="1" aria-label="添加照片 2"><img id="slot-preview-1" alt="照片 2预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>添加照片 2</strong><span id="slot-name-1">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="1" id="slot-remove-1" hidden>移除照片</button></div><button type="button" data-photo-keep="1" id="slot-keep-1" hidden>保留原选择</button><p id="slot-status-1" class="photo-status" role="status"></p></div></div><p class="registry-help">JPG、PNG、WebP · 每张不超过 5 MB · 仅保存在本机档案</p></section>
<p class="form-message" id="form-message" role="status"></p></div><div class="registration-savebar"><span id="draft-state">保存时校验 SN 与编号</span><button class="primary" id="register-button" type="submit">保存登记并生成二维码 →</button></div></form></section><section class="result-panel registry-group" aria-labelledby="result-title" id="registration-result" tabindex="-1"><h2 id="result-title">二维码与核验</h2>
<div id="empty-result" class="empty-state"><div class="empty-glyph"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" aria-hidden="true"><path d="M3 3h6v6H3z M15 3h6v6h-6z M3 15h6v6H3z M14 14h3v3h4v4h-7z"/></svg></div><div><b>等待完成登记</b><p>保存后自动生成二维码,供本地版上位机读取和核验。</p></div><ol><li>填写模块 SN</li><li>保存登记并生成二维码</li><li>在本地版上位机核验</li></ol></div><div id="record-result" class="record-result" hidden>
<div class="qr-stage" id="qr-stage" aria-label="本地登记二维码"></div>
<div class="record-kicker" id="result-context" role="status"></div>
@@ -24,8 +27,5 @@
<p class="result-tip">在本机同时启动登记站和本地版上位机,上传此二维码。上位机会从本地记录读取字段并比对模块 SN。</p>
</div>
</section>
<form id="register-form" aria-labelledby="register-title"><section class="registry-group"><div class="registry-group-heading"><h2>设备身份</h2><span>仅模块 SN 必填</span></div><div class="registration-fields"><div class="registration-field full"><label for="serial-no">模块 SN <span aria-hidden="true">*</span></label><input id="serial-no" name="serialNo" required maxlength="40" autocomplete="off" pattern="[A-Za-z0-9-]{6,40}" placeholder="输入完整模块序列号"></div><div class="registration-field"><label for="model-name">机型 <small>选填</small></label><input id="model-name" name="modelName" maxlength="60" placeholder="例如:5 寸穿越机"></div><div class="registration-field"><label for="owner-name">登记人 / 备注 <small>选填</small></label><input id="owner-name" name="ownerName" maxlength="40" placeholder="方便后续查找"></div></div><p class="registry-help">SN 需与上位机模块一致;相同 SN 再次保存将更新原档案。</p></section>
<section class="registry-group"><div class="registry-group-heading"><h2>登记编号</h2><span>自动生成或手动填写</span></div><div class="registration-number"><div class="registration-field"><label for="uas-code">FPV 编号 <small>选填</small></label><div class="registration-prefix"><span aria-hidden="true">FPV</span><input id="uas-code" name="uasDigits" maxlength="8" inputmode="numeric" pattern="[0-9]{8}" aria-describedby="fpv-hint" placeholder="8 位数字 · 留空自动生成"></div></div><p id="fpv-hint" class="registry-help">已有编号仅填写后 8 位数字。<br>留空时,保存后自动生成。</p></div></section>
<section class="registry-group"><div class="registry-group-heading"><h2>设备照片</h2><span>选填 · 最多 2 张</span></div><div class="registration-photos"><div class="photo-slot"><input id="photo-1" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="0" hidden><button type="button" class="photo-pick" data-photo-choose="0" aria-label="添加照片 1"><img id="slot-preview-0" alt="照片 1预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>添加照片 1</strong><span id="slot-name-0">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="0" id="slot-remove-0" hidden>移除照片</button></div><button type="button" data-photo-keep="0" id="slot-keep-0" hidden>保留原选择</button><p id="slot-status-0" class="photo-status" role="status"></p></div><div class="photo-slot"><input id="photo-2" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="1" hidden><button type="button" class="photo-pick" data-photo-choose="1" aria-label="添加照片 2"><img id="slot-preview-1" alt="照片 2预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>添加照片 2</strong><span id="slot-name-1">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="1" id="slot-remove-1" hidden>移除照片</button></div><button type="button" data-photo-keep="1" id="slot-keep-1" hidden>保留原选择</button><p id="slot-status-1" class="photo-status" role="status"></p></div></div><p class="registry-help">JPG、PNG、WebP · 每张不超过 5 MB · 仅保存在本机档案</p></section>
<p class="form-message" id="form-message" role="status"></p><div class="registration-savebar"><span id="draft-state">保存时校验 SN 与编号</span><button class="primary" id="register-button" type="submit">保存登记并生成二维码 →</button></div></form></div></div></div>
</div>
<dialog id="edit-dialog" aria-labelledby="edit-title"><form id="edit-form"><header><h2 id="edit-title">编辑档案</h2><p id="edit-identity"></p><p class="registry-help">SN 与 FPV 编号不可修改;清空机型或登记人后保存,即清除该字段。</p></header><div class="registration-fields"><div class="registration-field"><label for="edit-model">机型</label><input id="edit-model" maxlength="60"></div><div class="registration-field"><label for="edit-owner">登记人 / 备注</label><input id="edit-owner" maxlength="40"></div></div><div class="edit-photos"><fieldset><legend>照片 1</legend><div class="photo-slot"><input id="edit-photo-1" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="2" hidden><button type="button" class="photo-pick" data-photo-choose="2" aria-label="替换照片 1"><img id="slot-preview-2" alt="照片 1预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>选择替换照片 1</strong><span id="slot-name-2">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="2" id="slot-remove-2" hidden>取消替换 / 恢复原图</button></div><button type="button" data-photo-keep="2" id="slot-keep-2" hidden>保留原选择</button><p id="slot-status-2" class="photo-status" role="status"></p></div><label class="edit-delete"><input id="edit-delete-1" type="checkbox">删除现有照片 1</label></fieldset><fieldset><legend>照片 2</legend><div class="photo-slot"><input id="edit-photo-2" type="file" accept="image/jpeg,image/png,image/webp" data-photo-slot="3" hidden><button type="button" class="photo-pick" data-photo-choose="3" aria-label="替换照片 2"><img id="slot-preview-3" alt="照片 2预览" hidden><span class="photo-plus" aria-hidden="true">+</span><strong>选择替换照片 2</strong><span id="slot-name-3">点击选择本地图片</span></button><div class="photo-slot-actions"><button type="button" data-photo-remove="3" id="slot-remove-3" hidden>取消替换 / 恢复原图</button></div><button type="button" data-photo-keep="3" id="slot-keep-3" hidden>保留原选择</button><p id="slot-status-3" class="photo-status" role="status"></p></div><label class="edit-delete"><input id="edit-delete-2" type="checkbox">删除现有照片 2</label></fieldset></div><p id="edit-message" class="form-message" role="status"></p><div class="result-actions"><button id="edit-save" class="primary" type="submit">保存修改</button><button id="edit-cancel" type="button">取消</button></div></form></dialog>