<div class="content-heading  justify-content-between">
  <div>生源分专业分科类生源质量情况统计表</div>
</div>

<div class="row ml-1 mt-3" *ngIf="showSearchCondition==true">
  <div class="col-lg-12">
    <form >
      <table>
        <tr style="height: 60px">
          <td align='right' style="width: 80px">年份：</td>
          <td style="width: 180px"> 
            <input [(ngModel)]="query.year" type="text" style="width: 180px;margin-right: 4px" [ngModelOptions]="{standalone: true}">
          </td>
          <td align='right' style="width: 80px">学院：</td>
          <td style="width: 180px"> 
            <input [(ngModel)]="query.department" type="text" style="width: 180px;margin-right: 4px" [ngModelOptions]="{standalone: true}">
          </td>
          <td align='right' style="width: 80px">专业：</td>
          <td style="width: 180px">
            <input [(ngModel)]="query.major" type="text" style="width: 180px;margin-right: 4px" [ngModelOptions]="{standalone: true}">
          </td>
          <td align='center' colspan="2">
            <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="pager.reload();">
                <i class="fa fa-search"></i> 查询</button>
              <button class="btn btn-primary btn-rounded btn-outline btn-sm  mr-1" (click)="reset()">
                <i class="fa fa-undo"></i> 重置</button>
          </td>
        </tr>
      </table>
    </form>
  </div>
</div>



<div >

  <div class="float-left">
    <div class="input-group">
        <input class="form-control ml-2 mt-2" style="width: 200px;" type="text" [(ngModel)]="query.query" (keyup)="search" placeholder="模糊查询" />
        <div class="input-group-append mt-2" style="height: 35px;">
          <button class="btn btn-outline-secondary bg-white" (click)="pager.goSearch()">
            <em class="fa fas fa-search"></em>
          </button>
        </div>

        <button class="btn btn-primary mt-2 ml-2 mr-1 mb-1 btn-sm "  style="height: 35px;" data-toggle="tooltip" data-placement="left"  (click)="toggleShowSearchCondition()"
      title="高级查询">
      <span *ngIf="showSearchCondition==true">隐藏</span><span *ngIf="showSearchCondition==false">显示</span>高级查询</button>
    </div>
  </div>

  <div class="float-right">
    <div class="btn-group mb-1 mr-1" 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)="downloadReport( {report_name:'StdDepartmentMajorQualityReport', report_title :'生源分专业分科类生源质量情况统计表'})">导出生源分专业分科类生源质量情况统计表</a> -->
          <a class="dropdown-item" href="#" (click)="qualityDownloadReport()">导出生源分专业分科类生源质量情况统计表</a>
      </div>
    </div>
  </div>

</div>

<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th nowrap><span class="table-sort" >序号</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('year')">年份</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('department')">学院</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('major')">专业</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('families')">科类</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('admission_max_score')">录取最高分</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('admission_min_score')">录取最低分</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('admission_average_score')">录取平均分</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('reported_max_score')">报道最高分</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('reported_min_score')">报道最低分</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('reported_average_score')">报道平均分</span></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i+1}}</td>
      <td>{{v.year}}</td>
      <td>{{v.department}}</td>
      <td>{{v.major}}</td>
      <td>{{v.families}}</td>
      <td>{{v.admission_max_score}}</td>
      <td>{{v.admission_min_score}}</td>
      <td>{{v.admission_average_score}}</td>
      <td>{{v.reported_max_score}}</td>
      <td>{{v.reported_min_score}}</td>
      <td>{{v.reported_average_score}}</td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="PAGE_URL" [pagerParams]="query" #pager [showSearch]='false'></frame-pager>
</div>
<!-- 
<frame-uploader [uploadUrl]="'std/major/batchMajor.htm'" [templateFile]="'模板-导入学院专业计划数.xlsx'" [allowedFileType]="['xlsx']" [confirmMsg]="'确定要继续吗'" (allUpload)="reloadPage()" #uploader></frame-uploader> -->