import React, { PureComponent } from 'react'; import { connect } from 'dva'; import { Row, Col, Card, Tooltip } from 'antd'; import numeral from 'numeral'; import { Secured } from '../../utils/Authorized'; 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 targetTime = new Date().getTime() + 3900000; @Secured('admin') @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 (
} />
map
{ switch (parseInt(val, 10)) { case 20: return '差'; case 40: return '中'; case 60: return '良'; case 80: return '优'; default: return ''; } }} title="跳出率" height={180} percent={87} />
); } }