<div class="content-heading  justify-content-between">
  <div>评分管控</div>
  <div class="float-right" *ngIf="currentStep === 'Scoreing'">
    <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 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 class="">
              <ngx-select [items]="agentArray" [(ngModel)]="judgescore.agent_id"
                          (ngModelChange)="requestDateArray()" [autoClearSearch]="true"
                          optionValueField="ly_agent_id" optionTextField="ly_agent_name"></ngx-select>

            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="judgescore.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)]="judgescore.exam_date"
                          (ngModelChange)="requestRoomArray()" [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)]="judgescore.start_time" maxlength="5"/>
              </div>
              <div class="col-md-6">
                <input class="form-control" type="text" [(ngModel)]="judgescore.end_time" maxlength="5"/>
              </div>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="roomArray.length > 0 ">
        <div class="form-group row">
          <label class="col-lg-3 col-form-label text-right">请选择需要查看评分的考场 <br/>
            <div class="form-check">
              <div class="checkbox c-checkbox">
                <label>
                  <input type="checkbox" [(ngModel)]="judgescore.checked" (change)="checkAllGroup()"/>
                  <span class="fa fa-check"></span>全选</label>
              </div>
            </div>
          </label>

          <div class="col-lg-9">
            <div class="row">
              <div class="col-lg-6" *ngFor="let r of roomArray">
                <div class="form-check">
                  <div class="checkbox c-checkbox">
                    <label>
                      <input type="checkbox" [(ngModel)]="r.checked"/>
                      <span class="fa fa-check"></span>{{r.group.group_name}} - 第【{{r.room_seq}}】考场</label>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </fieldset>

      <fieldset *ngIf="roomArray.length > 0">
        <div class="d-flex justify-content-center">
          <button class="btn btn-primary" type="button" (click)="viewJudgeScore()">查看考场评分</button>
        </div>
      </fieldset>
    </div>

  </div>
</div>


<div class="row" *ngIf="currentStep === 'Scoreing'">

  <div class="col-xl-12 col-lg-12" *ngFor="let room of chooseRoomArray;let i=index">
    <div class="card card-default">
      <div class="card-header">
        <div class="card-title">【{{room.group.group_name}}】第{{room.room_seq}}考场【{{room.room_addr}}】</div>
        <div class="dropdown-divider"></div>
      </div>
      <div>
        <div echarts id="examMonitorScore_{{room.ly_room_id}}" [options]="all[i]" class="demo-chart"
             (chartInit)="onChartInit($event)"></div>
      </div>
    </div>
  </div>

</div>

