<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入bootstrap样式 -->
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <script type="text/javascript" src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <meta charset="UTF-8">
    <title>采集情况统计</title>

    <style type="text/css">
        td, th {
            text-align: center;
        }
    </style>

    <script>
        $(function () {

            //全选与全不选
            $("#firstCb").click(function () {
                var u = $("input[name='uid']")
                for (var i = 0; i < u.length; i++) {
                    u[i].checked = this.checked;
                }
            });

            //1. 获取数据行的奇数行的tr
            $("tr:gt(0):odd").css("backgroundColor","#e8f4ff");
            //2. 获取数据行的偶数行的tr
            $("tr:gt(0):even").css("backgroundColor","#dbe8f2");
        })

    </script>

</head>
<body>
<div class="container">

    <h3 style="text-align: center;color: black;font-family: 黑体">采集情况统计</h3>
    <div style="float: left;margin-bottom: 20px;margin-top: 10px">

        <form th:action="@{/api/collectionlog/statistics}" class="form-inline" method="get" id="form" autocomplete="off">
            <div class="form-group">
                <label for="sign">查询范围</label>
                <select  class="form-control" id="sign" name="sign" >
                    <option value="0">请选择</option>
                    <option value="1">最近1小时内统计</option>
                    <option value="0">最近24小时内统计</option>
                </select>
            </div>


            <button type="submit" class="btn btn-primary">查询</button>
        </form>

    </div>


        <table border="1" class="table table-bordered table-hover">
            <tr style="background-color: #76aef0">
                <th th:text="${signValue}" ></th>
                <th></th>
                <th></th>
                <th></th>
            </tr>
            <tr style="background-color: #76aef0">
                <th>采集名称</th>
                <th>采集编码</th>
                <th>信息源接收数量</th>
                <th>资讯采集数量</th>
            </tr>

            <tr th:if="${list != null}" th:each="map,stat:${list}">
                <td th:text="${map.get('name')}"></td>
                <td th:text="${map.get('code')}"></td>
                <td th:text="${map.get('countSource')}"></td>
                <td th:text="${map.get('countInfo')}"></td>
            </tr>

        </table>

</div>

<script>
    $(function () {
        $("li").click(function () {
            $(this).attr("class", "active")
        })
    })
</script>

</body>
</html>