From 02b9e988b456c4e7d7f077c613fcc1092d93803f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 29 九月 2021 19:02:43 +0800 Subject: [PATCH] 2021-09-29 --- src/menu/components/share/actioncomponent/formconfig.jsx | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 04804f3..109194f 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -13,6 +13,7 @@ */ export function getActionForm (card, functip, config, usefulFields, type, menulist = [], modules = []) { let appType = sessionStorage.getItem('appType') + let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview let setting = config.setting || {} let columns = config.columns || [] let appMenus = [] @@ -118,7 +119,7 @@ } let refresh = [] - if (sessionStorage.getItem('editMenuType') === 'popview') { // 寮圭獥鏍囩 + if (viewType === 'popview') { // 寮圭獥鏍囩 opentypes = opentypes.filter(item => item.value !== 'popview' && item.value !== 'funcbutton') refresh.push({ value: 'popclose', @@ -565,7 +566,7 @@ initVal: card.refreshTab || [], tooltip: '鎵ц鎴愬姛鍚庢垨鏍囩鍏抽棴鏃讹紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟', required: false, - forbid: isApp, + forbid: isApp || viewType === 'popview', options: menulist }, { @@ -587,15 +588,24 @@ required: false }, { - type: 'select', + type: 'cascader', + key: 'linkmenu', + label: Formdict['model.form.linkmenu'], + initVal: card.linkmenu || [], + required: true, + forbid: isApp, + options: menulist + }, + { + type: !appType ? 'cascader' : 'select', key: 'openmenu', label: '鎵撳紑鑿滃崟', tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', - initVal: card.openmenu || '', - forbid: appType !== 'pc' && appType !== 'mob', + initVal: card.openmenu || (!appType ? [] : ''), required: false, allowClear: true, - options: appType !== 'mob' ? appMenus : [...appMenus, {value: 'goback', text: '杩斿洖'}] + options: appType === 'mob' ? [...appMenus, {value: 'goback', text: '杩斿洖'}] : (appType === 'pc' ? appMenus : menulist), + forbid: viewType === 'popview' }, { type: 'text', @@ -603,8 +613,8 @@ label: '杩斿洖鍊�', tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', initVal: card.output || '', - forbid: appType !== 'pc' && appType !== 'mob', - required: false + required: false, + forbid: viewType === 'popview' }, { type: 'radio', -- Gitblit v1.8.0