<div class="content-heading  justify-content-between">
  <div>准考证下载统计</div>
  <div class="float-right">
    <div class="row">
      <div class="wd-xl wd-sm mr-1">
        <ngx-select [items]="schoolArray" [(ngModel)]="query.school_id" (ngModelChange)="requestData()"
                    placeholder="学校"
                    [autoClearSearch]="true" optionValueField="school_id" optionTextField="school_name">
        </ngx-select>
      </div>

      <div class="btn-group mb-1 mr-1" dropdown>

      </div>
    </div>
  </div>
</div>


<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th>考试批次</th>
      <th>待下载总人数</th>
      <th>已下载人数</th>
      <th>未下载人数</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.batch_name}}</td>
      <td>{{v.total}}</td>
      <td>{{v.download}}</td>
      <td>{{v.total - v.download}}</td>
      <td>
        <span class="table-button ml-2" title="导出未下载" (click)="export(v.batch_id)"><em
          class="fa-lg fas icon-cloud-download"></em></span>
      </td>
    </tr>
    <tr>
      <td>合计</td>
      <td>{{pager.getRecords() | frameSum : 'total'}}</td>
      <td>{{pager.getRecords() | frameSum : 'download'}}</td>
      <td>{{(pager.getRecords() | frameSum : 'total') - (pager.getRecords() | frameSum : 'download')}}</td>
      <td></td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./std/ticket/count.htm'" #pager [pagerParams]="{school_id: query.school_id}"
               [showSearch]="false"></frame-pager>
</div>
