<div class="app-content-body app-content-full fade-in-up" ng-class="{'h-full': app.hideFooter }">
    <!-- hbox layout -->
    <div class="hbox hbox-auto-xs hbox-auto-sm bg-light "
         ng-init="app.settings.asideFixed = true;app.settings.asideDock = false;app.settings.container = false;app.hideAside = false;app.hideFooter = true;">

        <div style="padding: 20px;" class="layui-anim layui-anim-up">
            <xblock>
                <button class="layui-btn" ng-click="addPerms()"><i class="layui-icon"></i>添加</button>
            </xblock>
            <table class="layui-table">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>权限</th>
                    <th>名称</th>
                    <!--<th>路径</th>-->
                    <th>类型</th>
                    <!--<th>父类id</th>-->
                    <!--<th>父类id树</th>-->
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="permission in permissionList | orderBy:id  track by permission.id">
                    <td>{{permission.id}}</td>
                    <td>{{permission.permission}}</td>
                    <td>{{permission.name}}</td>
                    <!--<td>{{permission.url}}</td>-->
                    <td>{{permission.resource_type}}</td>
                    <!--<td>{{permission.parent_id}}</td>-->
                    <!--<td>{{permission.parent_ids}}</td>-->
                    <td class="td-status">
                        <span ng-if="permission.available==1"
                              class="layui-btn layui-btn-normal layui-btn-mini layui-btn-disabled">已停用</span>
                        <span ng-if="permission.available==0"
                              class="layui-btn layui-btn-normal layui-btn-mini">已启用</span>
                    </td>
                    <td>
                        <a class="layui-btn layui-btn" ng-click="updatePerms(permission.id)">修改</a>
                        <a class="layui-btn layui-btn-danger" ng-if="permission.available==0"
                           ng-click="permissionDel(permission.id)">删除</a>
                        <a class="layui-btn layui-btn-info" ng-if="permission.available==1"
                           ng-click="permissionOpen(permission.id)">启用</a>
                    </td>
                </tr>
                </tbody>
            </table>

        </div>

    </div>
    <!-- /hbox layout -->
</div>