<div class="content-heading  justify-content-between">
    <div>常用统计
    </div>
    <div class="float-right">
      <div class="row">
        <div>
          <ngx-select [items]="dimenArr" [(ngModel)]="dimen" (ngModelChange)="changeBatch()"
                      placeholder="请选择统计维度"
                      class="wd-wide"
                      optionValueField="value" optionTextField="text"></ngx-select>
        </div>
        <div class="ml-3" *ngIf="flag">
            <ngx-select [items]="batchArr" [(ngModel)]="exam_batch" (ngModelChange)="requestData()"
                      placeholder="请选择批次"
                      class="wd-wide" optionValueField="dict_value" optionTextField="dict_text"></ngx-select>
            <!-- <select class="wd-wide" frameDict [dictName]="'ExamBatchName'" [tipFlag]="false" [(ngModel)]="exam_batch"
             (ngModelChange)="requestData()"></select>            -->
        </div>
      </div>
    </div>
</div>


<table class="table table-striped table-hover table-bordered" *ngIf="dimen === 1">
    <thead>
    <tr>
      <th class="th-index"></th>
      <th>专业名称</th>
      <th>总人数</th>
      <th>省内人数</th>
      <th>省外人数</th>
      <th>省内缴费人数</th>
      <th>省外缴费人数</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of dataArr; let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.aspect_name}}</td>
      <td>{{v.num}}</td>
      <td>{{v.province_num}}</td>
      <td>{{v.out_num}}</td>
      <td>{{v.province_pay_num}}</td>
      <td>{{v.out_pay_num}}</td>
    </tr>
    <tr >
      <td colspan="2">合计</td>
      <td>{{dataArr | frameSum : 'num'}}</td>
      <td>{{dataArr | frameSum : 'province_num'}}</td>
      <td>{{dataArr | frameSum : 'out_num'}}</td>
      <td>{{dataArr | frameSum : 'province_pay_num'}}</td>
      <td>{{dataArr | frameSum : 'out_pay_num'}}</td>
    </tr>
    </tbody>
  </table>

  <table class="table table-striped table-hover table-bordered" *ngIf="dimen === 2">
    <thead>
    <tr>
      <th class="th-index"></th>
      <th>分组名称</th>
      <th>总数</th>
      <th>省内人数</th>
      <th>省外人数</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of dataArr; let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.group_name}}</td>
      <td>{{v.group_std_total}}</td>
      <td>{{v.province_std_total}}</td>
      <td>{{v.outside_std_total}}</td>
    </tr>
    <tr >
      <td colspan="2">合计</td>
      <td>{{dataArr | frameSum : 'group_std_total'}}</td>
      <td>{{dataArr | frameSum : 'province_std_total'}}</td>
      <td>{{dataArr | frameSum : 'outside_std_total'}}</td>
    </tr>
    </tbody>
  </table>
  
  <table class="table table-striped table-hover table-bordered" *ngIf="dimen === 3 || dimen === 4 ">
    <thead>
    <tr>
      <th class="th-index"></th>
      <th>专业名称</th>
      <th>总数</th>
      <th>省内人数</th>
      <th>省外人数</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of dataArr; let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.aspect_name}}</td>
      <td>{{v.num}}</td>
      <td>{{v.province_num}}</td>
      <td>{{v.out_num}}</td>
    </tr>
    <tr >
      <td colspan="2">合计</td>
      <td>{{dataArr | frameSum : 'num'}}</td>
      <td>{{dataArr | frameSum : 'province_num'}}</td>
      <td>{{dataArr | frameSum : 'out_num'}}</td>
    </tr>
    </tbody>
  </table>

