import { WeaDialog, WeaProgress, WeaInputSearch, } from 'ecCom' import { Row, Col, Spin, } from 'antd' import { WeaTableNew } from 'comsMobx'; import React from 'react' import { jumpToHrmDept, jumpToHrmPost, jumpToHrmJob, } from '../../util/pulic-func' const WeaTable = WeaTableNew.WeaTable; class More extends React.Component { constructor(props) { super(props); this.state = { value: '', height: 510, } } reRenderColumns(columns, strokeColor) { columns.forEach((c, index) => { if (c.dataIndex == 'percent') { c.render = function(text, record) { let result = parseInt(record.result), max = parseInt(record.total); return
result} strokeColor={strokeColor} />
} } if (c.dataIndex == 'departmentid') { c.render = (text, record) => { return jumpToHrmDept(record.departmentid)}>{record.departmentname} } } if (c.dataIndex == 'title') { c.render = (text, record) => { // return jumpToHrmPost()}>{record.name} return {record.name} } } if (c.dataIndex == 'mark') { c.render = (text, record) => { // return jumpToHrmJob()}>{record.mark} return {record.mark} } } }) } render() { const { title, visible, onCancel, buttons, search, tableStore, strokeColor, } = this.props; const { value, height } = this.state; return ( { onCancel(); this.setState({value: ''}) } } buttons={buttons} style={{width: 870, height: 510}} onChangeHeight={(h) => this.setState({height: h})} >
search(v)} onSearchChange={(v) => this.setState({value: v}) } />
{this.reRenderColumns(c, strokeColor);return c}} />
) } } export default More