#
mrzhssss
2022-05-16 360427be92209485d972a8a68dd289666e608e40
src/main/webapp/views/area/area_detail.html
@@ -190,5 +190,35 @@
    <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>