<div class="content-heading  justify-content-between">
  <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)="showModal()">新增报考大类</a>
        <div class="dropdown-divider"></div>
        <a class="dropdown-item" href="#" (click)="showModal()">浏览模式</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><span class="table-sort" (click)="pager.sort('category_code')">大类代码</span></th>
      <th><span class="table-sort" (click)="pager.sort('category_name')">大类名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('category_status')">允许报考</span></th>
      <th><span class="table-sort" (click)="pager.sort('category_order')">排序</span></th>
      <th>专业限制</th>
      <th>方向限制</th>
      <th>报考说明</th>
      <th>{{FrameService.getParamValue('EnrolStepName_Major', '报考专业')}}管理总数</th>
      <th>方向总数</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.category_code}}</td>
      <td>{{v.category_name}}</td>
      <td [innerHTML]="v.category_status | frameStatusCustom: ['开放','关闭']"></td>
      <td>{{v.category_order}}</td>
      <td><span *ngIf="v.enrol_major_limit === 0" class="text-success">无限制</span>
        <span *ngIf="v.enrol_major_limit > 0" class="text-warning">{{v.enrol_major_limit}}</span>
      </td>

      <td><span *ngIf="v.enrol_aspect_limit === 0" class="text-success">无限制</span>
        <span *ngIf="v.enrol_aspect_limit > 0" class="text-warning">{{v.enrol_aspect_limit}}</span>
      </td>
      <td><span *ngIf="v.category_enrol_explain" class="text-success" [tooltip]="v.category_enrol_explain">有报考说明</span></td>
      <td>{{v.major_total}}</td>
      <td>{{v.aspect_total}}</td>
      <td><span class="table-button" (click)="showModal({ResponseEntity:v})"><em
        class="fa-lg fas fa-edit"></em></span>
        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('conf/category/delete.htm', v, {successMsg:'报考大类删除完成！', confirmMsg: '确定要删除该报考大类吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>

      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./conf/category/page.htm'" #pager></frame-pager>
</div>


