<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <!-- 样式 -->
        <link rel="stylesheet" th:href="@{'/css/permission/community-add.css'}" media="all">

        <style>
            .textAlign {
                text-align: center;
            }
        </style>
    </head>
    <body>

        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-form">
                                <fieldset class="layui-elem-field">
                                    <legend>配置基本信息</legend>
                                    <div class="layui-field-box">
                                        <div class="layui-form-item">
                                            <label class="layui-form-label"><span class="must">*</span><span>配置名称:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="name" type="text" lay-verify="required|specialCharacters|length" placeholder="请输入配置名称" autocomplete="off" class="layui-input" />
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>设备厂商:</span></label>
                                            <!-- 设备厂商 -->
                                            <div class="layui-input-inline">
                                                <div class="layui-input-inline">
                                                    <div id="deviceFactory"></div>
                                                </div>
                                                <!--<select name="deviceFactory" lay-filter="deviceFactory" lay-verify="required">-->
                                                    <!--<option value="">请选择</option>-->
                                                    <!--<option value="JVT" th:checked="true">JVT</option>-->
                                                    <!--<option value="qinlin" th:checked="true">qinlin</option>-->
                                                <!--</select>-->
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>设备型号:</span></label>
                                            <!-- 设备型号 -->
                                            <div class="layui-input-inline">
                                                <input name="typeCode" type="text" lay-verify="required" autocomplete="off" class="layui-input textAlign" />
                                            </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"><span class="must">*</span><span>是否支持门禁卡片功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveCard" lay-filter="isHaveCard" value="1" title="是" checked>
                                                <input type="radio" name="haveCard" lay-filter="isHaveCard" value="2" title="否">
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>是否支持人脸识别功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveFace" lay-filter="isHaveFace" value="1" title="是" checked>
                                                <input type="radio" name="haveFace" lay-filter="isHaveFace" value="2" title="否">
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>是否支持键盘功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveKeyboard" lay-filter="isHaveKeyboard" value="1" title="是" checked>
                                                <input type="radio" name="haveKeyboard" lay-filter="isHaveKeyboard" value="2" title="否">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label"><span class="must">*</span><span>是否支持视频通话功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveCall" lay-filter="isHaveCall" value="1" title="是" checked>
                                                <input type="radio" name="haveCall" lay-filter="isHaveCall" value="2" title="否">
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>是否支持一键重启功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="reboot" lay-filter="reboot" value="1" title="是" checked>
                                                <input type="radio" name="reboot" lay-filter="reboot" value="2" title="否" >
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>是否支持广告功能:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveAd" lay-filter="isHaveAd" value="1" title="是" checked>
                                                <input type="radio" name="haveAd" lay-filter="isHaveAd" value="2" title="否" >
                                            </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"><span class="must">*</span><span>设备尺寸:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="size" type="number" lay-verify="required" placeholder=""
                                                       autocomplete="off" class="layui-input textAlign" />
                                            </div>
                                            <!-- 屏幕亮度 -->
                                            <label class="layui-form-label"><span class="must">*</span><span>屏幕亮度:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="screenBrightness" type="number" lay-verify="required|size" placeholder="提示：请输入0-100的数字"
                                                       autocomplete="off" class="layui-input textAlign" />
                                            </div>
                                            <!-- 开门时长 -->
                                            <label class="layui-form-label"><span class="must">*</span><span>开门时长:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="delay" type="number" lay-verify="required" value="5" autocomplete="off" class="layui-input textAlign">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <!-- 显示姓名 -->
                                            <label class="layui-form-label"><span>显示姓名:</span></label>
                                            <div class="layui-input-inline">
                                                <div id="isShowUsername"></div>
                                                <!--<select name="isShowUsername">
                                                    <option value="1">显示</option>
                                                    <option selected value="2">不显示</option>
												</select>-->
                                            </div>
                                            <!-- 通话音量 -->
                                            <label class="layui-form-label" id="callVolumeLabel"><span class="must">*</span><span>通话音量:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="callVolume" type="number" lay-verify="required|size" placeholder="提示：请输入0-100的数字"
                                                       value="80" autocomplete="off" class="layui-input textAlign" />
                                            </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"><span class="must">*</span><span>广告音量:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="adVolume" type="number" lay-verify="required|size" placeholder="提示：请输入0-100的数字"
                                                       autocomplete="off" class="layui-input textAlign" />
                                            </div>
                                            <!-- 播放模式 -->
                                            <label class="layui-form-label"><span>广告播放模式:</span></label>
                                            <div class="layui-input-inline">
                                                <div id="playModel"></div>
                                                <!--<select name="playModel">
                                                    <option value="1">循环播放</option>
                                                    <option selected value="2">靠近播放</option>
                                                    <option value="3">按性别和年龄播放</option>
                                                </select>-->
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                                <fieldset class="layui-elem-field" id="face_options">
                                    <legend>人脸识别功能设置</legend>
                                    <div class="layui-field-box">
                                        <div class="layui-form-item">
                                            <!-- 补光灯亮度 -->
                                            <label class="layui-form-label"><span class="must">*</span><span>补光灯亮度:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="fillLight" type="number" lay-verify="required|size" placeholder="提示：请输入0-100的数字"
                                                       autocomplete="off" class="layui-input textAlign" />
                                            </div>
                                            <label class="layui-form-label"><span>识别框位置:</span></label>
                                            <div class="layui-input-inline">
                                                <div id="discernBoxPosition"></div>
                                                <!--<select name="discernBoxPosition">
                                                    <option selected value="1">左上角</option>
                                                    <option value="2">左下角</option>
                                                    <option value="3">中间位置</option>
                                                    <option value="4">右下角</option>
												</select>-->
                                            </div>
                                            <!-- 人脸识别度 -->
                                            <label class="layui-form-label"><span class="must">*</span><span>识别度达:</span></label>
                                            <div class="layui-input-inline">
                                                <input name="faceResolution" type="number" placeholder="" value="75"
                                                       class="layui-input textAlign" lay-verify="number|size" />
                                            </div>
                                            <div class="layui-form-mid layui-word-aux">%,时可进行开门</div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label"><span>活体检测:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="liveDetect" value="1" title="开启" checked>
                                                <input type="radio" name="liveDetect" value="2" title="关闭">
                                            </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"><span class="must">*</span><span>开门密码:</span></label>
                                            <div class="layui-input-inline">
                                                    <input name="openDoorPwd" type="number" lay-verify="password" value="000000" autocomplete="off" class="layui-input">
                                            </div>
                                            <label class="layui-form-label"><span class="must">*</span><span>是否有管理密码:</span></label>
                                            <div class="layui-input-inline">
                                                <input type="radio" name="haveAdminPwd" lay-filter="haveAdminPwd" value="1" title="是" checked>
                                                <input type="radio" name="haveAdminPwd" lay-filter="haveAdminPwd" value="2" title="否">
                                            </div>
                                            <label class="layui-form-label" id="adminPwdLabel"><span class="must">*</span><span>管理密码:</span></label>
                                            <div class="layui-input-inline" id="adminPwdInput">
                                                <input name="adminPwd" type="number" lay-verify="adminPassword" value="123456" autocomplete="off" class="layui-input">
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                                <!-- 备注 -->
                                <fieldset class="layui-elem-field">
                                    <legend>备注</legend>
                                    <div class="layui-field-box">
                                        <div class="layui-input-block" style="margin-left: 10px">
                                            <textarea name="remark" placeholder="请输入内容" class="layui-textarea w500" style="width: 1200px"></textarea>
                                        </div>
                                    </div>
                                </fieldset>
                                <!-- 按钮 -->
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="entity_submit_event">提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </body>
    <!-- javascript -->
    <!--去掉input type="number"后面的箭头-->
    <style type="text/css">
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
        }
        input[type="number"] {
            -moz-appearance: textfield;
        }
    </style>

    <script type="text/javascript" th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/device/device-template-add.js'}" charset="utf-8"></script>
</html>
