<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>
      </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('variety_code')">代码</span></th>
      <th><span class="table-sort" (click)="pager.sort('variety_name')">乐器/舞种名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('variety_order')">排序</span></th>
      <th><span class="table-sort" (click)="pager.sort('single_subject_variety')">唯一</span></th>
      <th><span class="table-sort" (click)="pager.sort('allow_same_tracks')">允许相同曲目</span></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.variety_code}}</td>
      <td>{{v.variety_name}}</td>
      <td>{{v.variety_order}}</td>
      <td [innerHTML]="v.single_subject_variety | frameStatusCustom: ['专业唯一','多专业共用']"></td>
      <td [innerHTML]="v.allow_same_tracks | frameStatusCustom: ['允许','禁止']"></td>


      <td><span *ngIf="getVarietyTracksConfig(v).length > 0" class="table-button"  (click)="showVarietyTracks(v)">{{getVarietyTracksConfig(v)}}</span>
        <span *ngIf="getVarietyTracksConfig(v).length === 0" class="text-muted table-button" (click)="showVarietyTracks(v)">配置曲目</span>
      </td>
      <td><span *ngIf="v.variety_enrol_explain" class="text-success" [tooltip]="v.variety_enrol_explain">有报考说明</span>


      <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/variety/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/variety/page.htm'" #pager></frame-pager>
</div>


