king
2022-04-26 5046d0d13dc6a8563b8e54e31913bc44cfa1072f
src/tabviews/custom/components/chart/antv-scatter/index.jsx
@@ -66,7 +66,9 @@
      search: Utils.initMainSearch(config.search),
    }, () => {
      if (config.setting.sync !== 'true' && config.setting.onload === 'true') {
        this.loadData()
        setTimeout(() => {
          this.loadData()
        }, _config.setting.delay || 0)
      } else if (config.setting.sync === 'true' && _data) {
        this.handleData()
      }
@@ -182,14 +184,24 @@
    if (config.uuid !== menuId) return
    this.loadData()                                                            // 数据刷新
    let supModule = config.setting.supModule
    if (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== config.setting.supModule) {
      MKEmitter.emit('reloadData', btn.syncComponentId)                        // 同级标签刷新
    btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId)
    if (!btn.syncComponentId || btn.syncComponentId !== supModule) {
      if (position === 'mainline' || position === 'popclose') { // 刷新源组件时,附带刷新上级行与当前组件
        if (supModule && BID) {
          MKEmitter.emit('reloadData', supModule, BID)
        } else {
          this.loadData()
        }
      } else {
        this.loadData()
      }
    }
    if (position === 'mainline' && config.setting.supModule) {                 // 主表行刷新
      MKEmitter.emit('reloadData', config.setting.supModule, (BID || 'empty'))
    if (position === 'popclose') { // 执行启动弹窗的按钮所选择的刷新项
      btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId)
    }
  }
@@ -426,8 +438,16 @@
  render() {
    const { config, loading, empty, BID } = this.state
    let style = {...config.style}
    if (empty && config.plot.empty === 'hidden') {
      style.opacity = 0
      style.position = 'absolute'
      style.zIndex = -1
      style.width = '100%'
    }
    return (
      <div className="custom-scatter-plot-box" style={config.style}>
      <div className="custom-scatter-plot-box" style={style}>
        {loading ?
          <div className="loading-mask">
            <div className="ant-spin-blur"></div>