<div class="content-heading  justify-content-between">
  <div>录取划线</div>
  <div class="float-right">

    <div class="row">
      <div>
        <input type="text" class="form-control form-control wd-xs" [(ngModel)]="score.gobal_percent">
      </div>
      <div class="wd-xs ml-3">
        <ngx-select [items]="batchNameArray" [(ngModel)]="score.batch_id" (ngModelChange)="changeBatch()"
                    [autoClearSearch]="true" optionValueField="dict_value" optionTextField="dict_text"
                    placeholder="批次"></ngx-select>
      </div>
      <div class="wd-sm ml-3">
        <ngx-select [items]="planTypeArray" [(ngModel)]="score.plan_type"
                    [autoClearSearch]="true" optionValueField="dict_value" optionTextField="dict_text"
                    placeholder="批次"></ngx-select>
      </div>

      <div class="btn-group ml-3 mr-5" dropdown>
        <button class="btn dropdown-toggle btn-secondary" type="button" dropdownToggle>录取功能
          <span class="caret"></span>
        </button>
        <div *dropdownMenu class="dropdown-menu" role="menu">
          <a class="dropdown-item" href="#" (click)="caclAll()">计算所有合格线</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="#" (click)="saveAllProvince()">保存划线计划</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="#" (click)="saveQualified()">判定合格</a>
        </div>
      </div>
    </div>

  </div>
</div>


<div class="table-responsive bg-white table-full" *ngIf="provinceArray">
  <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>
      <th>合格分</th>
      <th>合格比率</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of provinceArray; let i = index">
      <td>{{ i + 1}}</td>
      <td>{{v.pn_name}}</td>
      <td>{{v.province_name}}</td>
      <td>{{v.sex_type}}</td>
      <td>{{v.pn_batchs}}</td>
      <td>【{{v.std_total}}】考生，成绩【{{v.min_std_score / 100 }} -> {{v.max_std_score / 100}}】</td>
      <td><input type="number" class="form-control form-control-sm" [(ngModel)]="v.plan_total"
                 (ngModelChange)="changePlanTotal(v)" style="width:80px;"></td>
      <td>{{v['qualified_total_' + score.batch_id]}}</td>
      <td><input type="number" class="form-control form-control-sm"
                 [(ngModel)]="v['qualified_score_value_' + score.batch_id]" style="width:80px;"></td>
      <td>{{v['percent_' + score.batch_id]}}</td>
    </tr>
    </tbody>
  </table>

</div>
