Commit aa833043 authored by nikogu's avatar nikogu
parent 21dba8bc
...@@ -253,13 +253,16 @@ export default class Analysis extends Component { ...@@ -253,13 +253,16 @@ export default class Analysis extends Component {
<TabPane tab="销售额" key="sales"> <TabPane tab="销售额" key="sales">
<Row gutter={72}> <Row gutter={72}>
<Col xl={16} lg={12} md={12} sm={24} xs={24}> <Col xl={16} lg={12} md={12} sm={24} xs={24}>
<div className={styles.salesBar}>
<Bar <Bar
height={292} height={292}
title="销售额趋势" title="销售额趋势"
data={salesData} data={salesData}
/> />
</div>
</Col> </Col>
<Col xl={8} lg={12} md={12} sm={24} xs={24}> <Col xl={8} lg={12} md={12} sm={24} xs={24}>
<div className={styles.salesRank}>
<h4 className={styles.rankingTitle}>门店销售额排名</h4> <h4 className={styles.rankingTitle}>门店销售额排名</h4>
<ul className={styles.rankingList}> <ul className={styles.rankingList}>
{ {
...@@ -272,11 +275,38 @@ export default class Analysis extends Component { ...@@ -272,11 +275,38 @@ export default class Analysis extends Component {
)) ))
} }
</ul> </ul>
</div>
</Col> </Col>
</Row> </Row>
</TabPane> </TabPane>
<TabPane tab="访问量" key="visits"> <TabPane tab="访问量" key="views">
访问量没有, 因为偷懒了 <Row gutter={72}>
<Col xl={16} lg={12} md={12} sm={24} xs={24}>
<div className={styles.salesBar}>
<Bar
height={292}
title="访问量趋势"
data={salesData}
/>
</div>
</Col>
<Col xl={8} lg={12} md={12} sm={24} xs={24}>
<div className={styles.salesRank}>
<h4 className={styles.rankingTitle}>门店访问量排名</h4>
<ul className={styles.rankingList}>
{
rankingListData.map((item, i) => (
<li key={item.title}>
<span className={(i < 3) && styles.active}>{i + 1}</span>
<span>{item.title}</span>
<span>{numeral(item.total).format('0,0')}</span>
</li>
))
}
</ul>
</div>
</Col>
</Row>
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
...@@ -390,4 +420,4 @@ export default class Analysis extends Component { ...@@ -390,4 +420,4 @@ export default class Analysis extends Component {
</div> </div>
); );
} }
} }
...@@ -57,10 +57,13 @@ ...@@ -57,10 +57,13 @@
} }
.salesCard { .salesCard {
:global { .salesBar {
.ant-tabs-content { padding: 0 0 24px 24px;
padding: 0 24px 24px 24px;
} }
.salesRank {
padding: 0 24px 24px 0;
}
:global {
.ant-tabs-bar { .ant-tabs-bar {
padding-left: 24px; padding-left: 24px;
.ant-tabs-nav .ant-tabs-tab { .ant-tabs-nav .ant-tabs-tab {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment