import React from 'react'

import {
  Row,
  Col,
} from 'antd'

export default class BriefInfo extends React.Component {
  constructor(props) {
    super(props);
  }

  componentWillMount() {}

  getInfo() {
    const {
      datas
    } = this.props;

    let arr = []; //存放Row
    datas.map((data, i) => {
      let _arr = []; //存放Col
      for (let key in data) {
        if (key == 'label') {
          _arr[0] = (<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@2gzyuw@${key}`} span={4} offset={6}>{data[key]}:</Col>);
        }
        if (key == 'value') {
          _arr[1] = (<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@405o80@${key}`} span={8} style={{borderBottom: '1px solid #e2e2e2'}} className='text-elli' title={data[key]}>{data[key]}</Col>);
        }
      }
      arr.push(<div style={{marginTop: 20}}><Row ecId={`${this && this.props && this.props.ecId || ''}_Row@4rm131@${i}`}>{_arr}</Row></div>);
    });

    return arr;
  }

  render() {
    return (
      <div>
          {this.getInfo()}
      </div>
    )
  }
}