123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- {extend name="common/base"/}
- <!-- 主体 -->
- {block name="body"}
- <div class="p-3">
- <form class="layui-form gg-form-bar border-t border-x">
- <div class="layui-input-inline" style="width:300px;">
- <input type="text" name="keywords" placeholder="昵称/操作数据id/操作描述" class="layui-input" autocomplete="off" />
- </div>
- <div class="layui-input-inline">
- <select name="action">
- <option value="">请选择类型</option>
- {volist name="$type_action" id="vo"}
- <option value="{$vo}">{$vo}</option>
- {/volist}
- </select>
- </div>
- <div class="layui-input-inline">
- <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
- </div>
- </form>
- <table class="layui-hide" id="log" lay-filter="log"></table>
- </div>
- {/block}
- <!-- /主体 -->
- <!-- 脚本 -->
- {block name="script"}
- <script>
- const moduleInit = ['tool'];
- function gouguInit() {
- var table = layui.table, form = layui.form;
- var tableIns = table.render({
- elem: '#log',
- title: '用户操作日志列表',
- toolbar: '#toolbarDemo',
- url: '/admin/user/log', //数据接口
- page: true, //开启分页
- limit: 20,
- cols: [
- [
- {
- field: 'id',
- title: 'ID号',
- align: 'center',
- width: 80
- }, {
- field: 'title',
- title: '操作类型',
- align: 'center',
- width: 80
- }, {
- field: 'content',
- title: '操作描述',
- width: 300
- },{
- field: 'param_id',
- title: '操作数据ID',
- align: 'center',
- width: 100
- }, {
- field: 'param',
- title: '操作数据'
- }, {
- field: 'nickname',
- title: '昵称',
- align: 'center',
- width: 90
- }, {
- field: 'ip',
- title: 'IP地址',
- align: 'center',
- width: 130
- }, {
- field: 'create_time',
- title: '操作时间',
- align: 'center',
- width: 160
- }
- ]
- ]
- });
- //监听搜索提交
- form.on('submit(webform)', function (data) {
- tableIns.reload({
- where: {
- keywords: data.field.keywords,
- action: data.field.action
- },
- page: {
- curr: 1
- }
- });
- return false;
- });
- }
- </script>
- {/block}
- <!-- /脚本 -->
|