<div class="content-heading  justify-content-between">
  <div>{{FrameService.getParamValue('EnrolStepName_Major', '报考专业')}}管理</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>{{FrameService.getParamValue('EnrolStepName_Major', '报考专业')}}管理
        <span class="caret"></span>
      </button>
      <div *dropdownMenu class="dropdown-menu modal-lg" role="menu">
        <a class="dropdown-item" href="#" (click)="showModal({arrayUrl:'conf/category/all.htm'})">新增报考专业</a>
        <div class="dropdown-divider"></div>
      </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('major_code')">代码</span></th>
      <th><span class="table-sort"
                (click)="pager.sort('major_name')">{{FrameService.getParamValue('EnrolStepName_Major', '报考专业')}}</span>
      </th>
      <th><span class="table-sort" (click)="pager.sort('major_status')">允许报考</span></th>
      <th><span class="table-sort" (click)="pager.sort('major_order')">排序</span></th>
      <th>方向限制</th>
      <th>报考说明</th>
      <th>方向总数</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.major_code}}</td>
      <td>{{v.major_name}}</td>
      <td [innerHTML]="v.major_status | frameStatusCustom: ['开放','关闭']"></td>
      <td>{{v.major_order}}</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.major_enrol_explain" class="text-success" [tooltip]="v.major_enrol_explain">有报考说明</span></td>
      <td>{{v.aspect_total}}</td>
      <td><span class="table-button" (click)="showModal({ResponseEntity:v, arrayUrl:'conf/category/all.htm'})"><em
        class="fa-lg fas fa-edit"></em></span>
        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('conf/major/delete.htm', v, {successMsg:FrameService.getParamValue('EnrolStepName_Major','报考专业') + '已删除！', confirmMsg: '确定要删除该'+ FrameService.getParamValue('EnrolStepName_Major','报考专业')+'吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>

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


