提交 49140003 authored 作者: wtj's avatar wtj

处理元数据表单查看详情问题

上级 daec27e8
...@@ -104,14 +104,23 @@ const CreateForm = Form.create()(props => { ...@@ -104,14 +104,23 @@ const CreateForm = Form.create()(props => {
handleAdd(params, isAdd); handleAdd(params, isAdd);
}); });
}; };
console.log("isView",isView)
//需要获取动态表单 //需要获取动态表单
return ( return (
<Modal <Modal
width="700px" width="700px"
maskClosable={false} maskClosable={false}
destroyOnClose destroyOnClose
title={isAdd ? '新增' : '编辑'} title={isView?"查看详情":(isAdd ? '新增' : '编辑')}
visible={modalVisible} visible={modalVisible}
footer={isView?null:[
<Button key="back" onClick={() => handleModalVisible()}>
取消
</Button>,
<Button key="submit" type="primary" onClick={okHandle}>
确定
</Button>
]}
onOk={okHandle} onOk={okHandle}
onCancel={() => handleModalVisible()} onCancel={() => handleModalVisible()}
> >
...@@ -872,6 +881,7 @@ class FormList extends React.Component { ...@@ -872,6 +881,7 @@ class FormList extends React.Component {
} = this.props; } = this.props;
const { const {
showMobileDiv, showMobileDiv,
isView
} = this.state } = this.state
...@@ -890,7 +900,7 @@ class FormList extends React.Component { ...@@ -890,7 +900,7 @@ class FormList extends React.Component {
formItem: this.state.formItem, formItem: this.state.formItem,
isAdd: this.state.isAdd, isAdd: this.state.isAdd,
getItem: this.getItem, getItem: this.getItem,
isView:isView,
}; };
...@@ -908,8 +918,6 @@ class FormList extends React.Component { ...@@ -908,8 +918,6 @@ class FormList extends React.Component {
} }
if(this.columns.length>0&&this.columns[this.columns.length-1].title=="操作"){ if(this.columns.length>0&&this.columns[this.columns.length-1].title=="操作"){
this.columns[this.columns.length-1]=column; this.columns[this.columns.length-1]=column;
}else{
this.columns.push(column);
} }
}else{ }else{
const column = { const column = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论