import {
    WeaNewScroll,
    WeaSearchGroup,
    WeaMoreButton,
    WeaDialog
} from 'ecCom'

import {
    Spin,
    Button,
    Pagination
} from 'antd'

import {
    WeaSwitch,
    WeaTableNew
} from 'comsMobx'

import {
    i18n
} from '../public/i18n';

import '../style/common.less';

const WeaTable = WeaTableNew.WeaTable;

export default class NewWeaTableDialog extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            width: 800,
        }
    }

    render() {
        const {
            title,
            visible,
            onCancel,
            height,
            tableStore
        } = 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 }}
            >
                <WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
                    comsWeaTableStore={tableStore}
                    hasOrder={true}
                    needScroll={true}
                />
            </WeaDialog>
        )
    }
}