<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <meta charset="UTF-8">
        <title>常运智慧</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="@{'/layui/css/layui.css'}" media="all">
        <link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="${'/css/admin.css'}" media="all">
        <!-- 样式 -->
        <link rel="stylesheet" th:href="@{'/css/home/estate.css'}" media="all">
    </head>
    <body>
        <div class="title-article list-card ">
            <div class="list-pic"><img th:src="${fastDfsServer + onLineUser.userPortraitUri}"src="../../static/images/user.jpg" alt="Happy birthday ! " class="img-full"></div>
            <h1 th:text="'欢迎回来，'+ ${onLineUser.userName} +'，祝你开心每一天！' "></h1>
            <p><span th:each="role:${onLineUser.roleList}" th:text="${role.name}"></span> | <span th:text="${onLineUser.orgName}"></span></p>
            <div class="title-article-right">
                <div class="profile-infoitem">
                    <p>下属账户</p>
                    <p class="profile-infoitem-number hongbao"><span id="subordinate_account" class="number ng-binding" ng-bind="hongbaocount">0</span></p>
                </div>
                <div class="profile-infoitem">
                    <p>覆盖省份</p>
                    <p class="profile-infoitem-number score"><span id="cover_provice" class="number ng-binding" ng-bind="user.point">0</span></p>
                </div>
                <div class="profile-infoitem">
                    <p>覆盖城市</p>
                    <p class="profile-infoitem-number balance"><span id="cover_city" class="number ng-binding" ng-bind="user.balance| number : 2">0</span></p>
                </div>
                <div class="profile-infoitem">
                    <p>覆盖设备</p>
                    <p class="profile-infoitem-number city"><span id="device_account" class="number ng-binding" ng-bind="user.balance| number : 2">0</span></p>
                </div>
            </div>
        </div>

        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">

                <div class="layui-col-md8">
                    <div class="layui-card">
                        <div class="layui-card-header font18">
                            数据概览
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-row layui-col-space10">
                                <div class="layui-col-xs12 layui-col-sm4" lay-href="/ad/type/index"  lay-text="广告类别管理">
                                    <div class="layuiadmin-card-text bd-right">
                                        <div class="layui-text-top">
                                            <div class="layui-text-right">
                                                <p>广告类别</p>
                                                <p id="ad-type-count" class="lay-big-font">0</p>
                                            </div>
                                        </div>

                                        <p class="layui-text-bot">本月新增<span id="current-month-ad-type-count" class="num">0</span></p>
                                    </div>
                                </div>
                                <div class="layui-col-xs12 layui-col-sm4" lay-href="/statistics/data/cockpit/adDataCockpit"  lay-text="广告发布管理">
                                    <div class="layuiadmin-card-text bd-right">
                                        <div class="layui-text-top">
                                            <div class="layui-text-right">
                                                <p>总投放</p>
                                                <p id="ad-push-count" class="lay-big-font">0</p>
                                            </div>
                                        </div>

                                        <p class="layui-text-bot">本月新增<span id="current-month-ad-push-count" class="num">0</span></p>
                                    </div>
                                </div>
                                <div class="layui-col-xs12 layui-col-sm4" lay-href="/statistics/statisticsAdWatch/detail/index"  lay-text="广告观看详情">
                                    <div class="layuiadmin-card-text">
                                        <div class="layui-text-top">
                                            <div class="layui-text-right">
                                                <p>总观看</p>
                                                <p id="ad-watch-count" class="lay-big-font">0</p>
                                            </div>
                                        </div>

                                        <p  class="layui-text-bot">本月新增<span id="current-month-ad-watch-count" class="num">0</span></p>
                                    </div>
                                </div>


                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md4">
                    <div class="layui-card" style="padding-bottom: 88px;">
                        <div class="layui-card-header font18">快速开始 / 便捷导航</div>
                        <div class="layui-card-body">
                            <div class="layuiadmin-card-link">
                                <a lay-href="/ad/content/index" href="javascript: void(0);" lay-text="广告内容管理"><i class="layui-icon1 defined1-icon">&#xea6a;</i>添加广告</a>
                                <a lay-href="/ad/push/task/index" href="javascript: void(0);" lay-text="发布广告管理"><i class="layui-icon1 defined1-icon">&#xe612;</i>发布广告</a>

                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-sm12">
                    <div class="layui-card-header hei"style="  padding: 0 15px;border-bottom: 1px solid #e8e8e8 ;background: #fff;">
                        <div class="layui-btn-group layuiadmin-btn-groupLeft">
                            <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-sm layui-this" data-type="0">今日</a>
                            <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-sm" data-type="1">本周</a>
                            <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-sm" data-type="2">本月</a>
                            <a href="javascript:;" class="layui-btn layui-btn-primary layui-btn-sm" data-type="3">全年</a>
                        </div>
                        <div id= "year_div" class="layui-inline">
                            <label class="layui-form-label line40">年份</label>
                            <div class="layui-input-inline">
                                <input type="text" class="layui-input" id="year" placeholder="请选择查询日期">
                            </div>
                        </div>
                        <!--<a  th:href="@{'/statistics/data/cockpit/adDataCockpit'}" target="_blank"><span class="layuiadmin-btn-group">天视眼大屏查看数据</span></a>-->
                    </div>
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-row">

                                <div class="layui-col-xs12 layui-col-md8">
                                    <div id="data-view" style="width:100%;height: 360px;"></div>
                                </div>
                                <div class="layui-col-xs12 layui-col-md4">
                                    <table class="layui-table" lay-skin="nob">
                                        <colgroup>
                                            <col width="50">
                                            <col>
                                            <col width="96">
                                        </colgroup>
                                        <thead>
                                        <tr style="background: none;color: #333;">
                                            <th colspan="3" class="font18">省份排名</th>
                                        </tr>
                                        </thead>
                                        <tbody id="ad-watch-rank-id">
                                        <!--<tr>
                                            <td><span class="layui-badge layui-bg-cyan">1</span></td>
                                            <td>广东省</td>
                                            <td>323,234</td>
                                        </tr>
                                         -->
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="layui-col-sm12 layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-card-header font18">观看排行</div>
                        <div class="layui-card-body">
                            <div id="main" style="width: 100%;height:360px;"></div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-sm12 layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-card-header font18">观看类别占比</div>
                        <div class="layui-card-body">
                            <div id="ad-scale" style="width:100%;height: 360px;"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- javascript -->
        <script th:src="@{'/layui/layui.js'}"></script>
        <script th:src="@{'/lib/echarts.common.min.js'}"></script>
        <script th:src="@{'/lib/echartsTheme.js'}"></script>
        <script>
            layui.config({
                //  静态资源所在路径
                base: '/'
            });
        </script>
        <script th:src="@{'/js/home/ad.js'}"></script>
        <script th:src="@{'/lib/index.js'}"></script>
    </body>
</html>
