king
2025-03-13 678dc0801e09c68c3faa45c72e7f7b3e25a7e373
2025-03-13
4个文件已修改
105 ■■■■ 已修改文件
src/menu/debug/index.jsx 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/topSearch/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/utils.js 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/menudesign/index.jsx 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/debug/index.jsx
@@ -162,6 +162,78 @@
      return
    }
    let getMsearch = (components) => {
      let val = null
      components.forEach(com => {
        if (com.type !== 'search') return
        if (com.wrap && com.wrap.supModule && com.wrap.supModule.length > 0) {
          let supModule = com.wrap.supModule[com.wrap.supModule.length - 1];
          (com.search || []).forEach(item => {
            if (item.type === 'datemonth') {
              if (item.initval && item.dateShift) {
                val = {supModule: supModule, name: com.name}
              }
            } else if (item.type === 'daterange') {
              if (item.initval && item.dateShift) {
                val = {supModule: supModule, name: com.name}
              }
            } else if ((item.type === 'select' || item.type === 'link') && item.resourceType === '1') {
              if (/@BID@/ig.test(item.dataSource)) {
                val = {supModule: supModule, name: com.name}
              }
            }
          })
        }
      })
      return val
    }
    let checkSearch = (components, mSearch) => {
      components.forEach(item => {
        if (error) return
        if (item.type === 'tabs') {
          item.subtabs.forEach(tab => {
            let _ms = getMsearch(tab.components)
            if (_ms) {
              checkSearch(tab.components, _ms)
            } else {
              checkSearch(tab.components, mSearch)
            }
          })
          return
        } else if (item.type === 'group') {
          checkSearch(item.components, mSearch)
          return
        } else if (!mSearch || !item.setting) {
          return
        } else if (!(item.type === 'table' || (item.type === 'card' && ['datacard', 'dualdatacard'].includes(item.subtype)))) {
          return
        }
        if (item.setting.useMSearch === 'true' && item.setting.supModule && item.setting.supModule[0] !== 'empty') {
          let id = item.setting.supModule[item.setting.supModule.length - 1]
          if (mSearch.supModule !== id) {
            error = `${item.name} 使用了外部搜索,但与外部搜索(${mSearch.name})的上级组件不一致。`
          }
        }
      })
    }
    checkSearch(config.components, getMsearch(config.components))
    if (error) {
      Modal.warning({
        title: error,
        okText: '知道了'
      })
      return
    }
    this.sqlList = []
    this.linkMain = []
src/tabviews/zshare/topSearch/index.jsx
@@ -381,7 +381,7 @@
  UNSAFE_componentWillReceiveProps(nextProps) {
    const { config, BID } = this.props
    if (config.checkBid && config.type !== 'search' && nextProps.BID !== BID) {
    if (config.$checkBid && nextProps.BID !== BID) {
      this.resetOptions(nextProps.BID)
    }
  }
src/utils/utils.js
@@ -249,9 +249,6 @@
              config.checkBid = true
              item.checkShift = true
              if (config.setting) {
                config.setting.checkBid = true
              }
            }
            item.initval = ''
@@ -317,9 +314,6 @@
              config.checkBid = true
              item.checkShift = true
              if (config.setting) {
                config.setting.checkBid = true
              }
            }
            item.initval = ''
@@ -418,9 +412,6 @@
        if (/@BID@/ig.test(item.dataSource) && supModule) {
          config.checkBid = true
          item.checkBid = true
          if (config.setting) {
            config.setting.checkBid = true
          }
        }
        if (item.initval === '$first') {
          item.initval = ''
@@ -469,6 +460,15 @@
      return item
    })
    if (config.checkBid) {
      if (config.setting) {
        config.setting.checkBid = true
      }
      if (config.type !== 'search') {
        config.$checkBid = true
      }
    }
    config.$s_keys = keys
    config.$s_req = required
  }
src/views/menudesign/index.jsx
@@ -828,13 +828,7 @@
        }
        long_data = []
        // let oriIds = {}
        // if (config.allSqls) {
        //   config.allSqls.forEach(item => {
        //     if (!item.md5) return
        //     oriIds[item.uuid + item.md5] = item.v_id
        //   })
        // }
        let perm = true
        if (config.permission === 'false' || config.sqlperm === 'false') {
          perm = false
@@ -843,10 +837,6 @@
        config.allSqls = sqls.map(item => {
          let v_id = _t + getguid()
          // if (oriIds[item.uuid + item.md5]) {
          //   v_id = oriIds[item.uuid + item.md5]
          // }
          long_data.push(`${md5(window.GLOB.appkey + v_id)},${item.uuid},${v_id},${window.btoa(window.encodeURIComponent(item.LText))},${perm ? item.roleId || '' : ''}`)
          
          return {
@@ -854,7 +844,6 @@
            v_id: v_id,
            type: item.type,
            reps: item.reps,
            // md5: item.md5 || '',
            luser: item.luser === true
          }
        })