<!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="">
            <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="xqName" placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">设备名称</label>
                            <div class="layui-input-block">
                                <input type="text" id="deviceName" placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">设备序列号</label>
                            <div class="layui-input-block">
                                <input type="text" id="serialNumber" placeholder="请输入" autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <!-- 状态 发布状态 -->
                        <div class="layui-inline">
                            <label for="search_pushStatus" class="layui-form-label">推送状态</label>
                            <div class="layui-input-block">
                                <select id="search_pushStatus" class="layui-input">
                                    <option value="">请选择</option>
                                    <option value="0">未推送</option>
                                    <option value="1">推送成功</option>
                                    <option value="2">推送失败</option>
                                    <option value="3">推送中</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <button class="layui-btn layuiadmin-btn-admin"
                                    id="select_search_btn">
                                <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>查询
                            </button>
                        </div>
                    </div>
                </div>
                <!--任务id-->
                <input type="hidden" id="taskId" th:value="${taskId}">
                <div class="layui-card-body">

                    <table id="table-id" lay-filter="table-id"></table>
                    <!--操作-->
                    <script type="text/html" id="table-operate-id">
                        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="manually_issued"><i class="layui-icon layui-icon-util"></i> 手动下发</a>
                    </script>

                    <!-- 广告推送状态：{ 0：未推送， 1：推送成功，2：推送失败，3：推送中 } -->
                    <script type="text/html" id="pushStatus">
                        {{#  if(d.pushStatus == 0){ }}
                        <span style="color: red" >未推送</span>
                        {{#  } else if(d.pushStatus == 1){ }}
                        <span style="color: #1f26ff">推送成功</span>
                        {{#  } else if(d.pushStatus == 2){ }}
                        <span style="color: green">推送失败</span>
                        {{#  } else if(d.pushStatus == 3){ }}
                        <span style="color: gray">推送中</span>
                        {{#  }  }}
                    </script>

                </div>
            </div>
        </div>
    </div>
    <!-- javascript -->
    <script th:src="@{'/layui/layui.js'}" charset="utf-8"></script>
    <script>
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script th:src="@{'/js/ad/ad-push-device-details.js'}" charset="utf-8"></script>
</body>

</html>