From 10d5d95a52341a176d81d75186feafb4c0a58fa8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 02 六月 2023 11:50:50 +0800 Subject: [PATCH] Merge branch 'develop' --- src/components/normalform/modalform/index.jsx | 4 +++- src/menu/components/card/prop-card/index.jsx | 2 +- src/menu/components/card/double-data-card/index.jsx | 2 +- src/menu/components/chart/antv-X6/index.jsx | 35 +++++------------------------------ src/menu/components/card/data-card/index.jsx | 2 +- 5 files changed, 11 insertions(+), 34 deletions(-) diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx index 28dc5c9..7ce6bc5 100644 --- a/src/components/normalform/modalform/index.jsx +++ b/src/components/normalform/modalform/index.jsx @@ -178,7 +178,9 @@ recordChange = (values, item) => { this.record = {...this.record, ...values} - if (item && item.controlFields) { + if (!item) return + + if (item.controlFields) { let map = new Map() this.state.formlist.forEach(cell => { if (!cell.field) return diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index ae1bcf9..3b75676 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -562,7 +562,7 @@ <ToolOutlined /> </Popover> <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> - <div className={'float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}> + <div className={`float-${card.wrap.cardFloat || 'left'} select-${card.wrap.selStyle || ''}`}> {card.subcards.map((subcard, index) => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} </div> <div style={{clear: 'both'}}></div> diff --git a/src/menu/components/card/double-data-card/index.jsx b/src/menu/components/card/double-data-card/index.jsx index 1a47d2b..1374635 100644 --- a/src/menu/components/card/double-data-card/index.jsx +++ b/src/menu/components/card/double-data-card/index.jsx @@ -548,7 +548,7 @@ <ToolOutlined /> </Popover> <ActionComponent config={card} setSubConfig={this.setSubConfig} updateaction={this.updateComponent}/> - <div className={'select-' + card.wrap.selStyle + extraName}> + <div className={`select-${card.wrap.selStyle || ''} ${extraName}`}> {card.subcards.map(subcard => { if (subcard.$cardType === 'extendCard') { return (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>) diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx index 586b01b..12c8c19 100644 --- a/src/menu/components/card/prop-card/index.jsx +++ b/src/menu/components/card/prop-card/index.jsx @@ -423,7 +423,7 @@ } trigger="hover"> <ToolOutlined /> </Popover> - <div className={(card.wrap.layout || 'grid') + '-layout float-' + (card.wrap.cardFloat || 'left') + ' select-' + card.wrap.selStyle}> + <div className={`${card.wrap.layout || 'grid'}-layout float-${card.wrap.cardFloat || 'left'} select-${card.wrap.selStyle || ''}`}> {card.subcards.map(subcard => (<CardComponent key={subcard.uuid} cards={card} card={subcard} move={this.move} updateElement={this.updateCard} deleteElement={this.deleteCard}/>))} </div> {card.wrap.display === 'hidden' ? <HeatMapOutlined className="prop-hidden"/> : null} diff --git a/src/menu/components/chart/antv-X6/index.jsx b/src/menu/components/chart/antv-X6/index.jsx index 885210e..815cdf0 100644 --- a/src/menu/components/chart/antv-X6/index.jsx +++ b/src/menu/components/chart/antv-X6/index.jsx @@ -110,8 +110,6 @@ kapmaprender = () => { const { card } = this.state - preWork() - // #region 鍒濆鍖栫敾甯� const graph = new Graph({ container: document.getElementById(card.uuid + 'container'), @@ -197,10 +195,10 @@ target: graph, stencilGraphWidth: 200, stencilGraphHeight: 180, - collapsable: true, + // collapsable: true, groups: [ { - title: '鍩虹娴佺▼鍥�', + title: '閫氱敤鑺傜偣', name: 'group1', }, { @@ -218,7 +216,7 @@ rowHeight: 55, }, }) - document.getElementById('stencil').appendChild(stencil.container) + document.getElementById(card.uuid + 'stencil').appendChild(stencil.container) // #endregion // #region 蹇嵎閿笌浜嬩欢 @@ -599,34 +597,9 @@ }), ) stencil.load(imageNodes, 'group2') - // #endregion - - function preWork() { - // 杩欓噷鍗忓姪婕旂ず鐨勪唬鐮侊紝鍦ㄥ疄闄呴」鐩腑鏍规嵁瀹為檯鎯呭喌杩涜璋冩暣 - const container = document.getElementById(card.uuid + 'canvas') - const stencilContainer = document.createElement('div') - stencilContainer.id = 'stencil' - stencilContainer.classList.add('mk-stencil') - const graphContainer = document.createElement('div') - graphContainer.id = card.uuid + 'container' - graphContainer.classList.add('mk-container') - container.appendChild(stencilContainer) - container.appendChild(graphContainer) - } } updateComponent = (card) => { - if (this.state.card && (!is(fromJS(card.plot), fromJS(this.state.card.plot)) || !is(fromJS(card.style), fromJS(this.state.card.style)))) { - let _element = document.getElementById(card.uuid + 'canvas') - if (_element) { - _element.innerHTML = '' - } - this.$timer && clearTimeout(this.$timer) - this.$timer = setTimeout(() => { - this.viewrender() - }, 150) - } - card.width = card.plot.width card.name = card.plot.name card.subtype = card.plot.subtype @@ -687,6 +660,8 @@ </Popover> <NormalHeader config={card} updateComponent={this.updateComponent}/> <div className="canvas" style={{width: '100%', minHeight: card.plot.height, height: card.plot.height}} id={card.uuid + 'canvas'}> + <div id={card.uuid + 'stencil'} className="mk-stencil"></div> + <div id={card.uuid + 'container'} className="mk-container"></div> </div> <div className="component-name"> <div className="center"> -- Gitblit v1.8.0