<div class="modal-header">
  <h4 class="modal-title pull-left">【{{ResponseEntity.room_addr}}】评委列表</h4>
</div>
<table class="table table-striped table-hover table-bordered" *ngIf="currentStep !== 'judge'">
  <thead>
  <tr>
    <th class="th-index"></th>
    <th>登录名称</th>
    <th>评委姓名</th>
    <th>状态</th>
    <th>性别</th>
    <th>职称</th>
    <th>主评</th>
    <th>特权评委</th>
    <th>终端编号</th>
    <th class="th-b-3"></th>
  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let judge of ResponseMap?.JudgeArray; let i = index">
    <td>{{judge.judge_seq}}</td>
    <td>{{judge.login_name}}</td>
    <td>{{judge.judge_name}}</td>
    <td><span *ngIf="judge.judge_status === 'Init'">未登录</span>
      <span *ngIf="judge.judge_status === 'Examing'" class="text-success">已登录</span>
    </td>
    <td>{{judge.judge_sex}}</td>
    <td>{{judge.judge_tital}}</td>
    <td><span class="text-info" *ngIf="judge.room_chief === 'Active'">主评委</span></td>
    <td><span class="text-primary" *ngIf="judge.privilege_flag === 'Active'">特权评委</span></td>
    <td>{{judge.pad_mac}}</td>
    <td>
          <span class="table-button" tooltip="清除绑定终端"
                (click)="clearMac(judge)"><em
            class="fa-lg fas fa-desktop"></em></span>
      <span class="table-button ml-3" tooltip="更换评委"
            (click)="goChangeJudge(judge)"><em
        class="fa-lg fas fa-user"></em></span>
    </td>
  </tr>
  </tbody>
</table>

<div class="card card-default" *ngIf="currentStep === 'judge'">
  <div class="card-header">替换【<span class="text-primary">{{currentJudge.judge_name}}({{currentJudge.login_name}}</span>】的评委
  </div>
  <table class="table table-striped table-hover table-bordered mb-2">
    <thead>
    <tr>
      <th class="th-index"></th>
      <th>手机号码</th>
      <th>评委姓名</th>
      <th>性别</th>
      <th>单位</th>
      <th>职称</th>
      <th>参评品种</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.judge_mobile}}</td>
      <td>{{v.judge_name}}</td>
      <td>{{v.judge_sex}}</td>
      <td>{{v.judge_school}}</td>
      <td>{{v.judge_title}}</td>
      <td>{{v.judge_breeds}}</td>
      <td>
          <span class="table-button" *ngIf="v.judge_id !== currentJudge.judge_id"
                (click)="changeJudge(v)"><em
            class="fa-lg fas fa-user"></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./exam/judge/page.htm'" [pagerParams]="{ly_agent_id: currentEntity?.ly_agent_id}"
               [pagerLimit]="5" #pager></frame-pager>
</div>

<div class="modal-footer">
  <button class="btn btn-secondary" type="button" (click)="clearRoomMac()" *ngIf="currentStep!=='judge'">清除所有PAD
  </button>
  <button class="btn btn-secondary" type="button" (click)="currentStep = undefined" *ngIf="currentStep==='judge'">返回评委列表
  </button>
  <button class="btn btn-secondary" type="button" (click)="closeWindow()">关闭窗口</button>
</div>
