import React from 'react'; import { connect } from 'dva'; import { Modal, Form } from 'antd'; import CombinationPage from '../Combination/CombinationPage'; class CombinationModal extends React.Component { constructor(props) { super(props); this.state = { visible: false, loading: false } }; showModal = () => { // 显示弹窗 this.setState({ visible: true },()=>{ const {data}=this.props; this.props.dispatch({ type: 'editPage/save', payload: { [data?data.reloadKey:'']: true }, }); }); const click = this.props.click; if (typeof click === 'function') { click(true); } }; handleCancel = () => { // 退出弹窗 this.props.form.resetFields(); this.setState({ visible: false }); if(typeof this.destroyCacheDataFunc==='function'){ this.destroyCacheDataFunc(); } const click = this.props.click; if (typeof click === 'function') { click(false); } }; onRegDestroyCacheDataFunc=(destroyCacheDataFunc)=>{ this.destroyCacheDataFunc=destroyCacheDataFunc; }; handleLoadParam=()=>{ //this.searchFormRef.handleSearch(); let rule = [ { field: this.props.customParams, operator: 1, value: this.props.id } ]; return { data:{ rules:[...rule], } }; }; render() { const tmpData={ id:this.props.id, onSave:this.props.onSave, formCode:this.props.formCode, parentId: this.props.parentId, data:this.props.data, copySrcId:this.props.copySrcId, onCancel:this.handleCancel, isAddH: this.props.isAddH, onRegDestroyCacheDataFunc:this.onRegDestroyCacheDataFunc, }; let rule = [ { field: this.props.customParams, operator: 1, value: this.props.id, isCustom:true, } ]; let params= { rules:[...rule], } ; //const isEdit=tmpData.data?!tmpData.data.isBatchEdit:true; return (