From 9cf5fc474d2159aad973e3208fbef670f325307f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 25 十一月 2020 17:57:41 +0800 Subject: [PATCH] 2020-11-25 --- src/tabviews/zshare/actionList/tabbutton/index.jsx | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/tabviews/zshare/actionList/tabbutton/index.jsx b/src/tabviews/zshare/actionList/tabbutton/index.jsx index 389be69..26220ab 100644 --- a/src/tabviews/zshare/actionList/tabbutton/index.jsx +++ b/src/tabviews/zshare/actionList/tabbutton/index.jsx @@ -97,20 +97,24 @@ } } } else if (btn.tabTemplate === 'ThdMenu') { - let _type = 'CommonTable' - if (btn.linkThdMenu && btn.linkThdMenu.PageParam) { - try { - _type = JSON.parse(btn.linkThdMenu.PageParam).Template - } catch { - _type = 'CommonTable' - } + let menu = null + + if (btn.linkmenu && btn.linkmenu.length > 0) { + let menu_id = btn.linkmenu[btn.linkmenu.length - 1] + menu = this.props.permMenus.filter(m => m.MenuID === menu_id)[0] || '' + } + + if (!menu) { + notification.warning({ + top: 92, + message: '鑿滃崟宸插垹闄ゆ垨娌℃湁璁块棶鏉冮檺锛�', + duration: 5 + }) + return } newtab = { - MenuNo: btn.linkThdMenu.MenuNo, - MenuID: btn.linkThdMenu.MenuID, - MenuName: btn.linkThdMenu.MenuName, - type: _type, + ...menu, selected: true, param: { BID: primaryId, @@ -174,6 +178,7 @@ const mapStateToProps = (state) => { return { tabviews: state.tabviews, + permMenus: state.permMenus, } } -- Gitblit v1.8.0