2022-05-19 16:15:19 +08:00
|
|
|
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 }}
|
|
|
|
|
>
|
2022-05-23 17:28:38 +08:00
|
|
|
<WeaTable rowKey={record => record.id}
|
|
|
|
|
dataSource={dataSource} childrenColumnName="children"
|
|
|
|
|
columns={columns}
|
|
|
|
|
indentSize={15}
|
|
|
|
|
loading={loading}
|
|
|
|
|
defaultExpandedRowKeys={[1, 2]}
|
|
|
|
|
/>
|
2022-05-19 16:15:19 +08:00
|
|
|
</WeaDialog>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|