| | |
| | | const AntvPie = asyncComponent(() => import('@/tabviews/custom/components/chart/antv-pie')) |
| | | const DataCard = asyncComponent(() => import('@/tabviews/custom/components/card/data-card')) |
| | | const PropCard = asyncComponent(() => import('@/tabviews/custom/components/card/prop-card')) |
| | | const TableCard = asyncComponent(() => import('@/tabviews/custom/components/card/table-card')) |
| | | const NormalTable = asyncComponent(() => import('@/tabviews/custom/components/table/normal-table')) |
| | | |
| | | class BillPrint extends Component { |
| | | state = { |
| | |
| | | let params = [] |
| | | let _pars = [] |
| | | |
| | | config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type) && item.subtype !== 'tablecard') |
| | | config.components = config.components.filter(item => !['tabs', 'search'].includes(item.type)) |
| | | config.components = config.components.map(component => { |
| | | if (component.action) component.action = [] |
| | | if (component.search) component.search = [] |
| | |
| | | |
| | | comps.forEach((_item, index) => { |
| | | let item = fromJS(_item).toJS() |
| | | |
| | | if (index + 1 >= length && !_pageover) { |
| | | pagesover = true |
| | | } |
| | | |
| | | if (item.wrap && item.wrap.printType === 'headerOrfooter') { // 页眉页脚 |
| | | page.push(item) |
| | | } else if (_pageover) { |
| | | return |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | if (!_item.dataArray || _item.dataArray.length === 0) return |
| | | |
| | | } else if (item.subtype === 'datacard' || item.type === 'table') { |
| | | if (_item.dataArray && _item.dataArray.length > 0) { |
| | | item.data = [] |
| | | |
| | | while (count < limit && _item.dataArray.length > 0) { |
| | |
| | | _pageover = true |
| | | } |
| | | page.push(item) |
| | | } |
| | | } else { |
| | | page.push(item) |
| | | } |
| | | |
| | | if (index + 1 === length && !_pageover) { |
| | | if (index + 1 >= length && !_pageover) { |
| | | pagesover = true |
| | | } |
| | | }) |
| | |
| | | page.push(item) |
| | | } else if (_pageover) { |
| | | return |
| | | } else if (item.type === 'card' && item.subtype === 'datacard') { |
| | | if (!_item.dataArray || _item.dataArray.length === 0) return |
| | | |
| | | } else if (item.subtype === 'datacard' || item.type === 'table') { |
| | | if (_item.dataArray && _item.dataArray.length > 0) { |
| | | item.data = [] |
| | | |
| | | while (count < limit && _item.dataArray.length > 0) { |
| | |
| | | _pageover = true |
| | | } |
| | | page.push(item) |
| | | } |
| | | } else { |
| | | page.push(item) |
| | | } |
| | |
| | | pages.push(page) |
| | | pageIndex++ |
| | | |
| | | if (pageIndex >= 2000 || pagesover) { |
| | | if (pageIndex >= 200 || pagesover) { |
| | | over = true |
| | | } |
| | | } |
| | |
| | | <PropCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'normaltable') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <NormalTable config={item} initdata={item.data} mainSearch={[]} menuType="" /> |
| | | </Col> |
| | | ) |
| | | } else { |
| | | return null |
| | | } |