<!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/server-user-open-permission.css'}" media="all">
    <style type="text/css">
        .layui-form-item .layui-input-inline {height: 38px;line-height: 38px; }
    </style>
</head>
<body>
 <div class="layui-fluid">
    <div class="layui-upload ">
        <div class="layui-form" lay-filter="">
            <div class="layui-form-item" style="border-bottom: 1px solid #ccc;">
                <div class="layui-col-md3">
                    <div class="layui-upload-picture picture-bg">
                        <p class="name-info" th:text="'姓名：'+ ${serverUser?.name}"></p>
                        <div id="picture-img" class="picture-img">
                            <img id="default_img" th:src="@{'/images/picture.png'}" alt="">
                            <div id="webcam"></div>
                            <canvas id="canvas" hidden="hidden"></canvas>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md8 layui-upload-picture">
                    <div class="layui-upload-list layui-inline " >
                        <div class="layer-photos-content" th:if="${serverUser.serverUserFaceImage != null && serverUser.serverUserFaceImage != ''}">
                            <input type="hidden" name="imgUri" th:value="${serverUser.serverUserFaceImage.imageUri}"  />
                            <img class="layui-upload-img" src="" th:src="${fastDfsServer + serverUser.serverUserFaceImage.imageUri}">
                        </div>
                     </div>
                    <div class="layui-inline">
                        <p class="name-info">人脸登记注意事项：</p>
                        <p class="name-info">1.保证背景为白色的情况下拍摄。</p>
                        <p class="name-info">2.保证光线均匀，避免头像出现左右亮度不均。</p>
                        <p class="name-info">3.刘海不要遮住眉毛，头发不要遮住脸部。</p>
                        <p class="name-info">4.保持自然状态，请将人脸处于显示屏正中，注视摄像头。</p>
                    </div>
                </div>
            </div>
            <div class="" style="padding: 15px;">
                门禁卡：
                <div class="layui-form-item">
                        <label class="layui-form-label">卡号：</label>
                        <div class="layui-input-inline">
                            <span th:text="${serverUser?.accessCard?.cardNo}"></span>
                        </div>
                </div>
                <div class="layui-form-item">
                        <label class="layui-form-label">卡有效：</label>
                        <div class="layui-input-inline" style="width:auto;">
                            <span th:text="${serverUser?.accessCard?.beginDate+' - '+serverUser?.accessCard?.endDate}"></span>
                        </div>
                </div>
            </div>
        </div>
    </div>
 </div>
 <!-- javascript -->
 <script th:src="@{'/layui/layui.js'}"></script>
 <script>
     layui.config({
         base: '/' //静态资源所在路径
     });
 </script>
</body>
</html>