From 783ab4e467c95e26f7f031151507bd7ad8333a63 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 08 九月 2023 17:34:47 +0800 Subject: [PATCH] 2023-09-08 --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx index 7f2b2cf..46c4260 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -1875,34 +1875,32 @@ MKEmitter.emit('modifyTabs', newtab, true) } else if (plot.click === 'menu') { let menuId = plot.menu.slice(-1)[0] - let newtab = window.GLOB.mkThdMenus.filter(m => m.MenuID === menuId)[0] + let menu = null - if (!newtab && plot.MenuID) { - newtab = { + if (window.GLOB.mkThdMenus.has(menuId)) { + menu = {...window.GLOB.mkThdMenus.get(menuId)} + } else if (plot.MenuID) { + menu = { MenuID: plot.MenuID, MenuName: plot.MenuName, - MenuNo: plot.MenuNo, type: plot.tabType } - } else if (!newtab) { - return } + + if (!menu) return - newtab = { - ...newtab, - param: {} - } + menu.param = {} if (plot.joint === 'true') { - newtab.param.$BID = data.$$uuid || '' + menu.param.$BID = data.$$uuid || '' Object.keys(data).forEach(key => { if (/^\$/.test(key)) return - newtab.param[key] = data[key] + menu.param[key] = data[key] }) } - MKEmitter.emit('modifyTabs', newtab, true) + MKEmitter.emit('modifyTabs', menu, true) } else { MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), data) } -- Gitblit v1.8.0