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,8 @@ from app.models import (
get_latest_test_state,
get_automation_averages,
get_automation_records,
get_latest_wave_data,
get_wave_records,
clear_serialnet_records,
insert_log,
)
@@ -118,9 +120,13 @@ def api_automation_progress(dnt_id):
latest = get_latest_test_state(dnt_id)
averages = get_automation_averages(dnt_id, since if since else None)
records = get_automation_records(dnt_id, since) if since else []
latest_wave = get_latest_wave_data(dnt_id)
wave_records = get_wave_records(dnt_id, since) if since else []
return jsonify({
"stats": stats,
"latest": latest,
"averages": averages,
"records": records,
"latest_wave": latest_wave,
"wave_records": wave_records,
})