From bba707b04196d8421d71c4eb56617cd916c048a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=8E=E6=B0=B8=E9=A1=BA?= <971387674@qq.com> Date: Thu, 26 Sep 2024 16:16:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E7=BA=BF=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/salaryFileTable/index.tsx | 43 +++++++++++++--- src/pages/unitTable/renderColsOpts.tsx | 12 ++--- src/pages/welfareArchiveTable/index.tsx | 65 ++++++++++--------------- 3 files changed, 67 insertions(+), 53 deletions(-) diff --git a/src/pages/salaryFileTable/index.tsx b/src/pages/salaryFileTable/index.tsx index bf2f81e..1fc461a 100644 --- a/src/pages/salaryFileTable/index.tsx +++ b/src/pages/salaryFileTable/index.tsx @@ -124,7 +124,15 @@ const Index: FunctionComponent = (props) => { : - + handleSalaryFileOperate("log", record) + } + ] + }} placement="bottomRight"> + - + handleSalaryFileOperate("log", record) + } + ] + }} placement="bottomRight"> + - + handleSalaryFileOperate("log", record) + } + ] + }} placement="bottomRight"> + - + handleSalaryFileOperate("log", record) + } + ] + }} placement="bottomRight"> + ); + onClick={() => postMessageToParent((billStatus === "0" && record?.opts.includes("admin")) ? "CALC" : "VIEW", record)}>{text}); } }; break; @@ -72,15 +72,13 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject, return ( { - !extraParams?.permission ? + !record?.opts.includes("admin") ? postMessageToParent("log", record) - }] + items: [ + { key: "Log", label: i18n?.["操作日志"], onClick: () => postMessageToParent("log", record) } + ] }} placement="bottomRight"> + handleWelfareOperate("log", record) }] + }} placement="bottomRight"> + - - + + - - - ) - }]; - }, [columns, runStatuses, i18n, showOperateBtn]); + return [...columns, opts]; + }, [columns, runStatuses, i18n]); return (); };