From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 09 二月 2022 11:48:29 +0800 Subject: [PATCH] 2022-02-09 --- src/menu/components/form/formaction/formconfig.jsx | 25 ++++++++++++++++++------- 1 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index 475a856..63770ba 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -10,7 +10,7 @@ */ export function getActionForm (card, functip, tableName, usefulFields, modules) { - const isApp = sessionStorage.getItem('appType') === 'pc' + const appType = sessionStorage.getItem('appType') let _type = '鎻愪氦' if (card.type === 'prev') { _type = '涓婁竴姝�' @@ -19,25 +19,27 @@ } let menulist = [] - if (isApp) { + if (appType === 'pc' || appType === 'mob') { menulist = sessionStorage.getItem('appMenus') if (menulist) { try { menulist = JSON.parse(menulist) menulist = menulist.map(item => ({value: item.MenuID, text: item.MenuName})) - } catch { + } catch (e) { menulist = [] } } else { menulist = [] } - menulist.unshift({value: '', text: '鏃�'}) + if (appType === 'mob') { + menulist.push({value: 'goback', text: '杩斿洖'}) + } } else { menulist = sessionStorage.getItem('fstMenuList') if (menulist) { try { menulist = JSON.parse(menulist) - } catch { + } catch (e) { menulist = [] } } else { @@ -242,13 +244,22 @@ readonly: false }, { - type: isApp ? 'select' : 'cascader', + type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', key: 'linkmenu', label: '鎵撳紑鑿滃崟', tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', initVal: card.linkmenu, required: false, + allowClear: true, options: menulist + }, + { + type: 'text', + key: 'output', + label: '杩斿洖鍊�', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺��', + initVal: card.output || '', + required: false }, { type: 'radio', @@ -256,7 +267,7 @@ label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', required: false, - forbid: !isApp, + forbid: appType !== 'pc', options: [{ value: 'blank', text: '鏂扮獥鍙�' -- Gitblit v1.8.0