king
2022-02-08 f393af9623c26ae177a3f69b8676afc4e23bff8d
src/utils/utils-custom.js
@@ -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
   */