Files
vd_test_fixture/edc-web/app/static/css/style.css
wangfq dbe5d1cefb 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 子模块更新
2026-05-29 17:26:07 +08:00

172 lines
9.6 KiB
CSS

/* === Reset & Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f5f6fa; color: #333; }
/* === Top Menu === */
.top-menu { background: #2c3e50; padding: 0 24px; display: flex; gap: 0; }
.top-menu a { color: #bdc3c7; text-decoration: none; padding: 14px 24px; font-size: 15px; transition: .2s; }
.top-menu a:hover { color: #fff; background: #34495e; }
.top-menu a.active { color: #fff; background: #3498db; }
.top-menu .user-info { margin-left: auto; color: #bdc3c7; padding: 14px 0; font-size: 13px; display: flex; align-items: center; gap: 12px; }
.top-menu .user-info a { padding: 4px 12px; background: #e74c3c; border-radius: 4px; font-size: 12px; }
.top-menu .user-info a:hover { background: #c0392b; }
/* === Container === */
.container { max-width: 1400px; margin: 24px auto; padding: 0 24px; }
/* === Table === */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
th { background: #ecf0f1; text-align: left; padding: 12px 14px; font-size: 13px; font-weight: 600; color: #555; }
td { padding: 10px 14px; font-size: 13px; border-bottom: 1px solid #f0f0f0; }
tr:hover { background: #f8f9fa; }
/* === Online Status === */
.status-online { color: #27ae60; font-weight: 600; }
.status-offline { color: #bdc3c7; }
/* === Editable Name === */
.editable-name { cursor: pointer; border-bottom: 1px dashed transparent; }
.editable-name:hover { border-bottom-color: #3498db; }
.editable-name input { width: 120px; padding: 2px 6px; border: 1px solid #3498db; border-radius: 3px; font-size: 13px; }
/* === 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; }
.test-header a { color: #3498db; text-decoration: none; font-size: 14px; }
.test-layout { display: flex; gap: 24px; }
.test-control { flex: 1; min-width: 380px; }
.test-control h3 { margin: 16px 0 10px; font-size: 15px; color: #555; }
.test-control h3:first-child { margin-top: 0; }
.test-info { flex: 1; min-width: 350px; }
.test-info h3 { margin: 0 0 10px; font-size: 15px; color: #555; }
/* === Command Buttons === */
.cmd-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-cmd { padding: 10px 16px; background: #ecf0f1; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; font-size: 13px; transition: .15s; }
.btn-cmd:hover { background: #3498db; color: #fff; border-color: #3498db; }
/* === Automation === */
.automation { background: #fff; padding: 16px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-top: 12px; }
.automation label { font-size: 14px; }
.automation input[type="number"] { width: 80px; padding: 4px 8px; margin: 0 8px; border: 1px solid #ccc; border-radius: 4px; }
.btn-start, .btn-stop { padding: 8px 24px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; color: #fff; margin-left: 12px; }
.btn-start { background: #27ae60; }
.btn-start:hover { background: #219a52; }
.btn-stop { background: #e74c3c; }
.btn-stop:hover { background: #c0392b; }
/* === Progress === */
.progress-container { margin: 14px 0 8px; background: #ecf0f1; border-radius: 10px; height: 24px; overflow: hidden; position: relative; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #27ae60, #2ecc71); border-radius: 10px; width: 0%; transition: width .3s; }
.progress-text { position: absolute; top: 0; left: 0; right: 0; text-align: center; line-height: 24px; font-size: 12px; color: #333; }
.stats { display: flex; gap: 20px; font-size: 13px; }
.stats strong { font-size: 16px; }
/* === Latest Result === */
#latest-result { background: #fff; padding: 14px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); min-height: 60px; }
#latest-result p { margin: 4px 0; font-size: 13px; }
#latest-result .placeholder { color: #999; font-style: italic; }
/* === Average Table === */
#avg-table { margin-top: 12px; }
#avg-table td { padding: 6px 10px; }
#avg-table td:nth-child(2) { font-weight: 600; text-align: right; }
#avg-table td:nth-child(3) { color: #888; font-size: 12px; }
/* === Search Bar === */
.search-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar label { font-size: 13px; }
.search-bar input { padding: 6px 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 13px; }
.search-bar input[type="text"] { width: 180px; }
.btn-search, .btn-export { padding: 6px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; color: #fff; }
.btn-search { background: #3498db; }
.btn-export { background: #27ae60; margin-left: auto; }
/* === Pagination === */
.pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; }
.pagination button { padding: 6px 12px; border: 1px solid #ddd; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination button.active { background: #3498db; color: #fff; border-color: #3498db; }
.pagination button:hover:not(.active):not(:disabled) { background: #ecf0f1; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
/* === Responsive === */
@media (max-width: 900px) {
.test-layout { flex-direction: column; }
.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; }