From 9a11e62adeb8d435b52a361eb62d5b59e1deef2a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 23 五月 2024 21:14:50 +0800 Subject: [PATCH] 2024-05-23 --- src/menu/components/form/step-form/options.jsx | 62 +++++++++++++++++++++++++++++- 1 files changed, 59 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..647d7a0 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', @@ -86,9 +128,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