king
2022-10-25 5891206952e2ff63e87aed2f47df5324b019d32e
src/utils/utils-custom.js
@@ -939,7 +939,7 @@
/**
 * @description 获取表名
 */
export function getTables (config) {
export function getTables (config, pops) {
  let tables = []
  let cuts = []
  let cutreg = /(from|update|insert\s+into)\s+(@db@)?[a-z_]+/ig
@@ -973,15 +973,21 @@
  } else if (config.subcards) {
    config.subcards.forEach(item => {
      item.elements.forEach(cell => {
        if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
        if (cell.eleType !== 'button') return
        if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
          action.push(cell)
        } else if (pops && cell.OpenType === 'popview') {
          pops.push({...cell, parentId: config.uuid})
        }
      })
  
      if (item.backElements && item.setting.type === 'multi') {
        item.backElements.forEach(cell => {
          if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
          if (cell.eleType !== 'button') return
          if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
            action.push(cell)
          } else if (pops && cell.OpenType === 'popview') {
            pops.push({...cell, parentId: config.uuid})
          }
        })
      }
@@ -992,20 +998,27 @@
      col.elements.forEach(cell => {
        if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
          action.push(cell)
        } else if (pops && cell.OpenType === 'popview') {
          pops.push({...cell, parentId: config.uuid})
        }
      })
    }
  })
  config.elements && config.elements.forEach(cell => {
    if (cell.eleType === 'button' && ['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
    if (cell.eleType !== 'button') return
    if (['form', 'pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
      action.push(cell)
    } else if (pops && cell.OpenType === 'popview') {
      pops.push({...cell, parentId: config.uuid})
    }
  })
  config.action && config.action.forEach(cell => {
    if (['pop', 'prompt', 'exec', 'excelIn', 'excelOut'].includes(cell.OpenType)) {
      action.push(cell)
    } else if (pops && cell.OpenType === 'popview') {
      pops.push({...cell, parentId: config.uuid})
    }
  })