From c62724a2cdbafa3c660538955acbedafa5a01871 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 01 六月 2024 15:25:21 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/editor/braft-editor/options.jsx | 22 ++++++++-------------- 1 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index 922cc66..e0bb4a2 100644 --- a/src/menu/components/editor/braft-editor/options.jsx +++ b/src/menu/components/editor/braft-editor/options.jsx @@ -7,14 +7,15 @@ let isprint = sessionStorage.getItem('MenuType') === 'billPrint' let ispop = sessionStorage.getItem('editMenuType') === 'popview' let menu = window.GLOB.customMenu - let interfaces = [] + if (menu.interfaces) { menu.interfaces.forEach(item => { if (item.status === 'true') { interfaces.push({ value: item.uuid, - label: item.name + label: item.name, + columns: JSON.parse(JSON.stringify(item.columns)) }) } }) @@ -84,23 +85,15 @@ required: true, options: interfaces, reset_source: true, - callback: (map, record) => { + callback: (record) => { if (!record.publicId) return - let interfaces = window.GLOB.customMenu.interfaces || [] - - let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0] + let d = interfaces.filter(m => m.value === record.publicId)[0] if (!d || !d.columns) return - let columns = JSON.parse(JSON.stringify(d.columns)) - - let _field = map.get('field') - - if (_field) { - _field.options = columns - _field.oriOptions = columns - map.set('field', _field) + return { + field: d.columns } } }, @@ -109,6 +102,7 @@ field: 'field', label: '鏂囨湰瀛楁', initval: wrap.field || '', + timestamp: new Date().getTime(), required: false, options: columns }, -- Gitblit v1.8.0