65 lines
1.9 KiB
HTML
65 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}测试信息 - EDC 工装管理系统{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2>测试信息</h2>
|
|
|
|
<div class="view-tabs">
|
|
<button id="tab-all" class="tab-btn active" onclick="switchView('all')">全部数据</button>
|
|
<button id="tab-b2" class="tab-btn" onclick="switchView('b2')">灵敏度测试 (0xB2)</button>
|
|
<button id="tab-b4" class="tab-btn" onclick="switchView('b4')">波动测试 (0xB4)</button>
|
|
</div>
|
|
|
|
<div class="search-bar">
|
|
<label>
|
|
设备编码:
|
|
<input type="text" id="search-serial" placeholder="输入设备编码搜索...">
|
|
</label>
|
|
<label>
|
|
日期范围:
|
|
<input type="date" id="search-date-from">
|
|
至
|
|
<input type="date" id="search-date-to">
|
|
</label>
|
|
<button onclick="searchData(1)" class="btn-search">搜索</button>
|
|
<button onclick="exportCSV()" class="btn-export">导出 CSV</button>
|
|
<label style="margin-left:16px;">
|
|
每页:
|
|
<select id="per-page" onchange="searchData(1)" style="width:70px;">
|
|
<option value="20">20</option>
|
|
<option value="50">50</option>
|
|
<option value="100">100</option>
|
|
</select>
|
|
</label>
|
|
</div>
|
|
|
|
<table id="test-data-table">
|
|
<thead></thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
|
|
<div class="pagination" id="pagination"></div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<style>
|
|
.view-tabs { margin-bottom: 16px; display: flex; gap: 8px; }
|
|
.tab-btn {
|
|
padding: 8px 20px;
|
|
border: 1px solid #ccc;
|
|
background: #f5f5f5;
|
|
cursor: pointer;
|
|
border-radius: 4px 4px 0 0;
|
|
font-size: 14px;
|
|
transition: all .2s;
|
|
}
|
|
.tab-btn.active {
|
|
background: #2c3e50;
|
|
color: #fff;
|
|
border-color: #2c3e50;
|
|
}
|
|
.tab-btn:hover:not(.active) { background: #e0e0e0; }
|
|
</style>
|
|
<script src="{{ url_for('static', filename='js/test_data.js') }}"></script>
|
|
{% endblock %}
|