From 07c005cf28acf74e3afde82122e4c53e1000d70c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 12 六月 2023 12:06:18 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/components/share/tabtransfer/index.jsx | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/tabviews/custom/components/share/tabtransfer/index.jsx b/src/tabviews/custom/components/share/tabtransfer/index.jsx index aebf282..79c6827 100644 --- a/src/tabviews/custom/components/share/tabtransfer/index.jsx +++ b/src/tabviews/custom/components/share/tabtransfer/index.jsx @@ -22,6 +22,7 @@ const AntvScatter = asyncComponent(() => import('@/tabviews/custom/components/chart/antv-scatter')) const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card')) const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table')) +const DoubleDataCard = asyncComponent(() => import('@/tabviews/custom/components/card/double-data-card')) const EditTable = asyncComponent(() => import('@/tabviews/custom/components/table/edit-table')) const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card')) const NormalGroup = asyncComponent(() => import('@/tabviews/custom/components/group/normal-group')) @@ -173,13 +174,10 @@ }) } - getComponents = () => { - const { config } = this.props + getComponents = (components) => { const { mainSearch, data } = this.state - if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) - - return config.components.map(item => { + return components.map(item => { let style = null if (item.style && item.style.clear === 'left') { @@ -202,6 +200,12 @@ return ( <Col span={item.width} style={style} key={item.uuid}> <NormalTable config={item} data={data} mainSearch={mainSearch}/> + </Col> + ) + } else if (item.type === 'card' && item.subtype === 'dualdatacard') { + return ( + <Col span={item.width} style={style} key={item.uuid}> + <DoubleDataCard config={item} mainSearch={mainSearch}/> </Col> ) } else if (item.type === 'bar' || item.type === 'line') { @@ -348,8 +352,12 @@ } render() { + const { config } = this.props + + if (!config || !config.components || config.components.length === 0) return (<Empty description={false} />) + return ( - <Row className="component-wrap" gutter={8}>{this.getComponents()}</Row> + <Row className="component-wrap" id={'anchor' + config.uuid} gutter={8}>{this.getComponents(config.components)}</Row> ) } } -- Gitblit v1.8.0