diff --git a/src/component/Task/ApplyTablePermission/CreateModal/index.tsx b/src/component/Task/ApplyTablePermission/CreateModal/index.tsx index 87467a273..27309097d 100644 --- a/src/component/Task/ApplyTablePermission/CreateModal/index.tsx +++ b/src/component/Task/ApplyTablePermission/CreateModal/index.tsx @@ -218,10 +218,7 @@ const CreateModal: React.FC = (props) => { if (hasEdit) { Modal.confirm({ zIndex: 1003, - title: formatMessage({ - id: 'src.component.Task.ApplyTablePermission.CreateModal.11B637AA', - defaultMessage: '确认取消申请表权限吗?', - }), + title: '确认取消申请表/视图权限吗?', centered: true, onOk: () => { modalStore.changeApplyTablePermissionModal(false); @@ -299,9 +296,9 @@ const CreateModal: React.FC = (props) => { // 目前一个工单只会关联一个库 const databaseId = tables?.[0]?.databaseId; if (projectId && databaseId) { - tableSelecterRef.current?.loadTables(databaseId).then(() => { - tableSelecterRef.current?.expandTable(databaseId); - }); + await tableSelecterRef.current?.loadDatabases(); + await tableSelecterRef.current?.loadTables(databaseId); + tableSelecterRef.current?.expandTable(databaseId); } form.setFieldsValue(formData); }, [applyTablePermissionData, form]); @@ -328,8 +325,10 @@ const CreateModal: React.FC = (props) => { }; if (projectId && databaseId) { // 默认获取要申请权限的库下面的表,并且展开 - tableSelecterRef.current?.loadTables(databaseId).then(() => { - tableSelecterRef.current?.expandTable(databaseId); + tableSelecterRef.current?.loadDatabases()?.then(() => { + tableSelecterRef.current?.loadTables(databaseId).then(() => { + tableSelecterRef.current?.expandTable(databaseId); + }); }); } // 默认选中要申请的表、权限类型 @@ -374,10 +373,7 @@ const CreateModal: React.FC = (props) => { destroyOnClose className={styles.createModal} width={816} - title={formatMessage({ - id: 'src.component.Task.ApplyTablePermission.CreateModal.7DDD3557', - defaultMessage: '申请表权限', - })} + title={`申请表/视图权限`} footer={ { diff --git a/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx b/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx index cebd32827..adf2b06e4 100644 --- a/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx +++ b/src/page/Project/User/ManageModal/Table/UserAuthList/index.tsx @@ -44,10 +44,7 @@ const getColumns = (params: { return [ { dataIndex: 'tableName', - title: formatMessage({ - id: 'src.page.Project.User.ManageModal.Table.UserAuthList.012DC13E', - defaultMessage: '表', - }), + title: '表/视图', ellipsis: true, width: 140, filterDropdown: (props) => { diff --git a/src/page/Project/User/ManageModal/index.tsx b/src/page/Project/User/ManageModal/index.tsx index 06e5f860e..b62cdee9d 100644 --- a/src/page/Project/User/ManageModal/index.tsx +++ b/src/page/Project/User/ManageModal/index.tsx @@ -45,10 +45,7 @@ const items: MenuItem[] = [ key: EManagePermissionType.DATABASE, }, { - label: formatMessage({ - id: 'src.page.Project.User.ManageModal.81C0C3D0', - defaultMessage: '表权限', - }), + label: `表/视图权限`, key: EManagePermissionType.TABLE, }, ]; @@ -92,7 +89,7 @@ const ManageModal: React.FC = (props) => { items, selectedKey: [key], handleItemOnClick, - siderStyle: { flex: '0 0 80px' }, + siderStyle: { flex: '0 0 100px' }, contentStyle: { display: 'flex', flexDirection: 'column' }, }} content={} diff --git a/src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/components/ObjectList.tsx b/src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/components/ObjectList.tsx index 3641d90e4..ea1cbcd0e 100644 --- a/src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/components/ObjectList.tsx +++ b/src/page/Workspace/SideBar/ResourceTree/DatabaseSearchModal/components/ObjectList.tsx @@ -286,10 +286,7 @@ const ObjectList = ({ style={{ padding: 0, height: 18, display: 'inline-block' }} onClick={(e) => applyTablePermission(e, object, type)} > - {formatMessage({ - id: 'src.page.Workspace.SideBar.ResourceTree.DatabaseSearchModal.components.E2C1F722', - defaultMessage: '申请表权限', - })} + {`申请表/视图权限`} ); } diff --git a/src/page/Workspace/components/DBPermissionTableContent/index.tsx b/src/page/Workspace/components/DBPermissionTableContent/index.tsx index 7b38b9d5c..28324fcd6 100644 --- a/src/page/Workspace/components/DBPermissionTableContent/index.tsx +++ b/src/page/Workspace/components/DBPermissionTableContent/index.tsx @@ -56,10 +56,7 @@ const getColumns = ( }, { dataIndex: 'tableName', - title: formatMessage({ - id: 'src.page.Workspace.components.SQLResultSet.73CA790E', - defaultMessage: '表', - }), + title: '表/视图', ellipsis: true, }, { @@ -104,14 +101,8 @@ const getColumns = ( defaultMessage: '无法申请数据库权限:数据库没有归属项目', }); /* 无法申请数据库权限:数据库没有归属项目 */ tableTooltip = _.projectId - ? formatMessage({ - id: 'src.page.Workspace.components.SQLResultSet.455E73CE', - defaultMessage: '无法申请表权限:没有加入数据库所属项目', - }) - : formatMessage({ - id: 'src.page.Workspace.components.SQLResultSet.3BA312DB', - defaultMessage: '无法申请表权限:表所属数据库没有归属项目', - }); + ? `无法申请表/视图权限:没有加入数据库所属项目` + : `无法申请表/视图权限:表所属数据库没有归属项目` } return ( @@ -143,10 +134,7 @@ const getColumns = ( ); }} > - {formatMessage({ - id: 'src.page.Workspace.components.SQLResultSet.44FA6D77', - defaultMessage: '申请表权限', - })} + {`申请表/视图权限`} }