| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.cols) { |
| | | } else if (item.type === 'table') { |
| | | if (item.supNodes && item.supNodes.length > 0) { |
| | | item.supNodes = item.supNodes.map(cell => { |
| | | cell.nodes = cell.nodes.map(n => md5(commonId + n)) |
| | | cell.componentId = cell.nodes[cell.nodes.length - 1] |
| | | |
| | | return cell |
| | | }) |
| | | } |
| | | |
| | | let loopCol = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'action') { |
| | |
| | | }) |
| | | } |
| | | |
| | | item.cols = loopCol(item.cols) |
| | | item.cols = loopCol(item.cols || []) |
| | | |
| | | if (item.colsCtrls) { |
| | | item.colsCtrls = item.colsCtrls.map(col => { |
| | |
| | | return cell |
| | | }) |
| | | } |
| | | } else if (item.type === 'table' && item.cols) { |
| | | } else if (item.type === 'table') { |
| | | let loopCol = (cols) => { |
| | | return cols.map(col => { |
| | | if (col.type === 'action') { |
| | |
| | | }) |
| | | } |
| | | |
| | | item.cols = loopCol(item.cols) |
| | | item.cols = loopCol(item.cols || []) |
| | | |
| | | if (item.colsCtrls) { |
| | | item.colsCtrls = item.colsCtrls.map(col => { |
| | |
| | | } else if (!card.setting.supModule) { |
| | | errors.push({ level: 0, detail: '未设置上级组件!'}) |
| | | } |
| | | } else if (card.type === 'card' && card.subtype === 'datacard') { // 数据卡,可能有多上级 |
| | | } else if ((card.type === 'card' && card.subtype === 'datacard') || card.subtype === 'normaltable') { // 数据卡、table,可能有多上级 |
| | | if (card.wrap.supType !== 'multi' && !card.setting.supModule) { |
| | | errors.push({ level: 0, detail: '未设置上级组件!'}) |
| | | } |