From 0c84df247914f893ef5e41d57a422e10a2dc814c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 12 十一月 2021 17:02:06 +0800
Subject: [PATCH] 2021-11-12

---
 src/menu/components/chart/antv-pie/chartcompile/index.jsx |   30 +++++++++++++++++-------------
 1 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/chart/antv-pie/chartcompile/index.jsx b/src/menu/components/chart/antv-pie/chartcompile/index.jsx
index ce879c3..e9ec92e 100644
--- a/src/menu/components/chart/antv-pie/chartcompile/index.jsx
+++ b/src/menu/components/chart/antv-pie/chartcompile/index.jsx
@@ -1,7 +1,8 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Modal, Form, Row, Col, Select, Icon, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd'
+import { Modal, Form, Row, Col, Select, Radio, Tooltip, Input, InputNumber, Tabs, Button } from 'antd'
+import { QuestionCircleOutlined, EditOutlined } from '@ant-design/icons'
 
 import Utils from '@/utils/utils.js'
 import { getBaseForm, getOptionForm } from './formconfig'
@@ -16,7 +17,6 @@
 
 class LineChartDrawerForm extends Component {
   static propTpyes = {
-    MenuType: PropTypes.any,
     dict: PropTypes.object,
     plot: PropTypes.object,
     config: PropTypes.object,
@@ -51,13 +51,13 @@
   }
 
   showDrawer = () => {
-    const { config, MenuType } = this.props
+    const { config } = this.props
 
     this.setState({
       visible: true,
       view: 'normal',
       plot: fromJS(config.plot).toJS(),
-      baseFormlist: getBaseForm(config.plot, MenuType),
+      baseFormlist: getBaseForm(config.plot),
       formlist: getOptionForm(config.plot, config.columns)
     })
   }
@@ -71,6 +71,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
         })
@@ -101,7 +105,7 @@
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" title={item.tooltip}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined className="mk-form-tip" />
                 {item.label}
               </Tooltip> : item.label
             }>
@@ -122,7 +126,7 @@
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" title={item.tooltip}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined className="mk-form-tip" />
                 {item.label}
               </Tooltip> : item.label
             }>
@@ -143,7 +147,7 @@
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" title={item.tooltip}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined className="mk-form-tip" />
                 {item.label}
               </Tooltip> : item.label
             }>
@@ -158,7 +162,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>
                   )}
@@ -172,7 +176,7 @@
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" title={item.tooltip}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined className="mk-form-tip" />
                 {item.label}
               </Tooltip> : item.label
             }>
@@ -185,7 +189,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>
@@ -201,7 +205,7 @@
           <Col span={12} key={index}>
             <Form.Item label={item.tooltip ?
               <Tooltip placement="topLeft" title={item.tooltip}>
-                <Icon type="question-circle" />
+                <QuestionCircleOutlined className="mk-form-tip" />
                 {item.label}
               </Tooltip> : item.label
             }>
@@ -319,7 +323,7 @@
 
     return (
       <div className="line-chart-drawer-form">
-        <Icon type="edit" onClick={this.showDrawer} />
+        <EditOutlined title="缂栬緫" onClick={this.showDrawer} />
         <Modal
           wrapClassName="popview-modal menu-chart-edit-modal"
           title="鍥捐〃缂栬緫"
@@ -342,7 +346,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