import { inject, observer } from 'mobx-react'; import { WeaDialog, WeaMoreButton, WeaLocaleProvider, } from 'ecCom' import { Button, } from 'antd' import { WeaTableNew } from 'comsMobx'; import { jumpToHrmCard } from '../util/pure-util' const WeaTable = WeaTableNew.WeaTable; const getLabel = WeaLocaleProvider.getLabel; import ImportLog from './ImportLog' import ImportResult from './ImportResult' @observer export default class ImportHistory extends React.Component { constructor(props) { super(props); this.state = { width: 870, height: 510, } } reRenderColumns(c) { const { hrmImportCommon } = this.props, { jumpToImportResult } = hrmImportCommon; c.forEach(item => { if (item.dataIndex == 'operator') { item.render = function(text, record) { return jumpToHrmCard(record.operator)}>{record.operatorspan} } } if (item.dataIndex == 'allnum') { item.render = function(text, record) { return jumpToImportResult(record.randomFieldId)}>{record.allnumspan} } } }); } getButtons() { const { hrmImportCommon } = this.props, { recordDialog, queryLog, } = hrmImportCommon, { loading } = recordDialog; return [ (), () ]; } render() { const { hrmImportCommon } = this.props, { recordDialog, logDialog, resultDialog, setRecordDialogVisible } = hrmImportCommon, { title, visible, tableStore } = recordDialog, { width, height } = this.state; return (
setRecordDialogVisible(false)} buttons={this.getButtons()} style={{width: width, height: height}} onChangeHeight={(h) => this.setState({height: h})} > index} getColumns={c => this.reRenderColumns(c)} /> {logDialog.visible && }
) } }