king
2023-03-02 5a542f58fba7fa063d66f5ac8dd8f31dd8209017
src/templates/treepageconfig/index.jsx
@@ -283,31 +283,31 @@
      return
    }
    let _sort = 0
    let btntabs = []
    // let _sort = 0
    // let btntabs = []
    
    let tabParam = { // 添加菜单tab页
      func: 'sPC_sMenusTab_AddUpt',
      MenuID: menu.MenuID
    }
    // let tabParam = { // 添加菜单tab页
    //   func: 'sPC_sMenusTab_AddUpt',
    //   MenuID: menu.MenuID
    // }
    let _LText = []
    // let _LText = []
    btntabs.forEach(item => {
      _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
    })
    _config.tabgroups.forEach(group => {
      group.sublist.forEach(item => {
        _sort++
        _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
      })
    })
    // btntabs.forEach(item => {
    //   _LText.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${item.sort * 10}' as Sort`)
    // })
    // _config.tabgroups.forEach(group => {
    //   group.sublist.forEach(item => {
    //     _sort++
    //     _LText.push(`select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${_sort * 10}' as Sort`)
    //   })
    // })
    _LText = _LText.join(' union all ')
    // _LText = _LText.join(' union all ')
    tabParam.LText = Utils.formatOptions(_LText)
    tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
    // tabParam.LText = Utils.formatOptions(_LText)
    // tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    // tabParam.secretkey = Utils.encrypt(tabParam.LText, tabParam.timestamp)
    let _funcs = []
    let _tables = []
@@ -414,60 +414,22 @@
          this.setState({
            config: _config,
            openEdition: response.open_edition || '',
            originMenu: fromJS(_config).toJS()
            originMenu: fromJS(_config).toJS(),
            menuloading: false,
            menucloseloading: false
          })
          // 存在标签页时
          if (tabParam.LText) {
            Api.getSystemConfig(tabParam).then(result => {
              if (result.status) {
                notification.success({
                  top: 92,
                  message: '保存成功',
                  duration: 2
                })
          notification.success({
            top: 92,
            message: '保存成功',
            duration: 2
          })
                this.props.reloadmenu()
                Api.genericInterface(localParam)
          this.props.reloadmenu()
          Api.genericInterface(localParam)
                if (this.state.closeVisible) {
                  this.props.handleView()
                } else {
                  this.setState({
                    menuloading: false,
                    menucloseloading: false
                  })
                }
              } else {
                notification.warning({
                  top: 92,
                  message: result.message,
                  duration: 5
                })
                this.setState({
                  menuloading: false,
                  menucloseloading: false
                })
              }
            })
          } else {
            notification.success({
              top: 92,
              message: '保存成功',
              duration: 2
            })
            this.props.reloadmenu()
            Api.genericInterface(localParam)
            if (this.state.closeVisible) {
              this.props.handleView()
            } else {
              this.setState({
                menuloading: false,
                menucloseloading: false
              })
            }
          if (this.state.closeVisible) {
            this.props.handleView()
          }
        } else {
          this.setState({