From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 12 十二月 2023 21:05:37 +0800 Subject: [PATCH] 2023-12-12 --- src/menu/components/form/step-form/options.jsx | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/src/menu/components/form/step-form/options.jsx b/src/menu/components/form/step-form/options.jsx index 3d87ab2..1ec6a9e 100644 --- a/src/menu/components/form/step-form/options.jsx +++ b/src/menu/components/form/step-form/options.jsx @@ -29,6 +29,18 @@ } } + let interfaces = [] + if (menu.interfaces) { + menu.interfaces.forEach(item => { + if (item.status === 'true') { + interfaces.push({ + value: item.uuid, + label: item.name + }) + } + }) + } + const wrapForm = [ { type: 'text', @@ -59,11 +71,41 @@ 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: (map, record) => { + if (!record.publicId) return + + let interfaces = window.GLOB.customMenu.interfaces || [] + + let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0] + + if (!d || !d.columns) return + + let columns = JSON.parse(JSON.stringify(d.columns)) + + let _sCtrl = map.get('statusControl') + + if (_sCtrl && !_sCtrl.forbid) { + _sCtrl.options = columns + _sCtrl.oriOptions = columns + map.set('statusControl', _sCtrl) + } + } }, { type: 'select', @@ -124,6 +166,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', -- Gitblit v1.8.0