| | |
| | | |
| | | // 数据缓存设置 |
| | | if (config.cacheUseful === 'true') { |
| | | if (!['day', 'hour'].includes(config.timeUnit)) { |
| | | if (!['day', 'hour', 'minute'].includes(config.timeUnit)) { |
| | | config.timeUnit = 'day' |
| | | } |
| | | config.cacheTime = config.cacheTime || 1 |
| | |
| | | item.search = Utils.initSearchVal(item.search) |
| | | } |
| | | |
| | | let mutil = false |
| | | if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件 |
| | | mutil = true |
| | | item.setting.supModule = item.supNodes[0].componentId |
| | | } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') { |
| | | let pid = item.setting.supModule.pop() |
| | |
| | | |
| | | cell = this.resetButton(item, cell, Tab) |
| | | cell.$toolbtn = true |
| | | |
| | | if (!mutil && cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | |
| | | return true |
| | | }) |
| | |
| | | if (cell.hidden === 'true' || cell.OpenType === 'popview') return false |
| | | |
| | | cell = this.resetButton(item, cell, Tab) |
| | | |
| | | if (cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | } else { |
| | | cell = this.resetElement(cell) |
| | | } |
| | |
| | | if (item.subtype === 'editable') { |
| | | item.submit.logLabel = item.$menuname + '-提交' |
| | | item.submit.$menuId = item.uuid |
| | | item.submit.syncComponentId = item.submit.syncComponent ? (item.submit.syncComponent.pop() || '') : '' |
| | | |
| | | if (item.submit.syncComponentId && item.submit.syncComponentId === item.setting.supModule) { |
| | | item.submit.syncComponentId = '' |
| | | if (item.submit.execSuccess === 'grid') { |
| | | item.submit.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | } |
| | | } else if (item.type === 'card' || item.type === 'carousel' || item.type === 'timeline') { |
| | | item.subcards && item.subcards.forEach(card => { |
| | |
| | | if (cell.hidden === 'true' || cell.OpenType === 'popview') return false |
| | | |
| | | cell = this.resetButton(item, cell, Tab) |
| | | |
| | | if (!mutil && cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | } else { |
| | | cell = this.resetElement(cell) |
| | | } |
| | | |
| | | return true |
| | | }) |
| | | |
| | | if (card.setting.click === 'menus') { |
| | | if (card.menus) { |
| | | card.menus = card.menus.filter(m => !!m.MenuID) |
| | | if (card.menus.length === 0) { |
| | | card.menus = null |
| | | } |
| | | } |
| | | if (!card.menus || item.subtype !== 'datacard' || card.$cardType === 'extendCard') { |
| | | card.setting.click = '' |
| | | } |
| | | } else if (card.setting.click === 'menu') { |
| | | if (!Array.isArray(card.setting.menu)) { |
| | | card.setting.click = '' |
| | | } |
| | | } |
| | | |
| | | if (item.subtype === 'dualdatacard' && card.$cardType !== 'extendCard') { |
| | | if (card.backSetting && card.backSetting.click === 'menu') { |
| | | if (!Array.isArray(card.backSetting.menu)) { |
| | | card.backSetting.click = '' |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!card.backElements || card.backElements.length === 0) return |
| | | |
| | |
| | | if (cell.hidden === 'true' || cell.OpenType === 'popview') return false |
| | | |
| | | cell = this.resetButton(item, cell, Tab) |
| | | |
| | | if (!mutil && cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | } else { |
| | | cell = this.resetElement(cell) |
| | | } |
| | |
| | | if (cell.hidden === 'true' || cell.OpenType === 'popview') return false |
| | | |
| | | cell = this.resetButton(item, cell, Tab) |
| | | |
| | | if (cell.syncComponentId === item.wrap.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } |
| | | } else { |
| | | cell = this.resetElement(cell) |
| | | } |
| | |
| | | group.subButton.Ot = item.wrap.datatype === 'static' ? 'notRequired' : 'requiredSgl' |
| | | } |
| | | |
| | | group.subButton.syncComponentId = group.subButton.syncComponent ? group.subButton.syncComponent.pop() : '' |
| | | group.subButton.syncComponentId = group.subButton.syncComponent ? (group.subButton.syncComponent.pop() || '') : '' |
| | | |
| | | if (group.subButton.syncComponentId === item.setting.supModule) { |
| | | if (group.subButton.syncComponentId && group.subButton.syncComponentId === item.setting.supModule) { |
| | | group.subButton.syncComponentId = '' |
| | | if (group.subButton.execSuccess === 'grid') { |
| | | group.subButton.execSuccess = 'mainline' |
| | |
| | | } |
| | | } |
| | | |
| | | if (cell.syncComponentId) { |
| | | if (cell.syncComponentId === item.setting.supModule) { |
| | | cell.syncComponentId = '' |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | } else if (cell.syncComponentId === 'multiComponent') { |
| | | let ids = cell.syncComponents.map(m => { |
| | | return m.syncComId.pop() || '' |
| | | }) |
| | | |
| | | if (item.setting.supModule && ids.includes(item.setting.supModule)) { |
| | | if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') { |
| | | cell.execSuccess = 'mainline' |
| | | } |
| | | ids = ids.filter(id => id !== item.setting.supModule) |
| | | } |
| | | |
| | | if (ids.length === 0) { |
| | | cell.syncComponentId = '' |
| | | } else { |
| | | cell.syncComponentIds = ids |
| | | } |
| | | } |
| | | } |
| | | |
| | | return cell |
| | | } |
| | | |