Update: (步骤备份)修复刷新内置标签页的问题
This commit is contained in:
@@ -22,9 +22,11 @@ def index():
|
||||
def login_log():
|
||||
# orm查询
|
||||
# 使用分页获取data需要.items
|
||||
log = AdminLog.query.filter_by(url='/passport/login').order_by(desc(AdminLog.create_time)).layui_paginate()
|
||||
log = AdminLog.query.filter(
|
||||
AdminLog.url != '/passport/login'
|
||||
).order_by(desc(AdminLog.create_time)).layui_paginate()
|
||||
count = log.total
|
||||
return table_api(data= model_to_dicts(schema=LogOutSchema, data=log.items), count=count)
|
||||
return table_api(data=model_to_dicts(schema=LogOutSchema, data=log.items), count=count)
|
||||
|
||||
|
||||
# 操作日志
|
||||
@@ -33,8 +35,9 @@ def login_log():
|
||||
def operate_log():
|
||||
# orm查询
|
||||
# 使用分页获取data需要.items
|
||||
log = AdminLog.query.filter(
|
||||
AdminLog.url != '/passport/login').order_by(
|
||||
log = AdminLog.query.filter_by(
|
||||
url='/passport/login'
|
||||
).order_by(
|
||||
desc(AdminLog.create_time)).layui_paginate()
|
||||
count = log.total
|
||||
return table_api(data=model_to_dicts(schema=LogOutSchema, data=log.items), count=count)
|
||||
|
||||
@@ -383,7 +383,7 @@ layui.define(['jquery', 'element', 'dropdown'], function (exports) {
|
||||
*/
|
||||
tabPage.prototype.refresh = function (time) {
|
||||
|
||||
var $iframe = $(".layui-tab[lay-filter='" + this.option.elem + "'] .layui-tab-content .layui-show > div[data-frameid]");
|
||||
var $iframe = $(".layui-tab[lay-filter='" + this.option.elem + "'] .layui-tab-content .layui-show > div[data-frameid], iframe[data-frameid]");
|
||||
var $iframeLoad;
|
||||
|
||||
if (time != false && time != 0) {
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<title>日志</title>
|
||||
{% include 'system/common/header.html' %}
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='system/admin/css/other/console2.css') }}"/>
|
||||
</head>
|
||||
<body class="pear-container">
|
||||
|
||||
@@ -48,15 +47,15 @@
|
||||
|
||||
let cols = [
|
||||
[
|
||||
{ title: 'ID', field: 'id', align: 'center' },
|
||||
{ title: '请求方式', field: 'method', align: 'center' },
|
||||
{ title: '接口', field: 'url', align: 'center' },
|
||||
{ title: '浏览器', field: 'user_agent', align: 'center' },
|
||||
{ title: '操作地址', field: 'ip', align: 'center' },
|
||||
{ title: '访问时间', field: 'create_time', templet: '#log-createTime', align: 'center' },
|
||||
{ title: '操作人ID', field: 'uid', align: 'center' },
|
||||
{ title: '描述', field: 'desc', align: 'center' },
|
||||
{ title: '访问状态', templet: '#log-status', align: 'center' }
|
||||
{title: '编号', field: 'id', align: 'center', width: 80},
|
||||
{title: '请求方式', field: 'method', align: 'center', width: 100},
|
||||
{title: '接口', field: 'url', align: 'center', width: 300},
|
||||
{title: '浏览器', field: 'user_agent', align: 'center', width: 350},
|
||||
{title: '操作地址', field: 'ip', align: 'center', width: 100},
|
||||
{title: '访问时间', field: 'create_time', templet: '#log-createTime', align: 'center', width: 100},
|
||||
{title: '操作人ID', field: 'uid', align: 'center', width: 100},
|
||||
{title: '描述', field: 'desc', align: 'center', width: 150},
|
||||
{title: '访问状态', templet: '#log-status', align: 'center', width: 100}
|
||||
]
|
||||
]
|
||||
|
||||
@@ -79,7 +78,7 @@
|
||||
})
|
||||
|
||||
form.on('submit(dict-type-query)', function (data) {
|
||||
table.reload('dict-type-table', { where: data.field })
|
||||
table.reload('dict-type-table', {where: data.field})
|
||||
return false
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user