lanjianrong 3 年之前
父节点
当前提交
4147b98d22

+ 3 - 3
src/pages/Institutions/Company/Detail/components/Organization.tsx

@@ -189,6 +189,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
     }
   ]
 
+  const wrapHeight = document.querySelector('.ant-pro-page-container-warp')?.clientHeight || 0
+
   return (
     <div>
       <ProTable<API.OrganizationalStructureListItem>
@@ -196,8 +198,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
         actionRef={tRef}
         columns={columns}
         dataSource={state.organizationList}
-        // defaultExpandAllRows={true}
-        scroll={{ y: document.body.clientHeight - 371 }}
+        scroll={{ y: document.body.clientHeight - (263 + wrapHeight) }}
         expandable={{
           expandedRowKeys: state.expandTreeIds,
           onExpand: (expanded, record) => {
@@ -213,7 +214,6 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
             }
           }
         }}
-        // expandedRowRender={expandedRowRender}
         indentSize={30}
         search={false}
         pagination={false}

+ 11 - 5
src/pages/Institutions/Company/Detail/components/Staff.tsx

@@ -68,11 +68,17 @@ const Staff: React.FC<ListProps> = ({
       title: '姓名',
       renderText: (text, record) => `${text}${record.ID === managerID ? ' (管理员) ' : null}`
     },
-    // {
-    //   dataIndex: 'password',
-    //   key: 'password',
-    //   title: '密码'
-    // },
+    {
+      dataIndex: 'enable',
+      key: 'enable',
+      title: '状态',
+      filters: true,
+      filterMultiple: false,
+      valueEnum: {
+        true: { text: '启用', status: 'Success' },
+        false: { text: '禁用', status: 'Error' }
+      }
+    },
     {
       dataIndex: 'gender',
       key: 'gender',

+ 2 - 2
src/pages/Institutions/Staff/index.tsx

@@ -93,8 +93,8 @@ const CompanyList: React.FC<ListProps> = ({ schema, dispatch, accountTypeList })
       filters: true,
       filterMultiple: false,
       valueEnum: {
-        false: { text: '禁用', status: 'Error' },
-        true: { text: '启用', status: 'Success' }
+        true: { text: '启用', status: 'Success' },
+        false: { text: '禁用', status: 'Error' }
       }
     },
     {