|
@@ -0,0 +1,101 @@
|
|
|
|
|
+#include("/template/common/layout/_page_layout.html")
|
|
|
|
|
+#@layout()
|
|
|
|
|
+
|
|
|
|
|
+#define css()
|
|
|
|
|
+<style>
|
|
|
|
|
+
|
|
|
|
|
+</style>
|
|
|
|
|
+#end
|
|
|
|
|
+
|
|
|
|
|
+#define js()
|
|
|
|
|
+<script type="text/javascript">
|
|
|
|
|
+ layui.use(['table', 'layer'], function () {
|
|
|
|
|
+ var table = layui.table
|
|
|
|
|
+ , layer = layui.layer
|
|
|
|
|
+ , $ = layui.jquery
|
|
|
|
|
+ , form = layui.form;
|
|
|
|
|
+
|
|
|
|
|
+ // 表格渲染
|
|
|
|
|
+ var tableIns = table.render({
|
|
|
|
|
+ elem: '#dateTable' //指定原始表格元素选择器(推荐id选择器)
|
|
|
|
|
+ , id: 'dateTable'
|
|
|
|
|
+ , even: true //开启隔行背景
|
|
|
|
|
+ , size: 'sm' //小尺寸的表格
|
|
|
|
|
+ , height: 'full-150' //容器高度
|
|
|
|
|
+ , cols: [[ //标题栏
|
|
|
|
|
+ {checkbox: false, sort: true, fixed: true, space: true}
|
|
|
|
|
+ , {field: 'id', title: 'ID', width: 60}
|
|
|
|
|
+ , {field: 'lastUpdAcct', title: '用户', width: 100}
|
|
|
|
|
+ , {field: 'url', title: '请求url', width: 180}
|
|
|
|
|
+ , {field: 'from', title: '来源', width: 180}
|
|
|
|
|
+ , {field: 'ip', title: 'ip', width: 140}
|
|
|
|
|
+ , {field: 'browser', title: '浏览器', width: 120}
|
|
|
|
|
+ , {field: 'operation', title: '操作', width: 80}
|
|
|
|
|
+ , {field: 'createDate', title: '访问时间', width: 150}
|
|
|
|
|
+ ]]
|
|
|
|
|
+ , url: '#(ctxPath)/system/log/tableData'
|
|
|
|
|
+ , method: 'get'
|
|
|
|
|
+ , request: {
|
|
|
|
|
+ pageName: 'pageNumber' //页码的参数名称,默认:page
|
|
|
|
|
+ ,limitName: 'pageSize' //每页数据量的参数名,默认:limit
|
|
|
|
|
+ }
|
|
|
|
|
+ , page: true
|
|
|
|
|
+ , limits: [30, 60, 90, 150, 300]
|
|
|
|
|
+ , limit: 30 //默认采用30
|
|
|
|
|
+ , loading: true
|
|
|
|
|
+ , done: function (res, curr, count) {
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ reloadTableQuery = function () {
|
|
|
|
|
+ table.reload('dateTable', {
|
|
|
|
|
+ url: '#(ctxPath)/system/log/tableData'
|
|
|
|
|
+ ,where: {ip: $('#ip').val(), url: $('#url').val(), userName: $('#userName').val()} //设定异步数据接口的额外参数
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ reloadTable = function (ip, url, userName) {
|
|
|
|
|
+ table.reload('dateTable', {
|
|
|
|
|
+ url: '#(ctxPath)/system/log/tableData'
|
|
|
|
|
+ ,where: {ip: ip, url: url, userName: userName} //设定异步数据接口的额外参数
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ form.on('submit(search)', function(data){
|
|
|
|
|
+ reloadTable(data.field.ip, data.field.url, data.field.userName);
|
|
|
|
|
+ return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+</script>
|
|
|
|
|
+#end
|
|
|
|
|
+
|
|
|
|
|
+#define content()
|
|
|
|
|
+ <div class="layui-fluid">
|
|
|
|
|
+ <form id="searchForm" class="layui-form x-center" >
|
|
|
|
|
+ <div class="layui-form-pane">
|
|
|
|
|
+ <div class="layui-form-item">
|
|
|
|
|
+ <label class="layui-form-label">用户名</label>
|
|
|
|
|
+ <div class="layui-input-inline">
|
|
|
|
|
+ <input type="text" id="userName" name="userName" placeholder="用户名" class="layui-input"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <label class="layui-form-label">IP</label>
|
|
|
|
|
+ <div class="layui-input-inline">
|
|
|
|
|
+ <input type="text" id="ip" name="ip" placeholder="IP" class="layui-input"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <label class="layui-form-label">URL</label>
|
|
|
|
|
+ <div class="layui-input-inline">
|
|
|
|
|
+ <input type="text" id="url" name="url" placeholder="请求URL" class="layui-input"/>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="layui-input-inline" style="width : 80px">
|
|
|
|
|
+ <button class="layui-btn" lay-submit="" lay-filter="search"><i class="layui-icon"></i></button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <hr>
|
|
|
|
|
+ <div class="layui-row">
|
|
|
|
|
+ <table id="dateTable" lay-filter="dateTable"></table>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+#end
|