import React, { Component } from "react";
import { connect } from "dva";

import NotSubmitted from './NotSubmitted';
import Submitted from './Submitted';
import { gup } from '../../../utils/utils';
import '../declaration.less';
import { Tabs, Modal } from "antd";
import declare from '../../../utils/hoc/declare';
const { TabPane } = Tabs;
@connect(state => ({
  profile: state.profile
}))
@declare
export default class GradeCertificate extends Component {
  constructor(props, context) {
    super(props, context);
    this.state={
      noOpenAccountPerCount: 0,
      openAccountPerCount: 0,
      modalVisible: false,

      tab: '2'
      // tab: '1'
    };
  }

  componentWillMount(){
    const tab = gup('tab');
    if(tab) {
      this.setState({
        tab
      });
    }
  }
  componentDidMount() {
  }
  
  render() {
    if(this.props.showModal) {
      return '';
    }
    return (
      <div  style={{paddingTop:'10px'}}>
       <Tabs
          tabBarStyle={{ marginLeft: 24, marginRight: 24 }}
          defaultActiveKey={this.state.tab}
        >
          {/* <TabPane tab={`待报名`} key="1">
            <NotSubmitted></NotSubmitted>
          </TabPane> */}
          <TabPane forceRender
            tab={`申报列表`}
            key="2"
          >
            <Submitted></Submitted>
          </TabPane>
        </Tabs>
      </div>
    );
  }
}
