<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>

        <style>
            .xm-toolbar .toolbar-tag {
                width: 100%;
                display: flex;
                justify-content: center;
                background-color: #1E9FFF!important;
                color: #fff!important;
            }
        </style>
    </head>
    <body>
    <div class="layui-fluid">
        <div class="layui-card">
            <div class="layui-form layui-card-header layuiadmin-card-header-auto" style="padding:0;">
                <div class="layui-form-item border-b">
                    <div class="layui-inline">
                        <label class="layui-form-label">所属小区</label>
                        <div class="layui-input-block">
                            <div id="residential_name"></div>
                            <input id="residential_id" type="hidden" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">所属单元</label>
                        <div class="layui-input-block">
                            <div id="unit_name"></div>
                            <input id="unit_id" type="hidden" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">所属房间</label>
                        <div class="layui-input-block">
                            <div id="room_name"></div>
                            <input id="room_id" type="hidden" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">设备位置</label>
                        <div class="layui-input-block">
                            <input type="text" id="install_path" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">开门用户</label>
                        <div class="layui-input-block">
                            <input type="text" name="openUserName" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">用户手机</label>
                        <div class="layui-input-block">
                            <input type="text" name="openUserTel" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>

                    <div class="layui-inline">
                        <label class="layui-form-label">开门方式</label>
                        <div class="layui-input-block">
                            <select id="open_door_type" name="openDoorType">
                                <option value="">全部</option>
                                <option value="0">人脸开门</option>
                                <option value="1">密码开门</option>
                                <option value="2">刷卡开门</option>
                                <option value="3">远程开门</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">出入时间</label>
                        <div class="layui-input-block">
                            <input type="text"  class="layui-input date-icon" id="access_date"  placeholder="请选择" autocomplete="off">
                            <input type="hidden" id="begin_date"  name="beginDate"/>
                            <input type="hidden" id="end_date"  name="endDate" />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">出入卡号</label>
                        <div class="layui-input-block">
                            <input type="text" name="accessCardNo" placeholder="请输入" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-inline" style="margin-left: 38px;">
                        <button class="layui-btn layuiadmin-btn-useradmin"  lay-submit lay-filter="query">查询</button>
                        <button class="layui-btn  layui-btn-primary"  lay-submit lay-filter="reset">重置</button>
                    </div>
                </div>

                <!-- 表格+头部按钮 -->
                <div class="layui-card-body" id="layPhotosTbImg"  style="padding:0;">
                    <table id="table_id" lay-filter="table_event"></table>
                </div>
            </div>
        </div>
    </div>

    <script type="text/html" id="table-useradmin-webuser">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail" sptg:security="estate:access:records:manage">查看详情</a>
    </script>

    <!-- 住户类型 -->
    <script type="text/html" id="is_accessUserType">
        {{#  if(d.isAdmin == 1){ }}
            {{#  if(d.accessUserType == 0){ }}
            <span>保安</span>
            {{#  }else if(d.accessUserType == 1){ }}
            <span>快递</span>
            {{#  }else if(d.accessUserType == 2){ }}
            <span>外卖</span>
            {{#  }else if(d.accessUserType == 3){ }}
            <span>清洁</span>
            {{# }else { }}
            <span>其他</span>
            {{# } }}
        {{#  }else if(d.isAdmin == 2){ }}
            {{#  if(d.accessUserType == 0){ }}
            <span>业主</span>
            {{#  }else if(d.accessUserType == 1){ }}
            <span>家属</span>
            {{# }else { }}
            <span>租客</span>
            {{# } }}
        {{#  }else if(d.isAdmin == 3){ }}
            {{#  if(d.accessUserType == 0){ }}
            <span>朋友</span>
            {{#  }else if(d.accessUserType == 1){ }}
            <span>外卖</span>
            {{#  }else if(d.accessUserType == 2){ }}
            <span>快递</span>
            {{# }else { }}
            <span>其他</span>
            {{# } }}
        {{# }else if(d.isAdmin == 0){ }}
            <span>后台</span>
            {{# } }}
    </script>
    <!-- 住户来源 -->
    <script type="text/html" id="is_openDoorType">
        {{#  if(d.openDoorType == 0){ }}
        <span>人脸开门</span>
        {{#  }else if(d.openDoorType == 1){ }}
        <span>密码开门</span>
        {{#  }else if(d.openDoorType == 2){ }}
        <span>刷卡开门</span>
        {{# }else { }}
        <span>远程开门</span>
        {{# } }}
    </script>
    <!-- 抓拍图片 -->
    <input type="hidden" id="fastDfsServer" th:value="${fastDfsServer}" />
    <script type="text/html" id="is_snapshoUri">
        {{#  if(d.snapshoUri != null && d.snapshoUri != ''){ }}
           <img src="{{fastDfsServer + d.snapshoUri}}" style="display: inline-block; width: 16%; height: 100%;cursor: zoom-in">
        {{# } }}
    </script>
    <script type="text/html" id="is_compareUrl">
        {{#  if(d.compareUrl != null && d.compareUrl != ''){ }}
        <img src="{{fastDfsServer + d.compareUrl}}" style="display: inline-block; width: 16%; height: 100%;cursor: zoom-in">
        {{# } }}
    </script>
    <script type="text/html" id="is_temperature">
        {{#  if(d.temperature != null && d.temperature != ''){ }}
            <span>{{d.temperature}}℃</span>
        {{# } }}
    </script>
    <!-- javascript -->
    <script th:src="@{'/layui/layui.js'}"></script>
    <script>
        layui.config({
            base: '/' //静态资源所在路径
        });
        var fastDfsServer = document.getElementById("fastDfsServer").value;
    </script>
    <script th:src="@{'/js/estate/access-records-manage.js'}"></script>
    </body>
</html>
