#
luxiaotao1123
2021-01-26 9e497f0844f5f5ec08a1aa4b8acc3937ca4b8e74
src/main/webapp/views/tag/tag.html
@@ -34,7 +34,7 @@
<!-- 表单弹窗 -->
<script type="text/html" id="editDialog">
    <form id="detail" class="layui-form">
    <form id="detail" lay-filter="detail" class="layui-form">
        <input name="id" type="hidden">
        <input name="uuid" type="hidden">
        <input name="path" type="hidden">
@@ -190,7 +190,7 @@
                    return;
                }
                var ids = checkRows.map(function (d) {
                    return d.authorityId;
                    return d.id;
                });
                doDel({ids: ids});
            }
@@ -214,6 +214,7 @@
                content: $('#editDialog').html(),
                success: function (layero, dIndex) {
                    // 回显表单数据
                    console.log(mData)
                    form.val('detail', mData);
                    // 表单提交事件
                    form.on('submit(editSubmit)', function (data) {
@@ -274,15 +275,30 @@
            }, function (i) {
                layer.close(i);
                var loadIndex = layer.load(2);
                $.get('../../json/ok.json', {id: obj.data ? obj.data.authorityId : obj.ids}, function (res) {
                    layer.close(loadIndex);
                    if (res.code === 200) {
                        layer.msg(res.msg, {icon: 1});
                        insTb.refresh();
                    } else {
                        layer.msg(res.msg, {icon: 2});
                var ids;
                if (obj.data) {
                    ids = [];
                    ids[0] = obj.data.id;
                } else {
                    ids = obj.ids;
                }
                $.ajax({
                    url: baseUrl+"/tag/delete/auth",
                    headers: {'token': localStorage.getItem('token')},
                    data: {ids: ids},
                    method: 'POST',
                    success: function (res) {
                        layer.close(loadIndex);
                        if (res.code === 200){
                            layer.msg(res.msg, {icon: 1});
                            insTb.refresh();
                        } else if (res.code === 403){
                            top.location.href = baseUrl+"/";
                        } else {
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                }, 'json');
                })
            });
        }