| | |
| | | let _tbs = [] |
| | | if (config.tabgroups && config.tabgroups.length > 0) { |
| | | config.tabgroups.forEach(m => { |
| | | if (!m.sublist || m.sublist.length === 0) return |
| | | if (!m.sublist) return |
| | | |
| | | m.sublist = m.sublist.filter(c => !!c.linkTab) |
| | | |
| | | if (m.sublist.length === 0) return |
| | | |
| | | let tabs = { |
| | | uuid: Utils.getuuid(), |
| | |
| | | setting: {}, |
| | | style: {}, |
| | | subtabs: m.sublist.map(n => { |
| | | let tab = { uuid: Utils.getuuid(), label: n.label, icon: n.icon, permission: 'false', components: [ |
| | | let tab = { uuid: Utils.getuuid(), label: n.label, icon: n.icon, permission: 'true', components: [ |
| | | { |
| | | uuid: Utils.getuuid(), |
| | | linkTab: n.linkTab, |
| | |
| | | } |
| | | }) |
| | | |
| | | let supIds = [] |
| | | _config.components = _config.components.map(item => { |
| | | if (item.type === 'tabs') { |
| | | item.subtabs = item.subtabs.map(tab => { |
| | | tab.components[0] = this.getTable(menus[tab.components[0].linkTab], tab.components[0], errors, formActions, popActions, oldtabs) |
| | | supIds.push([item.uuid, tab.uuid, tab.components[0].uuid]) |
| | | |
| | | return tab |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | |
| | | _config.components = _config.components.map(item => { |
| | | if (item.type === 'tabs') { |
| | | item.subtabs = item.subtabs.map(tab => { |
| | | if (tab.components[0].setting.supModule && tab.components[0].setting.supModule.length === 1) { |
| | | supIds.forEach(ids => { |
| | | if (ids[2] === tab.components[0].setting.supModule[0]) { |
| | | tab.components[0].setting.supModule = ids |
| | | } |
| | | }) |
| | | } |
| | | return tab |
| | | }) |
| | | } |
| | |
| | | action: [], |
| | | subtype: 'basetable', |
| | | setting: { useMSearch: newCon.useMSearch }, |
| | | wrap: {}, |
| | | wrap: {name: newCon.name}, |
| | | style: {}, |
| | | headerStyle: {}, |
| | | columns: [], |
| | |
| | | let lineMarks = [] |
| | | config.columns.forEach(col => { |
| | | if (col.type === 'colspan') { |
| | | _colspan.push(...col.subfield.split(', ')) |
| | | if (col.subfield) { |
| | | _colspan.push(...col.subfield.split(', ')) |
| | | } else if (col.sublist && col.sublist.length > 0) { |
| | | _colspan.push(...col.sublist) |
| | | } |
| | | } |
| | | if (!col.field) return |
| | | |
| | |
| | | if (_colspan.includes(col.field)) { |
| | | _col.Hide = 'true' |
| | | } |
| | | |
| | | _col.uuid = Utils.getuuid() |
| | | _card.cols.push(_col) |
| | | } |
| | | |
| | |
| | | label: col.label, |
| | | marks: [], |
| | | isSub: false, |
| | | uuid: col.uuid, |
| | | uuid: Utils.getuuid(), |
| | | blacklist: [] |
| | | } |
| | | let _subs = [] |
| | | if (col.subfield) { |
| | | _subs = col.subfield.split(', ') |
| | | } else if (col.sublist) { |
| | | _subs = col.sublist |
| | | } |
| | | |
| | | if (col.unfold === 'true') { |
| | | ucol.type = 'colspan' |
| | | ucol.subcols = [] |
| | | |
| | | col.subfield.split(', ').forEach(sub => { |
| | | _subs.forEach(sub => { |
| | | if (_cols[sub]) { |
| | | let _col = fromJS(_cols[sub]).toJS() |
| | | _col.Hide = 'false' |
| | |
| | | ucol.elements = [] |
| | | ucol.style = {paddingTop: '12px', paddingLeft: '8px', paddingBottom: '12px', paddingRight: '8px'} |
| | | |
| | | col.subfield.split(', ').forEach(sub => { |
| | | _subs.forEach(sub => { |
| | | if (_cols[sub]) { |
| | | let _col = { |
| | | copyable: 'false', |