| | |
| | | * @param {*} type 按钮类型,用于区分可选的打开方式 |
| | | */ |
| | | |
| | | export function getActionForm (card, functip, tableName, usefulFields, modules, anchors) { |
| | | export function getActionForm (card, functip, tableName, usefulFields, modules, anchors, uuid) { |
| | | const appType = sessionStorage.getItem('appType') |
| | | let viewType = sessionStorage.getItem('editMenuType') // 弹窗 popview |
| | | let _type = '提交' |
| | |
| | | menulist = [] |
| | | } |
| | | } |
| | | |
| | | let linkButtons = [] |
| | | let filterComponent = (components) => { |
| | | components.forEach(item => { |
| | | if (item.type === 'tabs') { |
| | | item.subtabs.forEach(tab => { |
| | | filterComponent(tab.components) |
| | | }) |
| | | } else if (item.type === 'group') { |
| | | filterComponent(item.components) |
| | | } else { |
| | | item.action && item.action.forEach(cell => { |
| | | if (cell.hidden === 'true' || cell.uuid === uuid) return |
| | | if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return |
| | | |
| | | linkButtons.push({ |
| | | value: cell.uuid, |
| | | label: cell.label + '(' + item.name + ')' |
| | | }) |
| | | }) |
| | | |
| | | if (item.type === 'card' && item.subcards) { |
| | | item.subcards.forEach(m => { |
| | | if ((item.subtype === 'datacard' || item.subtype === 'dualdatacard') && m.$cardType !== 'extendCard') return |
| | | m.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.uuid === uuid) return |
| | | if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return |
| | | |
| | | linkButtons.push({ |
| | | value: cell.uuid, |
| | | label: cell.label + '(' + item.name + ')' |
| | | }) |
| | | }) |
| | | }) |
| | | } else if (item.type === 'balcony') { |
| | | item.elements.forEach(cell => { |
| | | if (cell.eleType !== 'button' || cell.hidden === 'true' || cell.uuid === uuid) return |
| | | if (!['exec', 'prompt', 'pop'].includes(cell.OpenType)) return |
| | | |
| | | linkButtons.push({ |
| | | value: cell.uuid, |
| | | label: cell.label + '(' + item.name + ')' |
| | | }) |
| | | }) |
| | | } else if (item.type === 'form') { |
| | | item.subcards.forEach(group => { |
| | | if(group.uuid === uuid) return |
| | | |
| | | if (item.subcards.length > 1) { |
| | | linkButtons.push({ |
| | | value: group.uuid, |
| | | label: group.subButton.label + '(' + item.name + '-' + group.setting.title + ')' |
| | | }) |
| | | } else { |
| | | linkButtons.push({ |
| | | value: group.uuid, |
| | | label: group.subButton.label + '(' + item.name + ')' |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | filterComponent(window.GLOB.customMenu.components) |
| | | |
| | | let refresh = [] |
| | | if (viewType === 'popview') { // 弹窗标签 |
| | |
| | | options: anchors |
| | | }, |
| | | { |
| | | type: 'select', |
| | | key: 'preButton', |
| | | label: '前置按钮', |
| | | tooltip: '当前按钮执行前,需要执行的按钮。', |
| | | initVal: card.preButton || '', |
| | | required: false, |
| | | allowClear: true, |
| | | options: linkButtons |
| | | }, |
| | | { |
| | | type: 'radio', |
| | | key: 'reload', |
| | | label: '上一页', |