{"size": 1339, "ext": "js", "max_stars_repo_path": "client/components/StatisticCard.js", "max_stars_repo_name": "Duo-Huang/cdfang", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "client/components/StatisticCard.js", "max_issues_repo_name": "Duo-Huang/cdfang", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "client/components/StatisticCard.js", "max_forks_repo_name": "Duo-Huang/cdfang", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.2641509434, "max_line_length": 56, "alphanum_fraction": 0.6176250934}
import React from 'react';
import 'whatwg-fetch';
import util from '../util';
import { Card, Col, Row } from 'antd';
import PropTypes from 'prop-types';

class StatisticCard extends React.Component {

	render() {
		var allData=this.props.data;
		var allInfo=util.getAllInfo(allData);
		var thisWeekInfo= util.getThisWeekInfo(allData);
		var thisMonthInfo= util.getThisMonthInfo(allData);
		var thisQuarterInfo= util.getThisQuarterInfo(allData);
		return (
			<div className="content-card">
				<Row gutter={16}>
					<Col span={6}>
						<Card title="本周开盘" bordered={false}>
									楼盘数： {thisWeekInfo.buildNumber} <br />
									房源数： {thisWeekInfo.houseNumber}
						</Card>
					</Col>
					<Col span={6}>
						<Card title="本月开盘" bordered={false}>
									楼盘数： {thisMonthInfo.buildNumber} <br />
									房源数： {thisMonthInfo.houseNumber}
						</Card>
					</Col>
					<Col span={6}>
						<Card title="本季度开盘" bordered={false}>
									楼盘数： {thisQuarterInfo.buildNumber} <br />
									房源数： {thisQuarterInfo.houseNumber}
						</Card>
					</Col>
					<Col span={6}>
						<Card title="总开盘" bordered={false}>
									楼盘数： {allInfo.buildNumber} <br />
									房源数： {allInfo.houseNumber}
						</Card>
					</Col>
				</Row>
			</div>
		);
	}
}

StatisticCard.propTypes = {
	data: PropTypes.array
};

export default StatisticCard;
