<div class="content-heading  justify-content-between">
    <div>数据推送
    </div>
    <div class="float-right">
        <div class="row">
            <div class="wd-xl wd-sm">
                <ngx-select [items]="agentArr" [(ngModel)]="query.agent_id"  placeholder="考点"
                    [autoClearSearch]="true" optionValueField="agent_id" optionTextField="agent_name">
                </ngx-select>
            </div>
            <div class="wd-x1 wd-sm ml-2">
                <ngx-select [items]="'ExamBatchName' | frameDict" [(ngModel)]="query.exam_batch"  (ngModelChange)="requestData()"
                optionValueField="dict_value" optionTextField="dict_text" placeholder="批次"></ngx-select>
            </div>            
            <div class="btn-group ml-3 mr-2" dropdown>
                <button class="btn dropdown-toggle btn-secondary" type="button" dropdownToggle>艺考系统数据推送
                    <span class="caret"></span>
                </button>
                <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
                    <a class="dropdown-item text-info" href="#" (click)="pushDataToScore()">评分系统</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item text-danger" href="#" (click)="pushDataToOnline()">在线考试系统</a>
                </div>
            </div>
        </div>
    </div>
</div>


<div class="table-responsive bg-white">
    <table class="table table-striped table-hover table-bordered">
        <thead>
            <tr>
                <th>学校名称</th>
                <th>考点名称</th>
                <th>批次名称</th>
                <th>推送系统</th>
                <th>推送状态</th>
                <th>推送时间</th>
            </tr>
        </thead>
        <tbody>
            <tr *ngFor="let v of pager.getRecords(); let i = index">
                <td>{{v.school_name}}</td>
                <td>{{v.agent_name}}</td>
                <td>{{v.exam_batch | frameDict: 'ExamBatchName'}}</td>
                <td>
                    <span *ngIf="v.push_system =='score'">评分系统</span>
                    <span *ngIf="v.push_system =='online'">在线考试系统</span>
                </td>
                <td><span [ngClass]="{'text-danger': v.push_status == 'Failure', 'text-success' : v.push_status == 'Complete' }">
                    {{v.push_status | frameDict: 'PushDataLogType'}}</span></td>
                <td>{{v.push_time}}</td>
            </tr>
        </tbody>
    </table>
    <frame-pager [url]="'./push/data/log/page.htm'" [pagerParams]="{agent_id: query.agent_id, exam_batch: query.exam_batch}" #pager></frame-pager>
</div>