king
2024-05-21 f0bf8c399c354c22227f8f1a76ed806098db59c0
src/tabviews/custom/components/chart/antv-G6/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { Modal, notification, Spin, Empty } from 'antd'
import { Spin, Empty } from 'antd'
import G6 from '@antv/g6'
import Api from '@/api'
@@ -1167,36 +1167,14 @@
        this.data = result.data || []
        this.handleData()
      }
      if (result.message) {
        if (result.ErrCode === 'Y') {
          Modal.success({
            title: result.message
          })
        } else if (result.ErrCode === 'S') {
          notification.success({
            top: 92,
            message: result.message,
            duration: 2
          })
        }
      }
      UtilsDM.querySuccess(result)
    } else {
      this.setState({
        loading: false
      })
      
      if (!result.message) return
      if (result.ErrCode === 'N') {
        Modal.error({
          title: result.message,
        })
      } else if (result.ErrCode !== '-2') {
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
      }
      UtilsDM.queryFail(result)
    }
  }
@@ -1643,17 +1621,13 @@
        MenuName: menu.MenuName,
        MenuNo: menu.MenuNo || '',
        type: menu.tabType,
        param: {}
        param: {$BID: data.$$uuid || ''}
      }
      if (plot.joint === 'true') {
        newtab.param.$BID = data.$$uuid || ''
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          newtab.param[key] = data[key]
        })
      }
      Object.keys(data).forEach(key => {
        if (/^\$/.test(key)) return
        newtab.param[key] = data[key]
      })
      MKEmitter.emit('modifyTabs', newtab, true)
    } else if (plot.click === 'menu') {
@@ -1674,16 +1648,12 @@
      if (!menu) return
      menu.param = {}
      menu.param = {$BID: data.$$uuid || ''}
      if (plot.joint === 'true') {
        menu.param.$BID = data.$$uuid || ''
        Object.keys(data).forEach(key => {
          if (/^\$/.test(key)) return
          menu.param[key] = data[key]
        })
      }
      Object.keys(data).forEach(key => {
        if (/^\$/.test(key)) return
        menu.param[key] = data[key]
      })
      MKEmitter.emit('modifyTabs', menu, true)
    } else {