From 2ae980243b7ad705dea575eadcfc4cf4e24073bd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 17 五月 2022 22:57:19 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/tabviews/custom/components/chart/antv-bar-line/index.jsx | 63 ++++++++++++++++++++++++++++++- 1 files changed, 60 insertions(+), 3 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 2184ac3..be150a4 100644 --- a/src/tabviews/custom/components/chart/antv-bar-line/index.jsx +++ b/src/tabviews/custom/components/chart/antv-bar-line/index.jsx @@ -296,8 +296,12 @@ marker: { symbol: item.chartType === 'bar' ? 'square' : 'hyphen', style: { stroke: item.color,fill: item.color, r: 5, lineWidth: 2 } } }) - if ((!_config.plot.Bar_axis || item.chartType !== 'bar') && item.show) { // 鎶樼嚎鍥炬垨閲嶅彔涓嬬殑鏌辩姸鍥惧彲鍗曠嫭璁剧疆鏄剧ず绫诲瀷 - vFieldsShow[item.type] = item.show + if (!_config.plot.Bar_axis || item.chartType !== 'bar') { // 鎶樼嚎鍥炬垨閲嶅彔涓嬬殑鏌辩姸鍥惧彲鍗曠嫭璁剧疆鏄剧ず绫诲瀷 + if (item.show) { + vFieldsShow[item.type] = item.show + } else { + item.show = _config.plot.show + } } }) _config.plot.customs = fields @@ -1712,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) { @@ -1781,7 +1838,7 @@ } return ( - <div className="custom-line-chart-plot-box" style={style}> + <div className="custom-line-chart-plot-box" id={'anchor' + config.uuid} style={style}> {loading ? <div className="loading-mask"> <div className="ant-spin-blur"></div> -- Gitblit v1.8.0