<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.province" 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:'StdScoreSegmentReport', report_title :'普高考生十分一段统计表'})">导出普高考生十分一段统计表</a> -->

          <a class="dropdown-item" href="#" (click)="segmentDownloadReport()">导出普高考生十分一段统计表</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('province')">省份</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('fraction_segment')">分数段</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('admission_segment_score')">录取本段人数</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('admission_cumulative_score')">录取累计人数</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('report_segment_score')">报道本段人数</span></th>
      <th nowrap><span class="table-sort" (click)="pager.sort('report_cumulative_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.province}}</td>
      <td>{{v.fraction_segment}}</td>
      <td>{{v.admission_segment_score}}</td>
      <td>{{v.admission_cumulative_score}}</td>
      <td>{{v.report_segment_score}}</td>
      <td>{{v.report_cumulative_score}}</td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="PAGE_URL" [pagerParams]="query" #pager [showSearch]='false'></frame-pager>
</div>
