From e1749547c76a5d8bae94e47d38d4d75b481610c1 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期四, 09 九月 2021 10:51:15 +0800 Subject: [PATCH] # --- src/main/webapp/views/allo/allo.html | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/views/allo/allo.html b/src/main/webapp/views/allo/allo.html index 94f2c70..b8e718a 100644 --- a/src/main/webapp/views/allo/allo.html +++ b/src/main/webapp/views/allo/allo.html @@ -21,7 +21,13 @@ </div> <div class="layui-inline"> <div class="layui-input-inline"> - <input class="layui-input" type="text" name="name" placeholder="浠撳簱鍚嶇О" autocomplete="off"> + <input class="layui-input" type="text" name="name" placeholder="璐т綅鍚嶇О" autocomplete="off"> + </div> + </div> + <div class="layui-inline"> + <div class="layui-input-inline"> + <select id="parentId" name="parent_id" lay-search=""> + </select> </div> </div> <!-- 寰呮坊鍔� --> @@ -49,6 +55,7 @@ <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> <script type="text/javascript" src="../../static/js/allo/allo.js" charset="utf-8"></script> @@ -56,5 +63,24 @@ <iframe id="detail-iframe" scrolling="auto" style="display:none;"></iframe> </body> +<script type="text/template" id="parentNodeGroup"> + <option value="">閫夋嫨搴撳尯</option> + {{#each data}} + <option value="{{this.key}}">{{this.val}}</option> + {{/each}} +</script> +<script type="text/javascript"> + getParentNode(); + function getParentNode(el) { + http.post(baseUrl + "/parent/node/group", {type: 2}, function (res) { + if (res.data != null) { + var tpl = $("#parentNodeGroup").html(); + var template = Handlebars.compile(tpl); + var html = template(res); + $('#parentId').append(html); + } + }); + } +</script> </html> -- Gitblit v1.9.1