feature/2.9.42310.01-薪资项目拓扑图
This commit is contained in:
parent
1dd9bc997b
commit
d733ec99e0
|
|
@ -37,6 +37,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
const [tableScrollHeight, setTableScrollHeight] = useState<Number>(0);
|
||||
const [payload, setPayload] = useState<string>("");
|
||||
const [fixed, setFixed] = useState<fixedProps>(true);
|
||||
const [pageSum, setPageSum] = useState<Partial<{}>>({}); //当页合计
|
||||
const [sumRow, setSumRow] = useState<Partial<{}>>({}); //总计行数据
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -63,6 +64,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
fixed = true,
|
||||
tableScrollHeight,
|
||||
sumRow,
|
||||
pageSum = {},
|
||||
optWidth
|
||||
} = data;
|
||||
setSumRowlistUrl(sumRowlistUrl);
|
||||
|
|
@ -73,6 +75,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
setPayload(payload);
|
||||
setFixed(fixed);
|
||||
setSumRow(sumRow);
|
||||
setPageSum(pageSum);
|
||||
setPageInfo(pageInfo);
|
||||
setDataSource(dataSource);
|
||||
setSelectedRowKeys([...selectedRowKeys, ...rowKeys]);
|
||||
|
|
@ -245,7 +248,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
};
|
||||
const rowSelection = {
|
||||
columnWidth: 50,
|
||||
columnTitle: isDetailTable ? "序号" : "",
|
||||
columnTitle: isDetailTable ? "序号" : "",
|
||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
|
||||
selectedRowKeys,
|
||||
preserveSelectedRowKeys: true,
|
||||
|
|
@ -287,6 +290,14 @@ const index: FunctionComponent<Props> = (props) => {
|
|||
<></>
|
||||
) : (
|
||||
<Table.Summary fixed={fixed}>
|
||||
{!_.isEmpty(pageSum) && (
|
||||
<Table.Summary.Row>
|
||||
<Table.Summary.Cell index={0} align="center">
|
||||
<Text type="danger">{i18n["当页合计"]}</Text>
|
||||
</Table.Summary.Cell>
|
||||
<CaclFixedTotal columns={columns} dataSourceUrl="" payload={{}} sumRow={pageSum} />
|
||||
</Table.Summary.Row>
|
||||
)}
|
||||
<Table.Summary.Row>
|
||||
<Table.Summary.Cell index={0} align="center">
|
||||
<Text type="danger">{i18n["总计"]}</Text>
|
||||
|
|
|
|||
Loading…
Reference in New Issue