Sfoglia il codice sorgente

feat: 企事业单位详情内tab页下表格高度优化

lanjianrong 3 anni fa
parent
commit
58f70f27aa

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

@@ -97,7 +97,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
           {record.isStart === false ? (
             <div
               className="px-2 text-primary cursor-pointer hover:text-hex-967bbd"
-              onClick={() => tryMoveOrganization({ ID: record.ID, operation: 'up' })}>
+              onClick={() => tryMoveOrganization({ ID: record.ID, operation: 'up' })}
+            >
               <Tooltip placement="top" title="上移">
                 <ArrowUpOutlined />
               </Tooltip>
@@ -106,7 +107,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
           {record.isEnd === false ? (
             <div
               className="px-2 text-primary cursor-pointer hover:text-hex-967bbd"
-              onClick={() => tryMoveOrganization({ ID: record.ID, operation: 'down' })}>
+              onClick={() => tryMoveOrganization({ ID: record.ID, operation: 'down' })}
+            >
               <Tooltip placement="top" title="下移">
                 <ArrowDownOutlined />
               </Tooltip>
@@ -122,7 +124,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                   defaultFormData: record,
                   currentModalType: ModalTypeEnum.MOVE
                 })
-              }}>
+              }}
+            >
               <Tooltip placement="top" title="移动">
                 <SwapOutlined />
               </Tooltip>
@@ -142,7 +145,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 },
                 currentModalType: ModalTypeEnum.ADDITEM
               })
-            }}>
+            }}
+          >
             <Tooltip placement="top" title="添加子项">
               <PlusSquareOutlined />
             </Tooltip>
@@ -156,7 +160,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                 defaultFormData: record,
                 currentModalType: ModalTypeEnum.UPDATE
               })
-            }}>
+            }}
+          >
             <Tooltip placement="top" title="重命名">
               <EditOutlined />
             </Tooltip>
@@ -192,6 +197,7 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
         columns={columns}
         dataSource={state.organizationList}
         // defaultExpandAllRows={true}
+        scroll={{ y: document.body.clientHeight - 371 }}
         expandable={{
           expandedRowKeys: state.expandTreeIds,
           onExpand: (expanded, record) => {
@@ -226,7 +232,8 @@ const Organization: React.FC<OrganizationProps> = ({ dataID, structureType }) =>
                     parentID: state.parentID
                   }
                 })
-              }>
+              }
+            >
               添加组织
             </Button>
           ]

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

@@ -142,7 +142,8 @@ const Staff: React.FC<ListProps> = ({
                   institutionDisable: true
                 }
               })
-            }}>
+            }}
+          >
             编辑
           </div>
         </div>
@@ -155,7 +156,7 @@ const Staff: React.FC<ListProps> = ({
         rowKey="ID"
         params={state.params}
         actionRef={tRef}
-        scroll={{ y: document.body.clientHeight - 314 }}
+        scroll={{ y: document.body.clientHeight - 371 }}
         columns={generateColumns(columns, schema)}
         search={false}
         request={async (params, filter, sorter) => {
@@ -176,6 +177,7 @@ const Staff: React.FC<ListProps> = ({
             onSearch: val => setState({ ...state, params: { ...state.params, search: val } })
           },
           actions: [
+<<<<<<< HEAD
             state.total && state.total > memberTotal ? (
               <Tooltip placement="top" title="成员已满,无法新增">
                 <Button type="primary" disabled>
@@ -201,6 +203,26 @@ const Staff: React.FC<ListProps> = ({
                 添加人员
               </Button>
             )
+=======
+            <Button
+              type="primary"
+              onClick={() => {
+                setState({
+                  ...state,
+                  visible: true,
+                  currentModalType: ModalType.ADD,
+                  institutionDisable: true,
+                  title: '',
+                  defaultFormData: {
+                    institutionID: dataID,
+                    institutionDisable: true
+                  }
+                })
+              }}
+            >
+              添加人员
+            </Button>
+>>>>>>> dee655f... feat: 企事业单位详情内tab页下表格高度优化
           ]
         }}
       />
@@ -212,7 +234,8 @@ const Staff: React.FC<ListProps> = ({
           </>
         }
         visible={state.visible}
-        onVisibleChange={visible => setState({ ...state, visible })}>
+        onVisibleChange={visible => setState({ ...state, visible })}
+      >
         <StaffDetail
           visible={state.visible}
           onVisibleChange={(visible: boolean) => setState({ ...state, visible })}