From 076c2b693da1d42cf3a468c0f3d631c1ed424285 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 08 十一月 2023 18:22:56 +0800 Subject: [PATCH] 2023-11-08 --- src/menu/components/share/actioncomponent/formconfig.jsx | 78 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 1 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 20df933..7456bc4 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -82,7 +82,73 @@ return _list } - let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) + let tabs = getTabs(window.GLOB.customMenu.components) + + 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 === card.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 === card.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 === card.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 === card.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 pageTemps = [ { value: 'billprint', text: '鍗曟嵁鎵撳嵃' }, @@ -878,6 +944,16 @@ forbid: viewType === 'popview' }, { + type: 'select', + key: 'preButton', + label: '鍓嶇疆鎸夐挳', + tooltip: '褰撳墠鎸夐挳鎵ц鍓嶏紝闇�瑕佹墽琛岀殑鎸夐挳銆�', + initVal: card.preButton || '', + required: false, + allowClear: true, + options: linkButtons + }, + { type: 'text', key: 'output', label: '杩斿洖鍊�', -- Gitblit v1.8.0