| | |
| | | const PropCard = asyncComponent(() => import('./components/card/prop-card')) |
| | | const TableCard = asyncComponent(() => import('./components/card/table-card')) |
| | | const MainSearch = asyncComponent(() => import('./components/search/main-search')) |
| | | const NormalTable = asyncComponent(() => import('./components/table/normal-table')) |
| | | |
| | | class CustomPage extends Component { |
| | | static propTpyes = { |
| | |
| | | tab.components = this.filterComponent(tab.components) |
| | | return tab |
| | | }) |
| | | |
| | | let supIds = [] |
| | | item.subtabs.forEach(tab => { |
| | | tab.components.forEach(comp => { |
| | | if (comp.type === 'tabs' && comp.parentIds) { |
| | | supIds.push(...comp.parentIds) |
| | | } else if (comp.setting.supModule && comp.setting.supModule[0] !== 'empty') { |
| | | supIds.push(...comp.setting.supModule.slice(-1)) |
| | | } |
| | | }) |
| | | }) |
| | | item.parentIds = supIds |
| | | } else if (item.type === 'pie' || item.type === 'bar' || item.type === 'line') { |
| | | if (item.plot.blacklist && item.plot.blacklist.length > 0) { |
| | | let _black = item.plot.blacklist.filter(v => { |
| | |
| | | } else if (item.type === 'tabs') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <AntvTabs config={item} BID={BID} mainSearch={mainSearch} /> |
| | | <AntvTabs config={item} mainSearch={mainSearch} /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | |
| | | <TableCard config={item} data={data} BID={BID} mainSearch={mainSearch} menuType={menuType} dataManager={dataManager} /> |
| | | </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} dataManager={dataManager} /> |
| | | </Col> |
| | | ) |
| | | } else { |
| | | return null |
| | | } |