<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('轮挡统计')"/>
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">

        <div class="col-sm-12 select-table table-striped" id="main" style="width: 100% ;height: 100%">
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: echarts-js" />
<script th:inline="javascript">
    var prefix = ctx + "manage/ledger_rfid";

    $(function () {
        $.post(prefix + "/countRfid", null, function(result) {
            console.log(echarts)

            var chartDom = document.getElementById('main');
            var myChart = echarts.init(chartDom);
            var option;

            option = {
                grid:{
                    top:0,
                    left:0,
                    bottom:0,
                    right:0
                },
                tooltip :{},
                series: [
                    {
                        type: 'treemap',
                        data: result.data

                    }
                ]
            };
            option && myChart.setOption(option);
        });
    });
</script>
</body>
</html>