From 72419e2f826031a158173f46d723a672064e37cd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 31 八月 2021 22:42:51 +0800 Subject: [PATCH] 2021-08-31 --- src/menu/components/chart/antv-pie/chartcompile/index.jsx | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.jsx b/src/menu/components/chart/antv-pie/chartcompile/index.jsx index 790cfc2..4f2638b 100644 --- a/src/menu/components/chart/antv-pie/chartcompile/index.jsx +++ b/src/menu/components/chart/antv-pie/chartcompile/index.jsx @@ -4,8 +4,7 @@ import { Modal, Form, Row, Col, Select, Icon, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd' import Utils from '@/utils/utils.js' -import { getOptionForm } from './formconfig' -import { getBaseForm } from '../../antv-bar/chartcompile/formconfig' +import { getBaseForm, getOptionForm } from './formconfig' import asyncComponent from '@/utils/asyncComponent' import ColorSketch from '@/mob/colorsketch' import './index.scss' @@ -17,10 +16,8 @@ class LineChartDrawerForm extends Component { static propTpyes = { - MenuType: PropTypes.any, dict: PropTypes.object, plot: PropTypes.object, - sysRoles: PropTypes.array, config: PropTypes.object, plotchange: PropTypes.func } @@ -53,13 +50,13 @@ } showDrawer = () => { - const { config, sysRoles, MenuType } = this.props + const { config } = this.props this.setState({ visible: true, view: 'normal', plot: fromJS(config.plot).toJS(), - baseFormlist: getBaseForm(config.plot, sysRoles, MenuType), + baseFormlist: getBaseForm(config.plot), formlist: getOptionForm(config.plot, config.columns) }) } @@ -73,6 +70,10 @@ formlist: formlist.map(item => { if (item.key === 'innerRadius') { item.hidden = val === 'pie' + } else if (item.key === 'type') { + item.hidden = val !== 'nest' + } else if (item.key === 'legend') { + item.hidden = val === 'nest' } return item }) @@ -160,7 +161,7 @@ })( <Select mode={item.multi ? 'multiple' : ''}> {item.options.map((option, index) => - <Select.Option key={index} value={option.field}> + <Select.Option key={index} value={option.field || option.value}> {option.label} </Select.Option> )} @@ -187,7 +188,7 @@ } ] })( - <Radio.Group disabled={item.readonly} onChange={(e) => this.radioChange(e, item.key)}> + <Radio.Group style={{whiteSpace: 'nowrap'}} disabled={item.readonly} onChange={(e) => this.radioChange(e, item.key)}> {item.options.map(option => { return ( <Radio key={option.value} value={option.value}>{option.text}</Radio> @@ -321,7 +322,7 @@ return ( <div className="line-chart-drawer-form"> - <Icon type="edit" onClick={this.showDrawer} /> + <Icon type="edit" title="缂栬緫" onClick={this.showDrawer} /> <Modal wrapClassName="popview-modal menu-chart-edit-modal" title="鍥捐〃缂栬緫" @@ -344,7 +345,7 @@ {plot ? <TabPane tab="棰滆壊璁剧疆" key="color"> <div> <Button className="color-add mk-green" onClick={this.addColor}>{this.props.dict['model.add']}</Button> - <EditTable data={plot.colors || []} columns={colorColumns} onChange={this.changeColor}/> + <EditTable actions={['edit', 'move', 'del']} data={plot.colors || []} columns={colorColumns} onChange={this.changeColor}/> </div> </TabPane> : null} </Tabs> -- Gitblit v1.8.0