|
|
@@ -55,7 +55,8 @@ export default class Analysis extends Component {
|
|
|
};
|
|
|
|
|
|
componentDidMount() {
|
|
|
- this.props.dispatch({
|
|
|
+ const { dispatch } = this.props;
|
|
|
+ dispatch({
|
|
|
type: 'chart/fetch',
|
|
|
});
|
|
|
}
|
|
|
@@ -80,21 +81,23 @@ export default class Analysis extends Component {
|
|
|
};
|
|
|
|
|
|
handleRangePickerChange = rangePickerValue => {
|
|
|
+ const { dispatch } = this.props;
|
|
|
this.setState({
|
|
|
rangePickerValue,
|
|
|
});
|
|
|
|
|
|
- this.props.dispatch({
|
|
|
+ dispatch({
|
|
|
type: 'chart/fetchSalesData',
|
|
|
});
|
|
|
};
|
|
|
|
|
|
selectDate = type => {
|
|
|
+ const { dispatch } = this.props;
|
|
|
this.setState({
|
|
|
rangePickerValue: getTimeDistance(type),
|
|
|
});
|
|
|
|
|
|
- this.props.dispatch({
|
|
|
+ dispatch({
|
|
|
type: 'chart/fetchSalesData',
|
|
|
});
|
|
|
};
|
|
|
@@ -200,7 +203,10 @@ export default class Analysis extends Component {
|
|
|
sorter: (a, b) => a.range - b.range,
|
|
|
render: (text, record) => (
|
|
|
<Trend flag={record.status === 1 ? 'down' : 'up'}>
|
|
|
- <span style={{ marginRight: 4 }}>{text}%</span>
|
|
|
+ <span style={{ marginRight: 4 }}>
|
|
|
+ {text}
|
|
|
+ %
|
|
|
+ </span>
|
|
|
</Trend>
|
|
|
),
|
|
|
align: 'right',
|
|
|
@@ -255,21 +261,25 @@ export default class Analysis extends Component {
|
|
|
<Icon type="info-circle-o" />
|
|
|
</Tooltip>
|
|
|
}
|
|
|
+ loading={loading}
|
|
|
total={() => <Yuan>126560</Yuan>}
|
|
|
footer={<Field label="日均销售额" value={`¥${numeral(12423).format('0,0')}`} />}
|
|
|
contentHeight={46}
|
|
|
>
|
|
|
<Trend flag="up" style={{ marginRight: 16 }}>
|
|
|
- 周同比<span className={styles.trendText}>12%</span>
|
|
|
+ 周同比
|
|
|
+ <span className={styles.trendText}>12%</span>
|
|
|
</Trend>
|
|
|
<Trend flag="down">
|
|
|
- 日环比<span className={styles.trendText}>11%</span>
|
|
|
+ 日环比
|
|
|
+ <span className={styles.trendText}>11%</span>
|
|
|
</Trend>
|
|
|
</ChartCard>
|
|
|
</Col>
|
|
|
<Col {...topColResponsiveProps}>
|
|
|
<ChartCard
|
|
|
bordered={false}
|
|
|
+ loading={loading}
|
|
|
title="访问量"
|
|
|
action={
|
|
|
<Tooltip title="指标说明">
|
|
|
@@ -286,6 +296,7 @@ export default class Analysis extends Component {
|
|
|
<Col {...topColResponsiveProps}>
|
|
|
<ChartCard
|
|
|
bordered={false}
|
|
|
+ loading={loading}
|
|
|
title="支付笔数"
|
|
|
action={
|
|
|
<Tooltip title="指标说明">
|
|
|
@@ -301,6 +312,7 @@ export default class Analysis extends Component {
|
|
|
</Col>
|
|
|
<Col {...topColResponsiveProps}>
|
|
|
<ChartCard
|
|
|
+ loading={loading}
|
|
|
bordered={false}
|
|
|
title="运营活动效果"
|
|
|
action={
|
|
|
@@ -312,10 +324,12 @@ export default class Analysis extends Component {
|
|
|
footer={
|
|
|
<div style={{ whiteSpace: 'nowrap', overflow: 'hidden' }}>
|
|
|
<Trend flag="up" style={{ marginRight: 16 }}>
|
|
|
- 周同比<span className={styles.trendText}>12%</span>
|
|
|
+ 周同比
|
|
|
+ <span className={styles.trendText}>12%</span>
|
|
|
</Trend>
|
|
|
<Trend flag="down">
|
|
|
- 日环比<span className={styles.trendText}>11%</span>
|
|
|
+ 日环比
|
|
|
+ <span className={styles.trendText}>11%</span>
|
|
|
</Trend>
|
|
|
</div>
|
|
|
}
|