<div class="content-heading  justify-content-between">
  <div>考生批量入场
  </div>
  <div class="float-right">
    <div class="row">
      <div>
        <ngx-select [items]="agentArray" [(ngModel)]="exam.agent_id" (ngModelChange)="requestDateArray()"
                    placeholder="请选择考点 "
                    class="wd-wide"
                    optionValueField="ly_agent_id" optionTextField="ly_agent_name"></ngx-select>
      </div>
      <div class="ml-3" *ngIf="exam.agent_id!==undefined">
        <ngx-select [items]="dateArray" [(ngModel)]="exam.exam_date"  placeholder="请选择考试时间 " (ngModelChange)="requestTotal()"
                    class="wd-wide"
                    optionValueField="exam_date" optionTextField="exam_date"></ngx-select>
      </div>

    </div>

  </div>
</div>

<table class="table table-striped table-hover table-bordered">
  <thead>
  <tr>
    <th class="th-index"></th>
    <th>面试项目</th>
    <th>面试考生数</th>
    <th>已进场考生数</th>
    <th>未进场考生数</th>
    <th>考场数</th>
    <th>待安排考生数</th>
    <th></th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let v of groupArray; let i = index">
    <td>{{i + 1}}</td>
    <td>{{v.group_name}}</td>
    <td>{{v.std_total}}</td>
    <td>{{v.exam_total}}</td>
    <td>{{v.no_total}}</td>
    <td><input type="number" class="form-control"  [(ngModel)]="v.room_total"  /> </td>
    <td><input type="number" class="form-control" [(ngModel)]="v.noroom_std_total" /> </td>
    <td><span class="table-button ml-3 text-info" (click)="batchEntrance(v)"><em class="fa-lg fas fa-users"></em></span></td>
  </tr>
  <tr >
    <td></td>
    <td>合计</td>
    <td>{{groupArray | frameSum : 'std_total'}}</td>
    <td>{{groupArray | frameSum : 'exam_total'}}</td>
    <td><span class="table-sort">{{groupArray | frameSum : 'no_total'}}</span></td>
    <td>{{groupArray | frameSum: 'room_total'}}</td>
    <td>{{groupArray | frameSum: 'noroom_std_total'}}</td>
    <td> <button class="btn btn-primary" type="button" (click)="batchEntrance()" *ngIf="exam.exam_date">批量入场</button></td>
  </tr>
  </tbody>
</table>
