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

弹出控件

上级 add1fa65
...@@ -11,12 +11,14 @@ import { Toast } from 'antd-mobile' ...@@ -11,12 +11,14 @@ import { Toast } from 'antd-mobile'
import router from 'umi/router' import router from 'umi/router'
import IsNewTable from './isNewTable'; import IsNewTable from './isNewTable';
import maintain from '../assets/maintain.png' import maintain from '../assets/maintain.png'
import FormModal from '../tableCompon/FormModal'
import moment from 'moment' import moment from 'moment'
export default class ZdyTable extends Component { export default class ZdyTable extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
this.state = { this.state = {
selects: new Map(), selects: new Map(),
left: 0, left: 0,
top: 0, top: 0,
...@@ -35,9 +37,12 @@ export default class ZdyTable extends Component { ...@@ -35,9 +37,12 @@ export default class ZdyTable extends Component {
isEdit: true, isEdit: true,
isReady: false, isReady: false,
formConfig: {}, formConfig: {},
modalCode:null
} }
} }
showModal=(modalCode)=>{
this.setState({modalCode})
}
componentDidMount() { componentDidMount() {
let { let {
postData, // 数据源 postData, // 数据源
...@@ -373,7 +378,8 @@ export default class ZdyTable extends Component { ...@@ -373,7 +378,8 @@ export default class ZdyTable extends Component {
isReady, isReady,
formConfig, formConfig,
formCode, formCode,
formId formId,
modalCode,
} = this.state } = this.state
let { border, let { border,
get, get,
...@@ -462,7 +468,7 @@ export default class ZdyTable extends Component { ...@@ -462,7 +468,7 @@ export default class ZdyTable extends Component {
})(<Input type="hidden" />); })(<Input type="hidden" />);
}) : ""} }) : ""}
{modalCode?<FormModal>ddddddddddddd</FormModal>:""}
<Row> <Row>
<Col span={24}> <Col span={24}>
<div <div
...@@ -510,6 +516,7 @@ export default class ZdyTable extends Component { ...@@ -510,6 +516,7 @@ export default class ZdyTable extends Component {
}} > }} >
<TableCom <TableCom
showModal={this.showModal}
formCode={formCode} // 当前表单code formCode={formCode} // 当前表单code
formId={formId} // 当前表单Id formId={formId} // 当前表单Id
i={i} // 当前组件下标 i={i} // 当前组件下标
...@@ -593,6 +600,7 @@ export default class ZdyTable extends Component { ...@@ -593,6 +600,7 @@ export default class ZdyTable extends Component {
})(<Input type="hidden" />); })(<Input type="hidden" />);
}) : ""} }) : ""}
{modalCode?<FormModal>ddddddddddddd</FormModal>:""}
{ {
items.map((item, i) => { items.map((item, i) => {
const allhidden = this.checkAllHidden(items) const allhidden = this.checkAllHidden(items)
...@@ -610,6 +618,7 @@ export default class ZdyTable extends Component { ...@@ -610,6 +618,7 @@ export default class ZdyTable extends Component {
item.map((ary, j) => { item.map((ary, j) => {
return !allhidden && ary.hidden ? "" return !allhidden && ary.hidden ? ""
: <><TableCom : <><TableCom
showModal={this.showModal}
formCode={formCode} formCode={formCode}
formId={formId} formId={formId}
i={i} i={i}
......
...@@ -1146,7 +1146,7 @@ export default class tableCom extends Component { ...@@ -1146,7 +1146,7 @@ export default class tableCom extends Component {
message: message, router: router, message: message, router: router,
setValues: this.setValues.bind(this, base52, json), setValues: this.setValues.bind(this, base52, json),
req: this.reqUtil.bind(this, base52, json, callback), req: this.reqUtil.bind(this, base52, json, callback),
md5: md5, md5: md5, showModal:this.props.showModal,
render:this.getRender,base64:getBase64, render:this.getRender,base64:getBase64,
}, },
functionObj, functionObj,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论