<div nz-row class="breadcrumbs">
    <div nz-col nzSpan="16">
        <nz-breadcrumb class="padding-8-0">
            <nz-breadcrumb-item>
                首页
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                <a>系统管理</a>
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                角色与权限
            </nz-breadcrumb-item>
        </nz-breadcrumb>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <button (click)="ngOnInit()" nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
        <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
    </div>
</div>

<div nz-row class="search-form">
    <div nz-col nzSpan="16">
        <button (click)="showSeparationModal()" nz-button nzType="default">三员分立</button>
        <button (click)="showAddRoleModal()" nz-button nzType="default"><i class="anticon anticon-plus-circle-o"></i>新增角色</button>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <input nz-input placeholder="角色/权限模块/资源权限">
        <button nz-button nzType="default"><i class="anticon anticon-search"></i>搜索</button>
    </div>
</div>
<nz-table #basicTable [nzData]="dataSet">
    <thead>
    <tr>
        <th>角色名称</th>
        <th>说明</th>
        <th>权限模块</th>
        <th>资源权限</th>
        <th>有效</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr *ngFor="let data of basicTable.data">
        <td>{{data.name}}</td>
        <td>{{data.comments}}</td>
        <td>{{data.key3}}</td>
        <td>{{data.key4}}</td>
        <td>
            <ng-container *ngIf="data.status == 0">
                <i class="anticon anticon-check"></i>
            </ng-container>
        </td>
        <td class="handle">
            <span (click)="grantUser(data)">授予用户</span>
            <span>查看</span>
                <span (click)="showEditModal(data)">编辑</span>
                <span (click)="deleteRole(data)">删除</span>
        </td>
    </tr>
    </tbody>
</nz-table>
<!--新增角色-->
<smart-role #smartRole (add)="getRole()"></smart-role>

<!--三员分立-->
<smart-separation #smartSeparation></smart-separation>

<!--选择人员-->
<smart-select-person #smartSelectPerson (done)="batchAdduserToRole($event)"></smart-select-person>