<!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>
            .layui-layer.alert_content .layui-layer-content {
                padding: 0;
            }
            .layui-layer.alert_content .layui-layer-btn{
                padding: 0 30px 12px;
            }
        </style>
    </head>

    <body style="position: absolute;top:0;bottom: 0;left:0;right: 0;">
        <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" 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" style="padding:0;">
                            <div style="padding-bottom: 10px;">
                                <button class="layui-btn" lay-submit lay-filter="add" sptg:security="device:template:add">添加配置</button>
                            </div>
                            <table id="data_table" lay-filter="data_event"></table>
                        </div>
                    </div>
                </div>
            <!--/*@thymesVar id="onLineUser" type="com.sptg.permissions.api.entity.Account"*/-->
            <input type="hidden" id="user_org_id" th:value="${onLineUser.orgId}" />
        </div>

        <!-- javascript -->
        <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-manage.js'}" charset="utf-8"></script>

        <!-- 是否支持门禁卡 -->
        <script type="text/html" id="have_card">
            {{#  if(d.haveCard == 1){ }}
            <span class="layui-badge layui-bg-green">支持</span>
            {{# } else if(d.haveCard == 2){ }}
            <span class="layui-badge layui-bg-black">不支持</span>
            {{#  } }}
        </script>

        <!-- 是否支持人脸识别 -->
        <script type="text/html" id="have_face">
            {{#  if(d.haveFace == 1){ }}
            <span class="layui-badge layui-bg-green">支持</span>
            {{# } else if(d.haveFace == 2){ }}
            <span class="layui-badge layui-bg-black">不支持</span>
            {{#  } }}
        </script>
        <!-- 设备厂商 -->
        <script type="text/html" id="device_factory">
            {{#  if(d.deviceFactory == "JVT"){ }}
            <span class="layui-badge layui-bg-black">巨龙</span>
            {{#  } }}
            {{#  if(d.deviceFactory == "qinlin"){ }}
            <span class="layui-badge layui-bg-black">亲邻</span>
            {{#  } }}
        </script>

        <!--操作-->
        <script type="text/html" id="table-operate">
            <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit" sptg:security="device:template:update">修改</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete" sptg:security="device:template:delete">删除</a>
        </script>

    </body>

</html>
