king
2022-02-09 d59f518f466274b2caeb2e01c10c92deafe7c93b
src/utils/utils-custom.js
@@ -274,7 +274,7 @@
          uuids.push(act.uuid)
        })
        if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) {
        if (['card', 'carousel', 'timeline'].includes(item.type) || (item.type === 'table' && item.subtype === 'tablecard')) {
          item.subcards.forEach(_card => {
            _card.elements && _card.elements.forEach(cell => {
              if (cell.eleType !== 'button') return
@@ -365,7 +365,7 @@
          cell.uuid = this.getuuid()
          return cell
        })
      } else if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) {
      } else if (['card', 'carousel', 'timeline'].includes(item.type) || (item.type === 'table' && item.subtype === 'tablecard')) {
        item.subcards.forEach(card => {
          card.uuid = this.getuuid()
          if (card.elements) {
@@ -511,6 +511,35 @@
  }
  /**
   * @description 重置菜单配置,页面整体复制
   * @return {String}  components 配置信息
   */
  static getFloor = (id) => {
    let floor = 1
    let finish = false
    let reCheck = (components, f) => {
      components.forEach(item => {
        if (finish) return
        if (item.type === 'tabs') {
          if (item.uuid === id) {
            floor = f
            finish = true
          } else {
            item.subtabs.forEach(tab => {
              reCheck(tab.components, f + 1)
            })
          }
        }
      })
    }
    reCheck(window.GLOB.customMenu.components, 1)
    return floor
  }
  /**
   * @description 数据源名称,用于统一查询
   * @return {String}  name
   */
@@ -561,7 +590,7 @@
        cell.uuid = this.getuuid()
        return cell
      })
    } else if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) {
    } else if (['card', 'carousel', 'timeline'].includes(item.type) || (item.type === 'table' && item.subtype === 'tablecard')) {
      item.subcards.forEach(card => {
        card.uuid = this.getuuid()
        if (card.elements) {