From 2ea548bd7f73a688f0d64ec758e225d61c31227b 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, 7 Dec 2023 09:22:54 +0800 Subject: [PATCH] =?UTF-8?q?master-=E8=96=AA=E8=B5=84=E6=A0=B8=E7=AE=97?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=89=B9=E9=87=8F=E6=9B=B4=E6=96=B0=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/atdTable/components/index.less | 4 ++-- src/pages/calcTable/calcExplainFooter.tsx | 4 ++++ src/pages/calcTable/customTableTitle.tsx | 12 +++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/pages/atdTable/components/index.less b/src/pages/atdTable/components/index.less index 8aa9522..12cae05 100644 --- a/src/pages/atdTable/components/index.less +++ b/src/pages/atdTable/components/index.less @@ -86,7 +86,7 @@ .expand-th:hover { .toogle-lock-tool { - width: 30%; + width: 37%; } } @@ -118,7 +118,7 @@ justify-content: center; align-items: center; - & > :first-child { + & > :not(:last-child) { margin-right: 4px; } diff --git a/src/pages/calcTable/calcExplainFooter.tsx b/src/pages/calcTable/calcExplainFooter.tsx index 5799820..6b6fa3e 100644 --- a/src/pages/calcTable/calcExplainFooter.tsx +++ b/src/pages/calcTable/calcExplainFooter.tsx @@ -29,6 +29,10 @@ const CalcExplainFooter: FunctionComponent = (props) => { {i18n["当前状态未锁定,点击锁定"]} +
+ + {i18n["批量更新"]} +
); }; diff --git a/src/pages/calcTable/customTableTitle.tsx b/src/pages/calcTable/customTableTitle.tsx index 3931d39..cdcad41 100644 --- a/src/pages/calcTable/customTableTitle.tsx +++ b/src/pages/calcTable/customTableTitle.tsx @@ -13,20 +13,22 @@ interface OwnProps { dataIndex?: string; title?: string; lockStatus?: string; + dataType?: string; onHandleFormulatd?: any; i18n?: any; + pattern?: number; } type Props = OwnProps; const customTableTitle: FunctionComponent = (props) => { - const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {} } = props; + const { dataIndex, title, lockStatus, onHandleFormulatd, i18n = {}, pattern, dataType } = props; - const handleToggleSalaryItemVal = (salaryItemId: string, type: string) => { + const handleToggleSalaryItemVal = (salaryItemId: string, type: string, updateParams: any = {}) => { window.parent.postMessage( { type: "turn", - payload: { id: "LOCKING", params: { lockType: type, salaryItemId } } + payload: { id: "LOCKING", params: { lockType: type, salaryItemId, ...updateParams } } }, "*" ); @@ -42,6 +44,10 @@ const customTableTitle: FunctionComponent = (props) => { onClick={() => handleToggleSalaryItemVal(dataIndex as string, "LOCK")}/> handleToggleSalaryItemVal(dataIndex as string, "UNLOCK")}/> + handleToggleSalaryItemVal(dataIndex as string, "BATCHUPDATE", { + pattern, salaryItemName: title, dataType + })}/> }