| | |
| | | } |
| | | } |
| | | |
| | | if (item.subtype === 'tablecard') { // 兼容 |
| | | item.type = 'card' |
| | | } |
| | | |
| | | // 搜索条件初始化 |
| | | if (item.search && item.search.length > 0) { |
| | | item.search = Utils.initSearchVal(item.search) |
| | | } |
| | | |
| | | if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { |
| | | if (item.type === 'table') { |
| | | let statFields = [] |
| | | let getCols = (cols) => { |
| | | return cols.filter(col => { |
| | |
| | | }) |
| | | } |
| | | |
| | | if (item.type === 'card') { |
| | | if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { |
| | | item.subcards && item.subcards.forEach(card => { |
| | | if (card.style.boxShadow) { |
| | | delete card.style.hShadow |
| | |
| | | |
| | | return cell.eleType !== 'button' || skip || permAction[cell.uuid] |
| | | }) |
| | | |
| | | if (!card.backElements || card.backElements.length === 0) return |
| | | |
| | | card.backElements = card.backElements.filter(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.hidden === 'true') return false |
| | |
| | | |
| | | return cell.eleType !== 'button' || skip || permAction[cell.uuid] |
| | | }) |
| | | } else if ((item.type === 'table' && item.subtype === 'tablecard') || item.type === 'carousel' || item.type === 'timeline') { |
| | | item.subcards && item.subcards.forEach(card => { |
| | | card.elements = card.elements.filter(cell => { |
| | | if (cell.eleType === 'button') { |
| | | if (cell.hidden === 'true') return false |
| | | |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | cell.Ot = cell.Ot || 'requiredSgl' |
| | | cell.ContainerId = this.state.ContainerId |
| | | cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : '' |
| | | cell.$menuId = item.uuid |
| | | cell.$MenuID = this.props.MenuID |
| | | cell.$tabId = tabId |
| | | cell.$view = 'CustomPage' |
| | | |
| | | if (cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | } |
| | | |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print' && cell.verify) { // 打印机设置 |
| | | cell = this.getPrinter(cell, item.uuid) |
| | | } |
| | | if (card.btnstyle) { // 兼容 |
| | | card.style = card.style || {} |
| | | card.style = {...card.style, ...card.btnstyle} |
| | | } |
| | | } else if (['text', 'number', 'formula'].includes(cell.eleType)) { |
| | | if (!cell.height) { |
| | | cell.innerHeight = 'auto' |
| | | } |
| | | if (cell.eleType === 'number' && typeof(cell.decimal) === 'number') { |
| | | cell.round = Math.pow(10, cell.decimal) |
| | | if (cell.format === 'percent') { |
| | | cell.decimal = cell.decimal > 2 ? cell.decimal - 2 : 0 |
| | | } |
| | | } |
| | | } |
| | | return cell.eleType !== 'button' || skip || permAction[cell.uuid] |
| | | }) |
| | | }) |
| | | } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { |
| | | } else if (item.type === 'table') { |
| | | item.cols = item.cols.filter(col => { |
| | | if (col.type !== 'action') return true |
| | | col.elements = col.elements.filter(cell => { |
| | |
| | | <CarouselPropCard config={item} data={data} mainSearch={mainSearch}/> |
| | | </Col> |
| | | ) |
| | | } else if (item.type === 'table' && item.subtype === 'tablecard') { |
| | | } else if (item.type === 'card' && item.subtype === 'tablecard') { |
| | | return ( |
| | | <Col span={item.width} key={item.uuid}> |
| | | <TableCard config={item} data={data} mainSearch={mainSearch}/> |