<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
    <link xmlns:th="http://www.thymeleaf.org" rel="stylesheet" th:href="${'/css/estate/access.css'}" media="all">
</head>
<body>
<div class="layui-fluid">
    <button type="button" lay-submit="" lay-filter="refresh" class="layui-btn layui-btn-primary layui-btn-sm"
            style="display:block;margin:0 auto">
        <i class="layui-icon layui-icon-refresh" style="font-size: 20px"></i>
    </button>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-body" pad15>
                    <div class="layui-form">
                        <input type="hidden" name="id" id="id" th:value="${accessRecords.id}"/>
                        <fieldset class="layui-elem-field">
                            <legend>用户信息</legend>
                            <div class="layui-field-box">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">开门用户姓名：</label>
                                    <div class="layui-input-inline">
                                        <span class="detail-info" th:text="${accessRecords.openUserName}"></span>
                                    </div>
                                    <label class="layui-form-label">手机号：</label>
                                    <div class="layui-input-inline">
                                        <span class="detail-info" th:text="${accessRecords.openUserTel}"></span>
                                    </div>
                                    <label class="layui-form-label">住户性别：</label>
                                    <div class="layui-input-inline">
                                        <span th:if="${accessRecords.accessSex == 0}" class="detail-info">未定义</span>
                                        <span th:if="${accessRecords.accessSex == 1}" class="detail-info">男</span>
                                        <span th:if="${accessRecords.accessSex == 2}" class="detail-info">女</span>
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                        <fieldset class="layui-elem-field">
                            <legend>设备信息</legend>
                            <div class="layui-field-box">
                                <div class="layui-form-item">
                                    <!--<label class="layui-form-label">设备别名：</label>
                                    <div class="layui-input-inline">
                                        <span class="detail-info"  th:text="${device.alias}" ></span>
                                    </div>-->
                                    <label class="layui-form-label">设备名称：</label>
                                    <div class="layui-input-inline">
                                        <span class="detail-info" th:text="${accessRecords.deviceName}"></span>
                                    </div>
                                    <label class="layui-form-label">设备位置：</label>
                                    <div class="layui-input-inline">
                                        <span class="detail-info" th:text="${accessRecords.installPath}"></span>
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                        <fieldset class="layui-elem-field">
                            <legend>开门信息</legend>
                            <div class="layui-field-box">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">开门用户类型：</label>
                                    <!--                                    <div class="layui-input-inline" th:switch="${accessRecords.accessUserType}">-->
                                    <!--                                        <p th:case="0" class="detail-info">保安</p>-->
                                    <!--                                        <p th:case="1" class="detail-info">快递</p>-->
                                    <!--                                        <p th:case="2" class="detail-info">外卖</p>-->
                                    <!--                                        <p th:case="3" class="detail-info">清洁</p>-->
                                    <!--                                        <p th:case="*" class="detail-info">其他</p>-->
                                    <!--                                    </div>-->
                                    <div class="layui-input-inline" th:switch="${accessRecords.isAdmin}">
                                        <div class="layui-input-inline" th:case="1">
                                            <div class="layui-input-inline" th:switch="${accessRecords.accessUserType}">
                                                <p th:case="0" class="detail-info">保安</p>
                                                <p th:case="1" class="detail-info">快递</p>
                                                <p th:case="2" class="detail-info">外卖</p>
                                                <p th:case="3" class="detail-info">清洁</p>
                                                <p th:case="*" class="detail-info">其他</p>
                                            </div>
                                        </div>
                                        <div class="layui-input-inline" th:case="2">
                                            <div class="layui-input-inline" th:switch="${accessRecords.accessUserType}">
                                                <p th:case="0" class="detail-info">业主</p>
                                                <p th:case="1" class="detail-info">家属</p>
                                                <p th:case="2" class="detail-info">租客</p>
                                            </div>
                                        </div>
                                        <div class="layui-input-inline" th:case="3">
                                            <div class="layui-input-inline" th:switch="${accessRecords.accessUserType}">
                                                <p th:case="0" class="detail-info">朋友</p>
                                                <p th:case="1" class="detail-info">外卖</p>
                                                <p th:case="2" class="detail-info">快递</p>
                                                <p th:case="*" class="detail-info">其他</p>
                                            </div>
                                        </div>
                                    </div>
                                    <label class="layui-form-label">开门方式：</label>
                                    <div class="layui-input-inline">
                                        <span th:if="${accessRecords.openDoorType == 0}" class="detail-info">人脸开门</span>
                                        <span th:if="${accessRecords.openDoorType == 1}" class="detail-info">密码开门</span>
                                        <span th:if="${accessRecords.openDoorType == 2}" class="detail-info">刷卡开门</span>
                                        <span th:if="${accessRecords.openDoorType == 3}" class="detail-info">远程开门</span>
                                    </div>
                                    <label class="layui-form-label">开门时间：</label>
                                    <div class="layui-input-inline">
                                        <!--                                                    <span class="detail-info"  th:text="${accessDate}" ></span>-->
                                        <span class="detail-info"
                                              th:text="${#dates.format(accessDate,'yyyy-MM-dd HH:mm:ss')}"></span>
                                    </div>
                                    <label class="layui-form-label">数据来源：</label>
                                    <div class="layui-input-inline">
                                        <!--<span class="detail-info" th:text="${}" ></span>-->
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                        <fieldset class="layui-elem-field" th:if="${accessRecords.openDoorType == 0}">
                            <legend>图片信息</legend>
                            <div class="layui-field-box">
                                <div class="layui-input-inline">
                                    <label class="layui-form-label">开门人脸：</label>
                                    <div th:if="${user != null}" style="width:182px;margin-right:5px;float:left"
                                         class="avatar">
                                        <div th:if="${user.imageUri != null}">
                                            <img th:src="${fastDfsServer + user.imageUri}">
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-input-inline">
                                    <label class="layui-form-label">抓拍图片：</label>
                                    <div th:if=" ${accessRecords.snapshoUri != null && accessRecords.snapshoUri != ''}"
                                         style="width:182px;margin-right:5px;float:left" class="avatar">
                                        <img th:src="${fastDfsServer + accessRecords.snapshoUri}">
                                    </div>
                                </div>
                            </div>
                        </fieldset>
                        <fieldset class="layui-elem-field" th:if="${accessRecords.openDoorType == 2}">
                            <legend>卡信息</legend>
                            <div class="layui-field-box">
                                <div class="layui-input-inline">
                                    <label class="layui-form-label">开门卡号：</label>
                                    <span class="detail-info" th:text="${accessRecords.accessCardNo}"></span>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- javascript -->
<script th:src="@{'/layui/layui.js'}"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script type="text/javascript" th:src="@{'/js/estate/detail-refresh.js'}"></script>
</body>
</html>
