From e93151d1c2b7a0835a550aa5570912507ee2c664 Mon Sep 17 00:00:00 2001 From: tbphp Date: Wed, 16 Jul 2025 21:34:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A5=E5=BF=97=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/logs/LogTable.vue | 38 +++++++++++++++++----------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/web/src/components/logs/LogTable.vue b/web/src/components/logs/LogTable.vue index 032fde5..e934d4a 100644 --- a/web/src/components/logs/LogTable.vue +++ b/web/src/components/logs/LogTable.vue @@ -43,7 +43,7 @@ const filters = reactive({ }); const successOptions = [ - { label: "全部状态", value: "" }, + { label: "状态", value: "" }, { label: "成功", value: "true" }, { label: "失败", value: "false" }, ]; @@ -102,13 +102,13 @@ const createColumns = () => [ { title: "时间", key: "timestamp", - width: 180, + width: 160, render: (row: LogRow) => formatDateTime(row.timestamp), }, { title: "状态", key: "is_success", - width: 80, + width: 50, render: (row: LogRow) => h( NTag, @@ -119,7 +119,7 @@ const createColumns = () => [ { title: "类型", key: "is_stream", - width: 80, + width: 50, render: (row: LogRow) => h( NTag, @@ -127,9 +127,9 @@ const createColumns = () => [ { default: () => (row.is_stream ? "流式" : "非流") } ), }, - { title: "状态码", key: "status_code", width: 80 }, - { title: "耗时(ms)", key: "duration_ms", width: 100 }, - { title: "重试", key: "retries", width: 60 }, + { title: "状态码", key: "status_code", width: 60 }, + { title: "耗时(ms)", key: "duration_ms", width: 80 }, + { title: "重试", key: "retries", width: 50 }, { title: "分组", key: "group_name", width: 120 }, { title: "Key", @@ -155,18 +155,21 @@ const createColumns = () => [ { title: "请求路径", key: "request_path", + width: 220, render: (row: LogRow) => h(NEllipsis, { style: "max-width: 200px" }, { default: () => row.request_path }), }, { title: "上游地址", key: "upstream_addr", + width: 220, render: (row: LogRow) => h(NEllipsis, { style: "max-width: 200px" }, { default: () => row.upstream_addr }), }, { title: "源IP", key: "source_ip", width: 130 }, { title: "错误信息", + width: 270, key: "error_message", render: (row: LogRow) => h(NEllipsis, { style: "max-width: 250px" }, { default: () => row.error_message || "-" }), @@ -174,6 +177,7 @@ const createColumns = () => [ { title: "User Agent", key: "user_agent", + width: 220, render: (row: LogRow) => h(NEllipsis, { style: "max-width: 200px" }, { default: () => row.user_agent }), }, @@ -223,7 +227,7 @@ function changePageSize(size: number) { v-model:value="filters.is_success" :options="successOptions" size="small" - style="width: 120px" + style="width: 80px" @update:value="handleSearch" /> - - -
- + @@ -340,7 +348,7 @@ function changePageSize(size: number) { background: white; border-radius: 8px; display: flex; - justify-content: space-between; + justify-content: left; align-items: center; padding: 12px; border-bottom: 1px solid #f0f0f0;