| | |
| | | if ((btn.OpenType === 'excelIn' || btn.OpenType === 'excelOut') && (!btn.verify || !btn.verify.columns) && (config.subtype === 'basetable' || config.subtype === 'normaltable')) { |
| | | let columns = [] |
| | | let maps = [] |
| | | let labels = {} |
| | | if (config.subtype === 'normaltable') { |
| | | config.columns.forEach(col => { |
| | | labels[col.field] = col.label |
| | | }) |
| | | } |
| | | |
| | | if (btn.OpenType === 'excelOut') { |
| | | let pushcol = (item) => { |
| | |
| | | } |
| | | |
| | | config.cols.forEach(item => { |
| | | if (item.type === 'colspan' && config.subtype === 'normaltable') { |
| | | item.subcols.forEach(cell => { |
| | | if (!cell.field || cell.Hide === 'true' || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | if (item.Hide === 'true') return |
| | | |
| | | pushcol(cell) |
| | | }) |
| | | if (config.subtype === 'normaltable') { |
| | | if (item.type === 'colspan') { |
| | | item.subcols.forEach(cell => { |
| | | if (!cell.field || cell.Hide === 'true' || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | |
| | | pushcol(cell) |
| | | }) |
| | | } else if (item.type === 'custom') { |
| | | item.elements.forEach(cell => { |
| | | if (!cell.field || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | |
| | | pushcol({...cell, label: labels[cell.field]}) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (!item.field || item.Hide === 'true' || maps.includes(item.field)) return |
| | | if (!item.field || maps.includes(item.field)) return |
| | | maps.push(item.field) |
| | | |
| | | pushcol(item) |
| | |
| | | } |
| | | |
| | | config.cols.forEach(item => { |
| | | if (item.type === 'colspan' && config.subtype === 'normaltable') { |
| | | item.subcols.forEach(cell => { |
| | | if (!cell.field || cell.Hide === 'true' || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | if (item.Hide === 'true') return |
| | | |
| | | pushcol(cell) |
| | | }) |
| | | if (config.subtype === 'normaltable') { |
| | | if (item.type === 'colspan') { |
| | | item.subcols.forEach(cell => { |
| | | if (!cell.field || cell.Hide === 'true' || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | |
| | | pushcol(cell) |
| | | }) |
| | | } else if (item.type === 'custom') { |
| | | item.elements.forEach(cell => { |
| | | if (!cell.field || maps.includes(cell.field)) return |
| | | maps.push(cell.field) |
| | | |
| | | pushcol({...cell, label: labels[cell.field]}) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | if (!item.field || item.Hide === 'true' || maps.includes(item.field)) return |
| | | if (!item.field || maps.includes(item.field)) return |
| | | maps.push(item.field) |
| | | |
| | | pushcol(item) |