<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>淮安市司法局</title>
    <meta name="keywords" content="淮安市司法局,法律规定,典型案例,表单下载">
    <meta name="description" content="淮安市司法局官方网站">
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/common.css">
    <style>
        .page-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        .page-header {
            text-align: center;
            margin-bottom: 30px;
        }
        .page-section {
            margin-bottom: 40px;
        }
        .page-section h3 {
            border-bottom: 2px solid #28a745;
            padding-bottom: 10px;
            margin-bottom: 20px;
        }
        .page-list {
            list-style: none;
            padding: 0;
        }
        .page-list li {
            padding: 12px 0;
            border-bottom: 1px dashed #eee;
        }
        .page-list li .date {
            float: right;
            color: #999;
        }
        .page-list li a {
            color: #333;
            text-decoration: none;
        }
        .page-list li a:hover {
            color: #28a745;
        }
        .tab-content {
            padding: 20px 0;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="page-container">
            <div class="page-header">
                <h2>淮安市司法局</h2>
            </div>
            
            <ul class="nav nav-tabs" id="myTab" role="tablist">
                <li class="nav-item" role="presentation">
                    <button class="nav-link active" id="law-tab" data-bs-toggle="tab" data-bs-target="#law" type="button" role="tab" aria-controls="law" aria-selected="true">法律规定</button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="case-tab" data-bs-toggle="tab" data-bs-target="#case" type="button" role="tab" aria-controls="case" aria-selected="false">典型案例</button>
                </li>
                <li class="nav-item" role="presentation">
                    <button class="nav-link" id="form-tab" data-bs-toggle="tab" data-bs-target="#form" type="button" role="tab" aria-controls="form" aria-selected="false">表单下载</button>
                </li>
            </ul>
            <div class="tab-content" id="myTabContent">
                <!-- 法律规定 -->
                <div class="tab-pane fade show active" id="law" role="tabpanel" aria-labelledby="law-tab">
                    <div class="page-section">
                        <ul class="page-list" id="lawList">
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/show.html?Id=000001">劳动法第四十条解读</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/show.html?Id=000002">劳动法第四十一条解读</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/show.html?Id=000003">劳动法第四十二条解读</a>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- 典型案例 -->
                <div class="tab-pane fade" id="case" role="tabpanel" aria-labelledby="case-tab">
                    <div class="page-section">
                        <ul class="page-list" id="caseList">
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/showcase.html?Id=000001">某公司劳动纠纷案例一</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/showcase.html?Id=000002">某公司劳动纠纷案例二</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/showcase.html?Id=000003">某公司劳动纠纷案例三</a>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- 表单下载 -->
                <div class="tab-pane fade" id="form" role="tabpanel" aria-labelledby="form-tab">
                    <div class="page-section">
                        <ul class="page-list" id="formList">
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/table.html?Id=000001">劳动仲裁申请表</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/table.html?Id=000002">劳动合同模板</a>
                            </li>
                            <li>
                                <span class="date">2025-05-28</span>
                                <a href="/table.html?Id=000003">工伤认定申请表</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="row text-center mt-5">
        <div class="col-md-4">
            <div class="card mb-4">
                <div class="card-body">
                    <h5 class="card-title">法律规定</h5>
                    <p class="card-text">查看最新的法律法规和相关规定</p>
                    <a href="/hasfjlaw" class="btn btn-success">查看详情</a>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card mb-4">
                <div class="card-body">
                    <h5 class="card-title">典型案例</h5>
                    <p class="card-text">浏览各类典型法律案例分析</p>
                    <a href="/hasfjcase" class="btn btn-primary">查看详情</a>
                </div>
            </div>
        </div>
        <div class="col-md-4">
            <div class="card mb-4">
                <div class="card-body">
                    <h5 class="card-title">表单下载</h5>
                    <p class="card-text">下载各类法律相关表单</p>
                    <a href="/hasfjform" class="btn btn-danger">查看详情</a>
                </div>
            </div>
        </div>
    </div>

    <script src="/js/jquery.min.js"></script>
    <script src="/js/bootstrap.min.js"></script>
    <script>
        $(function() {
            // 加载法律规定列表
            $.ajax({
                url: '/api/hasfj/laws',
                type: 'GET',
                success: function(res) {
                    if(res.code === 200 && res.data) {
                        var html = '';
                        $.each(res.data, function(index, item) {
                            var date = new Date(item.createTime).toLocaleDateString();
                            html += '<li><span class="date">' + date + '</span><a href="/show.html?Id=' + item.formatId + '">' + item.title + '</a></li>';
                        });
                        if(html) {
                            $('#lawList').html(html);
                        }
                    }
                }
            });
            
            // 加载典型案例列表
            $.ajax({
                url: '/api/hasfj/cases',
                type: 'GET',
                success: function(res) {
                    if(res.code === 200 && res.data) {
                        var html = '';
                        $.each(res.data, function(index, item) {
                            var date = new Date(item.createTime).toLocaleDateString();
                            html += '<li><span class="date">' + date + '</span><a href="/showcase.html?Id=' + item.formatId + '">' + item.title + '</a></li>';
                        });
                        if(html) {
                            $('#caseList').html(html);
                        }
                    }
                }
            });
            
            // 加载表单下载列表
            $.ajax({
                url: '/api/hasfj/forms',
                type: 'GET',
                success: function(res) {
                    if(res.code === 200 && res.data) {
                        var html = '';
                        $.each(res.data, function(index, item) {
                            var date = new Date(item.createTime).toLocaleDateString();
                            html += '<li><span class="date">' + date + '</span><a href="/table.html?Id=' + item.formatId + '">' + item.title + '</a></li>';
                        });
                        if(html) {
                            $('#formList').html(html);
                        }
                    }
                }
            });
        });
    </script>
</body>
</html> 