From f94e46bcc1d1bff53f739e9a6449f5f6d4d53825 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Thu, 31 Jul 2025 11:07:41 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BA=A7=E5=93=81=E5=AE=A1=E6=A0=B8:?= =?UTF-8?q?=20=E4=BB=B7=E6=A0=BC=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/locales/en/common.json | 4 +++- public/locales/zh/common.json | 4 +++- src/views/products/Detail/ProductQuotationLogPopover.jsx | 7 +++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/public/locales/en/common.json b/public/locales/en/common.json index 5fc92b0..4e8321a 100644 --- a/public/locales/en/common.json +++ b/public/locales/en/common.json @@ -36,6 +36,8 @@ "Table": { "Total": "Total {{total}} items" }, + "operator": "Operator", + "time": "Time", "Login": "Login", "Username": "Username", "Realname": "Realname", @@ -105,4 +107,4 @@ "Finance_Dept_arrproved": "Finance Dept arrproved", "Paid": "Paid" } -} \ No newline at end of file +} diff --git a/public/locales/zh/common.json b/public/locales/zh/common.json index d749ecd..0a57df9 100644 --- a/public/locales/zh/common.json +++ b/public/locales/zh/common.json @@ -36,6 +36,8 @@ "Table": { "Total": "共 {{total}} 条" }, + "operator": "操作", + "time": "时间", "Login": "登录", "Username": "账号", "Realname": "姓名", @@ -105,4 +107,4 @@ "Finance_Dept_arrproved": "财务已审核", "Paid": "已打款" } -} \ No newline at end of file +} diff --git a/src/views/products/Detail/ProductQuotationLogPopover.jsx b/src/views/products/Detail/ProductQuotationLogPopover.jsx index c1ed6be..e1f59fb 100644 --- a/src/views/products/Detail/ProductQuotationLogPopover.jsx +++ b/src/views/products/Detail/ProductQuotationLogPopover.jsx @@ -28,7 +28,7 @@ const parseJson = (str) => { return {}; } try { - result = JSON.parse(str); + result = typeof str === 'string' ? JSON.parse(str) : str; return Array.isArray(result) ? result.reduce((acc, cur) => ({ ...acc, ...cur }), {}) : result; } catch (e) { return {}; @@ -210,7 +210,10 @@ const ProductQuotationLogPopover = ({ method, triggerProps = {}, onOpenChange, . } }; - const columns = [...columnsSets(t, false), { title: '时间', dataIndex: 'updatetime', key: 'updatetime' }]; + const columns = [...columnsSets(t, false), + { title: t('common:time'), dataIndex: 'updatetime', key: 'updatetime', width: '10rem', }, + { title: t('common:operator'), dataIndex: 'update_by', key: 'update_by' } + ]; return (