import React, { Component } from 'react'; import { connect } from 'dva'; import { formatMessage, FormattedMessage } from 'umi/locale'; import { Row, Col, Card, Tooltip } from 'antd'; import { Pie, WaterWave, Gauge, TagCloud } from '@/components/Charts'; import NumberInfo from '@/components/NumberInfo'; import CountDown from '@/components/CountDown'; import ActiveChart from '@/components/ActiveChart'; import numeral from 'numeral'; import GridContent from '@/components/PageHeaderWrapper/GridContent'; import Authorized from '@/utils/Authorized'; import styles from './Monitor.less'; const { Secured } = Authorized; const targetTime = new Date().getTime() + 3900000; // use permission as a parameter const havePermissionAsync = new Promise(resolve => { // Call resolve on behalf of passed setTimeout(() => resolve(), 300); }); @Secured(havePermissionAsync) @connect(({ monitor, loading }) => ({ monitor, loading: loading.models.monitor, })) class Monitor extends Component { componentDidMount() { const { dispatch } = this.props; dispatch({ type: 'monitor/fetchTags', }); } render() { const { monitor, loading } = this.props; const { tags } = monitor; return ( } bordered={false} > } suffix="元" total={numeral(124543233).format('0,0')} /> } total="92%" /> } total={} /> } suffix="元" total={numeral(234).format('0,0')} />
} > map
} style={{ marginBottom: 24 }} bordered={false} > } style={{ marginBottom: 24 }} bodyStyle={{ textAlign: 'center' }} bordered={false} >
} bordered={false} className={styles.pieCard} > } total="28%" height={128} lineWidth={2} /> } total="22%" height={128} lineWidth={2} /> } total="32%" height={128} lineWidth={2} /> } loading={loading} bordered={false} bodyStyle={{ overflow: 'hidden' }} > } bodyStyle={{ textAlign: 'center', fontSize: 0 }} bordered={false} > } percent={34} />
); } } export default Monitor;