From 704f82b06befe96e5f739b2dce419f76f5683a6f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 15 八月 2022 09:27:54 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/share/actioncomponent/formconfig.jsx | 53 +++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 37 insertions(+), 16 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 6ffb4b4..25baad2 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -52,15 +52,28 @@ ] let getTabs = (list) => { - return list.filter(item => { - if (item.type !== 'tabs') return false + let _list = [] + list.forEach(item => { + if (item.type !== 'tabs') return - item.children = item.children.map(cell => { - cell.children = getTabs(cell.children) - return cell + _list.push({ + value: item.uuid, + label: item.name, + children: item.subtabs.map(cell => { + let children = getTabs(cell.components) + + if (children.length === 0) { + children = null + } + return { + value: cell.uuid, + label: cell.label, + children: children + } + }) }) - return item }) + return _list } // if (type === 'editable') { @@ -74,8 +87,7 @@ // } // ] // } - - let tabs = getTabs(JSON.parse(JSON.stringify(modules))) + let tabs = getTabs(JSON.parse(JSON.stringify(window.GLOB.customMenu.components))) let pageTemps = [ { value: 'billprint', text: '鍗曟嵁鎵撳嵃' }, @@ -189,6 +201,13 @@ options: opentypes }, { + type: 'text', + key: 'label', + label: '鎸夐挳鍚嶇О', + initVal: card.label, + required: true, + }, + { type: 'select', key: 'funcType', label: '鍔熻兘绫诲瀷', @@ -246,13 +265,6 @@ options: [] }, { - type: 'text', - key: 'label', - label: '鎸夐挳鍚嶇О', - initVal: card.label, - required: true, - }, - { type: 'checkbox', key: 'payType', label: '鏀粯鏂瑰紡', @@ -278,6 +290,9 @@ }, { value: 'inner', text: '鍐呴儴鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -424,6 +439,12 @@ }, { value: 'default', text: '鍚庡彴鑴氭湰' + }, { + value: 'func', + text: '鍥炶皟鍑芥暟' + }, { + value: 'none', + text: '鏃�' }] }, { @@ -438,7 +459,7 @@ key: 'callbackFunc', label: Formdict['header.form.callbackFunc'], initVal: card.callbackFunc || '', - required: false, + required: true }, { type: 'select', -- Gitblit v1.8.0