From 42fae277ae5ebe794fc070bf38482a919eb661fc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 25 十一月 2020 14:36:02 +0800 Subject: [PATCH] 2020-11-25 --- src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx index 9b14404..71194ee 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/formconfig.jsx @@ -8,8 +8,17 @@ * @param {object} card // 鍥捐〃瀵硅薄 * @param {Array} columns // 鏄剧ず鍒� */ -export function getBaseForm (card, sysRoles = [], MenuType) { - let _sysRoles = sysRoles.map(item => ({...item, field: item.value, label: item.text})) +export function getBaseForm (card, MenuType) { + let roleList = sessionStorage.getItem('sysRoles') + if (roleList) { + try { + roleList = JSON.parse(roleList) + } catch { + roleList = [] + } + } else { + roleList = [] + } return [ { @@ -56,7 +65,7 @@ multi: true, required: false, forbid: MenuType === 'billPrint', - options: _sysRoles + options: roleList } ] } -- Gitblit v1.8.0