<div class="content-heading  justify-content-between">
  <div>评委评分监控</div>
  <div class="float-right" *ngIf="currentStep === 'Scoreing'">
    <div class="row">
      <div class="ml-3 mt-3"  *ngIf="currentStep === 'Scoreing' && checkin.refresh_time !== undefined">{{checkin.refresh_time}}</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)="goInit()">选择日期</a>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- 选择日期和分组 -->
<div class="card card-default" *ngIf="currentStep === 'Init'">
  <div class="card-body">
    <div class="form-horizontal" method="get">
      <fieldset>
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择考点信息</label>
          <div class="col-lg-9">
            <div>
              <ngx-select [items]="agentArray" [(ngModel)]="checkin.agent_id"
                          (ngModelChange)="requestDateArray()" [autoClearSearch]="true"
                          optionValueField="ly_agent_id" optionTextField="ly_agent_name"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="checkin.agent_id !== undefined">
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择考试日期</label>
          <div class="col-lg-9">
            <div>

              <ngx-select [items]="dateArray" [(ngModel)]="checkin.exam_date"
                  [autoClearSearch]="true"  optionValueField="exam_date" optionTextField="exam_date"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset>
        <div class="form-group row mb">
          <label class="col-lg-3 col-form-label text-right">开考时段范围</label>
          <div class="col-lg-9">
            <div class="row">
              <div class="col-md-6">
                <input class="form-control" type="text" [(ngModel)]="checkin.start_time" maxlength="5"/>
              </div>
              <div class="col-md-6">
                <input class="form-control" type="text" [(ngModel)]="checkin.end_time" maxlength="5"/>
              </div>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="dateArray.length > 0">
        <div class="d-flex justify-content-center">
          <button class="btn btn-primary" type="button" (click)="judgeScore()">查看评委评分情况</button>
        </div>
      </fieldset>
    </div>

  </div>
</div>


<!-- 评委评分详情 -->
<div class="row" *ngIf="currentStep === 'Scoreing'" >

  <div class="col-xl-4 col-lg-4"  *ngFor="let room of roomArray">
    <div class="card card-default">
      <div class="card-header">
        <div class="card-title text-success">【{{room.group.group_name}}】第{{room.room_seq}}考场【{{room.room_addr}}】</div>
        <div class="dropdown-divider"></div>
      </div>
      <table  class="table table-striped ">
        <thead>
          <tr >
            <th>#</th>
            <th>登录账号</th>
            <th>评委姓名</th>
            <th>进场</th>
            <th>评分</th>
            <th>提交</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let judge of roomMap['JudgeArray'+room.ly_room_id]; let i = index">
            <td>{{i+1}}</td>
            <td>{{judge.login_name}}</td>
            <td>{{judge.judge_name}}</td>
            <td>{{judge.std_count}}</td>
            <td>{{judge.record_count}}</td>
            <td>{{judge.score_count}}</td>
          </tr>
        </tbody>
      </table>

    </div>
  </div> 

</div>
