content: import React from 'react';
  import { browserHistory } from 'react-router';
  import Loading from '/imports/ui/loading';
  import Table from './expert_table';
  
  
  class _Component extends React.Component {
    constructor(props) {
      super(props);
      this.state = {type: this.props.type};
      this.handleTab.bind(this);
    }
    handleTab(type) {
      this.setState({type: type});
    }
    render() {
      const data = this.props.data;
      const aClass = this.state.type === 'a' ? 'active item' : 'item';
      const bClass = this.state.type === 'b' ? 'active item' : 'item';
      const cClass = this.state.type === 'c' ? 'active item' : 'item';
      const a1Class = this.state.type === 'a' ? 'ui bottom attached active tab segment' : 'ui bottom attached tab segment';
      const b1Class = this.state.type === 'b' ? 'ui bottom attached active tab segment' : 'ui bottom attached tab segment';
      const c1Class = this.state.type === 'c' ? 'ui bottom attached active tab segment' : 'ui bottom attached tab segment';
      return (
        <div>
          <h1>专家列表</h1>
            {this.props.ready ?
              <div>
                <div className="ui top attached tabular menu">
                  <a onClick={() => this.handleTab('a')} className={aClass}>学术委员</a>
                  <a onClick={() => this.handleTab('b')} className={bClass}>编辑委员</a>
                  <a onClick={() => this.handleTab('c')} className={cClass}>审稿专家</a>
                </div>
                <div className={a1Class}> <Table data={this.props.dataA} type="a"/> </div>
                <div className={b1Class}> <Table data={this.props.dataB} type="b"/> </div>
                <div className={c1Class}> <Table data={this.props.dataC} type="c"/> </div>
              </div>
              :
              <Loading/>
            }
        </div>
      );
    }
  }
  
  export default _Component;
  