king
2021-01-26 f89183feaeaf4d52b994bb4d3f9a8d7ca6dadec4
src/menu/popview/index.jsx
@@ -344,52 +344,54 @@
      return
    }
    config.components = this.filterConfig(config.components)
    if (config.enabled && this.verifyConfig()) {
      config.enabled = false
    }
    let _config = fromJS(config).toJS()
    delete _config.tableFields
    let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
    let param = {
      func: 'sPC_ButtonParam_AddUpt',
      ParentID: btn.config.uuid,
      MenuID: _config.uuid,
      MenuNo: _config.MenuNo || '',
      Template: 'CustomPage',
      MenuName: _name,
      PageParam: JSON.stringify({Template: 'CustomPage'}),
      LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
    }
    if (openEdition) { // 版本管理
      param.open_edition = openEdition
    }
    let btnParam = {             // 添加菜单按钮
      func: 'sPC_Button_AddUpt',
      Type: 60,                  // 添加菜单下的按钮type为40,按钮下的按钮type为60
      ParentID: _config.uuid,
      MenuNo: _config.MenuNo,
      Template: 'CustomPage',
      PageParam: '',
      LongParam: '',
      LText: []
    }
    btnParam.LText = this.getMenuMessage()
    btnParam.LText = btnParam.LText.join(' union all ')
    btnParam.LText = Utils.formatOptions(btnParam.LText)
    btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
    this.setState({
      menuloading: true
    }, () => {
    })
    setTimeout(() => {
      config.components = this.filterConfig(config.components)
      if (config.enabled && this.verifyConfig()) {
        config.enabled = false
      }
      let _config = fromJS(config).toJS()
      delete _config.tableFields
      let _name = (btn.component.name ? btn.component.name + '-' : '') + btn.label
      let param = {
        func: 'sPC_ButtonParam_AddUpt',
        ParentID: btn.config.uuid,
        MenuID: _config.uuid,
        MenuNo: _config.MenuNo || '',
        Template: 'CustomPage',
        MenuName: _name,
        PageParam: JSON.stringify({Template: 'CustomPage'}),
        LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(_config)))
      }
      if (openEdition) { // 版本管理
        param.open_edition = openEdition
      }
      let btnParam = {             // 添加菜单按钮
        func: 'sPC_Button_AddUpt',
        Type: 60,                  // 添加菜单下的按钮type为40,按钮下的按钮type为60
        ParentID: _config.uuid,
        MenuNo: _config.MenuNo,
        Template: 'CustomPage',
        PageParam: '',
        LongParam: '',
        LText: []
      }
      btnParam.LText = this.getMenuMessage()
      btnParam.LText = btnParam.LText.join(' union all ')
      btnParam.LText = Utils.formatOptions(btnParam.LText)
      btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
      btnParam.secretkey = Utils.encrypt(btnParam.LText, btnParam.timestamp)
      new Promise(resolve => {
        if (delButtons.length === 0) {
          resolve({
@@ -476,7 +478,7 @@
          })
        }
      })
    })
    }, 300)
  }
  onEnabledChange = () => {