import { inject, observer } from 'mobx-react'; import { WeaTab, WeaDialog, WeaFormItem, WeaMoreButton, } from 'ecCom' import { Row, Col, Spin, Button, } from 'antd' import { WeaSwitch, WeaTableNew } from 'comsMobx' import { jumpToHrmCard } from '../../public/pulic-func' import { i18n } from '../../public/i18nbk'; const WeaTable = WeaTableNew.WeaTable; @inject('hrmImportCommon') @observer export default class ImportLog extends React.Component { constructor(props) { super(props); this.state = { width: 870, height: 510, isPanelShow: false, num: 5, } } getPanelComponents = () => { const { hrmImportCommon } = this.props, { logDialog } = hrmImportCommon, { form, condition, loading } = logDialog, { isFormInit } = form; let arr = []; isFormInit && condition.map(c => { c.items.map((field, index) => { arr.push(
{}
) }) }) return { if( e.keyCode == 13 && e.target.tagName === "INPUT") { hrmImportCommon.searchLogInfo(); hrmImportCommon.setLogPanelStatus(false) } } } >{arr} } reRenderColumns = (c) => { c.forEach((item, i) => { if (item.dataIndex == 'operator') { item.render = function(text, record) { return jumpToHrmCard(record.operator)}>{record.operatorspan} } } if (item.dataIndex == 'status') { item.render = function(text, record) { return {record.status == '1' ? {i18n.label.success()} : {i18n.label.fail()}} } } }); } getDialogButtons = () => { const buttons = [ () ]; return buttons } getSearchPanelButtons = () => { const { hrmImportCommon } = this.props, { searchLogInfo, setLogPanelStatus, logDialog, } = hrmImportCommon, { form } = logDialog; return [ (), (), (), ]; } getRowKey = (record,index) => index render() { const { hrmImportCommon } = this.props, { logDialog, setLogDialogVisible, setLogPanelStatus, } = hrmImportCommon, { title, visible, isPanelShow, tableStore, } = logDialog, { width, height, num } = this.state; return ( setLogDialogVisible(false)} buttons={this.getDialogButtons()} style={{width: width, height: height}} onChangeHeight={h => this.setState({height: h})} > setLogPanelStatus(bool) } hideSearchAd={ () => setLogPanelStatus(false) } searchsAd= {this.getPanelComponents()} advanceHeight={ Math.ceil(num / 2) * 42 + 10} hasMask={false} buttonsAd={this.getSearchPanelButtons()} /> ) } }