From 21167ece56edd628e6f6546d1d642947cc3a048f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 12 八月 2024 22:17:33 +0800 Subject: [PATCH] 2024-08-12 --- src/menu/components/form/formaction/formconfig.jsx | 79 +++++++++++++++++++++++++++++++-------- 1 files changed, 63 insertions(+), 16 deletions(-) diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx index 75d27e3..ef22b50 100644 --- a/src/menu/components/form/formaction/formconfig.jsx +++ b/src/menu/components/form/formaction/formconfig.jsx @@ -123,20 +123,30 @@ }) } + let closetab = [] + if (!appType && viewType !== 'popview') { + closetab = [{ + value: 'closetab', + text: '鍏抽棴鏍囩' + }] + } + let resets = [] fields.forEach(item => { - if (item.hidden === 'true') return if (item.type !== 'text' && item.type !== 'number') return - resets.push({ - value: item.uuid, - text: item.label - }) + if (item.label !== item.field) { + resets.push({ + value: item.field, + text: item.label + ' (' + item.field + ')' + }) + } else { + resets.push({ + value: item.field, + text: item.label + }) + } }) - - if (card.resetForm && resets.findIndex(item => item.value === card.resetForm) === -1) { - card.resetForm = '' - } return [ { @@ -244,7 +254,7 @@ initVal: card.innerFunc || '', tooltip: functip, fields: usefulFields, - tooltipClass: 'middle', + toolWidth: 350, required: true, readonly: false }, @@ -419,6 +429,7 @@ key: 'execSuccess', label: '鎴愬姛鍚�', initVal: card.execSuccess || 'grid', + tooltip: '濡傞渶鑱氱劍琛ㄥ崟璇蜂互 @focus:鑱氱劍瀛楁@ 鏍煎紡杩斿洖銆�', required: true, options: [{ value: 'never', @@ -429,7 +440,20 @@ }, { value: 'mainline', text: '鍒锋柊涓婄骇缁勪欢 - 琛�' - }, ...refresh] + }, { + value: 'maingrid', + text: '鍒锋柊涓婄骇缁勪欢' + }, ...closetab, ...refresh] + }, + { + type: 'cascader', + key: 'refreshTab', + label: '鍒锋柊鑿滃崟', + initVal: card.refreshTab || [], + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夛紝闇�瑕佸悓姝ュ埛鏂扮殑鑿滃崟', + required: false, + forbid: appType === 'pc' || appType === 'mob' || viewType === 'popview', + options: menulist }, { type: (appType === 'pc' || appType === 'mob') ? 'select' : 'cascader', @@ -467,9 +491,18 @@ key: 'syncComponent', label: '鍚屾鍒锋柊', initVal: card.syncComponent, - tooltip: '鎵ц鎴愬姛鍚庨渶瑕佸埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', + tooltip: '鎵ц鎴愬姛鍚庯紙鎴栨墽琛屽け璐ヤ笖瀛樺湪鍒锋柊椤规椂锛夐渶瑕佸埛鏂扮殑缁勪欢銆傛敞锛氶�夋嫨褰撳墠缁勪欢鐨勪笂绾х粍浠舵棤鏁堬紝鍒锋柊涓婄骇缁勪欢璇烽�夋嫨鎴愬姛鍚庘�滃埛鏂颁笂绾х粍浠� - 琛屸�濄��', required: false, options: modules + }, + { + type: 'number', + key: 'syncDelay', + label: '鍒锋柊寤惰繜', + initVal: card.syncDelay, + tooltip: '鍚屾鍒锋柊缁勪欢鐨勫欢杩熸椂闂达紝鍗曚綅姣銆�', + // placeholder: '鍗曚綅姣', + required: false }, { type: 'cascader', @@ -492,14 +525,28 @@ }, { type: 'select', - key: 'resetForm', + key: 'resetForms', label: '閲嶇疆琛ㄥ崟', tooltip: '鎸夐挳鎵ц鎴愬姛鍚庨渶瑕侀噸缃殑琛ㄥ崟锛岃〃鍗曚細鎭㈠榛樿鍊煎苟鑱氱劍銆�', - initVal: card.resetForm || '', + initVal: card.resetForms || [], required: false, - allowClear: true, + mode: 'multiple', options: resets }, + // { + // type: 'radio', + // key: 'returnValue', + // label: '鏇存柊琛ㄥ崟', + // initVal: card.returnValue || 'false', + // tooltip: '涓庨噸缃〃鍗曢厤鍚堜娇鐢紝寮�鍚椂锛屽繀椤诲湪鑷畾涔夎剼鏈腑杩斿洖鏁版嵁锛岀敤浜庢浛鎹㈠瓧娈甸泦鍜屽~鍏呰〃鍗曘��', + // options: [{ + // value: 'false', + // text: '绂佺敤' + // }, { + // value: 'true', + // text: '鍚敤' + // }] + // }, { type: 'radio', key: 'reload', @@ -514,6 +561,6 @@ value: 'true', text: '鍒锋柊' }] - }, + } ] } -- Gitblit v1.8.0