| | |
| | | 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 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')) |
| | | const BraftEditor = asyncComponent(() => import('@/tabviews/custom/components/editor/braft-editor')) |
| | |
| | | const CarouselDataCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/data-card')) |
| | | const CarouselPropCard = asyncComponent(() => import('@/tabviews/custom/components/carousel/prop-card')) |
| | | const Balcony = asyncComponent(() => import('@/tabviews/custom/components/card/balcony')) |
| | | const CustomChart = asyncComponent(() => import('@/tabviews/custom/components/chart/custom-chart')) |
| | | |
| | | class TabTransfer extends Component { |
| | | static propTpyes = { |
| | |
| | | } |
| | | |
| | | let params = [] |
| | | let delay = 20 |
| | | config.components.forEach(item => { |
| | | if (item.type === 'tabs' || item.type === 'group') return |
| | | |
| | |
| | | item.setting.sync = 'false' |
| | | item.setting.onload = 'false' |
| | | } else { |
| | | params.push(getStructDefaultParam(item, searchlist)) |
| | | params.push(getStructDefaultParam(item, searchlist, params.length === 0)) |
| | | } |
| | | } else { |
| | | item.setting.sync = 'false' |
| | | item.setting.delay = delay |
| | | delay += 20 |
| | | } |
| | | }) |
| | | |
| | |
| | | |
| | | return config.components.map(item => { |
| | | let BID = this.props.BID || '' |
| | | let BData = '' |
| | | if (item.setting && item.setting.supModule) { |
| | | BID = bids[item.setting.supModule] || '' |
| | | BData = bids[item.setting.supModule + '_data'] || '' |
| | | } |
| | | |
| | | if (item.type === 'bar' || item.type === 'line') { |
| | |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <DataCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <DataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <PropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <PropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'datacard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselDataCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselDataCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'carousel' && item.subtype === 'propcard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CarouselPropCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <CarouselPropCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <TableCard config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | <NormalTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'editable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <EditTable config={item} data={data} BID={BID} BData={BData} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'group' && item.subtype === 'normalgroup') { |
| | |
| | | <Balcony config={item} data={data} BID={BID} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'chart') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <CustomChart config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} /> |
| | | </Col> |
| | | ) |
| | | } else { |
| | | return null |
| | | } |