<!DOCTYPE html>
<!--解决idea thymeleaf 表达式模板报红波浪线-->
<!--suppress ALL -->
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <!-- 引入公用部分 -->
    <script th:replace="common/head::static"></script>
    <!-- 游戏数据用户相关样式 -->
    <link th:href="@{/sys/aComUser/css/user.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="layui-row layui-col-space15">
    <!-- 树 -->
    <div class="layui-col-md12">
        <div class="layui-card">
            <div class="layui-card-header">角色列表</div>
            <div class="layui-card-body">
                <!-- 表格主体 -->
                <table class="layui-hide" id="mainTable" lay-filter="test"></table>
                <!-- 模板 -->
                <script type="text/html" id="mainTableToolbarDemo">
                    <div class="layui-form" action="">
                        <div class="layui-form-item">
                            <div class="layui-inline tool-btn">
                                <button class="layui-btn layui-btn-sm" lay-event="addNewRow">新增</button>
                            </div>
                            <div class="layui-inline" style="width: 500px;">
                                <input type="text" id="queryByAddress" name="queryByAddress" placeholder="输入钱包地址"
                                       autocomplete="off" class="layui-input">
                            </div>
                            <button class="layui-btn layui-btn-sm" style="padding: 0 10px;" lay-event="query">查询<i
                                    class="layui-icon layui-icon-search"></i></button>
                        </div>
                    </div>
                </script>

                <script type="text/html" id="mainTableBarDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="edit">编辑<i class="layui-icon layui-icon-edit"></i></a>
                    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
                </script>
            </div>
        </div>

    </div>
    <!-- 操作表单 -->
    <div class="layui-col-md12" style="display:none;" id="show_div">
        <div class="layui-card">
            <!--<div class="layui-card-header">操作表单</div>-->
            <div class="layui-card-body">
                <form id="comForm" class="layui-form layui-form-pane" lay-filter="comForm">
                    <div class="layui-form-item" id="tableId">
                        <label class="layui-form-label">ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="id" autocomplete="off" placeholder="id"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <input type="text" name="userId" hidden="hidden"/>
                    <input type="text" name="roleId" hidden="hidden"/>
                    <input type="text" name="roleType" hidden="hidden"/>
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色名字</label>
                        <div class="layui-input-block">
                            <input type="text" name="name" autocomplete="off" placeholder="name"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色经验</label>
                        <div class="layui-input-block">
                            <input type="text" name="exp" autocomplete="off" placeholder="exp"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色等级</label>
                        <div class="layui-input-block">
                            <input type="text" name="level" autocomplete="off" placeholder="level"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">力量</label>
                        <div class="layui-input-block">
                            <input type="text" name="power" autocomplete="off" placeholder="power"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">智力值</label>
                        <div class="layui-input-block">
                            <input type="text" name="intelligence" autocomplete="off" placeholder="intelligence"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">技巧值</label>
                        <div class="layui-input-block">
                            <input type="text" name="skills" autocomplete="off" placeholder="skills"
                                   class="layui-input">
                        </div>
                    </div>
                    <!--<input type="text" name="random" hidden="hidden"/>-->
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">随机属性值</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="random" autocomplete="off" placeholder="random"-->
                    <!--               class="layui-input" >-->
                    <!--    </div>-->
                    <!--</div>-->
                    <!--<input type="text" name="professional" hidden="hidden"/>-->
                    <!--（0无,1挖矿，2勘探，3运输，4伐木） -->
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">工作</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="professional" autocomplete="off" placeholder="professional"-->
                    <!--               class="layui-input" readonly="readonly">-->
                    <!--    </div>-->
                    <!--</div>-->
                    <!--<input type="text" name="workPos" hidden="hidden"/>-->
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">配置位置</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="workPos" autocomplete="off" placeholder="workPos"-->
                    <!--               class="layui-input" readonly="readonly">-->
                    <!--    </div>-->
                    <!--</div>-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">携带动作</label>
                        <div class="layui-input-block">
                            <input type="text" name="action" autocomplete="off" placeholder="action"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">互动事件</label>
                        <div class="layui-input-block">
                            <input type="text" name="interactive" autocomplete="off" placeholder="interactive"
                                   class="layui-input">
                        </div>
                    </div>
                    <input type="text" name="state" hidden="hidden"/>
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">状态</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="state" autocomplete="off" placeholder="state"-->
                    <!--               class="layui-input">-->
                    <!--    </div>-->
                    <!--</div>-->
                    <!--<input type="text" name="modelId" hidden="hidden"/>-->
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">模型ID</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="modelId" autocomplete="off" placeholder="modelId"-->
                    <!--               class="layui-input">-->
                    <!--    </div>-->
                    <!--</div>-->
                    <!--<input type="text" name="modelColor" hidden="hidden"/>-->
                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">颜色ID</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="modelColor" autocomplete="off" placeholder="modelColor"-->
                    <!--               class="layui-input">-->
                    <!--    </div>-->
                    <!--</div>-->

                    <div class="layui-form-item" id="tableTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">创建时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="createTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item" id="tableTime">
                        <div class="layui-inline">
                            <label class="layui-form-label">更新时间</label>
                            <div class="layui-input-block">
                                <input type="text" name="updateTime" autocomplete="off" class="layui-input"
                                       readonly="readonly">
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a id="saveBtn" class="layui-btn" type="submit" lay-submit lay-filter="comFilter">保存</a>
                            <!--<a id="addBtn" class="layui-btn" type="submit" lay-submit lay-filter="comAddFilter">新增</a>-->
                        </div>
                    </div>
                </form>

            </div>
        </div>

    </div>
    <div class="layui-col-md12" style="display:none;" id="show_add_div">
        <div class="layui-card">
            <div class="layui-card-body">
                <form id="addForm" class="layui-form layui-form-pane" lay-filter="addForm">
                    <div class="layui-form-item">
                        <label class="layui-form-label">当前用户ID</label>
                        <div class="layui-input-block">
                            <input type="text" name="userId" autocomplete="off" placeholder="userId"
                                   class="layui-input" readonly="readonly">
                        </div>
                    </div>
                    <!--<input type="text" name="userId" hidden="hidden"/>-->

                    <!--<div class="layui-form-item">-->
                    <!--    <label class="layui-form-label">角色ID</label>-->
                    <!--    <div class="layui-input-block">-->
                    <!--        <input type="text" name="roleId" autocomplete="off" placeholder="roleId"-->
                    <!--               class="layui-input">-->
                    <!--    </div>-->
                    <!--</div>-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">角色ID</label>
                        <div class="layui-input-block">
                            <select name="roleId" id="roleId" lay-verify="required" lay-filter="roleIdFilter">
                                <option th:each="attri : ${characterAttris}"  th:value="${attri.id}" th:text="${attri.note}">
                                </option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <a id="addBtn" class="layui-btn" type="submit" lay-submit lay-filter="comAddFilter">新增</a>
                        </div>
                    </div>
                </form>

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

    <!--<div class="layui-col-md12">-->
    <!--    <div class="layui-card">-->
    <!--        <div class="layui-card-header">用户仓库操作列表</div>-->
    <!--        <div class="layui-card-body">-->
    <!--            &lt;!&ndash; 表格主体 &ndash;&gt;-->
    <!--            <table class="layui-hide" id="comPlayerLogTable" lay-filter="test"></table>-->
    <!--            &lt;!&ndash; 模板 &ndash;&gt;-->
    <!--            <script type="text/html" id="comPlayerLogTableToolbarDemo">-->
    <!--                <div class="layui-btn-container">-->
    <!--                    <button class="layui-btn layui-btn-sm" lay-event="playerLogReload">刷新</button>-->
    <!--                </div>-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--</div>-->

    <!--<div class="layui-col-md12">-->
    <!--    <div class="layui-card">-->
    <!--        <div class="layui-card-header">用户偷取操作列表</div>-->
    <!--        <div class="layui-card-body">-->
    <!--            &lt;!&ndash; 表格主体 &ndash;&gt;-->
    <!--            <table class="layui-hide" id="comPlayerProfitTable" lay-filter="test"></table>-->
    <!--            &lt;!&ndash; 模板 &ndash;&gt;-->
    <!--            <script type="text/html" id="comPlayerProfitTableToolbarDemo">-->
    <!--                <div class="layui-btn-container">-->
    <!--                    <button class="layui-btn layui-btn-sm" lay-event="playerProfitReload">刷新</button>-->
    <!--                </div>-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--</div>-->

</div>
</body>
<script type="text/javascript" th:inline="javascript">
    console.log("characterAttris:",[[${characterAttris}]]);
</script>
<!-- js -->
<script th:src="@{/sys/aComUser/js/userCharacters.js}"></script>
</html>