|
|
@ -37,6 +37,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
const [tableScrollHeight, setTableScrollHeight] = useState<Number>(0);
|
|
|
|
const [tableScrollHeight, setTableScrollHeight] = useState<Number>(0);
|
|
|
|
const [payload, setPayload] = useState<string>("");
|
|
|
|
const [payload, setPayload] = useState<string>("");
|
|
|
|
const [fixed, setFixed] = useState<fixedProps>(true);
|
|
|
|
const [fixed, setFixed] = useState<fixedProps>(true);
|
|
|
|
|
|
|
|
const [pageSum, setPageSum] = useState<Partial<{}>>({}); //当页合计
|
|
|
|
const [sumRow, setSumRow] = useState<Partial<{}>>({}); //总计行数据
|
|
|
|
const [sumRow, setSumRow] = useState<Partial<{}>>({}); //总计行数据
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
@ -63,6 +64,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
fixed = true,
|
|
|
|
fixed = true,
|
|
|
|
tableScrollHeight,
|
|
|
|
tableScrollHeight,
|
|
|
|
sumRow,
|
|
|
|
sumRow,
|
|
|
|
|
|
|
|
pageSum = {},
|
|
|
|
optWidth
|
|
|
|
optWidth
|
|
|
|
} = data;
|
|
|
|
} = data;
|
|
|
|
setSumRowlistUrl(sumRowlistUrl);
|
|
|
|
setSumRowlistUrl(sumRowlistUrl);
|
|
|
@ -73,6 +75,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
setPayload(payload);
|
|
|
|
setPayload(payload);
|
|
|
|
setFixed(fixed);
|
|
|
|
setFixed(fixed);
|
|
|
|
setSumRow(sumRow);
|
|
|
|
setSumRow(sumRow);
|
|
|
|
|
|
|
|
setPageSum(pageSum);
|
|
|
|
setPageInfo(pageInfo);
|
|
|
|
setPageInfo(pageInfo);
|
|
|
|
setDataSource(dataSource);
|
|
|
|
setDataSource(dataSource);
|
|
|
|
setSelectedRowKeys([...selectedRowKeys, ...rowKeys]);
|
|
|
|
setSelectedRowKeys([...selectedRowKeys, ...rowKeys]);
|
|
|
@ -245,7 +248,7 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const rowSelection = {
|
|
|
|
const rowSelection = {
|
|
|
|
columnWidth: 50,
|
|
|
|
columnWidth: 50,
|
|
|
|
columnTitle: isDetailTable ? "序号" : "",
|
|
|
|
columnTitle: isDetailTable ? "序号" : "",
|
|
|
|
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
|
|
|
|
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable ? <span>{index + 1}</span> : originNode),
|
|
|
|
selectedRowKeys,
|
|
|
|
selectedRowKeys,
|
|
|
|
preserveSelectedRowKeys: true,
|
|
|
|
preserveSelectedRowKeys: true,
|
|
|
@ -287,6 +290,14 @@ const index: FunctionComponent<Props> = (props) => {
|
|
|
|
<></>
|
|
|
|
<></>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<Table.Summary fixed={fixed}>
|
|
|
|
<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.Row>
|
|
|
|
<Table.Summary.Cell index={0} align="center">
|
|
|
|
<Table.Summary.Cell index={0} align="center">
|
|
|
|
<Text type="danger">{i18n["总计"]}</Text>
|
|
|
|
<Text type="danger">{i18n["总计"]}</Text>
|
|
|
|