From ddddb07002201150da9551875c25e75499563249 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 一月 2021 15:22:55 +0800
Subject: [PATCH] 2021-01-15

---
 src/menu/components/chart/antv-pie/index.jsx |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/chart/antv-pie/index.jsx b/src/menu/components/chart/antv-pie/index.jsx
index c17b950..4745360 100644
--- a/src/menu/components/chart/antv-pie/index.jsx
+++ b/src/menu/components/chart/antv-pie/index.jsx
@@ -21,6 +21,7 @@
 const PasteComponent = asyncIconComponent(() => import('@/menu/components/share/pastecomponent'))
 const LogComponent = asyncIconComponent(() => import('@/menu/components/share/logcomponent'))
 const NormalHeader = asyncComponent(() => import('@/menu/components/share/normalheader'))
+const UserComponent = asyncIconComponent(() => import('@/menu/components/share/usercomponent'))
 
 class antvBarLineChart extends Component {
   static propTpyes = {
@@ -41,7 +42,7 @@
     if (card.isNew) {
       let _plot = {
         shape: card.subtype, // 鍥捐〃绫诲瀷
-        width: 12,
+        width: card.width || 12,
         height: 400,
         label: 'outer',
         name: card.name
@@ -77,6 +78,21 @@
         plot: _plot,
         btnlog: [],
       }
+
+      if (card.config) {
+        let config = fromJS(card.config).toJS()
+
+        _card.plot = config.plot
+        _card.plot.name = card.name
+        _card.style = config.style
+        _card.headerStyle = config.headerStyle
+
+        _card.search = config.search.map(col => {
+          col.uuid = Utils.getuuid()
+          return col
+        })
+      }
+
       this.props.updateConfig(_card)
       this.setState({
         card: _card
@@ -441,6 +457,7 @@
             <PasteComponent config={card} options={['search', 'form']} updateConfig={this.updateComponent} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <LogComponent btnlog={card.btnlog || []} handlelog={this.handleLog} />
+            <UserComponent config={card}/>
             <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
             <SettingComponent config={card} updateConfig={this.updateComponent}/>
           </div>

--
Gitblit v1.8.0