|
@@ -1,3 +1,4 @@
|
|
|
+import TabsContent from '@/components/TabsContent';
|
|
|
import { UnityAction } from '@/utils/utils';
|
|
|
import { connect } from '@umijs/max';
|
|
|
import { Button, Spin, Table, Tabs } from 'antd';
|
|
@@ -164,27 +165,32 @@ const Analysis = (props) => {
|
|
|
|
|
|
return (
|
|
|
<Spin spinning={loading}>
|
|
|
- <Tabs defaultActiveKey="1" onChange={onTabChange}>
|
|
|
- {data?.map((item) => (
|
|
|
- <TabPane
|
|
|
- tab={`${item.name}(${item.data?.length || 0})`}
|
|
|
- key={item.type}
|
|
|
- >
|
|
|
- <Table
|
|
|
- dataSource={item.data}
|
|
|
- columns={columns}
|
|
|
- // rowKey={'DeviceCode'}
|
|
|
- // rowSelection={rowSelection}
|
|
|
- rowClassName={setRowClassName}
|
|
|
- onRow={(record, index) => ({
|
|
|
- onClick: () => onSelectRow(record, index),
|
|
|
- })}
|
|
|
- pagination={false}
|
|
|
- scroll={{ y: document.body.clientHeight - 542 }}
|
|
|
- />
|
|
|
- </TabPane>
|
|
|
- ))}
|
|
|
- </Tabs>
|
|
|
+ <TabsContent
|
|
|
+ small={true}
|
|
|
+ center={false}
|
|
|
+ defaultActiveKey="1"
|
|
|
+ items={data?.map((item) => {
|
|
|
+ return {
|
|
|
+ label: `${item.name}(${item.data?.length || 0})`,
|
|
|
+ key: item.type,
|
|
|
+ children: (
|
|
|
+ <Table
|
|
|
+ dataSource={item.data}
|
|
|
+ columns={columns}
|
|
|
+ // rowKey={'DeviceCode'}
|
|
|
+ // rowSelection={rowSelection}
|
|
|
+ rowClassName={setRowClassName}
|
|
|
+ onRow={(record, index) => ({
|
|
|
+ onClick: () => onSelectRow(record, index),
|
|
|
+ })}
|
|
|
+ pagination={false}
|
|
|
+ scroll={{ y: document.body.clientHeight - 542 }}
|
|
|
+ />
|
|
|
+ ),
|
|
|
+ };
|
|
|
+ })}
|
|
|
+ onChange={onTabChange}
|
|
|
+ />
|
|
|
</Spin>
|
|
|
);
|
|
|
};
|