king
2025-02-12 ed698a4ef051a13fe22c9ccfe121232c753725c1
src/tabviews/custom/index.jsx
@@ -49,6 +49,7 @@
const DebugTable = asyncComponent(() => import('@/tabviews/debugtable'))
const FlowFloat = asyncComponent(() => import('@/tabviews/zshare/flowFloat'))
const TableNodes = asyncComponent(() => import('@/tabviews/zshare/tablenodes'))
const DeepSeek = asyncComponent(() => import('@/tabviews/zshare/deepseek'))
const MkInterfaces = asyncComponent(() => import('@/tabviews/custom/components/interfaces'))
class CustomPage extends Component {
@@ -69,7 +70,8 @@
    loading: false,       // 列表数据加载中
    visible: false,       // 标签页控制
    shortcuts: null,      // 快捷键
    loadinginter: false
    loadinginter: false,
    noParam: false
  }
  stepInter = null
@@ -79,6 +81,7 @@
   */
  async loadconfig () {
    const { MenuID, MenuName, param } = this.props
    const { noParam } = this.state
    let _param = {
      func: 'sPC_Get_LongParam',
@@ -209,13 +212,17 @@
      let skip = config.permission === 'false' || window.GLOB.mkHS
      let urlparam = {} // url参数
      if (param) {
        Object.keys(param).forEach(key => {
          if (/^\$/.test(key)) {
            urlparam[key] = param[key]
          } else {
            urlparam[key.toLowerCase()] = param[key]
          }
        })
        if (!noParam) {
          Object.keys(param).forEach(key => {
            if (/^\$/.test(key)) {
              urlparam[key] = param[key]
            } else {
              urlparam[key.toLowerCase()] = param[key]
            }
          })
        } else {
          urlparam.$BID = param.$BID
        }
      }
      window.GLOB.CacheData.set(MenuID, urlparam)
@@ -224,7 +231,7 @@
        let keys = Object.keys(urlparam)
        config.allSqls.forEach(item => {
          item.id = md5(window.GLOB.appkey + item.v_id)
          if (item.type === 'datasource' || item.type === 'excelOut') {
          if (['datasource', 'interface', 'excelOut'].includes(item.type)) {
            item.urlkeys = keys
            item.urlparam = urlparam
            if (config.flow_code) {
@@ -583,8 +590,9 @@
        Utils.initSearchVal(item)
        if (urlparam.$searchkey) {
          let reg = new RegExp('(^|,)' + urlparam.$searchkey + '($|,)', 'ig')
          item.search.forEach(cell => {
            if (urlparam.$searchkey === cell.field.toLowerCase() && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) {
            if (reg.test(cell.field) && ['text', 'select', 'link', 'checkcard'].includes(cell.type)) {
              cell.initval = urlparam.$searchval
            }
          })
@@ -830,6 +838,13 @@
          group.subButton = this.resetButton(item, group.subButton)
          if (group.subButton.linkmenu) {
            if (Array.isArray(group.subButton.linkmenu) && group.subButton.linkmenu.length > 0) {
              group.subButton.openmenu = group.subButton.linkmenu
            }
            delete group.subButton.linkmenu
          }
          if (item.$cache && item.$time) { // 表单缓存
            group.$cache = item.$cache
            group.$time = item.$time
@@ -1056,6 +1071,7 @@
        }
      } else if (cell.syncComponentId === 'multiComponent') {
        let ids = cell.syncComponents.map(m => {
          if (Array.isArray(m)) return m.pop() || ''
          return m.syncComId.pop() || ''
        })
@@ -1472,12 +1488,12 @@
    })
  }
  reloadMenuView = (menuId) => {
  reloadMenuView = (menuId, clear) => {
    const { MenuID } = this.props
    if (MenuID !== menuId) return
    this.reloadview()
    this.reloadview(clear)
  }
  resetActiveMenu = (menuId) => {
@@ -1572,7 +1588,7 @@
    })
  }
  reloadview = () => {
  reloadview = (clear) => {
    window.GLOB.CacheData.delete(this.props.MenuID)
    
    if (this.state.config) {
@@ -1590,7 +1606,8 @@
      viewlost: false,      // 页面丢失:1、未获取到配置-页面丢失;2、页面未启用
      config: null,         // 页面配置信息,包括组件等
      loading: false,       // 列表数据加载中
      shortcuts: null
      shortcuts: null,
      noParam: clear === true
    }, () => {
      this.loadconfig()
    })
@@ -1825,6 +1842,7 @@
          {config.process === 'true' ? <FlowFloat config={config}/> : null}
          <SettingComponent config={config} shortcuts={shortcuts || []}/>
          <TableNodes config={config} />
          <DeepSeek/>
        </div>
      </div>
    )