<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <link xmlns:th="http://www.thymeleaf.org" rel="shortcut icon" th:href="@{'/favicon.ico'}" type="image/x-icon" media="all" />
        <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/home.css'}" media="all">
        <style>
            .data-block{
                margin-right: 12px;
            }
        </style>
    </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"></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"></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"></span></p>
                </div>
            </div>
        </div>

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

                <div class="layui-col-md12">
                    <div class="bgf8">
                        <div class="layui-row layui-col-space10">
                            <div class="layui-col-xs12 layui-col-sm4" lay-href="/estate/residential/index"  lay-text="小区管理">
                                <div class="layuiadmin-card-text">
                                    <div class="layui-text-top">
                                        <div class="layui-status-img">
                                            <i class="layui-icon1 defined-icon">&#xe637;</i>
                                        </div>
                                        <div class="layui-text-right">
                                            <p>区域</p>
                                            <p id="residential_account" class="lay-big-font" ></p>
                                        </div>
                                    </div>
                                    <p  class="layui-text-bot">本月新增<span class="num" id="residential_month_account" ></span></p>
                                </div>
                            </div>
                            <div class="layui-col-xs12 layui-col-sm4" lay-href="/estate/unit/index"  lay-text="单元管理">
                                <div class="layuiadmin-card-text">
                                    <div class="layui-text-top">
                                        <div class="layui-status-img"><i class="layui-icon1 defined-icon">&#xe91f;</i></div>
                                        <div class="layui-text-right">
                                            <p>单元</p>
                                            <p id="unit_account" class="lay-big-font"></p>
                                        </div>
                                    </div>
                                    <p class="layui-text-bot">本月新增<span class="num" id="unit_month_account"></span></p>
                                </div>
                            </div>
                            <div class="layui-col-xs12 layui-col-sm4" >
                                <div class="layuiadmin-card-text">
                                    <div class="layui-text-top"  lay-href="/estate/user/index" lay-text="住户管理">
                                        <div class="layui-status-img"><i class="layui-icon1 defined-icon">&#xe639;</i></div>
                                        <div class="layui-text-right">
                                            <p>住户</p>
                                            <p id="user_account" class="lay-big-font"></p>
                                        </div>
                                    </div>
                                    <p class="layui-text-bot">
                                        <span class="data-block">本月新增
                                            <span class="num" id="user_month_account"></span>
                                        </span>
                                        <span class="data-block" lay-href="/apply/user/index?checkState=0" lay-text="住户认证记录">待审核
                                            <span class="num" style="color: orangered" id="apply_user_account"></span>
                                        </span>
                                    </p>
                                </div>
                            </div>

                            <div class="layui-col-xs12 layui-col-sm4">
                                <div class="layuiadmin-card-text">
                                    <div class="layui-text-top" lay-href="/device/manage/index" lay-text="设备管理">
                                        <div class="layui-status-img"><i class="layui-icon1 defined-icon">&#xea55;</i></div>
                                        <div class="layui-text-right">
                                            <p>设备</p>
                                            <p id="device_account" class="lay-big-font"></p>
                                        </div>
                                    </div>

                                    <p class="layui-text-bot">
                                        <span class="data-block">本月新增
                                            <span class="num" id="device_month_account"></span>
                                        </span>
                                        <span class="data-block" lay-href="/device/manage/index?onlineStatus=0" lay-text="设备管理">离线设备
                                            <span class="num" style="color: orangered" id="device_offline_count"></span>
                                        </span>
                                    </p>
                                </div>
                            </div>
