|
|
@ -2,7 +2,7 @@ import React, { useEffect, useState, useRef } from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import ReactECharts from 'echarts-for-react'; |
|
|
|
import echarts from 'echarts'; |
|
|
|
import { Spin, Card, CardGroup, Form, Button } from '@douyinfe/semi-ui'; |
|
|
|
import { Spin, Card, CardGroup, Form, Button,Table } from '@douyinfe/semi-ui'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -15,15 +15,41 @@ const Network = (props) => { |
|
|
|
useEffect(() => { |
|
|
|
|
|
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
title: '设备名称', |
|
|
|
dataIndex: 'deviceName', |
|
|
|
width: 200, |
|
|
|
key:'deviceName' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '设备类型', |
|
|
|
dataIndex: 'deviceType', |
|
|
|
width:200, |
|
|
|
key:'deviceType' |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '最后采集时间', |
|
|
|
dataIndex: 'collectTime', |
|
|
|
width:200, |
|
|
|
key:'collectTime' |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
title: '更新日期', |
|
|
|
dataIndex: 'updateTime', |
|
|
|
sorter: (a, b) => (a.updateTime - b.updateTime > 0 ? 1 : -1), |
|
|
|
render: value => { |
|
|
|
return dateFns.format(new Date(value), 'yyyy-MM-dd'); |
|
|
|
}, |
|
|
|
}, |
|
|
|
]; |
|
|
|
return ( |
|
|
|
|
|
|
|
<div style={{ width: "100%", height: "100%" }}> |
|
|
|
|
|
|
|
表格展示 |
|
|
|
|
|
|
|
</div> |
|
|
|
<Table |
|
|
|
columns={columns} |
|
|
|
dataSource={dataSource} |
|
|
|
></Table> |
|
|
|
|
|
|
|
) |
|
|
|
} |
|
|
|