<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计量测试报告</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <div class="container">
        <header class="header">
            <h1>🎯 计量测试报告</h1>
            <p class="report-info">生成时间: {generation_time}</p>
            <p class="report-info">测试用例数: {total_cases}</p>
            <button onclick="exportModifiedHTML()" style="margin-top: 15px; padding: 10px 20px; background: #7c8fc2; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;" 
                    onmouseover="this.style.background='#6b7fb0'" 
                    onmouseout="this.style.background='#7c8fc2'"
                    title="导出修改后的HTML文件，保存您的状态修改">
                💾 导出修改后的HTML
            </button>
        </header>
        
        <div class="summary-section">
            {summary_html}
        </div>
        
        <div class="content-section">
            <!-- 状态过滤控件 -->
            <div class="filter-section" style="margin-bottom: 20px; padding: 15px; background: #f5f7fa; border-radius: 8px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap;">
                <label style="font-weight: 600; color: #7c8fc2; font-size: 14px;">筛选状态:</label>
                <div style="display: flex; gap: 10px; flex-wrap: wrap;">
                    <button onclick="filterByStatus('all')" id="filter-all" class="filter-btn active" style="padding: 8px 16px; border: 2px solid #7c8fc2; border-radius: 6px; background: #7c8fc2; color: white; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;">
                        全部
                    </button>
                    <button onclick="filterByStatus('pass')" id="filter-pass" class="filter-btn" style="padding: 8px 16px; border: 2px solid #5db884; border-radius: 6px; background: white; color: #5db884; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;">
                        ✅ 通过
                    </button>
                    <button onclick="filterByStatus('diff')" id="filter-diff" class="filter-btn" style="padding: 8px 16px; border: 2px solid #d6a884; border-radius: 6px; background: white; color: #d6a884; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;">
                        ⚠️ 有差异
                    </button>
                    <button onclick="filterByStatus('fail')" id="filter-fail" class="filter-btn" style="padding: 8px 16px; border: 2px solid #d6848a; border-radius: 6px; background: white; color: #d6848a; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s;">
                        ❌ 失败
                    </button>
                </div>
                <span id="filter-count" style="margin-left: auto; color: #555; font-size: 14px;"></span>
            </div>
            
            <div class="table-container">
                <table class="table-view">
                    <thead>
                        <tr>
                            {table_headers}
                        </tr>
                    </thead>
                    <tbody id="test-cases-table-body">
                        {table_rows}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    
    <script src="script.js"></script>
</body>
</html>

