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/actioncomponent/index.jsx | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/menu/actioncomponent/index.jsx b/src/menu/actioncomponent/index.jsx index 4e070de..14507c5 100644 --- a/src/menu/actioncomponent/index.jsx +++ b/src/menu/actioncomponent/index.jsx @@ -160,7 +160,18 @@ handleAction = (card) => { const { menu, config } = this.props - let ableField = menu.permFuncField ? menu.permFuncField.join(', ') : '' + let usefulFields = sessionStorage.getItem('permFuncField') + if (usefulFields) { + try { + usefulFields = JSON.parse(usefulFields) + } catch { + usefulFields = [] + } + } else { + usefulFields = [] + } + + let ableField = usefulFields.join(', ') let functip = <div> <p style={{marginBottom: '5px'}}>{this.state.dict['model.tooltip.func.innerface'].replace('@ableField', ableField)}</p> <p>{this.state.dict['model.tooltip.func.outface']}</p> @@ -196,7 +207,7 @@ this.setState({ visible: true, card: card, - formlist: getActionForm(card, functip, config.setting, menu.permFuncField, this.props.type, menulist, modules) + formlist: getActionForm(card, functip, config.setting, usefulFields, this.props.type, menulist, modules) }) } -- Gitblit v1.8.0