<div class="content-heading  justify-content-between">
  <div>材料管理</div>
  <div class="float-right">
    <div class="row">
      <div class="wd-xl wd-sm">
          <ngx-select [items]="schoolArray" [(ngModel)]="query.school_id" (ngModelChange)="changeSchool()" placeholder="学校"
              [autoClearSearch]="true" optionValueField="school_id" optionTextField="school_name">
          </ngx-select>
      </div>          
      <div class="btn-group ml-3 mr-2" dropdown>
          <button class="btn dropdown-toggle btn-secondary" 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>
      </div>
    </div>
  </div>
</div>
<div class="table-responsive bg-white table-full">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th>序号</th>
      <th>状态</th>
      <th>材料类型</th>
      <th>材料名称</th>
      <th>材料说明</th>
      <th>文件类型</th>
      <th>必须上传</th>
      <th>导师评审</th>
      <th>备注</th>
      <th class="th-b-3"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i + 1}}</td>
      <td [innerHTML]="v.status | frameDict:'EnableStatus'"></td>
      <td>{{v.category_name}}</td>
      <td>{{v.material_name}}</td>
      <td [tooltip]="v.material_desc">材料说明</td>
      <td>{{v.material_type}}</td>
      <td [innerHTML]="v.need_upload | frameDict:'YesOrNo'"></td>
      <td [innerHTML]="v.need_review | frameDict:'YesOrNo'"></td>
      <td><span (click)="setFeedBack(v);" class="text-green table-button">材料反馈</span></td>
      <td [tooltip]="v.remark">备注</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('cf/material/def/delete.htm', v, {successMsg:'材料已删除！', confirmMsg: '谨慎操作，确定要删除该材料吗？', successMsgType:'Swal'})"><em
          class="fa-lg fas fa-trash-alt "></em></span>
      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager [url]="'./cf/material/def/page.htm'" [pagerParams]="{school_id: query.school_id}" #pager></frame-pager>
</div>

