king
2020-02-03 75623dd039b742dbb44fb4c6b4af563404ed9c7f
src/components/sidemenu/editthdmenu/index.jsx
@@ -61,7 +61,9 @@
    tabConfig: null,        // 标签配置信息
    editSubTab: null,       // 编辑子标签(标签中的标签)
    subTabConfig: null,     // 子标签配置信息
    subConfig: null         // 子配置信息
    subConfig: null,        // 子配置信息
    btnTab: null,           // 打开新标签或当前页面刷新的按钮
    btnTabConfig: null      // 打开新标签按钮配置
  }
  /**
@@ -184,7 +186,7 @@
      this.setState({
        tabview: 'template',
        editMenu: {
          MenuID: '',
          MenuID: Utils.getuuid(),
          MenuName: '',
          MenuNo: '',
          type: '',
@@ -445,15 +447,6 @@
    document.getElementById('root').style.overflowY = 'unset'
  }
  handleConfig = (type) => {
    this.setState({tabview: type})
    if (type) {
      document.getElementById('root').style.overflowY = 'hidden'
    } else {
      document.getElementById('root').style.overflowY = 'unset'
    }
  }
  handleView = (param) => {
    this.setState({
      tabview: ''
@@ -463,81 +456,6 @@
        document.getElementById('root').style.overflowY = 'hidden'
      } else {
        document.getElementById('root').style.overflowY = 'unset'
      }
    })
  }
  handleSubConfig = (item, originMenu, config, type) => {
    this.setState({
      tabview: ''
    }, () => {
      if (type === 'button') { // 三级菜单页面,按钮配置
        if (item.OpenType === 'pop') {
          let pageParam = ''
          if (config && config.type === 'Modal') {
            pageParam = config
          }
          this.setState({
            editMenu: originMenu,
            editTab: '',
            editAction: item,
            btnParam: pageParam,
            tabview: 'Modal'
          })
        }
      } else if (type === 'tab') { // 三级菜单页面,标签配置
        if (item.type === 'SubTable' || item.tabType === 'SubTable') {
          this.setState({
            editMenu: originMenu,
            editTab: config,
            editAction: '',
            tabview: 'SubTable'
          })
        }
      } else if (type === 'tabButton') { // 三级菜单下,标签下,按钮配置
        let pageParam = ''
        if (item.OpenType === 'popview') {
          if (config && config.Template === 'SubTable') {
            pageParam = config
          } else {
            pageParam = {
              ...item,
              uuid: item.linkTab,
              create: true
            }
          }
          this.setState({
            editMenu: originMenu,
            editTab: pageParam,
            editAction: item,
            tabview: 'SubTable'
          })
        } else {
          if (config && config.type === 'Modal') {
            pageParam = config
          }
          this.setState({
            editTab: originMenu,
            editAction: item,
            btnParam: pageParam,
            tabview: 'Modal'
          })
        }
      } else if (type === 'tabview') { // 三级菜单下,打开新标签页或当前页跳转,类型的按钮配置
        let pageParam = ''
        if (config && config.type === 'FormTab') {
          pageParam = config
        }
        this.setState({
          editMenu: originMenu,
          editAction: item,
          btnParam: pageParam,
          tabview: 'FormTab'
        })
      }
    })
  }
@@ -668,6 +586,8 @@
            tabConfig={this.state.tabConfig}
            editSubTab={this.state.editSubTab}
            subTabConfig={this.state.subTabConfig}
            btnTab={this.state.btnTab}
            btnTabConfig={this.state.btnTabConfig}
            editAction={this.state.editAction}
            subConfig={this.state.subConfig}
            handleView={this.handleView}
@@ -679,6 +599,8 @@
            editTab={this.state.editTab}
            editSubTab={this.state.editSubTab}
            tabConfig={this.state.tabConfig}
            btnTab={this.state.btnTab}
            btnTabConfig={this.state.btnTabConfig}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
@@ -686,10 +608,9 @@
        {this.state.tabview === 'FormTab' &&
          <FormTabConfig
            menu={this.state.editMenu}
            config={this.state.btnParam}
            editAction={this.state.editAction}
            handleConfig={this.handleConfig}
            handleSubConfig={this.handleSubConfig}
            btnTab={this.state.btnTab}
            config={this.state.subConfig}
            handleView={this.handleView}
          />
        }
        {/* 图片预览 */}