<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 class="btn-group mb-1 mr-1 ml-3 " dropdown *ngIf="task.batch_id !==undefined">
          <button class="btn dropdown-toggle btn-secondary btn-lg" type="button" dropdownToggle>任务管理
            <span class="caret"></span>
          </button>
          <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
            <a class="dropdown-item" href="#" (click)="showTaskModal()">任务分发</a>
            <div class="dropdown-divider" ></div>
            <a class="dropdown-item" href="#" (click)="cancelTaskModal()">取消任务分发</a>
            <div class="dropdown-divider" ></div>
            <a class="dropdown-item" href="#" (click)="recycleStd()" >回收当日未评分考生</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" (click)="exportStdReport()" >导出未分发考生统计</a>
            <div class="dropdown-divider"></div>
            <a class="dropdown-item" href="#" (click)="exportTaskReport()" >导出分发任务</a>
          </div>
        </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>
      </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>
          <span class="text-muted" *ngIf="v.separate_status == null || v.separate_status == '' || v.separate_status == 'InActive'">集评</span>
          <span *ngIf="v.separate_status == 'Active'" class="text-success">分评</span>
        </td>
        <td>{{v.std_total}}({{v.in_province_total}}|{{v.out_province_total}})</td>
        <td class="text-success">{{v.layout_total}}({{v.in_layout_total}}|{{v.out_layout_total}})</td>
        <td class="text-muted">{{v.nolayout_total}}({{v.in_nolayout_total}}|{{v.out_nolayout_total}})</td>
      </tr>
      </tbody>
    </table>
    <frame-ajax [url]="'./ex/task/dist/total.htm'" [autoRequest]="false" [ajaxDataType]="'array'" #ajax></frame-ajax>
  </div>