<div class="content-heading  justify-content-between">
    <div>考生科目成绩</div>
    <div class="float-right">
      <div class="row">

        <div class="btn-group ml-3" dropdown>
            <button class="btn dropdown-toggle btn-secondary" type="button" dropdownToggle> 科目成绩
              <span class="caret"></span>
            </button>
            <div *dropdownMenu class="dropdown-menu mr-3" role="menu">
              <a class="dropdown-item text-warning" href="#" (click)="recalSubjectScore()">重算所有科目</a>
              <a class="dropdown-item text-warning" href="#" (click)="recalSubjectScore(subject?.subject_id)"
                 *ngIf="subject.subject_name">重算【{{subject.subject_name}}】</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item text-warning" href="#" (click)="generateSubjectScore()">重新合成科目成绩</a>
              <a class="dropdown-item text-warning" href="#" (click)="generateSubjectScore(subject?.subject_id)"
                 *ngIf="subject.subject_name">重新合成【{{subject.subject_name}}科目成绩</a>
              <div class="dropdown-divider"></div>
              <a class="dropdown-item" href="#" *ngIf="subject.subject_name"
                 (click)="downloadScore()">下载【{{subject.subject_name}}】原始分</a>
              <a class="dropdown-item" href="#"  (click)="downloadScore()">下载所有原始分</a>
                 <div class="dropdown-divider"></div>
              <a class="dropdown-item text-warning" href="#" *ngIf="score.school_id" (click)="pushDataToArt(subject?.subject_id,subject?.subject_name)">
                推送到艺考系统</a>
            </div>
        </div>

        <div class="ml-1 row">
          <div class="wd-xl ml-3">
            <ngx-select [items]="schoolArr" [(ngModel)]="score.school_id" [autoClearSearch]="true" (ngModelChange)="requestSubject()"
                        optionValueField="school_id" optionTextField="school_name" placeholder="请选择学校"></ngx-select>
          </div>
          <div  class="col-lg-4 wd-xxl">
            <ngx-select [items]="subjectArr" [(ngModel)]="score.subject_id" (ngModelChange)="requestSubjectScore()"
                        [autoClearSearch]="true" optionValueField="subject_id" optionTextField="subject_full_name"
                        placeholder="请选择考试科目"></ngx-select>
          </div>
        </div>

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


<div class="table-responsive bg-white table-full">
    <table class="table table-striped table-hover table-bordered" *ngIf="pager.getRecords().length>0">
      <thead>
      <tr>
        <th>考生姓名</th>
        <th>性别</th>
        <th><span class="table-sort" (click)="pager.sort('ticket_no')">准考证号</span></th>
        <th *ngIf="pager.getRecords()[0].variety_name !== undefined">品种</th>
        <th><span class="table-sort" (click)="pager.sort('ly_room_id,real_exam_seq')">考试考场</span></th>
        <th><span class="table-sort" (click)="pager.sort('ly_room_id,real_exam_seq')">考试序号</span></th>
        <th><span class="table-sort" (click)="pager.sort('subject_score')">科目分</span></th>
        <th *ngFor="let s of pager.getRecords()[0].judge_num | numberArray">
          第{{s}}评委
        </th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let v of pager.getRecords(); let i = index">
        <td>{{v.std_name}}</td>
        <td>{{v.std_sex}}</td>
        <td>{{v.ticket_no}}</td>
        <td *ngIf="v.variety_name!== undefined">{{v.variety_name}}</td>
        <td>{{v.room_addr}}</td>
        <td><span [tooltip]="v.real_exam_seq">{{v.real_exam_echo}}</span></td>
        <td>{{v.subject_score}}</td>
        <th *ngFor="let s of pager.getRecords()[0].judge_num | numberArray">
          <span [tooltip]="v['jn' + (s > 9 ? '' : '0') + s]">{{v['js' + (s > 9 ? '' : '0') + s]}}</span>
        </th>
  
      </tr>
      </tbody>
    </table>
    <frame-pager [url]="'./sc/std/subject/page.htm'" [pagerParams]="{subject_id:score?.subject_id}"  [autoRequest]="false" #pager></frame-pager>
  </div>
