| | |
| | | |
| | | updatecolumn = (config) => { |
| | | config.absFields = [] |
| | | config.cols.forEach(col => { |
| | | if (col.type === 'number') { |
| | | if (col.format === 'abs') { |
| | | config.absFields.push(col.field) |
| | | } |
| | | } else if (col.type === 'colspan' && col.subcols) { |
| | | col.subcols.forEach(scol => { |
| | | if (scol.type === 'number') { |
| | | if (scol.format === 'abs') { |
| | | config.absFields.push(scol.field) |
| | | } |
| | | config.hasExtend = false |
| | | let mapCol = (cols) => { |
| | | cols.forEach(col => { |
| | | if (col.type === 'number') { |
| | | if (col.format === 'abs') { |
| | | config.absFields.push(col.field) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } else if (col.type === 'extend') { |
| | | config.hasExtend = true |
| | | } else if (col.type === 'colspan' && col.subcols) { |
| | | mapCol(col.subcols) |
| | | } |
| | | }) |
| | | } |
| | | mapCol(config.cols) |
| | | |
| | | if (config.absFields.length) { |
| | | config.absFields = Array.from(new Set(config.absFields)) |