| | |
| | | }) |
| | | }) |
| | | } else if (item.type === 'table') { |
| | | item.cols && item.cols.forEach(col => { |
| | | if (col.type !== 'action') return |
| | | col.elements && col.elements.forEach(cell => { |
| | | cell.$expanded = false |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print') { |
| | | let loopCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'colspan') { |
| | | loopCol(col.subcols) |
| | | } else if (col.type === 'custom') { |
| | | col.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button') return |
| | | cell.$expanded = false |
| | | if (cell.OpenType === 'funcbutton' && cell.funcType === 'print') { |
| | | |
| | | cell.$port = cell.verify ? cell.verify.linkUrl : '' |
| | | if (cell.verify && cell.verify.printerTypeList && cell.verify.printerTypeList.length > 0) { |
| | | cell.verify.printerTypeList = cell.verify.printerTypeList.map(_cell => { |
| | | _cell.uuid = _cell.uuid || _cell.key |
| | | _cell.parentId = cell.uuid |
| | | _cell.$port = cell.$port |
| | | cell.$port = cell.verify ? cell.verify.linkUrl : '' |
| | | if (cell.verify && cell.verify.printerTypeList && cell.verify.printerTypeList.length > 0) { |
| | | cell.verify.printerTypeList = cell.verify.printerTypeList.map(_cell => { |
| | | _cell.uuid = _cell.uuid || _cell.key |
| | | _cell.parentId = cell.uuid |
| | | _cell.$port = cell.$port |
| | | |
| | | return _cell |
| | | }) |
| | | cell.$expanded = true |
| | | } |
| | | printbtns.push(cell) |
| | | return _cell |
| | | }) |
| | | cell.$expanded = true |
| | | } |
| | | printbtns.push(cell) |
| | | } |
| | | |
| | | _comp.action.push({...cell, $line: true, ...(userConfig[cell.uuid] || {})}) |
| | | }) |
| | | } |
| | | |
| | | _comp.action.push({...cell, $line: true, ...(userConfig[cell.uuid] || {})}) |
| | | }) |
| | | }) |
| | | } |
| | | loopCol(item.cols) |
| | | } |
| | | |
| | | if (_comp.action.length > 0) { |