From 57ad22259363a3e34de3c53583c3c4e227835fbf Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 15 五月 2022 21:01:35 +0800 Subject: [PATCH] 2022-05-15 --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 53 insertions(+), 1 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 e2e00e8..be150a4 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -313,7 +313,6 @@ } }) } - console.log(vFields) this.setState({ config: _config, @@ -1717,7 +1716,60 @@ chart.on('element:click', (ev) => { let data = ev.data.data + MKEmitter.emit('resetSelectLine', config.uuid, (data ? data.$$uuid : ''), data) + + if (plot.click === 'menus') { + let menu = null + + if (plot.menus && plot.menus.length > 0) { + let s = data[plot.menuType] || '' + plot.menus.forEach(m => { + if (s !== m.sign) return + menu = m + }) + } + if (!menu || !menu.MenuID) return + + menu.type = menu.tabType + + let newtab = { + ...menu, + param: {} + } + + if (plot.joint === 'true') { + newtab.param.$BID = data.$$uuid || '' + } + + if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) { + MKEmitter.emit('modifyTabs', newtab, 'replace') + } else { + MKEmitter.emit('modifyTabs', newtab, 'plus', true) + } + } else if (plot.click === 'menu' && plot.MenuID) { + let menu = { + MenuID: plot.MenuID, + MenuName: plot.MenuName, + MenuNo: plot.MenuNo, + type: plot.tabType + } + + let newtab = { + ...menu, + param: {} + } + + if (plot.joint === 'true') { + newtab.param.$BID = data.$$uuid || '' + } + + if (['linkage_navigation', 'linkage', 'menu_board'].includes(window.GLOB.navBar)) { + MKEmitter.emit('modifyTabs', newtab, 'replace') + } else { + MKEmitter.emit('modifyTabs', newtab, 'plus', true) + } + } }) if (plot.interaction && plot.interaction.length) { -- Gitblit v1.8.0