<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><span class="table-sort" (click)="pager.sort('subject_code')">科目代码</span></th>
      <th><span class="table-sort" (click)="pager.sort('subject_name')">科目名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('subject_type')">科目类型</span></th>
      <th>乐器/舞种</th>
      <th><span class="table-sort" (click)="pager.sort('subject_alias')">编排用名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('single_aspect_subject')">唯一</span></th>
      <th>报考说明</th>
      <th><span class="table-sort" (click)="pager.sort('subject_dept')">管理单位</span></th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{v.subject_code}}</td>
      <td><span  (click)="showModal({ResponseEntity:v, 'arrayUrl':'frame/dept/all.htm'})">{{v.subject_name}}</span></td>
      <td [innerHTML]="v.subject_type | frameDict: 'ConfSubjectType'"></td>
      <td><span *ngIf="v.variety_total !== undefined" class="text-info table-button"  (click)="showSubjectVariety(v)">{{v.variety_total}}</span>
        <span *ngIf="v.variety_total === undefined" class="text-muted table-button" (click)="showSubjectVariety(v)">配置</span>
      </td>
      <td>{{v.subject_alias}}</td>
      <td [innerHTML]="v.single_aspect_subject | frameStatusCustom: ['专业唯一','多专业共用']"></td>
      <td><span *ngIf="v.subject_enrol_explain" class="text-success" [tooltip]="v.subject_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/subject/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/subject/page.htm'" #pager></frame-pager>
</div>


