1
13693261870
2022-09-16 762f2fb45db004618ba099aa3c0bd89dba1eb843
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>服务管理</title>
    <link rel="stylesheet" href="js/layui/css/layui.css" media="all">
      <script src="../lanwebapp/js/paramconfig.js"></script>
</head>
<style>
   
    .fromsys {
        height: 38px;
 
    }
 
    .searchgroup {
        width: 100%;
        height: 100%;
        margin-top: 20px;
    }
 
    .layui-btn,
    .layui-laypage-em {
        background-color: #659cff !important;
    }
 
    select[name='fromsys'] {
        width: 90px;
        border-color: #e6e6e6;
        border-radius: 2px;
        text-align: center !important;
        text-indent: 0.1rem;
    }
 
    select[name='fromsys'] option {
        width: 90px;
        text-align: center !important;
        /* text-indent: 1rem; */
 
    }
</style>
 
<body>
    <div class="searchgroup">
        <!--查询代理服务筛选条件 -->
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">用户ID</label>
                <div class="layui-input-inline">
                    <input type="text" name="resourceid" lay-verify="number" autocomplete="off" class="layui-input">
                </div>
            </div>
        
        
        </div>
    </div>
 
    <table class="layui-hide" id="test" lay-filter="test" style="width: 100%"></table>
    <script type="text/html" id="toolbar">
        <div class="layui-btn-container">
            <button class="layui-btn layui-btn-sm" lay-event="query">查询</button>
            <button class="layui-btn layui-btn-sm" lay-event="reset">重置</button>
        </div>
    </script>
    
    <script src="js/layui/layui.js" charset="utf-8"></script>
    <script src="js/jquery.js" charset="utf-8"></script>
    <script>
        function getQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }
        var resourceid = getQueryString("resourceid");
        var table = null;
        var resourcedata = [];
 
        layui.use("table", function () {
            table = layui.table;
            table.render({
                elem: "#test",
                toolbar: "#toolbar",
                url: LanCatalogBaseURL+"res/jitmonitor/queryResActionRecordByZyId?resourceid=" +
                    resourceid,
                parseData: function (res) {
                    return {
                        "code": 0,
                        "msg": "",
                        "count": res.total,
                        "data": res.data
                    }
                },
                method: 'get',
                cellMinwidth: "80",
                cols: [
                    [{
                            type: 'checkbox'
                        },
                        {
                            field: 'resourceid',
                            title: '主键',
                            sort: true,
                            align: 'center'
                        },
                        {
                            field: 'userid',
                            title: '用户ID',
                            sort: true,
                            align: 'center',
                            edit: 'text'
                        },
                        {
                            field: 'appid',
                            title: '应用ID',
                            sort: true,
                            align: 'center'
                        },
                        {
                            field: 'ip',
                            title: '来源ip',
                            sort: true,
                            align: 'center',
                            edit: 'text'
                        },
                        {
                            field: 'actiontime',
                            title: '操作时间',
                            sort: true,
                            align: 'center'
                        },
                        {
                            field: 'actiontype',
                            title: '操作类型',
                            sort: true,
                            align: 'center',
                            edit: 'text',
                            templet: function (d) {
 
                                switch (d.ISPUBLIC) {
                                    case 1:
                                        return "公开";
                                        break;
                                    case 0:
                                        return "不公开";
                                        break;
                                    default:
                                        return "";
                                        break;
                                }
                            }
                        }
 
                    ]
                ],
                page: true
            })
            table.on('toolbar(test)', function (obj) {
                var checkstatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'query':
                        query();
                        break;
                    case 'reset':
                        reset();
                        break;
                };
            });
 
 
        })
 
        function query() {
            table.reload('test', {
                page: {
                    curr: 1
                },
                where: {
                    userid: $("[name='resourceid']").val()
                
                }
 
            }, 'data')
        }
        function reset() {
            $("[name='resourceid']").val('');
        
                table.reload('test', {
                    page: {
                        curr: 1
                    },
                    where: {
 
                    }
 
                }, 'data')
        }
 
    </script>
 
</body>
 
</html>