import {
WeaDialog,
WeaFormItem,
WeaNewScroll,
WeaSearchGroup,
WeaMoreButton,
} from 'ecCom'
import {
Spin,
Button,
} from 'antd'
import {
WeaSwitch
} from 'comsMobx'
import {
i18n
} from '../../public/i18n';
export default class NewPopconfirm extends React.Component {
constructor(props) {
super(props);
this.state = {
value: '0'
}
}
renderComponent(field, index,form) {
return
{}
}
getForm() {
const {
condition,
form,
isFormInit,
isMerge
} = this.props, {
value
} = this.state;
form.updateFields({
moveType: {
value: this.state.value
}
});
let arr = [];
isFormInit && condition.map(c => {
c.items.map((field, index) => {
if(!isMerge){
if (field.domkey[0] !== 'company' && field.domkey[0] !== 'department') {
arr.push(
this.renderComponent(field,index,form)
)
}
value === '0' && field.domkey[0] === 'company' && arr.push(
this.renderComponent(field,index,form)
)
value === '1' && field.domkey[0] === 'department' && arr.push(
this.renderComponent(field,index,form)
)
}else{
arr.push(
this.renderComponent(field,index,form))
}
})
})
return
{arr}
}
onChange = data => {
data.moveType && this.setState({
value:data.moveType.value
})
};
render() {
const {
title,
visible,
save,
onCancel,
loading,
height,
width,
form
} = this.props
const a = form.getFormParams();
const buttons = [
(),
()
];
return (
{this.setState({value:"0"});onCancel()}}
buttons={buttons}
style={{ width: width, height: height }}
>
{
loading ?
: this.getForm()
}
)
}
}