king
2021-01-15 ddddb07002201150da9551875c25e75499563249
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>