From 2ae980243b7ad705dea575eadcfc4cf4e24073bd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 17 五月 2022 22:57:19 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/card/cardcellcomponent/index.jsx | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index dbe882a..c3a5a91 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -12,6 +12,7 @@ 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' @@ -41,6 +42,7 @@ visible: false, // 妯℃�佹鎺у埗 actvisible: false, // 鎸夐挳缂栬緫妯℃�佹 profVisible: false, // 楠岃瘉淇℃伅缂栬緫 + record: null } /** @@ -267,10 +269,12 @@ 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) }) } } @@ -309,11 +313,12 @@ } 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) }) } @@ -627,7 +632,7 @@ 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"> @@ -672,6 +677,7 @@ 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> ]} @@ -684,6 +690,7 @@ formlist={this.state.formlist} inputSubmit={this.handleActionSubmit} setting={cards.setting} + updRecord={(record) => this.setState({record: fromJS(record).toJS()})} wrappedComponentRef={(inst) => this.actionFormRef = inst} /> </Modal> -- Gitblit v1.8.0