|
@@ -1,8 +1,9 @@
|
|
|
import { useAjax } from '@/Hook/useAjax';
|
|
|
import { getLocalCsgroupDayHourListApi } from '@/services/adqV3/monitorEWList';
|
|
|
-import { Modal, Statistic, Table } from 'antd';
|
|
|
+import { Modal, Statistic, Table, Typography } from 'antd';
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
import '../tencentAdPutIn/index.less';
|
|
|
+const { Text } = Typography;
|
|
|
|
|
|
interface AstraGroupHourProps {
|
|
|
localCsgroupName: string;
|
|
@@ -11,7 +12,7 @@ interface AstraGroupHourProps {
|
|
|
localCsgroupId: number;
|
|
|
}
|
|
|
}
|
|
|
-const AstraGroupHourEle: React.FC<AstraGroupHourProps> = ({localCsgroupName, data}) => {
|
|
|
+const AstraGroupHourEle: React.FC<AstraGroupHourProps> = ({ localCsgroupName, data }) => {
|
|
|
|
|
|
/***************************************/
|
|
|
const [visible, setVisible] = useState<boolean>(false);
|
|
@@ -116,6 +117,43 @@ const AstraGroupHourEle: React.FC<AstraGroupHourProps> = ({localCsgroupName, dat
|
|
|
},
|
|
|
}
|
|
|
]}
|
|
|
+ pagination={false}
|
|
|
+ summary={pageData => {
|
|
|
+ let totalCost = 0;
|
|
|
+ let totalScanFollowCount = 0;
|
|
|
+ let totalScanFollowUserCount = 0;
|
|
|
+ let totalAddUserCount = 0;
|
|
|
+
|
|
|
+ pageData.forEach(({ cost, scanFollowCount, scanFollowUserCount, addUserCount }) => {
|
|
|
+ totalCost += cost;
|
|
|
+ totalScanFollowCount += scanFollowCount;
|
|
|
+ totalScanFollowUserCount += scanFollowUserCount;
|
|
|
+ totalAddUserCount += addUserCount;
|
|
|
+ });
|
|
|
+
|
|
|
+ return (
|
|
|
+ <Table.Summary fixed='top'>
|
|
|
+ <Table.Summary.Row>
|
|
|
+ <Table.Summary.Cell index={0} align="center"><Text strong>总计</Text></Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={1} align="center">--</Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={2} align="right">
|
|
|
+ <Text strong>{totalCost}</Text>
|
|
|
+ </Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={3} align="right">
|
|
|
+ <Text strong>{totalScanFollowCount}</Text>
|
|
|
+ </Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={4} align="right">
|
|
|
+ <Text strong>{totalScanFollowUserCount}</Text>
|
|
|
+ </Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={5} align="right">
|
|
|
+ <Text strong>{totalAddUserCount}</Text>
|
|
|
+ </Table.Summary.Cell>
|
|
|
+ <Table.Summary.Cell index={6} align="center">--</Table.Summary.Cell>
|
|
|
+ </Table.Summary.Row>
|
|
|
+ </Table.Summary>
|
|
|
+ );
|
|
|
+ }}
|
|
|
+ sticky
|
|
|
size='small'
|
|
|
bordered
|
|
|
rowKey={'id'}
|