<!--                            <div class="layui-col-xs12 layui-col-sm4" lay-href="/ad/push/task/index"  lay-text="广告发布管理">-->
<!--                                <div class="layuiadmin-card-text">-->
<!--                                    <div class="layui-text-top"><div class="layui-status-img"><i class="layui-icon1 defined-icon">&#xe655;</i></div>-->
<!--                                        <div class="layui-text-right">-->
<!--                                            <p>广告投放</p>-->
<!--                                            <p id="ad_account" class="lay-big-font"></p>-->
<!--                                        </div>-->
<!--                                    </div>-->
<!--                                    <p class="layui-text-bot">本月新增<span class="num" id="ad_month_account"></span></p>-->
<!--                                </div>-->
<!--                            </div>-->
                            <div class="layui-col-xs12 layui-col-sm4" lay-href="/statistics/member/index"  lay-text="会员注册详情">
                                <div class="layuiadmin-card-text">
                                    <div class="layui-text-top"><div class="layui-status-img"><i class="layui-icon1 defined-icon" style="font-size: 32px !important;">&#xe72a;</i></div>
                                        <div class="layui-text-right">
                                            <p>用户数</p>
                                            <p id="member_account" class="lay-big-font"></p>
                                        </div>
                                    </div>
                                    <p class="layui-text-bot">本月新增<span class="num" id="member_month_account"></span></p>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>

<!--                小区统计数据-->
<!--                <div class="layui-col-xs12">-->
<!--                    <div class="layui-card">-->
<!--                        <div class="layui-card-body">-->
<!--                            <div class="layui-tab layui-tab-brief">-->
<!--                                <div class="layui-tab-content">-->
<!--                                    <div class="layui-tab-item layui-show">-->
<!--                                        <div class="layui-row layui-col-space30">-->
<!--                                            <div class=" layui-col-md6">-->
<!--                                                <div id="residential_org_data" style="width:100%;height: 500px;"></div>-->
<!--                                            </div>-->
<!--                                            <div class=" layui-col-md6">-->
<!--                                                <div id="residential_est_data" style="width:100%;height: 500px;"></div>-->
<!--                                            </div>-->
<!--                                        </div>-->
<!--                                    </div>-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </div>-->
<!--                    </div>-->
<!--                </div>-->

                <div class="layui-col-sm12">
                    <div class="layui-card">
                        <div class="layui-tab layui-tab-brief" lay-filter="tabZZT">
                            <div style="overflow: hidden;border-bottom: 1px solid #e8e8e8;">
                            <ul class="layui-tab-title" style="float:left;">
                                <li class="layui-this">设备故障次数</li>
                                <li>广告观看次数</li>
                            </ul>
                                <div class="layui-card-header hei"  style="float:right;margin-right:15px;">
                                    <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 href="/statistics/data/cockpit/homeDataCockpit" target="_blank">-->
                                    <!--<span  class="layuiadmin-btn-group" style="right: 190px;">首页天视眼</span>-->
                                    <!--</a>-->
                                    <!--<a href="/statistics/data/cockpit/estateDataCockpit" target="_blank">-->
                                    <!--<span  class="layuiadmin-btn-group" style="right: 100px;">物业天视眼</span>-->
                                    <!--</a>-->
                                    <!--<a href="/statistics/data/cockpit/adDataCockpit" target="_blank">-->
                                    <!--<span  class="layuiadmin-btn-group">广告天视眼</span>-->
                                    <!--</a>-->
                                </div>
                            </div>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <div class="layui-row layui-col-space30">
                                        <div class="layui-col-xs12 layui-col-md8">
                                            <div id="device_data" 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="device_rank_id">
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                        <div class="layui-row layui-col-space30">
                                            <div class=" layui-col-md8">
                                                <div id="ad_data" style="width:100%;height: 360px;"></div>
                                            </div>
                                            <div class=" 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;">
                                                    <tr style="background: none;color: #333;">
                                                        <th colspan="3" class="font18">广告观看次数省份排名</th>
                                                    </tr>
                                                    </thead>
                                                    <tbody id="ad_rank_id">
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-row">
                            <div class="layui-card-header font18">设备开门方式占比</div>
                            <div id="open_data" style="width:100%;height: 360px;"></div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md6">
                    <div class="layui-card">
                        <div class="layui-row">
                            <div class="layui-card-header font18">广告观看类别占比</div>
                            <div id="ad_type_data" style="width:100%;height: 360px;"></div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-xs12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief">
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-row layui-col-space30">
                                            <div class=" layui-col-md8">
                                                <div id="member_data" style="width:100%;height: 360px;"></div>
                                            </div>
                                            <div class=" layui-col-md4">
                                                <div id="member_per_data" style="width:100%;height: 360px;"></div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </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/home.js'}"></script>
        <script th:src="@{'/lib/index.js'}"></script>
    </body>
</html>