From 72c0f86c75c8a9a5eb7435d72b6ebece4c5382e8 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期二, 14 四月 2026 18:21:27 +0800
Subject: [PATCH] feat: 添加vue3-json-viewer并优化日志显示
---
Code/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue | 116 ++++++++++++++++++++++++++++++++-------------------------
1 files changed, 65 insertions(+), 51 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue b/Code/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue
index b403132..fde37f0 100644
--- a/Code/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue
+++ b/Code/WCS/WIDESEAWCS_Client/src/views/system/Sys_Log.vue
@@ -19,7 +19,7 @@
</view-grid>
</template>
<script>
-import extend from "@/extension/system/Sys_Log.js";
+import extend from "@/extension/system/Sys_Log.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
setup() {
@@ -45,36 +45,36 @@
const searchFormOptions = ref([
[
{ title: "璇锋眰鍦板潃", field: "url", type: "like" },
- { title: "鐢ㄦ埛IP", field: "userIP", type: "like" },
- { title: "鏈嶅姟鍣↖P", field: "serviceIP", type: "like" },
+ { title: "璇锋眰鍙傛暟", field: "requestParam", type: "like" },
+ { title: "鍝嶅簲鍙傛暟", field: "responseParam", type: "like" },
],
[
{ title: "寮�濮嬫椂闂�", field: "beginDate", type: "datetime" },
- {
- dataKey: "restatus",
- data: [],
- title: "鍝嶅簲鐘舵��",
- field: "success",
- type: "selectList",
- },
- {
- dataKey: "roles",
- data: [],
- title: "瑙掕壊ID",
- field: "role_Id",
- type: "select",
- },
+ // {
+ // dataKey: "restatus",
+ // data: [],
+ // title: "鍝嶅簲鐘舵��",
+ // field: "success",
+ // type: "selectList",
+ // },
+ // {
+ // dataKey: "roles",
+ // data: [],
+ // title: "瑙掕壊ID",
+ // field: "role_Id",
+ // type: "select",
+ // },
],
- [
- {
- dataKey: "log",
- data: [],
- title: "鏃ュ織绫诲瀷",
- field: "logType",
- colSize: 12,
- type: "checkbox",
- },
- ],
+ // [
+ // {
+ // dataKey: "log",
+ // data: [],
+ // title: "鏃ュ織绫诲瀷",
+ // field: "logType",
+ // colSize: 12,
+ // type: "checkbox",
+ // },
+ // ],
]);
const columns = ref([
{
@@ -91,7 +91,7 @@
field: "beginDate",
title: "寮�濮嬫椂闂�",
type: "datetime",
- width: 140,
+ width: 120,
align: "left",
sortable: true,
},
@@ -99,52 +99,66 @@
field: "userName",
title: "鐢ㄦ埛鍚嶇О",
type: "string",
- width: 90,
+ width: 60,
align: "left",
},
{
field: "url",
title: "璇锋眰鍦板潃",
type: "string",
- width: 110,
+ width: 150,
align: "left",
},
- {
- field: "logType",
- title: "鏃ュ織绫诲瀷",
- type: "string",
- bind: { key: "log", data: [] },
- width: 80,
- align: "left",
- },
- {
- field: "success",
- title: "鍝嶅簲鐘舵��",
- type: "int",
- bind: { key: "restatus", data: [] },
- width: 80,
- align: "left",
- },
+ // {
+ // field: "logType",
+ // title: "鏃ュ織绫诲瀷",
+ // type: "string",
+ // bind: { key: "log", data: [] },
+ // width: 80,
+ // align: "left",
+ // },
+ // {
+ // field: "success",
+ // title: "鍝嶅簲鐘舵��",
+ // type: "int",
+ // bind: { key: "restatus", data: [] },
+ // width: 80,
+ // align: "left",
+ // },
{
field: "elapsedTime",
title: "鏃堕暱",
type: "int",
- width: 60,
+ width: 50,
align: "left",
},
{
- field: "requestParameter",
+ field: "requestParam",
title: "璇锋眰鍙傛暟",
type: "string",
- width: 70,
+ width: 120,
align: "left",
+ formatter: (row) => {
+ if (!row.requestParam) return '-';
+ const preview = row.requestParam.length > 50
+ ? row.requestParam.substring(0, 50) + '...'
+ : row.requestParam;
+ return `<span style="color: #409EFF; cursor: pointer;">${preview}</span>`;
+ }
},
{
- field: "responseParameter",
+ field: "responseParam",
title: "鍝嶅簲鍙傛暟",
type: "string",
- width: 70,
+ width: 120,
align: "left",
+ formatter: (row) => {
+ if (!row.responseParam) return '-';
+ const preview = row.responseParam.length > 50
+ ? row.responseParam.substring(0, 50) + '...'
+ : row.responseParam;
+ return `<span style="color: #409EFF; cursor: pointer;">${preview}</span>`;
+ }
},
{
field: "exceptionInfo",
--
Gitblit v1.9.3