<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
    <head>
        <script th:replace="common/head"></script>
    </head>
    <body>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">

                        <div class="layui-card-body">

                            <div class="layui-form" lay-filter="entity_form">
                                <input id="role_id" type="hidden" name="id" th:value="${id}" />
                                <!-- 角色名称 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must">*</span>角色名称</label>
                                    <div class="layui-input-inline">
                                        <input name="name" lay-verify="required|specialCharacters|length" type="text" class="layui-input" />
                                    </div>
                                </div>
                                <!-- 归属机构 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label"><span class="must">*</span>归属机构</label>
                                    <div class="layui-input-inline">
                                        <input name="orgName" type="text" class="layui-input" disabled />
                                    </div>
                                </div>
                                <!-- 是否可用 -->
                                <div class="layui-form-item">
                                    <label class="layui-form-label">是否可用</label>
                                    <div class="layui-input-block">
                                        <input type="radio" name="isEnable" lay-verify="required" value="1" title="是" />
                                        <input type="radio" name="isEnable" lay-verify="required" value="2" title="否" />
                                    </div>
                                </div>
                                <!-- 配置权限 -->
                                <div class="layui-form-item ">
                                    <label class="layui-form-label">配置权限</label>
                                    <div id="permissions_tree" class="xtree_contianer"></div>
                                </div>
                                <!-- 备注 -->
                                <div class="layui-form-item layui-form-text">
                                    <label class="layui-form-label">备注</label>
                                    <div class="layui-input-block">
                                        <textarea name="remark" class="layui-textarea w500"></textarea>
                                    </div>
                                </div>
                                <!-- 按钮 -->
                                <div class="layui-form-item">
                                    <div class="layui-input-block">
                                        <button class="layui-btn" lay-submit lay-filter="entity_update_filter">提交</button>
                                        <button type="reset" class="layui-btn layui-btn-primary">取消</button>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </body>


    <!-- javascript -->
    <script type="text/javascript" th:src="@{'/layui/layui.js'}"></script>
    <script type="text/javascript">
        layui.config({
            base: '/' //静态资源所在路径
        });
    </script>
    <script type="text/javascript" th:src="@{'/js/util/layui-xtree.js'}"></script>
    <script type="text/javascript" th:src="@{'/js/permissions/role-edit.js'}"></script>
</html>