king
2023-08-15 a94b0a4d15b26ecf8fe99f0a1c3e60d60b97766d
src/menu/components/chart/chart-custom/chartcompile/index.jsx
@@ -1,11 +1,12 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { fromJS } from 'immutable'
import { Modal, Form, Icon, Tabs } from 'antd'
import { Modal, Tabs } from 'antd'
import { EditOutlined } from '@ant-design/icons'
import { getBaseForm } from './formconfig'
import asyncComponent from '@/utils/asyncComponent'
import './index.scss'
// import './index.scss'
const { TabPane } = Tabs
const NormalForm = asyncComponent(() => import('@/menu/components/share/normalform'))
@@ -13,7 +14,6 @@
class CustomChartDrawerForm extends Component {
  static propTpyes = {
    dict: PropTypes.object,
    plot: PropTypes.object,
    config: PropTypes.object,
    plotchange: PropTypes.func
@@ -86,14 +86,14 @@
  }
  render() {
    const { config } = this.props
    const { view, visible, baseFormlist, plot } = this.state
    return (
      <>
        <Icon type="edit" style={{color: '#1890ff'}} title="编辑" onClick={this.showDrawer} />
        <EditOutlined style={{color: '#1890ff'}} title="编辑" onClick={this.showDrawer} />
        <Modal
          wrapClassName="popview-modal custom-chart-edit-modal"
          title="自定义图表编辑"
          wrapClassName="mk-pop-modal"
          visible={visible}
          width={950}
          maskClosable={false}
@@ -101,9 +101,10 @@
          onCancel={() => { this.setState({ visible: false }) }}
          destroyOnClose
        >
          {config.name ? <div className="mk-com-name">{config.name} - 编辑</div> : null}
          <Tabs activeKey={view} onChange={this.changeTab}>
            <TabPane tab="组件设置" key="base">
              <NormalForm dict={this.props.dict} formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/>
              <NormalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/>
            </TabPane>
            {plot ? <TabPane tab="JS" key="JS">
              {plot.chartType === 'antv' ? <div>入参:Chart、 DataSet、 wrap(dom节点)、data、 config</div> : <div>入参:echarts、 DataSet、 wrap(dom节点)、 data、 config</div>}
@@ -116,4 +117,4 @@
  }
}
export default Form.create()(CustomChartDrawerForm)
export default CustomChartDrawerForm