<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
        <style type="text/css">
            .layui-form-label{
                width: 105px;
            }
            .layui-form-item{
                margin-bottom: 0;
            }
            /* 模糊搜索下拉框样式 */
            .search-content{
                display: none;
                position: absolute;
                left: 0;
                top: 42px;
                padding: 5px 0;
                z-index: 1000;
                min-width: 100%;
                border: 1px solid #d2d2d2;
                max-height: 300px;
                overflow-y: auto;
                background-color: #fff;
                border-radius: 2px;
                box-shadow: 0 2px 4px rgba(0,0,0,.12);
                box-sizing: border-box;
            }
            .search-content dd.layui-this {
                background-color: #5FB878;
                color: #fff;
            }
            .search-content dd {
                cursor: pointer;
            }
            .search-content dd {
                padding: 0 10px;
                line-height: 36px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .search-content dd:hover {
                background-color: #f2f2f2;
                -webkit-transition: .5s all;
                transition: .5s all;
            }
        </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-form" lay-filter="entity_form">

                            <div class="layui-form-item">
                                <!-- 关联策略 -->
                                <div class="layui-inline">
                                    <label class="layui-form-label">
                                        <span class="must">*</span>
                                        <span>关联策略:</span>
                                    </label>
                                    <!--点击关联背景-->
                                    <button class="layui-btn layuiadmin-btn-admin" id="relation_ts_btn">
                                        <i class="layui-icon layuiadmin-button-btn"></i>
                                        <span>关联&nbsp;(<span class="select_count">0</span>)</span>
                                    </button>
                                </div>
                            </div>

                            <!-- 发布类型 -->
                            <script th:replace="common/push-type"></script>
                            <!-- 按钮 -->
                            <div class="layui-form-item">
                                <div class="layui-input-block" style="margin-left: 135px;">
                                    <button class="layui-btn" lay-submit lay-filter="entity_submit_event">提交</button>
                                    <button class="layui-btn layui-btn-primary" type="reset">取消</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>
    <!-- javascript -->
    <script type="text/javascript" th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
    <script type="text/javascript" charset="utf-8">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/device/time-strategy-push.js'}" charset="utf-8"></script>
    <script type="text/html" id="ts_content_table">
        <!-- 查询条件 -->
        <div class="layui-form-item" style="margin-top: 10px;">
            <!-- 策略名称 -->
            <div class="layui-inline">
                <label class="layui-form-label">
                    <span>策略名称:</span>
                </label>
                <div class="layui-input-inline">
                    <input id="ts_name" type="text" class="layui-input" />
                </div>
            </div>
            <div class="layui-inline">
                <button type="button" class="layui-btn layuiadmin-btn-admin" id="select_btn">
                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                    <span>查询</span>
                </button>
            </div>
        </div>
        <!-- 表格 -->
        <div class="layui-card-body">
            <table id="ts_entity_table" lay-filter="ts_entity_event"></table>
        </div>
    </script>

    <!--表格头部按钮-->
    <script type="text/html" id="table-head-id">
        <div>
            <button class="layui-btn layuiadmin-btn-useradmin" lay-event="confirm">确认选择(<span  class="select_count">0</span>)</button>
            <button class="layui-btn layuiadmin-btn-admin" lay-event="clear">清空选择</button>
        </div>
    </script>
</html>