| | |
| | | var pageCurr; |
| | | |
| | | 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); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | var pageCurr; |
| | | var tableIns; |
| | | |
| | | getParentNode(); |
| | | function getParentNode(el) { |
| | | http.post(baseUrl + "/parent/node/group", {type: 1}, function (res) { |
| | | if (res.data != null) { |
| | | var tpl = $("#parentNodeGroup").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('#parentId').append(html); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | layui.use(['table','laydate', 'form'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | |
| | | |
| | | <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/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/js/allo/allo.js" charset="utf-8"></script> |
| | | |
| | | <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> |
| | | |
| | | </html> |
| | | |
| | |
| | | <option value="{{this.key}}">{{this.val}}</option> |
| | | {{/each}} |
| | | </script> |
| | | <script> |
| | | layui.use(['form'], function(){ |
| | | var form = layui.form; |
| | | getParentNode(); |
| | | function getParentNode(el) { |
| | | $.ajax({ |
| | | url: baseUrl+"/parent/node/group", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {type: 2}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.data != null) { |
| | | var tpl = $("#parentNodeGroup").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('#parentId').append(html); |
| | | layui.form.render('select'); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | </script> |
| | | </html> |
| | | |
| | |
| | | <option value="{{this.key}}">{{this.val}}</option> |
| | | {{/each}} |
| | | </script> |
| | | <script> |
| | | layui.use(['form'], function(){ |
| | | var form = layui.form; |
| | | getParentNode(); |
| | | function getParentNode(el) { |
| | | $.ajax({ |
| | | url: baseUrl+"/parent/node/group", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: {type: 1}, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | if (res.data != null) { |
| | | var tpl = $("#parentNodeGroup").html(); |
| | | var template = Handlebars.compile(tpl); |
| | | var html = template(res); |
| | | $('#parentId').append(html); |
| | | form.render('select'); |
| | | } |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | </script> |
| | | </html> |
| | | |