king
2023-06-05 4e570c993e66a47ead0f83de76b63b0a2f8c5446
src/tabviews/custom/popview/index.jsx
@@ -302,9 +302,7 @@
        item.search = Utils.initSearchVal(item.search)
      }
      let mutil = false
      if (item.wrap && item.wrap.supType === 'multi') { // 数据卡多上级组件
        mutil = true
        item.setting.supModule = item.supNodes[0].componentId
      } else if (item.setting && item.setting.supModule && typeof(item.setting.supModule) !== 'string') {
        let pid = item.setting.supModule.pop()
@@ -322,13 +320,6 @@
          cell = this.resetButton(item, cell, Tab)
          cell.$toolbtn = true
          if (!mutil && cell.syncComponentId && cell.syncComponentId === item.setting.supModule) {
            cell.syncComponentId = ''
            if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
              cell.execSuccess = 'mainline'
            }
          }
          return true
        })
@@ -371,13 +362,6 @@
                  if (cell.hidden === 'true' || cell.OpenType === 'popview') return false
            
                  cell = this.resetButton(item, cell, Tab)
                  if (cell.syncComponentId && cell.syncComponentId === item.setting.supModule) {
                    cell.syncComponentId = ''
                    if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                      cell.execSuccess = 'mainline'
                    }
                  }
                } else {
                  cell = this.resetElement(cell)
                }
@@ -430,13 +414,6 @@
              if (cell.hidden === 'true' || cell.OpenType === 'popview') return false
              cell = this.resetButton(item, cell, Tab)
              if (!mutil && cell.syncComponentId && cell.syncComponentId === item.setting.supModule) {
                cell.syncComponentId = ''
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
              }
            } else {
              cell = this.resetElement(cell)
            }
@@ -451,13 +428,6 @@
              if (cell.hidden === 'true' || cell.OpenType === 'popview') return false
              cell = this.resetButton(item, cell, Tab)
              if (!mutil && cell.syncComponentId && cell.syncComponentId === item.setting.supModule) {
                cell.syncComponentId = ''
                if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                  cell.execSuccess = 'mainline'
                }
              }
            } else {
              cell = this.resetElement(cell)
            }
@@ -478,13 +448,6 @@
            if (cell.hidden === 'true' || cell.OpenType === 'popview') return false
            cell = this.resetButton(item, cell, Tab)
            if (cell.syncComponentId && cell.syncComponentId === item.wrap.supModule) {
              cell.syncComponentId = ''
              if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
                cell.execSuccess = 'mainline'
              }
            }
          } else {
            cell = this.resetElement(cell)
          }
@@ -598,6 +561,32 @@
      }
    }
    if (cell.syncComponentId) {
      if (cell.syncComponentId === item.setting.supModule) {
        cell.syncComponentId = ''
        if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
          cell.execSuccess = 'mainline'
        }
      } else if (cell.syncComponentId === 'multiComponent') {
        let ids = cell.syncComponents.map(m => {
          return m.syncComId.pop() || ''
        })
        if (item.setting.supModule && ids.includes(item.setting.supModule)) {
          if (cell.execSuccess === 'line' || cell.execSuccess === 'grid') {
            cell.execSuccess = 'mainline'
          }
          ids = ids.filter(id => id !== item.setting.supModule)
        }
        if (ids.length === 0) {
          cell.syncComponentId = ''
        } else {
          cell.syncComponentIds = ids
        }
      }
    }
    return cell
  }