Helius
2021-06-16 5728be2af515b2200e782aa201ca5d4d67d9ea47
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!--#layout("/common/layout.html",{"jsBase":"/js/admin/setting/storage/"}){ -->
 
<div>
    <div class="layui-form-item" style="margin-top: 20px">
        <button type="button" id="add" class="layui-btn layui-btn-primary">添加</button>
    </div>
</div>
<table id="storageTable" lay-filter="storageTable"></table>
<!--#} -->
<script>
    var index;
    layui.use(['index'], function(){
        index = layui.index
        index.init({'delFlag':0});
    });
 
    // 删除
    var delCuserById = function(id, e){
        layer.confirm('确认要删除吗?', {
            btn : [ '确定', '取消' ]//按钮
        }, function(index) {
            layer.close(index);
            $.post(Common.ctxPath+'/admin/setting/storage/delStorage.json', {'id':id}, null);
            $("tr[data-index='" + e + "']").remove();
        });
    };
 
    $("#add").click(function () {
        layer.open({
            type: 2,
            area: ['800px', '650px'],
            fixed: false, //不固定
            maxmin: true,
            content: Common.ctxPath+'/admin/setting/storage/add.do',
            end: function () {//无论是确认还是取消,只要层被销毁了,end都会执行,不携带任何参数。layer.open关闭事件
                location.reload();  //layer.open关闭刷新
            }
        });
    })
</script>
<!--C端用户管理----用户查询-->