From 24e2e7b886fbf134c800b9184d7a63f3f803965b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?=
<15040126243@163.com>
Date: Sat, 28 Oct 2023 15:54:03 +0800
Subject: [PATCH] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=20=E6=93=8D?=
=?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=BF=97=20=E9=83=A8=E9=97=A8=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/ruoyi/common/log/aspect/LogAspect.java | 5 ++++-
.../src/views/system/operlog/index.vue | 15 +++++++++------
ruoyi-ui/src/views/system/operlog/index.vue | 17 ++++++++++-------
3 files changed, 23 insertions(+), 14 deletions(-)
diff --git a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
index 470514913..b5b9a88d0 100644
--- a/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
+++ b/ruoyi-common/ruoyi-common-log/src/main/java/com/ruoyi/common/log/aspect/LogAspect.java
@@ -13,6 +13,7 @@ import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessStatus;
import com.ruoyi.common.log.event.OperLogEvent;
import com.ruoyi.common.satoken.utils.LoginHelper;
+import com.ruoyi.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
@@ -75,7 +76,9 @@ public class LogAspect {
operLog.setOperIp(ip);
operLog.setOperLocation(AddressUtils.getRealAddressByIP(ip));
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) {
operLog.setStatus(BusinessStatus.FAIL.ordinal());
diff --git a/ruoyi-ui-vue3/src/views/system/operlog/index.vue b/ruoyi-ui-vue3/src/views/system/operlog/index.vue
index 296aa6505..630ca9590 100644
--- a/ruoyi-ui-vue3/src/views/system/operlog/index.vue
+++ b/ruoyi-ui-vue3/src/views/system/operlog/index.vue
@@ -117,8 +117,10 @@
-
+
+
+
@@ -153,15 +155,16 @@
-
- {{ form.title }} / {{ typeFormat(form) }}
+
{{ form.operName }} / {{ form.operIp }}
+ >{{ form.operName }} / {{form.deptName}} / {{ form.operIp }} / {{ form.operLocation }}
- {{ form.operUrl }}
- {{ form.requestMethod }}
+ {{ form.requestMethod }} {{form.operUrl }}
+
+
+ {{ form.title }} / {{ typeFormat(form) }}
{{ form.method }}
diff --git a/ruoyi-ui/src/views/system/operlog/index.vue b/ruoyi-ui/src/views/system/operlog/index.vue
index fae581141..f68889c42 100644
--- a/ruoyi-ui/src/views/system/operlog/index.vue
+++ b/ruoyi-ui/src/views/system/operlog/index.vue
@@ -121,8 +121,10 @@
-
-
+
+
+
+
@@ -158,15 +160,16 @@
-
- {{ form.title }} / {{ typeFormat(form) }}
+
{{ form.operName }} / {{ form.operIp }}
+ >{{ form.operName }} / {{form.deptName}} / {{ form.operIp }} / {{ form.operLocation }}
- {{ form.operUrl }}
- {{ form.requestMethod }}
+ {{ form.requestMethod }} {{form.operUrl }}
+
+
+ {{ form.title }} / {{ typeFormat(form) }}
{{ form.method }}