<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:sptg="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
    </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">
                                <input type="text" id="s_name" 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" style="padding:0;">
                        <div style="padding-bottom: 10px;">
                            <button class="layui-btn layuiadmin-btn-admin" lay-submit lay-filter="push" sptg:security="device:time:strategy:push:add">发布策略</button>
                        </div>
                        <table id="data_entity_table" lay-filter="data_table_event"></table>
                    </div>
                </div>
            </div>
        </div>
    </body>

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

    <!--操作-->
    <script type="text/html" id="table-operate">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detail">详情</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="rollback" sptg:security="device:time:strategy:push:rollback">撤回</a>
    </script>
    <!-- 发布方式 -->
    <script type="text/html" id="push_type">
        {{# if(d.pushType == 1){ }}
        <span>按小区发布</span>
        {{# }else if (d.pushType == 2){  }}
        <span>按单元发布</span>
        {{# }else if (d.pushType == 3){  }}
        <span>按设备发布</span>
        {{# }else if (d.pushType == 4){ }}
        <span>按区域发布</span>
        {{# } }}
    </script>
</html>