From fcdfdc9670866fecd2d239d75a6ec28391175e9f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 10 四月 2025 11:13:51 +0800 Subject: [PATCH] 2025-04-10 --- src/menu/components/form/step-form/options.jsx | 69 ++++++++++++++++++++++++++++++++-- 1 files changed, 65 insertions(+), 4 deletions(-) diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx index 3d87ab2..a580960 100644 --- a/src/menu/components/form/step-form/options.jsx +++ b/src/menu/components/form/step-form/options.jsx @@ -29,6 +29,19 @@ } } + let interfaces = [] + if (menu.interfaces) { + menu.interfaces.forEach(item => { + if (item.status === 'true') { + interfaces.push({ + value: item.uuid, + label: item.name, + columns: JSON.parse(JSON.stringify(item.columns)) + }) + } + }) + } + const wrapForm = [ { type: 'text', @@ -59,11 +72,33 @@ options: [ {value: 'dynamic', label: '鍔ㄦ��'}, {value: 'static', label: '闈欐��'}, + {value: 'public', label: '鍏叡鏁版嵁婧�'} ], controlFields: [ {field: 'empty', values: ['dynamic']}, {field: 'supModule', values: ['static']}, + {field: 'publicId', values: ['public']}, ] + }, + { + type: 'select', + field: 'publicId', + label: '鏁版嵁婧�', + initval: wrap.publicId || '', + required: true, + options: interfaces, + reset_source: config.subtype !== 'tabform', + callback: (record) => { + if (!record.publicId) return + + let d = interfaces.filter(m => m.value === record.publicId)[0] + + if (!d || !d.columns) return + + return { + statusControl: d.columns + } + } }, { type: 'select', @@ -71,6 +106,7 @@ label: '鐘舵�佹帶鍒�', initval: wrap.statusControl || '', tooltip: '琛ㄥ崟鍔犺浇鏃剁殑鐘舵�侊紝褰撳瓧娈靛�间笌琛ㄥ崟缁勭殑鐘舵�佸�间竴鑷存椂锛屽惎鐢ㄥ搴旂殑琛ㄥ崟缁勩��', + timestamp: new Date().getTime(), required: false, options: config.columns, forbid: config.subtype === 'tabform' @@ -86,9 +122,23 @@ {value: 'show', label: '鏄剧ず'}, {value: 'hidden', label: '闅愯棌'}, ], - // controlFields: [ - // {field: 'labelSize', values: ['show']}, - // ] + controlFields: [ + // {field: 'labelSize', values: ['show']}, + {field: 'labelJump', values: ['show']}, + ] + }, + { + type: 'radio', + field: 'labelJump', + label: '鍚嶇О鍒囨崲', + initval: wrap.labelJump || 'false', + tooltip: '寮�鍚椂锛屽彲閫氳繃鐐瑰嚮鍒嗙粍鍚嶇О鍚戝墠璺宠浆銆�', + required: false, + forbid: config.subtype === 'tabform', + options: [ + {value: 'false', label: '鍏抽棴'}, + {value: 'true', label: '寮�鍚�'}, + ] }, // { // type: 'number', @@ -124,6 +174,18 @@ }, { type: 'radio', + field: 'formStyle', + label: '琛ㄥ崟鏍峰紡', + initval: wrap.formStyle || '', + required: false, + options: [ + {value: '', label: '榛樿'}, + {value: 'shadow', label: '闃村奖'}, + ], + forbid: appType !== 'mob' + }, + { + type: 'radio', field: 'goback', label: '绌哄�艰繑鍥�', initval: wrap.goback || 'false', @@ -142,7 +204,6 @@ initval: wrap.empty || 'show', tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', required: false, - skip: true, options: [ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, -- Gitblit v1.8.0