mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-05-11 22:32:11 +08:00
update 优化 操作日志 部门信息完善
This commit is contained in:
@@ -13,6 +13,7 @@ import com.ruoyi.common.log.annotation.Log;
|
|||||||
import com.ruoyi.common.log.enums.BusinessStatus;
|
import com.ruoyi.common.log.enums.BusinessStatus;
|
||||||
import com.ruoyi.common.log.event.OperLogEvent;
|
import com.ruoyi.common.log.event.OperLogEvent;
|
||||||
import com.ruoyi.common.satoken.utils.LoginHelper;
|
import com.ruoyi.common.satoken.utils.LoginHelper;
|
||||||
|
import com.ruoyi.system.api.model.LoginUser;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.aspectj.lang.JoinPoint;
|
import org.aspectj.lang.JoinPoint;
|
||||||
import org.aspectj.lang.annotation.AfterReturning;
|
import org.aspectj.lang.annotation.AfterReturning;
|
||||||
@@ -75,7 +76,9 @@ public class LogAspect {
|
|||||||
operLog.setOperIp(ip);
|
operLog.setOperIp(ip);
|
||||||
operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip));
|
operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip));
|
||||||
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
|
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
|
||||||
operLog.setOperName(LoginHelper.getUsername());
|
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||||
|
operLog.setOperName(loginUser.getUsername());
|
||||||
|
operLog.setDeptName(loginUser.getDeptName());
|
||||||
|
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
operLog.setStatus(BusinessStatus.FAIL.ordinal());
|
||||||
|
|||||||
@@ -117,8 +117,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
||||||
<el-table-column label="操作人员" align="center" prop="operName" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
<el-table-column label="操作人员" align="center" width="110" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
||||||
|
<el-table-column label="部门" align="center" prop="deptName" width="130" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作状态" align="center" prop="status">
|
<el-table-column label="操作状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="sys_common_status" :value="scope.row.status" />
|
<dict-tag :options="sys_common_status" :value="scope.row.status" />
|
||||||
@@ -153,15 +155,16 @@
|
|||||||
<el-dialog title="操作日志详细" v-model="open" width="700px" append-to-body>
|
<el-dialog title="操作日志详细" v-model="open" width="700px" append-to-body>
|
||||||
<el-form :model="form" label-width="100px">
|
<el-form :model="form" label-width="100px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="登录信息:"
|
label="登录信息:"
|
||||||
>{{ form.operName }} / {{ form.operIp }} </el-form-item>
|
>{{ form.operName }} / {{form.deptName}} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
|
<el-form-item label="请求信息:">{{ form.requestMethod }} {{form.operUrl }}</el-form-item>
|
||||||
<el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
|
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
|
||||||
|
|||||||
@@ -121,8 +121,10 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
||||||
<el-table-column label="操作人员" align="center" prop="operName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" width="100"/>
|
<el-table-column label="操作人员" align="center" prop="operName" width="100" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
|
||||||
<el-table-column label="主机" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
<el-table-column label="部门" align="center" prop="deptName" width="130" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
||||||
|
<el-table-column label="操作地点" align="center" prop="operLocation" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作状态" align="center" prop="status">
|
<el-table-column label="操作状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status"/>
|
||||||
@@ -158,15 +160,16 @@
|
|||||||
<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
|
<el-dialog title="操作日志详细" :visible.sync="open" width="700px" append-to-body>
|
||||||
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
<el-form ref="form" :model="form" label-width="100px" size="mini">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="24">
|
||||||
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="登录信息:"
|
label="登录信息:"
|
||||||
>{{ form.operName }} / {{ form.operIp }}</el-form-item>
|
>{{ form.operName }} / {{form.deptName}} / {{ form.operIp }} / {{ form.operLocation }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="请求地址:">{{ form.operUrl }}</el-form-item>
|
<el-form-item label="请求信息:">{{ form.requestMethod }} {{form.operUrl }}</el-form-item>
|
||||||
<el-form-item label="请求方式:">{{ form.requestMethod }}</el-form-item>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="操作模块:">{{ form.title }} / {{ typeFormat(form) }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
|
<el-form-item label="操作方法:">{{ form.method }}</el-form-item>
|
||||||
|
|||||||
Reference in New Issue
Block a user