From f866467fd548ce0c6db0f0245a109a15f87a1d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=95=85=E6=99=9A?= Date: Tue, 23 Jul 2024 16:50:17 +0800 Subject: [PATCH 1/2] PullRequest: 476 fix/dev-4.3.1-2991 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dev-4.3.1-2988 of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.3.1 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/476 Signed-off-by: 晓康 * Fixes oceanbase/odc#2988 * fix: remove unnecessary feature in db list * Fixes oceanbase/odc#2991 * Fixes oceanbase/odc#2994 --- src/component/CommonTable/index.tsx | 19 +++++++------------ .../customComponents/DetailBox.tsx | 2 +- src/component/SelectTransfer/index.tsx | 9 +++++++-- .../ManageModal/Table/TaskApplyList/index.tsx | 12 +++++------- .../ManageModal/Table/UserAuthList/index.tsx | 12 +++++------- 5 files changed, 25 insertions(+), 29 deletions(-) diff --git a/src/component/CommonTable/index.tsx b/src/component/CommonTable/index.tsx index c64893bbe..f4dd91390 100644 --- a/src/component/CommonTable/index.tsx +++ b/src/component/CommonTable/index.tsx @@ -73,7 +73,7 @@ interface IProps { operationContent?: IOperationContent; // 是否展示 操作连 筛选区&自定义操作区 分割标记 isSplit?: boolean; - // 行选择 相关配置 + // 行选择 相关配置 (初使用时容易与antd的rowSelection混淆重复导致bug) rowSelecter?: IRowSelecter; // 行选择状态回调 rowSelectedCallback?: (selectedRowKeys: any[]) => void; @@ -460,17 +460,12 @@ const CommonTable: ( } onChange={handleChange} rowSelection={ - rowSelecter - ? { - ...tableProps?.rowSelection, - ...rowSelecter, - selectedRowKeys, - onSelect: handleRowKeySelect, - onSelectAll: handleSelectAll, - } - : { - ...tableProps?.rowSelection, - } + rowSelecter && { + ...rowSelecter, + selectedRowKeys, + onSelect: handleRowKeySelect, + onSelectAll: handleSelectAll, + } } pagination={{ ...tableProps?.pagination, diff --git a/src/component/ProfileFlow/customComponents/DetailBox.tsx b/src/component/ProfileFlow/customComponents/DetailBox.tsx index a962f6251..27dfd5b1e 100644 --- a/src/component/ProfileFlow/customComponents/DetailBox.tsx +++ b/src/component/ProfileFlow/customComponents/DetailBox.tsx @@ -287,7 +287,7 @@ export default ({ dataSource, topNodes, initialNodes, globalInfo }: Iprops) => { {subNodesSortMap[subNodeSortType.BY_DURATION].label} diff --git a/src/component/SelectTransfer/index.tsx b/src/component/SelectTransfer/index.tsx index f92b0382d..62d98eedb 100644 --- a/src/component/SelectTransfer/index.tsx +++ b/src/component/SelectTransfer/index.tsx @@ -114,8 +114,13 @@ export default function SelectTransfer(props: IProps) { checkable selectable={false} checkedKeys={checkedKeys} - onCheck={(v) => { - setCheckedKeys([...(checkedKeys || []), ...(v as string[])]); + onCheck={(v, e) => { + const { checked, checkedNodes, node, event, halfCheckedKeys } = e; + if (checked === false) { + setCheckedKeys([...checkedKeys.filter((i) => i !== node?.key)]); + } else { + setCheckedKeys([...(checkedKeys || []), ...(v as string[])]); + } }} height={274} treeData={sourceDisplayTreeData} diff --git a/src/page/Project/User/ManageModal/Table/TaskApplyList/index.tsx b/src/page/Project/User/ManageModal/Table/TaskApplyList/index.tsx index a5d81553b..73fe82c5d 100644 --- a/src/page/Project/User/ManageModal/Table/TaskApplyList/index.tsx +++ b/src/page/Project/User/ManageModal/Table/TaskApplyList/index.tsx @@ -295,6 +295,11 @@ const TaskApplyList: React.FC = (props) => { onOk: onReclaim, }, ], + getCheckboxProps: (record: ITablePermission) => { + return { + disabled: record?.status === TablePermissionStatus.EXPIRED, + }; + }, } : null } @@ -303,13 +308,6 @@ const TaskApplyList: React.FC = (props) => { tableProps={{ columns: columns?.filter((item) => (isOwner ? true : item?.dataIndex !== 'action')), dataSource: dataSource?.contents ?? [], - rowSelection: { - getCheckboxProps: (record: ITablePermission) => { - return { - disabled: record?.status === TablePermissionStatus.EXPIRED, - }; - }, - }, rowKey: 'id', scroll: { x: 950, diff --git a/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx b/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx index 45c99fd46..ca8fa1e40 100644 --- a/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx +++ b/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx @@ -242,6 +242,11 @@ const UserAuthList: React.FC = (props) => { onOk: onReclaim, }, ], + getCheckboxProps: (record: ITablePermission) => { + return { + disabled: record?.status === TablePermissionStatus.EXPIRED, + }; + }, } : null } @@ -251,13 +256,6 @@ const UserAuthList: React.FC = (props) => { columns: columns?.filter((item) => (isOwner ? true : item?.dataIndex !== 'action')), dataSource: dataSource?.contents ?? [], rowKey: 'id', - rowSelection: { - getCheckboxProps: (record: ITablePermission) => { - return { - disabled: record?.status === TablePermissionStatus.EXPIRED, - }; - }, - }, scroll: { x: 950, y: 800, From b64b2bce9098fd4f9538ab632d560458aea9ae93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B9=8B=E7=91=9B?= Date: Tue, 23 Jul 2024 17:32:30 +0800 Subject: [PATCH 2/2] PullRequest: 477 fix: fixes oceanbase/odc#2921 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge branch 'fix/dev-4.3.1-2921 of git@code.alipay.com:oceanbase/oceanbase-developer-center.git into dev-4.3.1 https://code.alipay.com/oceanbase/oceanbase-developer-center/pull_requests/477 Signed-off-by: 晓康 * fix: fixes oceanbase/odc#2921 --- .../components/DDLResultSet/StatusBar.tsx | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/page/Workspace/components/DDLResultSet/StatusBar.tsx b/src/page/Workspace/components/DDLResultSet/StatusBar.tsx index 3c2e68671..d3e87391b 100644 --- a/src/page/Workspace/components/DDLResultSet/StatusBar.tsx +++ b/src/page/Workspace/components/DDLResultSet/StatusBar.tsx @@ -130,15 +130,17 @@ const StatusBar: React.FC = function ({ ) : null} - - {formatMessage( - { - id: 'src.page.Workspace.components.DDLResultSet.0B7666A0', - defaultMessage: '总耗时:${DBCostTime}', - }, - { DBCostTime: DBCostTime }, - )} - + {timer && ( + + {formatMessage( + { + id: 'src.page.Workspace.components.DDLResultSet.0B7666A0', + defaultMessage: '总耗时:${DBCostTime}', + }, + { DBCostTime: DBCostTime }, + )} + + )} { formatMessage(