From 287cb6ec9c1525d03aa0508bb77309f96a1dcdae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?piexlMax=28=E5=A5=87=E6=B7=BC?= Date: Fri, 14 Nov 2025 14:41:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96error=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/systemTools/sysError/sysError.vue | 89 +++++++++++++++---- 1 file changed, 74 insertions(+), 15 deletions(-) diff --git a/web/src/view/systemTools/sysError/sysError.vue b/web/src/view/systemTools/sysError/sysError.vue index fcf0e69ec..520391768 100644 --- a/web/src/view/systemTools/sysError/sysError.vue +++ b/web/src/view/systemTools/sysError/sysError.vue @@ -110,14 +110,32 @@ label="错误等级" prop="level" width="120" - /> + > + + + width="140" + > + + 方案 + 方案 + - {{ detailForm.level }} + + {{ levelLabelMap[detailForm.level] || defaultLevelLabel }} + - {{ detailForm.status || '未处理' }} + + {{ statusLabelMap[detailForm.status] || defaultStatusLabel }} +
{{ detailForm.info }}
@@ -248,13 +276,22 @@ getTableData() } - const getSolution = (id) =>{ - getSysErrorSolution({ id }).then((res) => { - if (res.code === 0) { - ElMessage({ type: 'success', message: res.msg || '处理已提交,1分钟后完成' }) - getTableData() + const getSolution = async (id) => { + const confirmed = await ElMessageBox.confirm( + '日志将通过 AI-PATH 传输至 GVA AI 用于错误分析,并在 GVA 官方平台短暂存储作为 AI 上下文。是否确认进行 AI 处理?(此功能仅向授权用户开放)', + '提示(Beta)', + { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'warning' } - }) + ).catch(() => false) + if (!confirmed) return + const res = await getSysErrorSolution({ id }) + if (res.code === 0) { + ElMessage({ type: 'success', message: res.msg || '处理已提交,1分钟后完成' }) + getTableData() + } } // 搜索 const onSubmit = () => { @@ -393,6 +430,28 @@ detailShow.value = false detailForm.value = {} } - - + const statusLabelMap = { + 未处理: '未处理', + 处理中: '处理中', + 处理完成: '处理完成', + 处理失败: '处理失败' + } + const statusTagMap = { + 未处理: 'info', + 处理中: 'warning', + 处理完成: 'success', + 处理失败: 'danger' + } + const defaultStatusLabel = '未处理' + + const levelLabelMap = { + fatal: '致命错误', + error: '一般错误' + } + const levelTagMap = { + fatal: 'danger', + error: 'warning' + } + const defaultLevelLabel = '一般错误' +