From 7bd04b1c21a59e8d79325f247bdb1726507b51fb Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 13 八月 2024 18:51:20 +0800 Subject: [PATCH] 2024-08-13 --- src/menu/components/form/step-form/options.jsx | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 53 insertions(+), 3 deletions(-) diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx index dae0a31..aca8cd7 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', -- Gitblit v1.8.0