<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <script th:replace="common/head"></script>
</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>
                            <div class="layui-input-inline" style="width:80%;line-height: 38px;">
                                <!--/*@thymesVar id="adPushContents" type="com.sptg.ad.api.entity.AdPushContent"*/-->
                                <span style="display:inline-block;overflow: hidden;margin-right: 20px;" th:each="adPushContent:${adPushTask.adPushContents}" th:text="${adPushContent.adTitle}+','"></span>
                            </div>
                        </div>
                        <!-- 图片播放时长  当广告有图片时显示-->
                        <div class="layui-form-item" th:style="${adPushTask.imgPlayTime==null?'display: none':''}">
                            <label class="layui-form-label">
                                <span class="must">*</span>
                                <span>时长:</span>
                            </label>
                            <div class="layui-input-inline">
                                <input type="text" disabled="disabled" autocomplete="off" class="layui-input" th:value="${adPushTask.imgPlayTime}">
                            </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" disabled="disabled" class="layui-input" autocomplete="off" th:value="${adPushTask.beginDate+'-'+adPushTask.endDate}">
                            </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;line-height: 38px;">
                                <span th:if="${adPushTask.pushType==1}" style="color: red">按小区发布</span>
                                <span th:if="${adPushTask.pushType==2}" style="color: #1f26ff">按单元发布</span>
                                <span th:if="${adPushTask.pushType==3}" style="color: green">按设备发布</span>
                                <span th:if="${adPushTask.pushType==4}" style="color: gray">按区域发布</span>
                            </div>
                        </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:80%;line-height: 38px;">
                                <span style="display:inline-block;overflow: hidden;margin-right: 20px;" th:each="object:${objects}" th:text="${object.name}+','"></span>
                            </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: '/' //静态资源所在路径
    });
</script>
<script type="text/javascript" th:src="@{'/js/ad/ad-push-task-detail.js'}" charset="utf-8"></script>
</html>