| | |
| | | import MKEmitter from '@/utils/events.js' |
| | | import MenuUtils from '@/utils/utils-custom.js' |
| | | import ElementForm from './elementform' |
| | | import CreateFunc from '@/templates/zshare/createfunc' |
| | | import DragElement from './dragaction' |
| | | import './index.scss' |
| | | |
| | |
| | | visible: false, // 模态框控制 |
| | | actvisible: false, // 按钮编辑模态框 |
| | | profVisible: false, // 验证信息编辑 |
| | | record: null |
| | | } |
| | | |
| | | /** |
| | |
| | | if (card.eleType === 'button') { |
| | | this.handleAction(card) |
| | | } else { |
| | | let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || [] |
| | | |
| | | this.setState({ |
| | | visible: true, |
| | | card: card, |
| | | formlist: getCardCellForm(card, cards.type, cards.subtype, cardCell) |
| | | formlist: getCardCellForm(card, cards.type, cards.subtype, cardCell, anchors) |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | let modules = MenuUtils.getSubModules(window.GLOB.customMenu.components, cards.uuid) || [] |
| | | let anchors = MenuUtils.getAnchors(window.GLOB.customMenu.components, cards.uuid) || [] |
| | | |
| | | this.setState({ |
| | | actvisible: true, |
| | | card: card, |
| | | formlist: getActionForm(card, functip, cards, usefulFields, 'card', menulist, modules) |
| | | formlist: getActionForm(card, functip, cards, usefulFields, 'card', menulist, modules, anchors) |
| | | }) |
| | | } |
| | | |
| | |
| | | |
| | | render() { |
| | | const { cards, cardCell } = this.props |
| | | const { elements, visible, actvisible, profVisible, card, dict } = this.state |
| | | const { elements, visible, actvisible, profVisible, card, dict, record } = this.state |
| | | |
| | | return ( |
| | | <div className="model-menu-card-cell-list"> |
| | |
| | | maskClosable={false} |
| | | onCancel={this.editModalCancel} |
| | | footer={[ |
| | | record && record.intertype === 'inner' ? <CreateFunc key="create" dict={dict} ref="btnCreatFunc" trigger={this.creatFunc}/> : null, |
| | | <Button key="cancel" onClick={this.editModalCancel}>{dict['model.cancel']}</Button>, |
| | | <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>{dict['model.confirm']}</Button> |
| | | ]} |
| | |
| | | formlist={this.state.formlist} |
| | | inputSubmit={this.handleActionSubmit} |
| | | setting={cards.setting} |
| | | updRecord={(record) => this.setState({record: fromJS(record).toJS()})} |
| | | wrappedComponentRef={(inst) => this.actionFormRef = inst} |
| | | /> |
| | | </Modal> |