king
2022-03-25 ac3fc53f2c2f69690dbc0b7d5637624bb4457f73
src/tabviews/custom/components/card/balcony/index.jsx
@@ -205,32 +205,37 @@
   * @param {*} position   // 刷新位置
   * @param {*} btn        // 执行的按钮
   */
  refreshByButtonResult = (menuId, position, btn) => {
  refreshByButtonResult = (menuId, position, btn, id, lines) => {
    const { config, BID, syncConfig } = this.state
    if (config.uuid !== menuId) return
    this.loadData()                                                            // 数据刷新
    if (syncConfig) {
      MKEmitter.emit('refreshByButtonResult', syncConfig.uuid, position, btn, id, lines)
      this.loadData()
    } else {
    let supModule = config.wrap.supModule
    if (syncConfig) {
      supModule = syncConfig.setting.supModule
      btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId)
      MKEmitter.emit('refreshByButtonResult', syncConfig.uuid, position, btn)
      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 (btn.syncComponentId && btn.syncComponentId !== config.uuid && btn.syncComponentId !== supModule) {
      MKEmitter.emit('reloadData', btn.syncComponentId)                        // 同级标签刷新
    }
    if (position === 'mainline' && supModule) {                                // 主表行刷新
      MKEmitter.emit('reloadData', supModule, (BID || 'empty'))
    } else if (position === 'popclose') {                                      // 标签关闭刷新
      supModule && MKEmitter.emit('reloadData', supModule, (BID || 'empty'))
      if (position === 'popclose') {                                      // 标签关闭刷新
      btn.$tabId && MKEmitter.emit('refreshPopButton', btn.$tabId)
    }
  }
  }
  syncBalconyData = (menuId, data, checked) => {
    const { syncConfig } = this.state