<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)="saveAllProvince()">保存划线计划</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item" href="#" (click)="saveQualified()">判定合格</a>
        </div>
      </div>
    </div>

  </div>
</div>

<!-- class="table-responsive bg-white table-full" -->
<div  *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>
      <th></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of provinceArray; let i = index">
      <td>{{ i + 1}}</td>
      <td><span class="table-sort" (click)="showPlanDetail(v)">{{v.pn_name}}</span></td>
      <td><span (click)="downloadReport( {report_name:'ZXScoreExport',
         pn_id: v.pn_id, report_title :'score_'+v.pn_id})">{{v.province_name}}</span></td>
      <td>{{v.sex_type}}</td>
      <td>{{v.pn_batchs}}</td>
      <td><span [tooltip]="v.std_total">【{{v.score_std_total}}】</span>考生，成绩【{{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>
      <td>
        <ng-container>
        <div class="btn-group" dropdown style="margin-top: -5px;">
          <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)="ModalService.showUploadWindow(bsService,'plan/group/province/qualified/std/upload.htm',
          {pn_province_id: v.pn_province_id},{
            uploadTitle:'合格名单上传',
            templateFile:'模版-合格名单导入.xls',
            uploadCallback:uploadCallback.bind(this),
            autoClose:true
          })">导入合格名单</a> -->
          <!-- <div class="dropdown-divider"></div> -->
          <a class="dropdown-item text-danger" href="#" (click)="saveQualified(v.pn_id)" >判定合格</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item text-danger" href="#" (click)="cacluRank(v)" >计算排名</a>
          <div class="dropdown-divider"></div>
          <a class="dropdown-item text-primary" href="#" 
          (click)="exportStdRegRoom(v)">导出合格名单</a>
          <!-- downloadReport( {report_name:'ZXScoreExport', pn_id: v.pn_id, report_title :'score_'+v.pn_id}) -->
        </div>
        </div>
      </ng-container>
      </td>
    </tr>
    </tbody>
  </table>

</div>
