<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>
        <a class="dropdown-item" href="#" (click)="showComponentModal(FrameDeptTreeComponent,{'arrayUrl':'frame/dept/all.htm'})">机构树</a>
      </div>
    </div>
  </div>
</div>
<div class=" table-responsive bg-white">
  <table class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th class="th-index">#</th>
      <th><span (click)="pager.sort('dept_code')">机构编号</span></th>
      <th><span (click)="pager.sort('dept_name')">机构名称</span></th>
      <th><span (click)="pager.sort('dept_type')">机构类型</span></th>
      <th><span (click)="pager.sort('dept_manager')">机构经理</span></th>
      <th><span (click)="pager.sort('dept_addr')">机构地址</span></th>
      <th><span (click)="pager.sort('dept_tel')">机构电话</span></th>
      <th><span (click)="pager.sort('dept_fax')">机构传真</span></th>
      <th><span (click)="pager.sort('teach_addr')">助学点</span></th>
      <th>状态</th>
      <th class="th-b-2"></th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let v of pager.getRecords(); let i = index">
      <td>{{i + 1}}</td>
      <td>{{v.dept_code}}</td>
      <td title="{{v.dept_id}}">{{v.dept_name}}</td>
      <td [innerHTML]="v.dept_type | frameDict:'DeptType'"></td>
      <td>{{v.dept_manager}}</td>
      <td>{{v.dept_addr}}</td>
      <td>{{v.dept_tel}}</td>
      <td>{{v.dept_fax}}</td>
      <td>{{v.teach_addr}}</td>
      <td [innerHTML]="v.status | frameDict:'EnableStatus'"></td>
      <td>
        <span class="cursor-hand" (click)="showModal({ResponseEntity:v, arrayUrl:'frame/dept/all.htm'})">
          <em class="fa-lg fas fa-edit"></em>
        </span>
        <span class="cursor-hand ml-3 text-danger" (click)="pager.optrRecord('frame/dept/delete.htm', v, {successMsg:'部门删除完成！', confirmMsg: '确定要删除该部门吗？', successMsgType:'Swal'})">
          <em class="fa-lg fas fa-trash-alt "></em>
        </span>

      </td>
    </tr>
    </tbody>
  </table>
  <frame-pager url="frame/dept/page.htm" #pager></frame-pager>
</div>


