From a8d8d2fdb83f21e76f90cb13ea91ad6e9bf98a9b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 24 三月 2025 10:53:52 +0800
Subject: [PATCH] Merge branch 'master' into positec
---
src/menu/components/chart/chart-custom/chartcompile/index.jsx | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/menu/components/chart/chart-custom/chartcompile/index.jsx b/src/menu/components/chart/chart-custom/chartcompile/index.jsx
index e59b022..562c075 100644
--- a/src/menu/components/chart/chart-custom/chartcompile/index.jsx
+++ b/src/menu/components/chart/chart-custom/chartcompile/index.jsx
@@ -1,19 +1,19 @@
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'))
+const ModalForm = asyncComponent(() => import('@/components/normalform/modalform'))
const CodeMirror = asyncComponent(() => import('@/templates/zshare/codemirror'))
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,12 +101,13 @@
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}/>
+ <ModalForm formlist={baseFormlist} inputSubmit={this.onSubmit} wrappedComponentRef={(inst) => this.baseRef = inst}/>
</TabPane>
{plot ? <TabPane tab="JS" key="JS">
- {plot.chartType === 'antv' ? <div>鍏ュ弬锛欳hart銆� DataSet銆� wrap锛坉om鑺傜偣锛夈�乨ata銆� config</div> : <div>鍏ュ弬锛歟charts銆� DataSet銆� wrap锛坉om鑺傜偣锛夈�� data銆� config</div>}
+ {plot.chartType === 'antv' ? <div>鍏ュ弬锛欳hart銆� chartId锛坉om鑺傜偣id锛夈�乨ata銆� config</div> : <div>鍏ュ弬锛歟charts銆� chartId锛坉om鑺傜偣id锛夈�� data銆� config</div>}
<CodeMirror mode="text/javascript" theme="cobalt" value={plot.script} onChange={this.onChange} />
</TabPane> : null}
</Tabs>
@@ -116,4 +117,4 @@
}
}
-export default Form.create()(CustomChartDrawerForm)
\ No newline at end of file
+export default CustomChartDrawerForm
\ No newline at end of file
--
Gitblit v1.8.0