<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' && score.refresh_time !== undefined">{{score.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]="schoolArr" [(ngModel)]="score.school_id"
                            (ngModelChange)="requestBatch()" [autoClearSearch]="true"
                            optionValueField="school_id" optionTextField="school_name"></ngx-select>
            </div>
            </div>
        </div>
        </fieldset>

      <fieldset *ngIf="score.school_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]="batchArr" [(ngModel)]="score.batch_id"
                          (ngModelChange)="requestDate()" [autoClearSearch]="true"
                          optionValueField="batch_id" optionTextField="batch_name"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="score.batch_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]="dateArr" [(ngModel)]="score.exam_date"
                  [autoClearSearch]="true"  optionValueField="exam_date" optionTextField="exam_date"></ngx-select>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="dateArr.length > 0 && score.exam_date">
        <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 roomArr">
      <div class="card card-default">
        <div class="card-header">
          <div class="card-title text-success">【{{room.group.group_name}}】第{{room.room_seq}}考场</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['judgeArr'+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>
