From aa1901ccb08d5d1846618504ddfcc5e1c9af7fbb Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 5 Nov 2024 15:26:05 +0800 Subject: [PATCH 1/6] master --- src/pages/unitTable/index.tsx | 9 +-------- src/pages/unitTable/renderColsOpts.tsx | 18 +++++++++++------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/src/pages/unitTable/index.tsx b/src/pages/unitTable/index.tsx index cfcb283..fbd007c 100644 --- a/src/pages/unitTable/index.tsx +++ b/src/pages/unitTable/index.tsx @@ -100,14 +100,7 @@ const UnitTable: FC = (props) => { scroll={{ x: 1200, y: `calc(100vh - ${extraParams?.scrollHeight || 109}px)` }} bordered={_.some(columns, (k) => k.children)} rowSelection={!_.isNil(extraParams?.selectedRowKeys) ? rowSelection : undefined} - pagination={ - !_.isNil(pageInfo) - ? { - ...paginationAction(pageInfo, i18n, onChange), - size: "default" - } - : false - } + pagination={!_.isNil(pageInfo) ? { ...paginationAction(pageInfo, i18n, onChange), size: "default" } : false} summary={() => !extraParams.showTotalCell ? ( <> diff --git a/src/pages/unitTable/renderColsOpts.tsx b/src/pages/unitTable/renderColsOpts.tsx index a587a57..784233f 100644 --- a/src/pages/unitTable/renderColsOpts.tsx +++ b/src/pages/unitTable/renderColsOpts.tsx @@ -69,7 +69,7 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject, width: 185, fixed: "right", render: (__: string, record: any) => { - const { billStatus } = record; + const { billStatus, customOptAuth } = record; const items: MenuProps["items"] = [ { key: "DeleteList", @@ -111,9 +111,11 @@ export function renderCols(initialState: any[], type: string, i18n?: AnyObject, - + {(_.isEmpty(customOptAuth) || customOptAuth.FILE) && ( + + )} - + {(_.isEmpty(customOptAuth) || customOptAuth.RECALC) && ( + + )} Date: Thu, 7 Nov 2024 18:30:11 +0800 Subject: [PATCH 2/6] master --- src/pages/calcTable/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 7010adc..159e8c0 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -134,7 +134,7 @@ const index: FunctionComponent = (props) => { } ]; return ( - + {text} From 30501b5fe7c4caf2f15e385b485b8c94be0b860d Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Thu, 7 Nov 2024 18:33:47 +0800 Subject: [PATCH 3/6] master --- src/pages/calcTable/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 159e8c0..603916a 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -105,7 +105,7 @@ const index: FunctionComponent = (props) => { i18n: item.i18n, onCell: (record: any) => ({ onContextMenu: (e: any) => { - record.lockItems && e.preventDefault(); + !item.calcDetail && e.preventDefault(); } }), render: (text: string, record: any) => { @@ -134,7 +134,7 @@ const index: FunctionComponent = (props) => { } ]; return ( - + {text} From 3f9a65840cdd65dbb83fe5b862284fd52816e3b2 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 8 Nov 2024 14:42:47 +0800 Subject: [PATCH 4/6] master --- src/pages/unitTable/index.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/unitTable/index.tsx b/src/pages/unitTable/index.tsx index fbd007c..9074aa3 100644 --- a/src/pages/unitTable/index.tsx +++ b/src/pages/unitTable/index.tsx @@ -15,6 +15,7 @@ export type extraType = { rowKey: string; showTotalCell: boolean; isSpecial: boolean; + showRowSelection: boolean; }; const UnitTable: FC = (props) => { const [unitTableType, setUnitTableType] = useState(""); @@ -48,7 +49,8 @@ const UnitTable: FC = (props) => { rowKey, showTotalCell = false, sumDataSource = {}, - isSpecial = false + isSpecial = false, + showRowSelection = true } = data; setI18n(i18n); setColumns(columns); @@ -63,6 +65,7 @@ const UnitTable: FC = (props) => { rowKey, showTotalCell, isSpecial, + showRowSelection, selectedRowKeys: [...(extraParams.selectedRowKeys as string[] | number[]), ...rowKeys] }); } @@ -99,7 +102,7 @@ const UnitTable: FC = (props) => { columns={renderCols(columns, unitTableType, i18n, extraParams)} scroll={{ x: 1200, y: `calc(100vh - ${extraParams?.scrollHeight || 109}px)` }} bordered={_.some(columns, (k) => k.children)} - rowSelection={!_.isNil(extraParams?.selectedRowKeys) ? rowSelection : undefined} + rowSelection={extraParams?.showRowSelection ? rowSelection : undefined} pagination={!_.isNil(pageInfo) ? { ...paginationAction(pageInfo, i18n, onChange), size: "default" } : false} summary={() => !extraParams.showTotalCell ? ( From ab841485709ece2a61a9100634653d5d1d621afa Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Tue, 19 Nov 2024 09:17:38 +0800 Subject: [PATCH 5/6] master --- src/pages/calcTable/index.tsx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/pages/calcTable/index.tsx b/src/pages/calcTable/index.tsx index 603916a..9ff298d 100644 --- a/src/pages/calcTable/index.tsx +++ b/src/pages/calcTable/index.tsx @@ -85,6 +85,32 @@ const index: FunctionComponent = (props) => { + {optWidth && ( + <> + + + + )} {record?.lockTime && {record?.lockTime}} ) From 5cfd9289cfbb43153959db9738c0c4a4bab91450 Mon Sep 17 00:00:00 2001 From: lys <971387674@qq.com> Date: Fri, 22 Nov 2024 14:39:04 +0800 Subject: [PATCH 6/6] master --- src/layouts/PageEmptyLayout/index.tsx | 9 +++++++++ src/layouts/index.tsx | 15 ++++++++------- src/pages/unitTable/index.tsx | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 src/layouts/PageEmptyLayout/index.tsx diff --git a/src/layouts/PageEmptyLayout/index.tsx b/src/layouts/PageEmptyLayout/index.tsx new file mode 100644 index 0000000..5028345 --- /dev/null +++ b/src/layouts/PageEmptyLayout/index.tsx @@ -0,0 +1,9 @@ +import * as React from "react"; +import { useEffect } from "react"; + +export default ({ children }: any) => { + useEffect(() => { + return () => {}; + }, []); + return
{children}
; +}; diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 8b5dc47..1285af1 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -7,9 +7,10 @@ import { Provider } from "mobx-react"; import zhCN from "antd/lib/locale/zh_CN"; import { HTML5Backend } from "react-dnd-html5-backend"; import { connect, IRouteComponentProps, useModel } from "umi"; -import BaseLayout from "./BaseLayout"; +// import BaseLayout from "./BaseLayout"; import BlankLayout from "./BlankLayout"; -import UserLayout from "./UserLayout"; +// import UserLayout from "./UserLayout"; +import PageEmptyLayout from "./PageEmptyLayout"; import { IRouterProps, RouterContext } from "./RouterContext"; import { layoutConfig } from "@/layouts/config"; import stores from "@/store"; @@ -64,18 +65,18 @@ const Layout = ({ children, location, route, history, match }: IRouteComponentPr if (type) { switch (type) { - case "user": - layout = ; - break; + // case "user": + // layout = ; + // break; case "blank": layout = ; break; default: - layout = ; + layout = ; break; } } else { - layout = ; + layout = ; } } diff --git a/src/pages/unitTable/index.tsx b/src/pages/unitTable/index.tsx index 9074aa3..63419e6 100644 --- a/src/pages/unitTable/index.tsx +++ b/src/pages/unitTable/index.tsx @@ -113,7 +113,7 @@ const UnitTable: FC = (props) => { {i18n["总计"]} - + )