| | |
| | | window.GLOB.CacheData.set(tempId, {$BID: BID}) |
| | | |
| | | config.components = config.components.map(component => { |
| | | if (component.action) component.action = [] |
| | | if (component.action) { |
| | | component.action = component.action.filter(cell => { |
| | | cell = this.resetButton(component, cell) |
| | | cell.$toolbtn = true |
| | | |
| | | return !cell.hidden |
| | | }) |
| | | } |
| | | if (component.search) { |
| | | component.search = [] |
| | | component.$searches = [] |
| | |
| | | } |
| | | } else if (item.type === 'custom') { |
| | | item.elements = item.elements.filter(cell => { |
| | | if (cell.eleType === 'button') return false |
| | | if (cell.eleType === 'button') { |
| | | cell = this.resetButton(component, cell) |
| | | |
| | | return !cell.hidden |
| | | } |
| | | |
| | | cell = this.resetElement(cell) |
| | | return cell |
| | | |
| | | return true |
| | | }) |
| | | if (item.elements.length === 0) { |
| | | return false |
| | |
| | | } |
| | | |
| | | card.elements = card.elements.filter(cell => { |
| | | if (cell.eleType === 'button') return false |
| | | |
| | | if (cell.eleType === 'button') { |
| | | cell = this.resetButton(component, cell) |
| | | |
| | | return !cell.hidden |
| | | } |
| | | |
| | | cell = this.resetElement(cell) |
| | | |
| | | |
| | | return true |
| | | }) |
| | | |
| | | if (!card.backElements || card.backElements.length === 0) return |
| | | |
| | | card.backElements = card.backElements.filter(cell => { |
| | | if (cell.eleType === 'button') return false |
| | | |
| | | if (cell.eleType === 'button') { |
| | | cell = this.resetButton(component, cell) |
| | | |
| | | return !cell.hidden |
| | | } |
| | | |
| | | cell = this.resetElement(cell) |
| | | |
| | | return true |
| | |
| | | }) |
| | | } else if (component.type === 'balcony') { |
| | | component.elements = component.elements.filter(cell => { |
| | | if (cell.eleType === 'button') return false |
| | | |
| | | if (cell.eleType === 'button') { |
| | | cell = this.resetButton(component, cell) |
| | | |
| | | return !cell.hidden |
| | | } |
| | | |
| | | cell = this.resetElement(cell) |
| | | |
| | | return true |
| | |
| | | }) |
| | | } |
| | | |
| | | resetButton = (item, cell) => { |
| | | cell.logLabel = item.$menuname + '-' + cell.label |
| | | cell.Ot = cell.Ot || 'requiredSgl' |
| | | cell.syncComponentId = '' |
| | | cell.$menuId = item.uuid |
| | | |
| | | cell.hidden = cell.hidden === 'true' |
| | | if (!['pop', 'prompt', 'exec', 'innerpage', 'form'].includes(cell.OpenType)) { |
| | | cell.hidden = true |
| | | } |
| | | |
| | | if (cell.controlField) { |
| | | if (/,/ig.test(cell.controlVal)) { |
| | | cell.controlVals = cell.controlVal.split(',') |
| | | } else { |
| | | cell.controlVals = [(cell.controlVal || '')] |
| | | } |
| | | } |
| | | |
| | | return cell |
| | | } |
| | | |
| | | resetElement = (cell) => { |
| | | cell.style = cell.style || {} |
| | | if (['text', 'number', 'formula'].includes(cell.eleType)) { |