/**
 * Created by liekkas on 16/2/19.
 */
import React, { PropTypes } from 'react'
import { ECharts, Panel } from '../../components'
import style from './style.scss'

class Home extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      foo: 'bar',
    }
  }

  render() {
    const { foo } = this.props
    return (
      <div className={style.root}>
        <Panel title="全国故障投诉情况" height="300">
          <ECharts config={{type: 'map',mode: 'local',}}/>
        </Panel>

        <div className={style.hgroup}>
          <Panel title="工单投诉" height="300">
            <ECharts config={{type: 'bar',mode: 'local',}}/>
          </Panel>
          <Panel title="故障申报" height="300" style={{ marginRight: 0 }}>
            <ECharts config={{type: 'bar',mode: 'local',}}/>
          </Panel>
        </div>

        <div className={style.hgroup}>
          <Panel title="工单投诉" height="300">
            <ECharts config={{type: 'pie',mode: 'local',}}/>
          </Panel>
          <Panel title="故障申报" height="300" style={{ marginRight: 0 }}>
            <ECharts config={{type: 'line',mode: 'local',}}/>
          </Panel>
        </div>
      </div>
    )
  }
}

Home.propTypes = {
  foo: PropTypes.string.isRequired,
}
Home.defaultProps = {
  foo: 'Home',
}

export default Home

@@ -266,25 +266,82 @@
     
-foo: 'bar',%0A    %7D
+mapType: 'china',%0A    %7D%0A  %7D%0A%0A  onMapClick(e) %7B%0A    console.log('%3E%3E%3E %E6%88%91%E9%9D%A0',e)
 %0A  %7D
@@ -520,16 +520,17 @@
 : 'map',
+ 
 mode: 'l
@@ -527,32 +527,100 @@
 , mode: 'local',
+ eventType: 'click', eventHandler: this.onMapClick, mapType: 'china'
 %7D%7D/%3E%0A        %3C/P

use mapType