From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 六月 2022 22:33:59 +0800 Subject: [PATCH] 2022-06-18 --- src/menu/components/form/formaction/formconfig.jsx | 104 ++++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 76 insertions(+), 28 deletions(-) diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index 9b358d1..e406576 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -9,7 +9,7 @@ * @param {*} type 鎸夐挳绫诲瀷锛岀敤浜庡尯鍒嗗彲閫夌殑鎵撳紑鏂瑰紡 */ -export function getActionForm (card, functip, tableName, usefulFields, modules) { +export function getActionForm (card, functip, tableName, usefulFields, modules, anchors) { const appType = sessionStorage.getItem('appType') let _type = '鎻愪氦' if (card.type === 'prev') { @@ -25,19 +25,19 @@ 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: '鏃�'}) + menulist.push({value: 'goback', text: '杩斿洖锛堜笂涓�椤碉級'}) } else { menulist = sessionStorage.getItem('fstMenuList') if (menulist) { try { menulist = JSON.parse(menulist) - } catch { + } catch (e) { menulist = [] } } else { @@ -242,13 +242,54 @@ readonly: false }, { + type: 'radio', + key: 'Ot', + label: '琛岃缃�', + initVal: card.Ot, + required: true, + options: [{ + value: 'notRequired', + text: '涓嶉�夋嫨琛�' + }, { + value: 'requiredSgl', + text: '閫夋嫨鍗曡' + }] + }, + { + type: 'select', + key: 'execSuccess', + label: '鎴愬姛鍚�', + initVal: card.execSuccess || 'grid', + required: true, + options: [{ + value: 'never', + text: '涓嶅埛鏂�' + }, { + value: 'grid', + text: '鍒锋柊褰撳墠缁勪欢' + }, { + value: 'mainline', + text: '鍒锋柊涓婄骇缁勪欢 - 琛�' + }] + }, + { type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', key: 'linkmenu', - label: '鎵撳紑鑿滃崟', + label: '涓嬩竴姝ユ搷浣�', tooltip: '鎵ц鎴愬姛鍚庨渶瑕佹墦寮�鐨勮彍鍗曘��', initVal: card.linkmenu, + help: appType === 'pc' || appType === 'mob' ? '鍙繑鍥炰笂涓�椤点��' : null, required: false, + allowClear: true, options: menulist + }, + { + type: 'text', + key: 'output', + label: '杩斿洖鍊�', + tooltip: '鎵ц鎴愬姛鍚庣殑杩斿洖鍊笺�傜郴缁熷嚱鏁板彲鎸囧畾杩斿洖鐨勫彉閲忥紙浠绗﹀紑澶达紝濡侤id锛夛紱鑷畾涔夊嚱鏁板彲鎸囧畾杩斿洖瀛楁锛堝id锛夈��', + initVal: card.output || '', + required: false }, { type: 'radio', @@ -256,37 +297,44 @@ label: '鎵撳紑鏂瑰紡', initVal: card.open || 'blank', required: false, - forbid: appType !== 'pc', - options: [{ - value: 'blank', - text: '鏂扮獥鍙�' - }, { - value: 'self', - text: '褰撳墠绐楀彛' - }] + forbid: appType !== 'pc' && appType !== 'mob', + options: [ + {value: 'blank', text: appType !== 'mob' ? '鏂扮獥鍙�' : '鏂伴〉闈�'}, + {value: 'self', text: appType !== 'mob' ? '褰撳墠绐楀彛' : '褰撳墠椤甸潰'}, + ] }, { type: 'cascader', key: 'syncComponent', label: '鍚屾鍒锋柊', initVal: card.syncComponent, - tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆�', + tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堛��', required: false, options: modules }, - // { - // type: 'radio', - // key: 'enable', - // label: '鏄惁鏄剧ず', - // initVal: card.enable || 'true', - // required: false, - // options: [{ - // value: 'true', - // text: '鏄剧ず' - // }, { - // value: 'false', - // text: '闅愯棌' - // }] - // } + { + type: 'cascader', + key: 'anchors', + label: '璺宠浆閿氱偣', + initVal: card.anchors || [], + tooltip: '鎵ц鎴愬姛鍚庯紝闇�瑕佽烦杞殑閿氱偣銆�' + (appType === 'mob' ? '娉細灏忕▼搴忎腑鏃犳晥' : ''), + required: false, + options: anchors + }, + { + type: 'radio', + key: 'reload', + label: '涓婁竴椤�', + initVal: card.reload || 'false', + tooltip: '鎴愬姛鍚庢槸鍚﹀埛鏂颁笂椤电殑鏁版嵁銆傛敞锛氬湪鏄庣浜慉PP鎴栧皬绋嬪簭涓湁鏁堛��', + forbid: appType !== 'mob', + options: [{ + value: 'false', + text: '涓嶅埛鏂�' + }, { + value: 'true', + text: '鍒锋柊' + }] + }, ] } -- Gitblit v1.8.0