<!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">
                <div class="layui-inline">
                    <label class="layui-form-label">广告名称</label>
                    <div class="layui-input-block">
                        <input type="text" id="selectedAdTitle" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">广告类型</label>
                    <div class="layui-input-block">
                        <select id="selectedTaskType" lay-verify="" lay-search="">
                            <option value="" selected>全部</option>
                            <option value="1" >人脸广告</option>
                            <option value="2" >闲时广告</option>
                        </select>
                    </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;">
                <table id="table-id" lay-filter="table-id"></table>
            </div>
        </div>
    </div>
</div>

<!--操作-->
<script type="text/html" id="table-operate-id">
    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="task_detail" sptg:security="ad:push:record:detail">详情</a>
</script>

<!-- 发布类型{ 1 ：按小区发布，2：按单元发布，3：按设备发布，4：按区域发布} -->
<script type="text/html" id="pushType">
    {{#  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>

<!-- 发布结果 -->
<script type="text/html" id="pushStatus">
    {{#  if(d.pushStatus == -1){ }}
    <span style="color: red" >发布失败</span>
    {{#  } else if(d.pushStatus == 0){ }}
    <span style="color: #1f26ff">待发布</span>
    {{#  } else if(d.pushStatus == 1){ }}
    <span style="color: green">已完成</span>
    {{#  } else if(d.pushStatus == 2){ }}
    <span style="color: gray">已撤销</span>
    {{#  }  }}
</script>
<!-- 广告类型 -->
<script type="text/html" id="taskType">
    {{#  if(d.taskType == 1){ }}
    <span style="color: red" >人脸广告</span>
    {{#  } else if(d.taskType == 2){ }}
    <span style="color: blue">闲时广告</span>
    {{#  }  }}
</script>
<!-- 发布结果 -->
<script type="text/html" id="imgPlayTime">
    {{#  if(d.imgPlayTime != null){ }}
    {{d.imgPlayTime}}秒
    {{#  }  }}
</script>
<!-- javascript -->
<script th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
<script>
    layui.config({
        base: '/' //静态资源所在路径
    });
</script>
<script th:src="@{'/js/ad/ad-push-record.js'}" charset="utf-8"></script>
</body>

</html>
