日志查询界面暂时提交
This commit is contained in:
@@ -36,7 +36,7 @@ public class LogInterceptorConfig extends WebMvcConfigurerAdapter {
|
|||||||
}
|
}
|
||||||
for (String uri : StringUtils.split(epps, ",")){
|
for (String uri : StringUtils.split(epps, ",")){
|
||||||
if (StringUtils.isNotBlank(uri)){
|
if (StringUtils.isNotBlank(uri)){
|
||||||
registration.excludePathPatterns(StringUtils.trim(epps));
|
registration.excludePathPatterns(StringUtils.trim(uri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class MobileViewInterceptorConfig extends WebMvcConfigurerAdapter {
|
|||||||
}
|
}
|
||||||
for (String uri : StringUtils.split(epps, ",")){
|
for (String uri : StringUtils.split(epps, ",")){
|
||||||
if (StringUtils.isNotBlank(uri)){
|
if (StringUtils.isNotBlank(uri)){
|
||||||
registration.excludePathPatterns(StringUtils.trim(epps));
|
registration.excludePathPatterns(StringUtils.trim(uri));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +1,59 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
|
||||||
*/
|
*/
|
||||||
package com.jeesite.modules.sys.service;
|
package com.jeesite.modules.sys.service;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.jeesite.common.entity.Page;
|
import com.jeesite.common.entity.Page;
|
||||||
import com.jeesite.common.lang.DateUtils;
|
import com.jeesite.common.lang.DateUtils;
|
||||||
import com.jeesite.common.service.CrudService;
|
import com.jeesite.common.service.CrudService;
|
||||||
import com.jeesite.modules.sys.dao.LogDao;
|
import com.jeesite.modules.sys.dao.LogDao;
|
||||||
import com.jeesite.modules.sys.entity.Log;
|
import com.jeesite.modules.sys.entity.Log;
|
||||||
import com.jeesite.modules.sys.entity.User;
|
import com.jeesite.modules.sys.entity.User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志Service
|
* 日志Service
|
||||||
* @author ThinkGem
|
* @author ThinkGem
|
||||||
* @version 2014-05-16
|
* @version 2014-05-16
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
@Transactional(readOnly=true)
|
@Transactional(readOnly=true)
|
||||||
public class LogService extends CrudService<LogDao, Log> {
|
public class LogService extends CrudService<LogDao, Log> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询日志记录
|
* 查询日志记录
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Page<Log> findPage(Page<Log> page, Log log) {
|
public Page<Log> findPage(Page<Log> page, Log log) {
|
||||||
|
|
||||||
// 设置默认时间范围,默认当前月
|
// 设置默认时间范围,默认当前月
|
||||||
if (log.getCreateDate_gte() == null){
|
if (log.getCreateDate_gte() == null){
|
||||||
log.setCreateDate_gte(DateUtils.setDays(new Date(), 1));
|
log.setCreateDate_gte(DateUtils.setDays(new Date(), 1));
|
||||||
}
|
}
|
||||||
if (log.getCreateDate_lte() == null){
|
if (log.getCreateDate_lte() == null){
|
||||||
log.setCreateDate_lte(DateUtils.addDays(DateUtils.addMonths(log.getCreateDate_gte(), 1), -1));
|
log.setCreateDate_lte(DateUtils.addDays(DateUtils.addMonths(log.getCreateDate_gte(), 1), -1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// 为了方便进行按天查询,设置一天的开始和结束时间(如:开始为一天的0点0分,结束为一天的23点59分)
|
// 普通用户看自己的,管理员看全部的。
|
||||||
log.setCreateDate_gte(DateUtils.getOfDayFirst(log.getCreateDate_gte()));
|
if (!log.getCurrentUser().isAdmin()){
|
||||||
log.setCreateDate_lte(DateUtils.getOfDayLast(log.getCreateDate_lte()));
|
log.setCreateBy(new User(log.getCurrentUser().getUserCode()));
|
||||||
|
}
|
||||||
// 普通用户看自己的,管理员看全部的。
|
|
||||||
if (!log.getCurrentUser().isAdmin()){
|
return super.findPage(page, log);
|
||||||
log.setCreateBy(new User(log.getCurrentUser().getUserCode()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.findPage(page, log);
|
/**
|
||||||
|
* 不使用数据库事务,执行插入日志
|
||||||
}
|
*/
|
||||||
|
@Transactional(readOnly=false, propagation=Propagation.NOT_SUPPORTED)
|
||||||
/**
|
public void insertLog(Log entity) {
|
||||||
* 不使用数据库事务,执行插入日志
|
dao.insert(entity);
|
||||||
*/
|
}
|
||||||
@Transactional(readOnly=false, propagation=Propagation.NOT_SUPPORTED)
|
|
||||||
public void insertLog(Log entity) {
|
}
|
||||||
dao.insert(entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ public class LogUtils {
|
|||||||
log.setLogTitle("未知操作");
|
log.setLogTitle("未知操作");
|
||||||
}
|
}
|
||||||
// 如果有异常,设置异常信息(将异常对象转换为字符串)
|
// 如果有异常,设置异常信息(将异常对象转换为字符串)
|
||||||
log.setExceptionInfo(throwable != null ? Global.YES : Global.NO);
|
log.setIsException(throwable != null ? Global.YES : Global.NO);
|
||||||
log.setExceptionInfo(ExceptionUtils.getStackTraceAsString(throwable));
|
log.setExceptionInfo(ExceptionUtils.getStackTraceAsString(throwable));
|
||||||
// 如果无地址并无异常日志,则不保存信息
|
// 如果无地址并无异常日志,则不保存信息
|
||||||
if (StringUtils.isBlank(log.getRequestUri()) && StringUtils.isBlank(log.getExceptionInfo())){
|
if (StringUtils.isBlank(log.getRequestUri()) && StringUtils.isBlank(log.getExceptionInfo())){
|
||||||
|
|||||||
@@ -365,12 +365,12 @@ web:
|
|||||||
excludePathPatterns: >
|
excludePathPatterns: >
|
||||||
${adminPath}/index,
|
${adminPath}/index,
|
||||||
${adminPath}/login,
|
${adminPath}/login,
|
||||||
|
${adminPath}/desktop,
|
||||||
|
${adminPath}/sys/online/count,
|
||||||
${adminPath}/**/listData,
|
${adminPath}/**/listData,
|
||||||
${adminPath}/**/treeData,
|
${adminPath}/**/treeData,
|
||||||
${adminPath}/file/**,
|
${adminPath}/file/**,
|
||||||
${adminPath}/tags/*,
|
${adminPath}/tags/*
|
||||||
${adminPath}/sys/log/**,
|
|
||||||
${adminPath}/sys/online/count
|
|
||||||
|
|
||||||
# 前台自动切换到手机视图拦截器
|
# 前台自动切换到手机视图拦截器
|
||||||
mobile:
|
mobile:
|
||||||
|
|||||||
195
modules/core/src/main/resources/views/modules/sys/logForm.html
Normal file
195
modules/core/src/main/resources/views/modules/sys/logForm.html
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
<% layout('/layouts/default.html', {title: '操作日志表管理', libs: ['validate']}){ %>
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="box box-main">
|
||||||
|
<div class="box-header with-border">
|
||||||
|
<div class="box-title">
|
||||||
|
<i class="fa fa-list-alt"></i> ${log.isNewRecord ? '新增操作日志表' : '编辑操作日志表'}
|
||||||
|
</div>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<#form:form id="inputForm" model="${log}" action="${ctx}/sys/log/save" method="post" class="form-horizontal">
|
||||||
|
<div class="box-body">
|
||||||
|
<div class="form-unit">基本信息</div>
|
||||||
|
<#form:hidden path="id"/>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 日志标题:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="logTitle" maxlength="500" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 日志类型:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:select path="logType" dictType="sys_log_type" class="form-control required " />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 用户名称:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="createByName" maxlength="100" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 请求URI:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="requestUri" maxlength="255" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 操作方式:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="requestMethod" maxlength="10" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 操作提交的数据:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="requestParams" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 业务主键:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="bizKey" maxlength="64" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 业务类型:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="bizType" maxlength="64" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 操作IP地址:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="remoteAddr" maxlength="255" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required ">*</span> 请求服务器地址:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="serverAddr" maxlength="255" class="form-control required "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 是否异常:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:select path="isException" dictType="sys_yes_no" blankOption="true" class="form-control " />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 异常信息:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="exceptionInfo" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 用户代理:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="userAgent" maxlength="500" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 设备名称/操作系统:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="deviceName" maxlength="100" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-xs-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label col-sm-4" title="">
|
||||||
|
<span class="required hide">*</span> 浏览器名称:<i class="fa icon-question hide"></i></label>
|
||||||
|
<div class="col-sm-8">
|
||||||
|
<#form:input path="browserName" maxlength="100" class="form-control "/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-offset-2 col-sm-10">
|
||||||
|
<% if (hasPermi('sys:log:edit')){ %>
|
||||||
|
<button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> 保 存</button>
|
||||||
|
<% } %>
|
||||||
|
<button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> 关 闭</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</#form:form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<script>
|
||||||
|
$("#inputForm").validate({
|
||||||
|
submitHandler: function(form){
|
||||||
|
js.ajaxSubmitForm($(form), function(data){
|
||||||
|
js.showMessage(data.message);
|
||||||
|
if(data.result == Global.TRUE){
|
||||||
|
js.closeCurrentTabPage(function(contentWindow){
|
||||||
|
contentWindow.page();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}, "json");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
151
modules/core/src/main/resources/views/modules/sys/logList.html
Normal file
151
modules/core/src/main/resources/views/modules/sys/logList.html
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
<% layout('/layouts/default.html', {title: '访问日志查询', libs: ['dataGrid']}){ %>
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="box box-main">
|
||||||
|
<div class="box-header">
|
||||||
|
<div class="box-title">
|
||||||
|
<i class="fa fa-bug"></i> 访问日志查询
|
||||||
|
</div>
|
||||||
|
<div class="box-tools pull-right">
|
||||||
|
<a href="#" class="btn btn-default" id="btnSearch" title="查询"><i class="fa fa-filter"></i> 查询</a>
|
||||||
|
<% if(hasPermi('sys:log:edit')){ %>
|
||||||
|
<a href="${ctx}/sys/log/form" class="btn btn-default btnTool" title="新增操作日志表"><i class="fa fa-plus"></i> 新增</a>
|
||||||
|
<% } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="box-body">
|
||||||
|
<#form:form id="searchForm" model="${log}" action="${ctx}/sys/log/listData" method="post" class="form-inline hide"
|
||||||
|
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">日志标题:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="logTitle" maxlength="500" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">请求地址:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="requestUri" maxlength="255" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">日志类型:</label>
|
||||||
|
<div class="control-inline width-90">
|
||||||
|
<#form:select path="logType" dictType="sys_log_type" class="form-control required " />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">操作账号:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="createBy.userCode" maxlength="64" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">操作用户:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="createBy.userName" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">是否异常:</label>
|
||||||
|
<div class="control-inline width-90">
|
||||||
|
<#form:select path="isException" dictType="sys_yes_no" blankOption="true" class="form-control"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">业务主键:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="bizKey" maxlength="64" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">业务类型:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="bizType" maxlength="64" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">操作时间:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="createDate_gte" readonly="readonly" maxlength="20" class="form-control Wdate-date"
|
||||||
|
dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,onpicked:function(){createDate_lte.click()}});"/>
|
||||||
|
--
|
||||||
|
<#form:input path="createDate_lte" readonly="readonly" maxlength="20" class="form-control Wdate-date"
|
||||||
|
dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">客户端IP:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="remoteAddr" maxlength="255" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">服务器IP:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="serverAddr" maxlength="255" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">设备名称:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="deviceName" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">浏览器名:</label>
|
||||||
|
<div class="control-inline">
|
||||||
|
<#form:input path="browserName" maxlength="100" class="form-control width-90"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<button type="submit" class="btn btn-primary btn-sm">查询</button>
|
||||||
|
<button type="reset" class="btn btn-default btn-sm">重置</button>
|
||||||
|
</div>
|
||||||
|
</#form:form>
|
||||||
|
<table id="dataGrid"></table>
|
||||||
|
<div id="dataGridPage"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<% } %>
|
||||||
|
<script>
|
||||||
|
// 初始化DataGrid对象
|
||||||
|
$('#dataGrid').dataGrid({
|
||||||
|
searchForm: $("#searchForm"),
|
||||||
|
columnModel: [
|
||||||
|
{header:'日志标题', name:'logTitle', index:'a.log_title', width:200, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||||
|
return '<a href="${ctx}/sys/log/form?id='+row.id+'" class="btnList" data-title="编辑操作日志表">'+(val ? val : row.id)+'</a>';
|
||||||
|
}},
|
||||||
|
{header:'请求URI', name:'requestUri', index:'a.request_uri', width:200, align:"left"},
|
||||||
|
{header:'操作方式', name:'requestMethod', index:'a.request_method', width:200, align:"left"},
|
||||||
|
{header:'日志类型', name:'logType', index:'a.log_type', width:200, align:"left", formatter: function(val, obj, row, act){
|
||||||
|
return js.getDictLabel(${@DictUtils.getDictListJson('sys_log_type')}, val, '未知', true);
|
||||||
|
}},
|
||||||
|
{header:'操作账号', name:'createBy.userCode', index:'a.create_by', width:200, align:"left"},
|
||||||
|
{header:'操作用户', name:'createByName.userCode', index:'a.create_by_name', width:200, align:"left"},
|
||||||
|
{header:'是否异常', name:'isException', index:'a.is_exception', width:200, align:"center", formatter: function(val, obj, row, act){
|
||||||
|
return js.getDictLabel(${@DictUtils.getDictListJson('sys_yes_no')}, val, '未知', true);
|
||||||
|
}},
|
||||||
|
{header:'业务主键', name:'bizKey', index:'a.biz_key', width:200, align:"left"},
|
||||||
|
{header:'业务类型', name:'bizType', index:'a.biz_type', width:200, align:"left"},
|
||||||
|
{header:'操作时间', name:'createDate', index:'a.create_date', width:200, align:"left"},
|
||||||
|
{header:'客户端IP', name:'remoteAddr', index:'a.remote_addr', width:200, align:"left"},
|
||||||
|
{header:'服务器IP', name:'serverAddr', index:'a.server_addr', width:200, align:"left"},
|
||||||
|
{header:'设备名称', name:'deviceName', index:'a.device_name', width:200, align:"left"},
|
||||||
|
{header:'浏览器名', name:'browserName', index:'a.browser_name', width:200, align:"left"},
|
||||||
|
{header:'操作', name:'actions', width:130, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||||
|
var actions = [];
|
||||||
|
<% if(hasPermi('sys:log:edit')){ %>
|
||||||
|
actions.push('<a href="${ctx}/sys/log/form?id='+row.id+'" class="btnList" title="编辑操作日志表"><i class="fa fa-pencil"></i></a> ');
|
||||||
|
<% } %>
|
||||||
|
return actions.join('');
|
||||||
|
}}
|
||||||
|
],
|
||||||
|
// 加载成功后执行事件
|
||||||
|
ajaxSuccess: function(data){
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user