<!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">
    <!-- 省市区样式 -->
    <link rel="stylesheet" th:href="@{'/layui/lay/mymodules/region.css'}">
</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">
                        <!-- 广告标题/广告编号 -->
                        <div id="parent_entity" class="layui-form-item layui-form">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>关联广告:</span>
                            </label>
                            <!--点击关联广告-->
                            <button class="layui-btn layuiadmin-btn-admin"
                                    id="relevance_btn">
                                <i class="layui-icon layuiadmin-button-btn"></i>
                                <span>关联(<span style="color: red" id="relative_ad_count">0</span>)</span>
                            </button>
                        </div>
                        <!-- 图片播放时长  当广告有图片时显示-->
                        <div class="layui-form-item" id="ad_img" style="display: none;">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>图片播放时长:</span>
                            </label>
                            <div class="layui-input-inline">
                                <input type="hidden" id="isImgPlayTime" value="0">
                                <input type="text" id="imgPlayTime" name="imgPlayTime" placeholder="每张图片播放时间" autocomplete="off" class="layui-input">
                            </div>
                            <div class="layui-form-mid layui-word-aux">秒</div>
                        </div>
                        <!-- 时间范围选择 -->
                        <div class="layui-form-item">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>时间范围:</span>
                            </label>
                            <div class="layui-input-inline" style="width:300px;">
                                <input type="text" class="layui-input" id="date_range" placeholder="请选择广告播放的时间段" autocomplete="off" lay-verify="required">
                            </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="enableThreshold" value="1" title="启用" checked>-->
<!--                                <input type="radio" name="enableThreshold" value="2" title="禁用">-->
<!--                            </div>-->
<!--                        </div>-->

                        <!-- 发布方式 -->
                        <script th:replace="common/offline-push-type"></script>

                        <div class="layui-form-item">
                            <div class="layui-input-block">
                                <button class="layui-btn" lay-submit lay-filter="addConfirm">提交</button>
                                <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<!-- javascript -->
<script type="text/javascript" th:src="@{'/layui/layui.js'}"></script>
<script type="text/javascript">
    layui.config({
        base: '/' //静态资源所在路径
    });
    //选中的广告类容map
    var table_ad_checkbox_map = new Map();
    //选中的广告id
    var table_ad_checkbox_id_list = [];
</script>
<script type="text/javascript" th:src="@{'/js/ad/ad-offline-push-add.js'}" charset="utf-8"></script>
</html>
