<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>
    <!-- 样式 -->
    <link th:href="@{/css/common/contianer.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="layui-row">
    <!-- 树 -->
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">权限列表</div>
            <div class="layui-card-body simple-table">
                <!-- 表格主体 -->
                <table class="layui-hide" id="permissionsTable" lay-filter="permissionsTable"></table>
                <!-- 模板 -->
                <script type="text/html" id="tableToolBar">
                    <div class="layui-btn-container">
                        <button class="layui-btn layui-btn-sm" lay-event="add">新增</button>
                        <input type="text" id="searchKeyInput" name="searchKeyInput" autocomplete="off"
                               placeholder="请输入权限名称" class="layui-input layui-btn-sm">
                        <button class="layui-btn layui-btn-sm" lay-event="query">查询</button>
                    </div>
                </script>
                <script type="text/html" id="rowToolBar">
                    {{# if(d.permisScope == 'SPECIAL'){ }}
                        <a class="layui-btn layui-btn-xs" lay-event="config">配置</a>
                    {{# } }}
                    {{#
                        let disabled = '';
                        if(d.permisId.startsWith('PERMIS_')){
                            disabled = ' layui-disabled'
                        }
                    }}
                    <a class="layui-btn layui-btn-xs {{disabled}}" lay-event="edit{{disabled}}">编辑</a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs {{disabled}}" lay-event="delete{{disabled}}">删除</a>
                </script>
            </div>
        </div>
    </div>
</div>
</body>
<!-- js -->
<script th:replace="common/head::static-foot"></script>
<script th:src="@{/js/sys/permissions/permissions.js}"></script>
<script type="text/javascript">
    const sizeInit = () => $(".simple-table").height(window.innerHeight - 43 - 20)
    window.onresize = sizeInit;
    sizeInit();
</script>
</html>