<!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-form layui-card-header layuiadmin-card-header-auto"  style="padding:0;">
                <div class="layui-form-item border-b">
                    <div class="layui-inline">
                        <label class="layui-form-label">小区名称</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" th:value="${xqName}" disabled />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">设备</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input" th:value="${serialNumber}" disabled />
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">指令描述</label>
                        <div class="layui-input-block">
                            <select id="instruct_code" >
                                <option value="" selected>全部</option>
                                <option value="open_door" >远程开门</option>
                                <option value="restart" >重启设备</option>
                                <option value="check_online" >检测设备在线</option>
                                <option value="pull_data" >重新拉取数据</option>
                                <option value="add_open_door_pwd" >添加开门密码</option>
                                <option value="del_open_door_pwd" >删除开门密码</option>
                                <option value="add_user_face" >设置人脸</option>
                                <option value="add_open_door_card" >添加门禁卡</option>
                                <option value="del_open_door_card" >删除门禁卡</option>
                                <option value="update_device_info" >更新设备信息</option>
                                <option value="add_video_call_account" >添加视频对讲账号</option>
                                <option value="evacuate" >开启紧急疏散模式</option>
                                <option value="cancel_evacuate" >解除紧急疏散模式</option>
                                <option value="update_app_package" >更新app包</option>
                                <option value="format_data" >格式化数据</option>
                                <option value="sync_face_advert" >同步广告数据</option>
                                <option value="sync_leisure_advert" >同步屏保数据</option>
                                <option value="sync_notice_data" >同步公告数据</option>
                                <option value="add_face_advert_task" >添加人脸广告任务</option>
                                <option value="add_leisure_advert_task" >添加轮播广告任务</option>
                                <option value="add_notice" >添加设备公告</option>
                                <option value="add_strategy_task" >添加策略任务</option>
                                <option value="delete_advert" >删除设备广告</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">卡号</label>
                        <div class="layui-input-block">
                            <input type="text" name="cardNo" id="cardNo" 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="handle_status" >
                                <option value="0" selected>全部</option>
                                <option value="1" >待处理</option>
                                <option value="2" >已处理</option>
                                <option value="3" >处理失败</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">创建时间</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input date-icon" id="create_date" placeholder="请选择"
                                   autocomplete="off">
                            <input type="hidden" id="begin_date" name="beginDate"/>
                            <input type="hidden" id="end_date" name="endDate"/>
                        </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>
            <button type="button" lay-submit="" lay-filter="refresh" class="layui-btn layui-btn-primary layui-btn-sm"
                    style="display:block;margin:0 auto">
                <i class="layui-icon layui-icon-refresh" style="font-size: 20px"></i>
            </button>
            <input type="hidden" name="serialNumber" th:value="${serialNumber}" />
            <br/>
            <div style="padding-bottom: 10px;">
                <button class="layui-btn layuiadmin-btn-useradmin" lay-submit lay-filter="resendList"  sptg:security="device:instruct:resend">批量重发</button>
            </div>
            <table id="data_table" lay-filter="data_table_event"></table>
        </div>
    </body>
    <!-- javascript -->
    <!--操作-->
    <script type="text/javascript" th:src="@{'/layui/layui.js'}"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/html" id="table-operate">
        {{#  if(d.handleStatus != 2 && d.invalid != 2){ }}
            <a class="layui-btn layui-btn-warm layui-btn-xs" lay-event="resend" sptg:security="device:instruct:resend">重发</a>
        {{#  } }}
    </script>
    <script type="text/javascript" th:src="@{'/js/device/instruct-publish-log.js'}"></script>
</html>
