import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Row, Col, Card } from 'antd'; import numeral from 'numeral'; import { Pie, WaterWave, Gauge, TagCloud } from '../../components/Charts'; import NumberInfo from '../../components/NumberInfo'; import CountDown from '../../components/CountDown'; import ActiveChart from '../../components/ActiveChart'; import styles from './Monitor.less'; const MapData = []; for (let i = 0; i < 50; i += 1) { MapData.push({ x: Math.floor(Math.random() * 600), y: Math.floor(Math.random() * 400), value: Math.floor(Math.random() * 1000) + 500, }); } const targetTime = new Date().getTime() + 3900000; @connect(state => ({ monitor: state.monitor, })) export default class Monitor extends PureComponent { componentDidMount() { this.props.dispatch({ type: 'monitor/fetchTags', }); } render() { const { monitor } = this.props; const { tags } = monitor; return (