正在显示
7 个修改的文件
包含
14 行增加
和
17 行删除
... | ... | @@ -14,12 +14,8 @@ |
14 | 14 | "ant-design-pro": "^2.1.1", |
15 | 15 | "antd": "^3.10.9", |
16 | 16 | "dva": "^2.4.0", |
17 | - "hash.js": "^1.1.5", | |
18 | 17 | "mockjs": "^1.0.1-beta3", |
19 | - "moment": "^2.22.2", | |
20 | 18 | "numeral": "^2.0.6", |
21 | - "nzh": "^1.0.3", | |
22 | - "qs": "^6.6.0", | |
23 | 19 | "react": "^16.6.3", |
24 | 20 | "umi-request": "^1.0.0" |
25 | 21 | }, |
... | ... |
1 | 1 | import React, { Component } from 'react'; |
2 | -import { MiniArea } from 'ant-design-pro/lib/Charts'; | |
3 | -import NumberInfo from 'ant-design-pro/lib/NumberInfo'; | |
2 | +import { Charts, NumberInfo } from 'ant-design-pro'; | |
4 | 3 | |
5 | 4 | import styles from './index.less'; |
6 | 5 | |
6 | +const { MiniArea } = Charts; | |
7 | + | |
7 | 8 | function fixedZero(val) { |
8 | 9 | return val * 1 < 10 ? `0${val}` : val; |
9 | 10 | } |
... | ... |
... | ... | @@ -4,8 +4,8 @@ import { formatMessage, FormattedMessage } from 'umi/locale'; |
4 | 4 | import { Row, Col, Card, Tooltip } from 'antd'; |
5 | 5 | import { NumberInfo, Charts } from 'ant-design-pro'; |
6 | 6 | import CountDown from 'ant-design-pro/lib/CountDown'; |
7 | -import ActiveChart from '@/components/ActiveChart'; | |
8 | 7 | import numeral from 'numeral'; |
8 | +import ActiveChart from './components/ActiveChart'; | |
9 | 9 | |
10 | 10 | import styles from './style.less'; |
11 | 11 | |
... | ... | @@ -13,21 +13,21 @@ const { Pie, WaterWave, Gauge, TagCloud } = Charts; |
13 | 13 | |
14 | 14 | const targetTime = new Date().getTime() + 3900000; |
15 | 15 | |
16 | -@connect(({ monitor, loading }) => ({ | |
17 | - monitor, | |
16 | +@connect(({ BLOCK_NAME, loading }) => ({ | |
17 | + BLOCK_NAME, | |
18 | 18 | loading: loading.models.monitor, |
19 | 19 | })) |
20 | -class Monitor extends PureComponent { | |
20 | +class PAGE_NAME_UPPER_CAMEL_CASE extends PureComponent { | |
21 | 21 | componentDidMount() { |
22 | 22 | const { dispatch } = this.props; |
23 | 23 | dispatch({ |
24 | - type: 'monitor/fetchTags', | |
24 | + type: 'BLOCK_NAME/fetchTags', | |
25 | 25 | }); |
26 | 26 | } |
27 | 27 | |
28 | 28 | render() { |
29 | - const { monitor, loading } = this.props; | |
30 | - const { tags } = monitor; | |
29 | + const { BLOCK_NAME, loading } = this.props; | |
30 | + const { tags } = BLOCK_NAME; | |
31 | 31 | |
32 | 32 | return ( |
33 | 33 | <React.Fragment> |
... | ... | @@ -232,4 +232,4 @@ class Monitor extends PureComponent { |
232 | 232 | } |
233 | 233 | } |
234 | 234 | |
235 | -export default Monitor; | |
235 | +export default PAGE_NAME_UPPER_CAMEL_CASE; | |
... | ... |
请
注册
或
登录
后发表评论