```text
chore: 新增项目规则文档、构建别名及忽略规则 添加 AGENTS.md 项目规则文件,涵盖语言与工具链、模块设计、 Git 提交规范及验证流程等内容。 变更要点: - .cargo/config.toml 新增 xtask 命令别名 - .gitignore 忽略运行时地图缓存、接收器配置文件、 构建锁文件及本地 docs/ 目录 - 新增 AGENTS.md 定义项目编码、提交与审查规则 ```
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
<div class="shell">
|
||||
<header class="topbar">
|
||||
<img class="brand-mark" src="/fpv-rid-icon.png" alt="FPV-RID 图标">
|
||||
<div class="brand-copy">
|
||||
<strong>任务指挥 MISSION CONTROL</strong>
|
||||
<small>FPV-RID · 本地备案与核验中心</small>
|
||||
</div>
|
||||
<nav class="mc-nav-tabs" style="margin-left: 20px;">
|
||||
<span class="mc-nav-pill active"><span class="mc-pill-icon">📋</span> 设备备案登记</span>
|
||||
<a class="mc-nav-pill mc-nav-link" href="/realtime"><span class="mc-pill-icon">🗺️</span> 实时态势工作台</a>
|
||||
</nav>
|
||||
<div class="top-status"><i></i> 本机沙盒运行</div>
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<section class="hero">
|
||||
<div>
|
||||
<h1>登记设备,生成本地二维码</h1>
|
||||
<p>为模块 SN 建立本机记录。二维码交给配套的本地版上位机扫描,校验 SN 后再由上位机完成设备操作。</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="columns">
|
||||
<section class="panel form-panel" aria-labelledby="register-title">
|
||||
<div class="panel-head"><div><span class="step">01</span><h2 id="register-title">新建设备登记</h2></div><span class="subtle">同一 SN 只保留一条记录</span></div>
|
||||
<form id="register-form">
|
||||
<label for="serial-no">模块 SN <em>必填</em></label>
|
||||
<input id="serial-no" name="serialNo" required maxlength="40" autocomplete="off" placeholder="例如 ZEX0RID1202605011000" pattern="[A-Za-z0-9-]{6,40}">
|
||||
<p class="hint">请与上位机“RID 模块状态信息”里的 SN 完全一致。</p>
|
||||
|
||||
<div class="field-grid">
|
||||
<div><label for="model-name">机型</label><input id="model-name" name="modelName" maxlength="60" placeholder="例如 5 寸穿越机"></div>
|
||||
<div><label for="owner-name">登记人 / 备注</label><input id="owner-name" name="ownerName" maxlength="40" placeholder="可选"></div>
|
||||
</div>
|
||||
|
||||
<label for="uas-code">FPV 编号 <span class="optional">可选</span></label>
|
||||
<div class="input-prefix"><span>FPV</span><input id="uas-code" name="uasDigits" maxlength="8" inputmode="numeric" pattern="[0-9]{8}" placeholder="留空则自动生成 8 位数字"></div>
|
||||
<p class="hint">已有 FPV 编号可输入后 8 位数字;留空则自动生成。</p>
|
||||
|
||||
<div class="field-grid photo-fields">
|
||||
<div><label for="photo-1">登记照片 1 <span class="optional">可选</span></label><input id="photo-1" type="file" accept="image/jpeg,image/png,image/webp"></div>
|
||||
<div><label for="photo-2">登记照片 2 <span class="optional">可选</span></label><input id="photo-2" type="file" accept="image/jpeg,image/png,image/webp"></div>
|
||||
</div>
|
||||
<p class="hint">每张最多 5 MB,支持 JPG、PNG 和 WebP。照片保存在本机数据库;同一 SN 再次保存可补充或替换照片。</p>
|
||||
|
||||
<button class="primary" id="register-button" type="submit">保存登记并生成二维码 <span aria-hidden="true">→</span></button>
|
||||
<p class="form-message" id="form-message" role="status"></p>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<section class="panel result-panel" aria-labelledby="result-title">
|
||||
<div class="panel-head"><div><span class="step muted">02</span><h2 id="result-title">二维码与核验</h2></div><span class="subtle">同机使用</span></div>
|
||||
<div id="empty-result" class="empty-state"><div class="empty-glyph">▦</div><b>等待登记</b><span>保存后在这里生成二维码,供本地版上位机读取。</span></div>
|
||||
<div id="record-result" class="record-result" hidden>
|
||||
<div class="qr-stage" id="qr-stage" aria-label="本地登记二维码"></div>
|
||||
<div class="record-kicker">本地记录已保存</div>
|
||||
<div class="uas-display" id="display-uas"></div>
|
||||
<dl class="result-fields"><div><dt>Serial No.</dt><dd id="display-sn"></dd></div><div><dt>机型</dt><dd id="display-model"></dd></div><div><dt>登记人</dt><dd id="display-owner"></dd></div></dl>
|
||||
<div class="saved-photos" id="saved-photos" hidden>
|
||||
<a id="photo-1-link" target="_blank" rel="noopener" hidden><img id="photo-1-preview" alt="登记照片 1"><span>照片 1</span></a>
|
||||
<a id="photo-2-link" target="_blank" rel="noopener" hidden><img id="photo-2-preview" alt="登记照片 2"><span>照片 2</span></a>
|
||||
</div>
|
||||
<div class="url-box"><span>二维码内容</span><code id="display-url"></code></div>
|
||||
<div class="result-actions"><button id="download-qr" class="secondary" type="button">下载二维码 PNG</button><button id="copy-url" class="ghost" type="button">复制链接</button></div>
|
||||
<div class="result-actions"><a id="open-card" class="secondary action-link" target="_blank" rel="noopener">打开档案卡</a><a id="download-card" class="ghost action-link">下载离线档案卡</a></div>
|
||||
<p class="result-tip">在本机同时启动登记站和本地版上位机,上传此二维码。上位机会从本地记录读取字段并比对模块 SN。</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<section class="panel history-panel" aria-labelledby="history-title">
|
||||
<div class="panel-head history-head"><div><span class="step muted">03</span><h2 id="history-title">本地登记记录</h2></div><div class="history-controls"><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><label class="select-all"><input id="select-all" type="checkbox">全选 <span id="selected-count">(0)</span></label><button id="export-archive" class="export-button" type="button" disabled>导出档案包</button><button id="export-excel" class="export-button" type="button" disabled>导出 Excel</button><button id="refresh-list" class="text-button" type="button">刷新记录</button></div></div>
|
||||
<p class="history-message" id="history-message" role="status">导出档案包包含离线档案卡、照片和登记信息;Excel 导出为登记表。</p>
|
||||
<div id="history-empty" class="history-empty">暂无登记记录。</div>
|
||||
<div id="history-cards" class="history-cards"></div>
|
||||
<nav class="pagination" aria-label="档案分页"><span>全选仅当前页</span><button id="previous-page" type="button">上一页</button><span id="page-status" aria-live="polite"></span><button id="next-page" type="button">下一页</button></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>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<footer><span>127.0.0.1:8787 · 数据保存在本机</span></footer>
|
||||
</div>
|
||||
<dialog id="edit-dialog" aria-labelledby="edit-title">
|
||||
<form id="edit-form">
|
||||
<h2 id="edit-title">编辑档案</h2><p id="edit-identity"></p><p class="edit-help">SN 与 FPV 编号不可修改;清空机型或登记人后保存,即清除该字段。</p>
|
||||
<label for="edit-model">机型</label><input id="edit-model" maxlength="60">
|
||||
<label for="edit-owner">登记人 / 备注</label><input id="edit-owner" maxlength="40">
|
||||
<div class="edit-photos">
|
||||
<fieldset><legend>照片 1</legend><img id="edit-preview-1" alt="现有照片 1" hidden><label for="edit-photo-1">替换照片 1</label><input id="edit-photo-1" type="file" accept="image/jpeg,image/png,image/webp"><label class="edit-delete"><input id="edit-delete-1" type="checkbox">删除现有照片 1</label></fieldset>
|
||||
<fieldset><legend>照片 2</legend><img id="edit-preview-2" alt="现有照片 2" hidden><label for="edit-photo-2">替换照片 2</label><input id="edit-photo-2" type="file" accept="image/jpeg,image/png,image/webp"><label class="edit-delete"><input id="edit-delete-2" type="checkbox">删除现有照片 2</label></fieldset>
|
||||
</div>
|
||||
<p id="edit-message" role="status"></p><div class="result-actions"><button id="edit-save" class="secondary" type="submit">保存修改</button><button id="edit-cancel" class="ghost" type="button">取消</button></div>
|
||||
</form>
|
||||
</dialog>
|
||||
Reference in New Issue
Block a user