From f4e30513152f3f1e3467fc022bd2439de302d1e5 Mon Sep 17 00:00:00 2001
From: liyongde <1419499670@qq.com>
Date: Tue, 10 Feb 2026 11:12:16 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E5=BF=97=E5=BC=82=E5=B8=B8?=
=?UTF-8?q?=E6=8F=90=E5=8F=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/monitor/log/errorLog.vue | 56 +++++++++++++++++++
.../src/views/monitor/log/locale/error/en.js | 1 +
.../src/views/monitor/log/locale/error/in.js | 1 +
.../src/views/monitor/log/locale/error/zh.js | 1 +
4 files changed, 59 insertions(+)
diff --git a/wms/nladmin-ui/src/views/monitor/log/errorLog.vue b/wms/nladmin-ui/src/views/monitor/log/errorLog.vue
index 7749a3e..8e67b96 100644
--- a/wms/nladmin-ui/src/views/monitor/log/errorLog.vue
+++ b/wms/nladmin-ui/src/views/monitor/log/errorLog.vue
@@ -40,6 +40,13 @@
{{ parseTime(scope.row.create_time) }}
+
+
+
+ {{ parseExceptionMessage(scope.row.exception_detail) }}
+
+
+
{{ $t('ErrorLog.table.see_del') }}
@@ -82,6 +89,55 @@ export default {
}
},
methods: {
+ // 解析异常信息
+ parseExceptionMessage(exceptionDetail) {
+ if (!exceptionDetail) {
+ return '-'
+ }
+
+ try {
+ let exceptionStr = ''
+
+ // 处理不同类型的数据
+ if (typeof exceptionDetail === 'string') {
+ // 尝试 Base64 解码
+ try {
+ exceptionStr = decodeURIComponent(escape(atob(exceptionDetail)))
+ } catch (e) {
+ // 如果不是 Base64,直接使用原字符串
+ exceptionStr = exceptionDetail
+ }
+ } else if (Array.isArray(exceptionDetail)) {
+ // 如果是字节数组,转换为字符串
+ exceptionStr = String.fromCharCode.apply(null, exceptionDetail)
+ } else if (exceptionDetail instanceof Uint8Array) {
+ exceptionStr = new TextDecoder('utf-8').decode(exceptionDetail)
+ } else {
+ return '-'
+ }
+
+ // 匹配 org.nl.common.exception.BadRequestException: 后面的内容
+ const regex = /org\.nl\.common\.exception\.BadRequestException:\s*(.+?)(?:\r?\n|\s+at\s+|$)/
+ const match = exceptionStr.match(regex)
+
+ if (match && match[1]) {
+ return match[1].trim()
+ }
+
+ // 如果没有匹配到,尝试匹配其他异常类型
+ const generalRegex = /Exception:\s*(.+?)(?:\r?\n|\s+at\s+|$)/
+ const generalMatch = exceptionStr.match(generalRegex)
+
+ if (generalMatch && generalMatch[1]) {
+ return generalMatch[1].trim()
+ }
+
+ return '-'
+ } catch (error) {
+ console.error('解析异常信息失败:', error)
+ return '-'
+ }
+ },
// 获取异常详情
info(log_id) {
this.dialog = true
diff --git a/wms/nladmin-ui/src/views/monitor/log/locale/error/en.js b/wms/nladmin-ui/src/views/monitor/log/locale/error/en.js
index 775f4d3..a9c8461 100644
--- a/wms/nladmin-ui/src/views/monitor/log/locale/error/en.js
+++ b/wms/nladmin-ui/src/views/monitor/log/locale/error/en.js
@@ -8,6 +8,7 @@ export default {
'description': 'description',
'browser': 'browser',
'create_time': 'create time',
+ 'error_message': 'error message',
'err_del': 'exception details',
'see_del': 'view details',
'time': 'request time',
diff --git a/wms/nladmin-ui/src/views/monitor/log/locale/error/in.js b/wms/nladmin-ui/src/views/monitor/log/locale/error/in.js
index a98350f..8a7afcc 100644
--- a/wms/nladmin-ui/src/views/monitor/log/locale/error/in.js
+++ b/wms/nladmin-ui/src/views/monitor/log/locale/error/in.js
@@ -8,6 +8,7 @@ export default {
'description': 'keterangan',
'browser': 'peramban',
'create_time': 'menciptakan waktu',
+ 'error_message': 'pesan kesalahan',
'err_del': 'detail pengecualian',
'see_del': 'melihat rincian',
'time': 'waktu permintaan',
diff --git a/wms/nladmin-ui/src/views/monitor/log/locale/error/zh.js b/wms/nladmin-ui/src/views/monitor/log/locale/error/zh.js
index 54e3400..dfdfb41 100644
--- a/wms/nladmin-ui/src/views/monitor/log/locale/error/zh.js
+++ b/wms/nladmin-ui/src/views/monitor/log/locale/error/zh.js
@@ -8,6 +8,7 @@ export default {
'description': '描述',
'browser': '浏览器',
'create_time': '创建日期',
+ 'error_message': '错误信息',
'err_del': '异常详情',
'see_del': '查看详情',
'time': '请求耗时',