<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)="showDeptTree({'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 class="table-sort" (click)="pager.sort('dept_code')">部门编号</span></th>
      <th><span class="table-sort" (click)="pager.sort('dept_name')">部门名称</span></th>
      <th><span class="table-sort" (click)="pager.sort('dept_manager')">部门经理</span></th>
      <th><span class="table-sort" (click)="pager.sort('dept_addr')">部门地址</span></th>
      <th><span class="table-sort" (click)="pager.sort('dept_tel')">部门电话</span></th>
      <th><span class="table-sort" (click)="pager.sort('dept_fax')">部门传真</span></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>{{v.dept_name}}</td>
      <td>{{v.dept_manager}}</td>
      <td>{{v.dept_addr}}</td>
      <td>{{v.dept_tel}}</td>
      <td>{{v.dept_fax}}</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('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>


