import React from 'react'; import { inject, observer } from 'mobx-react'; import {WeaRightMenu,WeaTop,WeaTab,WeaErrorPage,WeaTools,WeaNewScroll,WeaLocaleProvider} from "ecCom" import { Button } from 'antd'; import PrjImport from './PrjImport' import TaskImport from './TaskImport' const getLabel = WeaLocaleProvider.getLabel; @inject('prjImportStore') @observer class ProjectImport extends React.Component { constructor(props) { super(props); } componentWillReceiveProps(nextProps){ if(this.props.location.key !== nextProps.location.key){ const { location,prjImportStore } = nextProps; prjImportStore.clearStatus(); } } componentWillUnmount(){ const {prjImportStore } = this.props; prjImportStore.clearStatus(); } render(){ const title = getLabel(81757,"项目导入"); const topTab = [ {key: 'prjimport',title: getLabel(81757,"项目导入")}, {key: 'taskimport', title: getLabel(383858,"任务导入")}, ]; const {prjImportStore} = this.props; const {loading,selectTabkey,reflesh} = prjImportStore; return (
} iconBgcolor='#217346' buttons={this.getTopButtons()} buttonSpace={10} showDropIcon={true} dropMenuDatas={this.getRightMenu()} onDropMenuClick={this.onRightMenuClick} >
) } getTopButtons(){ const {doImport,disabled} = this.props.prjImportStore; let btnArr = []; btnArr.push() return btnArr; } getRightMenu(){ const {doImport,disabled} = this.props.prjImportStore; let btnArr = []; btnArr.push({ key: '1', icon: , disabled: disabled, content: getLabel(615,"提交"), onClick:(key)=>{doImport()} }); return btnArr; } changeTab=(key)=>{ const {prjImportStore} = this.props; prjImportStore.changeTab(key); } } export default WeaTools.tryCatch(React, props => , {error: ""} )(ProjectImport);