<div class="content-heading  justify-content-between">
  <div>考生管理</div>
  <div class="float-right">
    <div class="row">

      <div class="wd-sm">
        <ngx-select [items]="provinceArray" [(ngModel)]="std.province_id"
                    (ngModelChange)="requestStd()" [autoClearSearch]="true"
                    optionValueField="province_id" optionTextField="province_abbr"></ngx-select>
      </div>
      <div class="ml-3 wd-xl">
        <ngx-select [items]="aspectArray" [(ngModel)]="std.aspect_id" [autoClearSearch]="true"
                    (ngModelChange)="getVariety(std.aspect_id)"
                    optionValueField="aspect_id" optionTextField="aspect_name"></ngx-select>
      </div>
      <div class="ml-3 wd-sm">
        <ngx-select [items]="varietyArray" [(ngModel)]="std.variety_id"
                    (ngModelChange)="requestStd()" [autoClearSearch]="true"
                    optionValueField="variety_id" optionTextField="variety_name"></ngx-select>
      </div>

    <div class="btn-group mb-1 mr-1 ml-3" dropdown>
      <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)="showModal({'arrayUrl':'frame/region/province/list.htm'})">手动添加</a>
        <div class="dropdown-divider" *ngIf="FrameService.FrameOptr.optr_id === 0"></div>
        <a class="dropdown-item" href="#" (click)="validStdPhoto()"
           *ngIf="FrameService.FrameOptr.optr_id === 0">公安验证</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
           (click)="FuncService.ajaxDownload('frame/report/download.htm', {report_name:'StdRegReport', report_title :'考生数据汇总'})">考生数据下载</a>
        <!-- <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
        (click)="downloadStdEnrol('xlxs')">上报国家库(Excel)</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#"
        (click)="downloadStdEnrol('dbf')">上报国家库(Dbf)</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="showExportModal()">自定义导出</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="uploader.downloadTempalte()">下载考生号模版</a>
        <a class="dropdown-item" href="#" (click)="uploader.uploadFiles()">导入修正考生号</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><span class="table-sort" (click)="pager.sort('std_province')">生源地</span></th>
      <th><span class="table-sort" (click)="pager.sort('cert_id')">证件号码</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_name')">考生姓名</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_sex')">性别</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_verify_flag')">公安验证</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_nation')">民族</span></th>
      <th><span class="table-sort" (click)="pager.sort('reg_time')">注册时间</span></th>
      <!-- <th><span class="table-sort" (click)="pager.sort('reg_status')">注册状态</span></th> -->
      <th><span class="table-sort" (click)="pager.sort('exam_id')">考生号</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_mobile')">联系电话</span></th>
      <th><span class="table-sort" (click)="pager.sort('std_admit_flag')">考试确认</span></th>
      <th>微信绑定</th>
      <th></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.province_name}}</td>
      <td>{{v.cert_id}}</td>
      <td>{{v.std_name}}</td>
      <td>{{v.std_sex}}</td>
      <td>
        <span class="text-success" *ngIf="v.std_verify_flag === 'Active'">认证成功</span>
        <span class="text-danger" *ngIf="v.std_verify_flag === 'InActive'">认证失败</span>
      </td>
      <td>{{v.std_nation}}</td>
      <td>{{v.reg_time}}</td>
      <!-- <td>{{v.reg_status | frameDict:'StdRegStatus'}}</td> -->
      <td>{{v.exam_id}}</td>
      <td><span [tooltip]="v.link_mobile">{{v.std_mobile}}</span></td>
      <td>
        <span *ngIf="v.std_admit_flag === 'Active'" class="text-success">已确认</span>
      </td>
      <td>
        <span class="text-success" *ngIf="v.weixin_id">已绑定</span>
        <span class="text-danger" *ngIf="!v.weixin_id">未绑定</span>
      </td>
      <td>
          <span class="table-button" (click)="showStdDetail(v)"><em class="fa-lg fas fa-edit text-primary"></em></span>
          <span class="table-button ml-2" (click)="syncStdToUmp(v)"><em class="fa-lg fas icon-refresh text-primary" frameRole resId="201001"></em></span>
          <span class="table-button ml-2" (click)="resetPasswd(v)"><em class="fa-lg fas icon-key text-primary"></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./std/reg/page.htm'" [pagerParams]="{province_id: std.province_id, aspect_id: std.aspect_id, variety_id: std.variety_id}" #pager></frame-pager>
</div>


<!-- <frame-uploader [uploadUrl]="'std/reg/examid/update.htm'" [templateFile]="'模版-修正考生号.xlsx'" [allowedFileType]="['xls']" [confirmMsg]="'上传该文件将覆盖考生的考生号，没有备份！！请谨慎进行此操作'" #uploader></frame-uploader> -->
