<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 class="table table-striped table-hover table-bordered">
    <thead>
    <tr>
      <th>#</th>
      <th><span href="#" (click)="pager.sort('role_name')">角色名称</span></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>{{v.role_name}}</td>
      <td [innerHTML]="v.role_status | frameStatus"></td>
      <td>{{v.optr_count}}</td>
      <td>{{v.res_count}}</td>
      <td>{{v.role_type}}</td>
      <td>{{v.home_page}}</td>
      <td>{{v.thread_max}}</td>
      <td>{{v.create_optr_name}}（{{v.create_login_name}}）</td>
      <td>
        <span class="cursor-hand" (click)="showModal({ResponseEntity:v})"><em class="fa-lg fas fa-edit"></em></span>
        <span class="cursor-hand  ml-3 text-success" (click)="showComponentModal(FrameRoleResComponent,{ResponseEntity:v, arrayUrl: 'frame/role/res/list.htm', arrayParam: {role_id: v.role_id}})" title="为该角色分配资源权限"><em class="fa-lg fas fa-tree"></em></span>
        <span class="cursor-hand ml-3 text-danger" (click)="pager.optrRecord('frame/role/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/role/page.htm" #pager></frame-pager>
</div>


