feat: 波动测试模式前端适配 — tb_state_tst扩展+0xB4存库+页面更新

- edc_server/models.py: tb_state_tst DDL增加test_mode/data_source + B4字段
  + ALTER TABLE自动迁移 + insert_test_result扩展 + insert_wave_data
- edc_server/handlers.py: 0xB2处理传test_mode、0xB4处理调用insert_wave_data存库
- edc-web/models.py: 新增get_latest_wave_data/get_wave_records + test_mode筛选
- edc-web/routes: test_op返回wave数据、test_data支持test_mode筛选
- 前端: test_op页面增加波动数据显示区+测试模式列
  test_data页面增加test_mode下拉筛选+B4字段列+CSV导出适配
This commit is contained in:
wangfq
2026-06-03 14:14:52 +08:00
parent cf0b308e22
commit a69d7ab1d0
8 changed files with 368 additions and 8 deletions

View File

@@ -9,6 +9,14 @@
设备编码:
<input type="text" id="search-serial" placeholder="输入设备编码搜索...">
</label>
<label>
测试模式:
<select id="search-test-mode">
<option value="">全部</option>
<option value="0">灵敏度测试</option>
<option value="1">波动测试</option>
</select>
</label>
<label>
日期范围:
<input type="date" id="search-date-from">
@@ -27,6 +35,8 @@
<th>DG430地址</th>
<th>设备型号</th>
<th>类型</th>
<th>测试模式</th>
<th>数据来源</th>
<th>是否完成</th>
<th>故障信息</th>
<th>继电器</th>
@@ -38,6 +48,11 @@
<th>离开距离(mm)</th>
<th>进入速度(m/s)</th>
<th>离开速度(m/s)</th>
<th>剩余次数</th>
<th>当前距离(mm)</th>
<th>速度(dm/s)</th>
<th>最近距离(mm)</th>
<th>最远距离(mm)</th>
<th>时间</th>
</tr>
</thead>

View File

@@ -49,6 +49,11 @@
<p class="placeholder">等待设备上报...</p>
</div>
<h3>波动测试数据</h3>
<div id="latest-wave">
<p class="placeholder">暂无波动数据...</p>
</div>
<h3>自动化平均值</h3>
<table id="avg-table">
<tr><td>平均峰峰值</td><td id="avg-ppvalue">-</td><td>V</td></tr>
@@ -65,7 +70,7 @@
<table id="records-table" style="font-size:11px;">
<thead>
<tr>
<th>#</th><th>串口状态</th><th>峰峰值(V)</th><th>开始频率</th><th>进入距离</th><th>离开距离</th><th>速度(m/s)</th><th>时间</th>
<th>#</th><th>串口状态</th><th>模式</th><th>峰峰值(V)</th><th>开始频率</th><th>进入距离</th><th>离开距离</th><th>速度(m/s)</th><th>时间</th>
</tr>
</thead>
<tbody></tbody>