提交 0d669149 authored 作者: chscls@163.com's avatar chscls@163.com

弹出控件传值

上级 50463c9a
......@@ -522,6 +522,7 @@ export default class ZdyTable extends Component {
<TableCom
showModal={this.showModal}
modalInit={this.props.modalInit||{}}
formCode={formCode} // 当前表单code
formId={formId} // 当前表单Id
i={i} // 当前组件下标
......@@ -624,6 +625,7 @@ export default class ZdyTable extends Component {
return !allhidden && ary.hidden ? ""
: <><TableCom
showModal={this.showModal}
modalInit={this.props.modalInit||{}}
formCode={formCode}
formId={formId}
i={i}
......
......@@ -147,9 +147,10 @@ export default class tableCom extends Component {
};
excludeKeys = ["defaultValues", ""]
showModal=(fk,title)=>{
showModal=(fk,title,data)=>{
const {datas,get,isEdit,obj,init,mapData,sqlData,defaultValues}=this.props
const child =<ZdyTable key={fk} datas={datas} get={get} isChild={true} currentFormKey={fk} isEdit={isEdit} obj={obj} init={init} form={this.props.form} mapData={mapData} sqlData={sqlData} {...datas[fk]} defaultValues={defaultValues} />
const child =<ZdyTable modalInit={data} key={fk} datas={datas} get={get} isChild={true} currentFormKey={fk} isEdit={isEdit} obj={obj} init={init} form={this.props.form} mapData={mapData} sqlData={sqlData} {...datas[fk]} defaultValues={defaultValues} />
this.props.showModal(child,title)
}
equal = (obj1, obj2, json, sqlContent, depth) => {
......@@ -1131,7 +1132,7 @@ export default class tableCom extends Component {
})
})
try {
var fun1 = new Function("obj","init", "defaultValues", "env", "index", "fatherCode", "utils","$","routerState", fun);
var fun1 = new Function("obj","init","modalInit", "defaultValues", "env", "index", "fatherCode", "utils","$","routerState", fun);
let obj
if(!this.props.isEdit&&this.props.fatherCode){
......@@ -1143,7 +1144,7 @@ export default class tableCom extends Component {
const value = fun1(obj, this.props.init, this.props.defaultValues, { clientType: this.props.get, formCode: this.props.formCode, formId: this.props.formId }, this.props.index, this.props.fatherCode,
const value = fun1(obj, this.props.init,this.props.modalInit, this.props.defaultValues, { clientType: this.props.get, formCode: this.props.formCode, formId: this.props.formId }, this.props.index, this.props.fatherCode,
{
moment: moment,
sql: this.sqlUtil.bind(this, base52, json, callback),
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论