From d59f518f466274b2caeb2e01c10c92deafe7c93b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 09 二月 2022 11:48:29 +0800
Subject: [PATCH] 2022-02-09

---
 src/menu/components/chart/chart-custom/index.jsx |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/chart/chart-custom/index.jsx b/src/menu/components/chart/chart-custom/index.jsx
index e92c651..924baa8 100644
--- a/src/menu/components/chart/chart-custom/index.jsx
+++ b/src/menu/components/chart/chart-custom/index.jsx
@@ -1,7 +1,8 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Icon, Popover, notification } from 'antd'
+import { Popover, notification } from 'antd'
+import { ToolOutlined, DeleteOutlined, FontColorsOutlined, PlusCircleOutlined } from '@ant-design/icons'
 import { Chart } from '@antv/g2'
 import DataSet from '@antv/data-set'
 import * as echarts from 'echarts'
@@ -49,7 +50,6 @@
       let _card = {
         uuid: card.uuid,
         type: card.type,
-        floor: card.floor,
         tabId: card.tabId || '',
         parentId: card.parentId || '',
         format: 'array',   // 缁勪欢灞炴�� - 鏁版嵁鏍煎紡
@@ -80,6 +80,10 @@
         _card.plot.name = card.name
         _card.style = config.style
         _card.headerStyle = config.headerStyle
+
+        _card.setting = config.setting
+        _card.columns = config.columns
+        _card.scripts = config.scripts
 
         _card.search = config.search.map(col => {
           col.uuid = Utils.getuuid()
@@ -174,7 +178,7 @@
 
   updateComponent = (component) => {
     const card = fromJS(this.state.card).toJS()
-    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style))) {
+    if (!is(fromJS(component.plot), fromJS(card.plot)) || !is(fromJS(component.style), fromJS(card.style)) || !is(fromJS(component.search), fromJS(card.search))) {
       let _element = document.getElementById(card.uuid + 'canvas')
       if (_element) {
         _element.innerHTML = ''
@@ -208,7 +212,6 @@
     newcard.type = 'select'
     newcard.resourceType = '0'
     newcard.options = []
-    newcard.setAll = 'false'
     newcard.orderType = 'asc'
     newcard.match = '='
 
@@ -247,18 +250,18 @@
       <div className="menu-custom-chart-edit-box" style={{..._style, height: card.plot.height || 400}} onClick={this.clickComponent} id={card.uuid}>
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
-            {appType !== 'mob' ? <Icon className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch} type="plus-circle" /> : null}
+            {appType !== 'mob' ? <PlusCircleOutlined className="plus" title="娣诲姞鎼滅储" onClick={this.addSearch}/> : null}
             <ChartCompileForm config={card} dict={this.state.dict} plotchange={this.updateComponent}/>
             <CopyComponent type="line" card={card}/>
-            <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
+            <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle}/>
             <ClockComponent config={card} updateConfig={this.updateComponent}/>
-            <Icon className="close" title="delete" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
+            <DeleteOutlined className="close" title="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
             <SettingComponent config={card} updateConfig={this.updateComponent}/>
           </div>
         } trigger="hover">
-          <Icon type="tool" />
+          <ToolOutlined />
         </Popover>
-        {card.plot.title || card.search.length > 0 ? <NormalHeader config={card} updateComponent={this.updateComponent}/> : null}
+        <NormalHeader config={card} updateComponent={this.updateComponent}/>
         <div className="canvas" id={card.uuid + 'canvas'} ref={ref => this.wrap = ref}></div>
       </div>
     )

--
Gitblit v1.8.0