<div class="content-heading  justify-content-between">
    <div>分发统计</div>
    <div class="float-right">
        <div class="row">
            <div>
                <ngx-select [items]="schoolArr" [(ngModel)]="task.school_id" (ngModelChange)="requestBatch()"
                    placeholder="请选择学校 " class="wd-wide" [size]="'large'" optionValueField="school_id"
                    optionTextField="school_name"></ngx-select>
            </div>
            <div class="ml-3">
                <ngx-select [items]="batchArr" [(ngModel)]="task.batch_id"
                    (ngModelChange)="ajax.reload({batch_id:task.batch_id})" placeholder="请选择批次 " class="wd-wide"
                    [size]="'large'" optionValueField="batch_id" optionTextField="batch_name"></ngx-select>
            </div>
        </div>
    </div>
</div>


<div class="table-responsive bg-white table-full">
    <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 ajax.getArray(); let i = index">
        <td>{{i+1}}</td>
        <td>{{v.show_group_name == null || v.show_group_name == undefined ? v.group_name : v.show_group_name }}</td>
        <td>{{v.std_total}}({{v.in_province_total}}|{{v.out_province_total}})</td>
        <td class="text-primary"><a href="#" (click)="showLayoutModal(v)">{{v.layout_total}}({{v.in_layout_total}}|{{v.out_layout_total}})</a></td>
        <td>{{v.nolayout_total}}({{v.in_nolayout_total}}|{{v.out_nolayout_total}})</td>
        <td>{{v.videoNum}}({{v.inVideoNum}}|{{v.outVideoNum}})</td>
        <td>{{v.layoutVideoNum}}({{v.layoutInVideoNum}}|{{v.layoutOutVideoNum}})</td>
        <td>{{v.noLayoutVideoNum}}({{v.noLayoutInVideoNum}}|{{v.noLayoutOutVideoNum}})</td>
      </tr>
      <tr *ngIf="ajax.getArray().length>0">
        <td colspan="2" align="center">共计</td>
        <td>{{ajax.getArray() | frameSum : 'std_total'}}({{ajax.getArray() | frameSum : 'in_province_total'}}|{{ajax.getArray() | frameSum : 'out_province_total'}})</td>
        <td class="text-primary"><a href="#"  (click)="showLayoutModal()">{{ajax.getArray() | frameSum : 'layout_total'}}({{ajax.getArray() | frameSum : 'in_layout_total'}}|{{ajax.getArray() | frameSum : 'out_layout_total'}})</a></td>
        <td>{{ajax.getArray() | frameSum : 'nolayout_total'}}({{ajax.getArray() | frameSum : 'in_nolayout_total'}}|{{ajax.getArray() | frameSum : 'out_nolayout_total'}})</td>
        <td>{{ajax.getArray() | frameSum : 'videoNum'}}({{ajax.getArray() | frameSum : 'inVideoNum'}}|{{ajax.getArray() | frameSum : 'outVideoNum'}})</td>
        <td>{{ajax.getArray() | frameSum : 'layoutVideoNum'}}({{ajax.getArray() | frameSum : 'layoutInVideoNum'}}|{{ajax.getArray() | frameSum : 'layoutOutVideoNum'}})</td>
        <td>{{ajax.getArray() | frameSum : 'noLayoutVideoNum'}}({{ajax.getArray() | frameSum : 'noLayoutInVideoNum'}}|{{ajax.getArray() | frameSum : 'noLayoutOutVideoNum'}})</td>
      </tr>
      </tbody>
    </table>
    <frame-ajax [url]="'./material/report/total.htm'" [autoRequest]="false" [ajaxDataType]="'array'" #ajax></frame-ajax>
  </div>