king
2023-06-29 48db4d4b22331f32bf6c6a0956a7cd4245ad6fde
src/tabviews/custom/popview/index.jsx
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import { is, fromJS } from 'immutable'
import { notification, Spin, Row, Col } from 'antd'
import { notification, Spin, Row, Col, Modal } from 'antd'
import Api from '@/api'
import zhCN from '@/locales/zh-CN/main.js'
@@ -41,6 +41,7 @@
const Voucher = asyncComponent(() => import('../components/module/voucher'))
const Iframe = asyncComponent(() => import('../components/iframe'))
const AntvG6 = asyncComponent(() => import('../components/chart/antv-G6'))
const AntvX6 = asyncComponent(() => import('../components/chart/antv-X6'))
class CustomPage extends Component {
  static propTpyes = {
@@ -797,6 +798,20 @@
    Api.genericInterface(param).then(result => {
      if (result.status) {
        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
            })
          }
        }
        delete result.status
        delete result.message
        delete result.ErrMesg
@@ -821,11 +836,19 @@
          data: '',
          loading: false
        })
        notification.error({
          top: 92,
          message: result.message,
          duration: 10
        })
        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
          })
        }
      }
    })
  }
@@ -1053,6 +1076,12 @@
            <AntvG6 config={item} data={data} mainSearch={mainSearch}/>
          </Col>
        )
      } else if (item.type === 'antvX6') {
        return (
          <Col span={item.width} style={style} key={item.uuid}>
            <AntvX6 config={item}/>
          </Col>
        )
      } else {
        return null
      }