From 2e3bf38aced62c8ecf4af58ca2685f09d3d47dde Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 17 二月 2023 00:09:04 +0800 Subject: [PATCH] 2023-02-17 --- src/menu/components/card/cardcellcomponent/index.jsx | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/index.jsx b/src/menu/components/card/cardcellcomponent/index.jsx index 454f5a9..9459118 100644 --- a/src/menu/components/card/cardcellcomponent/index.jsx +++ b/src/menu/components/card/cardcellcomponent/index.jsx @@ -122,11 +122,12 @@ this.setState({elements: this.state.elements.filter(item => item.uuid !== eleId)}) } - cardAddElement = (id, element) => { - const { cardCell } = this.props + cardAddElement = (id, element, type) => { + const { cardCell, side } = this.props if (id !== cardCell.uuid) return if (window.GLOB.$lock) return + if (type && side !== type) return window.GLOB.$lock = true setTimeout(() => { @@ -535,9 +536,13 @@ } handleSubConfig = (item) => { - const { cards } = this.props + const { cards, side } = this.props const { appType } = this.state let btn = fromJS(item).toJS() + + if (side === 'sub') { + btn.$sub = true + } if ((sessionStorage.getItem('style-control') && sessionStorage.getItem('style-control') === 'true')) return @@ -693,7 +698,7 @@ } getVerify = (card) => { - const { cards } = this.props + const { cards, side } = this.props if (!card) return null @@ -701,13 +706,13 @@ return <VerifyCard card={card} config={cards} - columns={cards.columns} + columns={side === 'sub' ? cards.subColumns : cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelIn') { return <VerifyExcelIn card={card} - columns={cards.columns} + columns={side === 'sub' ? cards.subColumns : cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } else if (card.OpenType === 'excelOut') { @@ -719,14 +724,14 @@ } else if (card.OpenType === 'funcbutton' && card.funcType === 'print') { return <VerifyPrint card={card} - columns={cards.columns} + columns={side === 'sub' ? cards.subColumns : cards.columns} wrappedComponentRef={(inst) => this.verifyRef = inst} /> } } render() { - const { cards, cardCell } = this.props + const { cards, cardCell, side } = this.props const { elements, visible, actvisible, profVisible, card, record } = this.state return ( @@ -734,7 +739,7 @@ <DragElement list={elements} parent={cardCell} - fields={cards.columns} + fields={side === 'sub' ? cards.subColumns : cards.columns} updateMarks={this.updateMarks} handleList={this.handleList} handleMenu={this.handleElement} @@ -757,6 +762,7 @@ > <ElementForm card={card} + side={side} formlist={this.state.formlist} inputSubmit={this.handleSubmit} config={cards} @@ -771,7 +777,7 @@ maskClosable={false} onCancel={this.editModalCancel} footer={[ - record && record.intertype === 'inner' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, + record && record.intertype === 'inner' && cards.subtype === 'dualdatacard' ? <CreateFunc key="create" ref="btnCreatFunc" trigger={this.creatFunc}/> : null, <Button key="cancel" onClick={this.editModalCancel}>鍙栨秷</Button>, <Button key="confirm" type="primary" onClick={this.handleActionSubmit}>纭畾</Button> ]} -- Gitblit v1.8.0