<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({'arrayUrl':'frame/dept/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 class="th-b-2"><span class="table-sort" (click)="pager.sort('aspect_code')">代码</span></th>
      <th><span class="table-sort" (click)="pager.sort('aspect_name')">方向名称</span></th>
      <th><span class="table-sort"
                (click)="pager.sort('aspect_status')">状态</span>
      </th>
      <th>品种</th>
      <th  *ngIf="FrameService.getParamValue('ExamBatchs','1') > '1'"><span class="table-sort" (click)="pager.sort('aspect_batchs')">批次</span></th>
      <th>分组</th>
      <th>报考费用</th>
      <th>报考显示科目</th>
      <th><span class="table-sort" (click)="pager.sort('aspect_order')">排序</span></th>
      <th>报考说明</th>
      <th><span class="table-sort" (click)="pager.sort('aspect_dept')">管理单位</span></th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td><span *ngIf="v.aspect_code===undefined">{{v.aspect_id}}</span>
        <span *ngIf="v.aspect_code!== undefined">{{v.aspect_code}}<span
          *ngIf="(v.aspect_id+'') !== v.aspect_code">({{v.aspect_id}})</span></span>
      </td>
      <td><span (click)="showModal({ResponseEntity:v, 'arrayUrl':'frame/dept/all.htm'})">{{v.aspect_name}}</span></td>
      <td [innerHTML]="v.aspect_status | frameStatusCustom: ['开放','关闭']"></td>
      <td><span *ngIf="v.variety_total !== undefined" class="text-info table-button"
                (click)="showAspectVariety(v)">{{v.variety_total}}</span>
        <span *ngIf="v.variety_total === undefined" class="text-muted table-button"
              (click)="showAspectVariety(v)">配置</span>
      </td>
      <td
        *ngIf="FrameService.getParamValue('ExamBatchs','1') > '1'">{{v.aspect_batchs | frameDict: 'ExamBatchName'}}</td>

      <td><span *ngIf="v.aspect_group" [tooltip]="v.aspect_group">多选一</span></td>
      <td [innerHTML]="getFeeNote(v)"></td>
      <td><span class="table-button" (click)="showAspectSubject(v)" [innerHTML]="getShowSubjects(v)"></span></td>
      <td>{{v.aspect_order}}</td>
      <td><span *ngIf="v.aspect_enrol_explain" class="text-success" [tooltip]="v.aspect_enrol_explain">有报考说明</span>
      </td>
      <td>{{v.dept_name}}</td>
      <td><span class="table-button" (click)="showModal({ResponseEntity:v, 'arrayUrl':'frame/dept/all.htm'})"><em
        class="fa-lg fas fa-edit"></em></span>
        <span class="table-button ml-3 text-danger"
              (click)="pager.optrRecord('conf/aspect/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/aspect/page.htm'" #pager></frame-pager>
</div>


