king
2022-11-04 3c50bfdd8d605b3dd449adcb54cdf7f7c25d6c16
src/tabviews/commontable/index.jsx
@@ -36,7 +36,8 @@
    param: PropTypes.any,        // 其他页面传递的搜索条件等参数
    MenuID: PropTypes.string,    // 菜单Id
    MenuNo: PropTypes.string,    // 菜单参数
    MenuName: PropTypes.string   // 菜单名称
    MenuName: PropTypes.string,  // 菜单名称
    changeTemp: PropTypes.func
  }
  state = {
@@ -91,13 +92,34 @@
      try { // 配置信息解析
        config = JSON.parse(window.decodeURIComponent(window.atob(result.LongParam)))
        config.MenuID = MenuID
        config.MenuName = MenuName
        config.setting.MenuName = MenuName
        config.setting.$name = MenuName
      } catch (e) {
        console.warn('Parse Failure')
        config = ''
      }
      // 页面配置解析错误时提示
      if (!config) {
        this.setState({
          loadingview: false,
          viewlost: true
        })
        return
      }
      // 页面未启用时,显示未启用页面
      if (!config.enabled) {
        this.setState({
          loadingview: false,
          viewlost: true,
          lostmsg: this.state.dict['main.view.unenabled']
        })
        return
      }
      // 模板错误
      if (config.Template === 'BaseTable' || config.Template === 'CustomPage') {
        this.props.changeTemp(MenuID, config.Template)
        return
      }
      
      // HS不使用自定义设置
@@ -136,24 +158,11 @@
        }
      }
      // 页面配置解析错误时提示
      if (!config) {
        this.setState({
          loadingview: false,
          viewlost: true
        })
        return
      }
      // 页面未启用时,显示未启用页面
      if (!config.enabled) {
        this.setState({
          loadingview: false,
          viewlost: true,
          lostmsg: this.state.dict['main.view.unenabled']
        })
        return
      }
      // 信息初始化赋值
      config.MenuID = MenuID
      config.MenuName = MenuName
      config.setting.MenuName = MenuName
      config.setting.$name = MenuName
      // 版本兼容
      config = updateCommonTable(config)