king
2024-05-09 a975aa770d1f5d0ae133f0e87a28b5d6b94734ef
src/tabviews/custom/components/chart/antv-bar-line/index.jsx
@@ -3,7 +3,7 @@
import { is, fromJS } from 'immutable'
import { Chart } from '@antv/g2'
import DataSet from '@antv/data-set'
import { Spin, Empty, notification, Modal } from 'antd'
import { Spin, Empty } from 'antd'
import { DownloadOutlined } from '@ant-design/icons'
import moment from 'moment'
@@ -256,15 +256,35 @@
      style: { fill: _config.plot.color }
    }}
    let yc = {label: { style: { fill: _config.plot.color } }}
    if (_config.plot.grid === 'hidden') {
      yc.grid = null
    }
    if (_config.plot.y_line === 'show') {
    if (_config.plot.tick === 'hidden') {
      xc.tickLine = null
    }
    if (_config.plot.x_line === 'hidden') {
      xc.line = null
    }
    if (_config.plot.y_line === 'hidden') {
      yc.line = null
    } else {
      yc.line = {style: { stroke: '#D1D2CE' }}
    }
    if (_config.plot.x_label === 'hidden') {
      xc.label = null
    }
    if (_config.plot.y_label === 'hidden') {
      yc.label = null
    }
    if (_config.plot.lineColor) {
      xc.tickLine = {style: { stroke: _config.plot.lineColor }}
      xc.line = { style: { stroke: _config.plot.lineColor } }
      if (xc.tickLine !== null) {
        xc.tickLine = {style: { stroke: _config.plot.lineColor }}
      }
      if (xc.line !== null) {
        xc.line = { style: { stroke: _config.plot.lineColor } }
      }
      if (yc.grid !== null) {
        yc.grid = { line: { style: { stroke: _config.plot.lineColor } }}
      }
@@ -528,8 +548,8 @@
    if (config.uuid !== menuId) return
    if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 刷新源组件时,附带刷新上级行与当前组件
      MKEmitter.emit('reloadData', config.setting.supModule, BID)
    if (['mainline', 'maingrid', 'popclose'].includes(position) && config.setting.supModule) {
      MKEmitter.emit('reloadData', config.setting.supModule, position === 'maingrid' ? '' : BID)
    } else {
      this.loadData()
    }
@@ -642,37 +662,15 @@
          this.timer && this.timer.stop()
        }
      }
      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
      })
      this.timer && this.timer.stop()
      
      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)
    }
  }
@@ -928,6 +926,9 @@
        } else if (plot.show === 'thdSeparator') {
          val = val + ''
          val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
        }
        if (plot.labelUnit) {
          val = val + plot.labelUnit
        }
        return {
          content: val,
@@ -1221,6 +1222,9 @@
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.labelUnit) {
              val = val + plot.labelUnit
            }
            if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
              lablecfg.style.fill = plot.$colors.get(key)
@@ -1283,6 +1287,9 @@
            } else if (plot.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.labelUnit) {
              val = val + plot.labelUnit
            }
            if (plot.$label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
              lablecfg.style.fill = plot.$colors.get(key)
@@ -1380,6 +1387,9 @@
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.labelUnit) {
              val = val + plot.labelUnit
            }
            if (plot.label === 'true' && plot.labelColor === 'custom' && item.color) {
              lablecfg.style.fill = item.color
            }
@@ -1446,6 +1456,9 @@
            } else if (item.show === 'thdSeparator') {
              val = val + ''
              val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
            }
            if (plot.labelUnit) {
              val = val + plot.labelUnit
            }
            return {
@@ -1694,6 +1707,9 @@
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          if (plot.labelUnit) {
            val = val + plot.labelUnit
          }
          if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
            lablecfg.style.fill = plot.$colors.get(key)
@@ -1780,6 +1796,9 @@
            val = val + ''
            val = val.replace(/\d{1,3}(?=(\d{3})+(\.\d*)?$)/g, '$&,')
          }
          if (plot.labelUnit) {
            val = val + plot.labelUnit
          }
          if (plot.label === 'true' && plot.labelColor === 'custom' && plot.$colors && plot.$colors.has(key)) {
            lablecfg.style.fill = plot.$colors.get(key)