feat: 工装配置页面 + 车检器基准参数管理
- 设备页增加「配置」按钮(devices.js) - 新增工装配置页面(fixture.html+js): 参数表单、5个操作按钮、通信日志区、基准参数表 - 新增车检器基准参数管理页面(vehicle_base_test.html+js): CRUD + 搜索 - 新增 fixture 蓝图(routes/fixture.py): 0x4A~0x4E 指令发送、参数CRUD、serialnet状态查询 - models.py: 新增 get_serialnet_by_id, tb_fixture_param/tb_vechicle_base_test CRUD - edc_server 子模块更新
This commit is contained in:
@@ -32,6 +32,8 @@ tr:hover { background: #f8f9fa; }
|
||||
/* === Buttons === */
|
||||
.btn-test { padding: 4px 14px; background: #3498db; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; }
|
||||
.btn-test:hover { background: #2980b9; }
|
||||
.btn-config { padding: 4px 14px; background: #9b59b6; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; margin-left: 4px; }
|
||||
.btn-config:hover { background: #8e44ad; }
|
||||
|
||||
/* === Test Page Layout === */
|
||||
.test-header { margin-bottom: 20px; }
|
||||
@@ -103,3 +105,67 @@ tr:hover { background: #f8f9fa; }
|
||||
.search-bar { justify-content: center; }
|
||||
.btn-export { margin-left: 0; }
|
||||
}
|
||||
|
||||
/* === Fixture Page === */
|
||||
.fixture-layout { display: flex; gap: 24px; }
|
||||
.fixture-left { flex: 1; min-width: 420px; }
|
||||
.fixture-right { flex: 1; min-width: 380px; }
|
||||
|
||||
.fixture-card { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 16px; }
|
||||
.fixture-card h3 { margin: 0 0 12px; font-size: 15px; color: #555; }
|
||||
|
||||
.fixture-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
|
||||
.fixture-form .form-group { display: flex; flex-direction: column; }
|
||||
.fixture-form .form-group label { font-size: 12px; color: #777; margin-bottom: 3px; }
|
||||
.fixture-form .form-group input,
|
||||
.fixture-form .form-group select { padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
|
||||
|
||||
.fixture-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
|
||||
.btn-fixture { padding: 8px 14px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; font-size: 12px; transition: .15s; background: #ecf0f1; }
|
||||
.btn-fixture:hover { background: #3498db; color: #fff; border-color: #3498db; }
|
||||
.btn-fixture.danger { color: #e74c3c; border-color: #e74c3c; }
|
||||
.btn-fixture.danger:hover { background: #e74c3c; color: #fff; }
|
||||
.btn-fixture.primary { background: #3498db; color: #fff; border-color: #3498db; }
|
||||
.btn-fixture.primary:hover { background: #2980b9; }
|
||||
|
||||
.version-info { margin-top: 8px; padding: 8px 12px; background: #f0f8ff; border-radius: 4px; font-size: 13px; color: #2980b9; }
|
||||
|
||||
.msg-toast { position: fixed; top: 20px; right: 20px; background: #27ae60; color: #fff; padding: 10px 20px; border-radius: 6px; font-size: 14px; z-index: 1000; opacity: 0; transition: opacity .3s; }
|
||||
.msg-toast.show { opacity: 1; }
|
||||
.msg-toast.error { background: #e74c3c; }
|
||||
|
||||
/* === Vehicle base test table in fixture page === */
|
||||
.ref-table-wrapper { max-height: 300px; overflow-y: auto; margin-top: 8px; }
|
||||
.ref-table-wrapper table { font-size: 12px; }
|
||||
.ref-table-wrapper th, .ref-table-wrapper td { padding: 6px 8px; }
|
||||
.ref-table-wrapper tr { cursor: pointer; }
|
||||
.ref-table-wrapper tr:hover { background: #ebf5fb; }
|
||||
.ref-table-wrapper tr.selected { background: #d4e6f1; }
|
||||
|
||||
/* === Vehicle Base Test management === */
|
||||
.vbt-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
|
||||
.btn-add { padding: 8px 18px; background: #27ae60; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
|
||||
.btn-add:hover { background: #219a52; }
|
||||
.btn-edit { padding: 3px 10px; background: #f39c12; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 11px; }
|
||||
.btn-edit:hover { background: #e67e22; }
|
||||
.btn-del { padding: 3px 10px; background: #e74c3c; color: #fff; border: none; border-radius: 3px; cursor: pointer; font-size: 11px; margin-left: 4px; }
|
||||
.btn-del:hover { background: #c0392b; }
|
||||
|
||||
/* === Modal === */
|
||||
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 999; }
|
||||
.modal-box { background: #fff; border-radius: 10px; padding: 24px; width: 480px; max-width: 95vw; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
|
||||
.modal-box h3 { margin: 0 0 16px; font-size: 16px; }
|
||||
.modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
|
||||
.modal-form .form-group { display: flex; flex-direction: column; }
|
||||
.modal-form .form-group.full { grid-column: 1 / -1; }
|
||||
.modal-form label { font-size: 12px; color: #777; margin-bottom: 3px; }
|
||||
.modal-form input, .modal-form select, .modal-form textarea { padding: 6px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
|
||||
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
|
||||
.btn-save { padding: 8px 20px; background: #3498db; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
|
||||
.btn-save:hover { background: #2980b9; }
|
||||
.btn-cancel { padding: 8px 20px; background: #ecf0f1; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; }
|
||||
|
||||
/* === Communication Log === */
|
||||
#comm-log { word-break: break-all; }
|
||||
#comm-log::-webkit-scrollbar { width: 6px; }
|
||||
#comm-log::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }
|
||||
|
||||
Reference in New Issue
Block a user