77 lines
2.0 KiB
JavaScript
77 lines
2.0 KiB
JavaScript
|
|
import {
|
||
|
|
WeaDialog,
|
||
|
|
WeaFormItem,
|
||
|
|
WeaNewScroll,
|
||
|
|
WeaSearchGroup,
|
||
|
|
WeaMoreButton,
|
||
|
|
WeaTable
|
||
|
|
} from 'ecCom'
|
||
|
|
|
||
|
|
import {
|
||
|
|
Spin,
|
||
|
|
Button,
|
||
|
|
} from 'antd'
|
||
|
|
|
||
|
|
import {
|
||
|
|
WeaSwitch
|
||
|
|
} from 'comsMobx'
|
||
|
|
|
||
|
|
import {
|
||
|
|
i18n
|
||
|
|
} from '../public/i18n';
|
||
|
|
|
||
|
|
export default class NewTableDialog extends React.Component {
|
||
|
|
constructor(props) {
|
||
|
|
super(props);
|
||
|
|
this.state = {
|
||
|
|
width: 800,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
render() {
|
||
|
|
const {
|
||
|
|
title,
|
||
|
|
visible,
|
||
|
|
onCancel,
|
||
|
|
loading,
|
||
|
|
height,
|
||
|
|
dataSource,
|
||
|
|
columns
|
||
|
|
} = this.props, {
|
||
|
|
width,
|
||
|
|
} = this.state;
|
||
|
|
|
||
|
|
const buttons = [
|
||
|
|
//(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => save()} disabled={loading}>{i18n.button.save()}</Button>),
|
||
|
|
(<WeaMoreButton ecId={`${this && this.props && this.props.ecId || ''}_WeaMoreButton@e4f4n1`} />)
|
||
|
|
];
|
||
|
|
|
||
|
|
return (
|
||
|
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
|
||
|
|
title={title}
|
||
|
|
icon="icon-coms-hrm"
|
||
|
|
iconBgcolor="#217346"
|
||
|
|
visible={visible}
|
||
|
|
closable={true}
|
||
|
|
hasScroll={true}
|
||
|
|
onCancel={() => onCancel()}
|
||
|
|
buttons={buttons}
|
||
|
|
style={{ width: width, height: height }}
|
||
|
|
>
|
||
|
|
{
|
||
|
|
loading ? <div className='hrm-loading-center-small'>
|
||
|
|
<Spin spinning={loading}></Spin>
|
||
|
|
</div>
|
||
|
|
: <WeaTable rowKey={record => record.id}
|
||
|
|
dataSource={dataSource} childrenColumnName="children"
|
||
|
|
columns={columns}
|
||
|
|
indentSize={15}
|
||
|
|
defaultExpandedRowKeys={[1, 2]}
|
||
|
|
/>
|
||
|
|
}
|
||
|
|
</WeaDialog>
|
||
|
|
)
|
||
|
|
}
|
||
|
|
}
|