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/menu/components/chart/antv-bar/chartcompile/index.jsx | 78 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 74 insertions(+), 4 deletions(-) diff --git a/src/menu/components/chart/antv-bar/chartcompile/index.jsx b/src/menu/components/chart/antv-bar/chartcompile/index.jsx index 942c0cf..accb869 100644 --- a/src/menu/components/chart/antv-bar/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-bar/chartcompile/index.jsx @@ -218,7 +218,7 @@ } }, { - title: '鏄剧ず', + title: '鏄剧ず锛堝��/%锛�', dataIndex: 'show', inputType: 'select', editable: true, @@ -274,7 +274,7 @@ datatype: config.plot.datatype || 'query', fieldName: fieldName, plot: fromJS(config.plot).toJS(), - baseFormlist: getBaseForm(config.plot), + baseFormlist: getBaseForm(config.plot, config.columns), formlist: getOptionForm(config.plot, config.columns) }) } @@ -502,6 +502,40 @@ this.baseRef.handleConfirm().then(res => { let _plot = {...plot, ...res} + if (res.click === 'menu') { + delete _plot.menus + } else if (res.click === 'menus') { + delete _plot.menu + } else { + delete _plot.menus + delete _plot.menu + } + + delete _plot.MenuID + delete _plot.MenuName + delete _plot.MenuNo + delete _plot.tabType + + if (_plot.click === 'menu' && sessionStorage.getItem('appType') === '' && _plot.menu) { + let list = null + try { + list = JSON.parse(sessionStorage.getItem('thdMenuList')) || [] + } catch (e) { + list = [] + } + + let id = _plot.menu[_plot.menu.length - 1] + + list.forEach(item => { + if (item.MenuID === id) { + _plot.MenuID = id + _plot.MenuName = item.MenuName + _plot.MenuNo = item.MenuNo + _plot.tabType = item.type + } + }) + } + this.setState({ plot: _plot, visible: false @@ -579,8 +613,44 @@ }) } else if (view === 'base') { this.baseRef.handleConfirm().then(res => { + let _plot = {...plot, ...res} + + if (res.click === 'menu') { + delete _plot.menus + } else if (res.click === 'menus') { + delete _plot.menu + } else { + delete _plot.menus + delete _plot.menu + } + + delete _plot.MenuID + delete _plot.MenuName + delete _plot.MenuNo + delete _plot.tabType + + if (_plot.click === 'menu' && sessionStorage.getItem('appType') === '' && _plot.menu) { + let list = null + try { + list = JSON.parse(sessionStorage.getItem('thdMenuList')) || [] + } catch (e) { + list = [] + } + + let id = _plot.menu[_plot.menu.length - 1] + + list.forEach(item => { + if (item.MenuID === id) { + _plot.MenuID = id + _plot.MenuName = item.MenuName + _plot.MenuNo = item.MenuNo + _plot.tabType = item.type + } + }) + } + this.setState({ - plot: {...plot, ...res}, + plot: _plot, view: tab }) }) @@ -638,7 +708,7 @@ wrapClassName="popview-modal menu-chart-edit-modal" title={config.type === 'bar' ? '鏌辩姸鍥剧紪杈�' : '鎶樼嚎鍥剧紪杈�'} visible={visible} - width={950} + width={1000} maskClosable={false} onOk={this.onSubmit} onCancel={() => { this.setState({ visible: false }) }} -- Gitblit v1.8.0