From 8881f69f5d7127a4090184b3ea7c9cbf9574100e Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 18 三月 2024 18:01:51 +0800 Subject: [PATCH] 2024-03-18 --- src/menu/components/share/actioncomponent/formconfig.jsx | 87 +++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 82 insertions(+), 5 deletions(-) diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 8c39bc9..ca241a6 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -8,7 +8,7 @@ * @param {*} setting 缁勪欢閰嶇疆 * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� */ -export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side) { +export function getActionForm (card, functip, config, usefulFields, modules = [], anchors = [], side, position) { let appType = sessionStorage.getItem('appType') let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview let setting = config.setting || {} @@ -311,6 +311,11 @@ }] } else if (card.formType === 'scan') { card.formType = 'switch' + } + + let width = card.width || (card.width === 0 ? 0 : 12) + if (/x/.test(card.width)) { + width = +width.replace(/x/, '.5') } let forms = [ @@ -809,10 +814,10 @@ key: 'width', min: 0, max: 24, - precision: 0, + precision: 1, label: '瀹藉害', - initVal: card.width || (card.width === 0 ? 0 : 12), - tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼�備负 0 鏃跺搴﹁嚜閫傚簲銆�', + initVal: width, + tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼�備负 0 鏃跺搴﹁嚜閫傚簲銆傚彲璁剧疆鍗婂垪鍗�.5銆�', forbid: type !== 'card', required: true }, @@ -1047,6 +1052,20 @@ tooltip: '榧犳爣鎮诞鍦ㄦ寜閽笂鏂规椂鐨勬彁绀轰俊鎭��', forbid: appType === 'mob', required: false + }, + { + type: 'select', + key: 'showName', + label: '鏄剧ず鍐呭', + initVal: card.showName || '', + tooltip: '琛岀骇鎸夐挳鍙�氳繃琛屼俊鎭帶鍒舵寜閽樉绀哄唴瀹广��', + required: false, + allowClear: true, + forbid: position !== 'line', + options: columns.map(item => ({ + value: item.field, + text: `${item.label}锛�${item.field}锛塦 + })) }, { type: 'radio', @@ -1457,6 +1476,28 @@ options: modules } ] + }, + { + type: 'radio', + key: 'preHandle', + label: '鑷畾涔夎剼鏈�', + initVal: card.preHandle || 'false', + // tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '绂佺敤' + }, { + value: 'true', + text: '鍚敤' + }] + }, + { + type: 'codemirror', + key: 'pre_func', + label: '鑷畾涔夎剼鏈�', + initVal: card.pre_func || '', + required: true, } ] @@ -1470,7 +1511,7 @@ * @param {*} setting 缁勪欢閰嶇疆 * @param {*} usefulFields 瀛樺偍杩囩▼鍙敤鐨勫紑濮嬪瓧娈� */ -export function getBaseTableActionForm (card, functip, config, usefulFields, modules) { +export function getBaseTableActionForm (card, functip, config, usefulFields, modules, position) { let viewType = sessionStorage.getItem('editMenuType') // 寮圭獥 popview let setting = config.setting || {} let columns = config.columns || [] @@ -2185,6 +2226,20 @@ required: false }, { + type: 'select', + key: 'showName', + label: '鏄剧ず鍐呭', + initVal: card.showName || '', + tooltip: '琛岀骇鎸夐挳鍙�氳繃琛屼俊鎭帶鍒舵寜閽樉绀哄唴瀹广��', + required: false, + allowClear: true, + forbid: position !== 'line', + options: columns.map(item => ({ + value: item.field, + text: `${item.label}锛�${item.field}锛塦 + })) + }, + { type: 'radio', key: 'openTab', label: '鎵撳紑鏂瑰紡', @@ -2420,6 +2475,28 @@ options: modules } ] + }, + { + type: 'radio', + key: 'preHandle', + label: '鑷畾涔夎剼鏈�', + initVal: card.preHandle || 'false', + // tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '绂佺敤' + }, { + value: 'true', + text: '鍚敤' + }] + }, + { + type: 'codemirror', + key: 'pre_func', + label: '鑷畾涔夎剼鏈�', + initVal: card.pre_func || '', + required: true, } ] -- Gitblit v1.8.0