king
2019-12-25 af0db2414ced6089cdb829304a4409ea4231d57a
src/templates/comtableconfig/index.jsx
@@ -278,6 +278,15 @@
    })
  }
  /**
   * @description 组件销毁,清除state更新
   */
  componentWillUnmount () {
    this.setState = (state, callback) => {
      return
    }
  }
  handleList = (type, list, card) => {
    const { config } = this.state
@@ -1789,10 +1798,9 @@
      let tabParam = { // 添加菜单tab页
        func: 'sPC_sMenusTab_AddUpt',
        LText: config.tabs.map((item, index) => {
          return `select '${menu.MenuID}' as MenuID ,'${item.uuid}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
          return `select '${menu.MenuID}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`
        })
      }
      tabParam.LText = tabParam.LText.join(' union all ')
      tabParam.LText = Utils.formatOptions(tabParam.LText)
      tabParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
@@ -1871,7 +1879,6 @@
   * @description 保存或修改菜单按钮
   */
  submitAction = (btnParam, tabParam) => {
    console.log(tabParam)
    const { config } = this.state
    new Promise(resolve => {
      // 内部请求
@@ -1915,6 +1922,17 @@
    }).then(res => {
      if (res === false) return res
      if (tabParam.LText) {
        Api.getSystemConfig(tabParam).then(result => {
          if (!result.status) {
            notification.warning({
              top: 92,
              message: result.message,
              duration: 10
            })
          }
        })
      }
      if (btnParam.LText) {
        return Api.getSystemConfig(btnParam)
      } else {
@@ -2358,10 +2376,12 @@
      this.setState({
        config: {...config, setting: res},
        settingVisible: false,
        columnsloading: true
        columnsloading: true,
        tabloading: true
      }, () => {
        this.setState({
          columnsloading: false
          columnsloading: false,
          tabloading: false
        })
      })
    })