| | |
| | | label: '无动作' |
| | | } |
| | | ] |
| | | columns.forEach(col => { |
| | | if (col.editable === 'true' && col.uuid !== card.uuid) { |
| | | editCols.push({ |
| | | field: col.uuid, |
| | | label: col.label |
| | | }) |
| | | } else if (col.type === 'colspan') { |
| | | col.subcols.forEach(subcol => { |
| | | if (subcol.editable === 'true' && subcol.uuid !== card.uuid) { |
| | | editCols.push({ |
| | | field: subcol.uuid, |
| | | label: col.label + '-' + subcol.label |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | let cols = [] |
| | | let getcols = (columns, suplabel = '') => { |
| | | columns.forEach(col => { |
| | | if (col.editable === 'true' && col.uuid !== card.uuid) { |
| | | cols.push({ |
| | | field: col.uuid, |
| | | label: suplabel + col.label |
| | | }) |
| | | } else if (col.type === 'colspan') { |
| | | getcols(col.subcols, col.label + '-') |
| | | } |
| | | }) |
| | | } |
| | | |
| | | getcols(columns) |
| | | |
| | | editCols.push(...cols) |
| | | |
| | | cols.forEach(col => { |
| | | editCols.push({ |
| | | field: '$next_' + col.field, |
| | | label: col.label + '(下一行)' |
| | | }) |
| | | }) |
| | | |
| | | return [ |