king
2019-12-14 2b84af9bed8f4b7da94a4bb85e7223d3b18e4fcb
src/templates/comtableconfig/index.jsx
@@ -1085,11 +1085,13 @@
              }
              let _param = {
                funcName: btn.innerFunc,
                name: _config.setting.tableName || '',
                fields: fields
                fields: fields,
                menuNo: this.props.menu.MenuNo
              }
              LText = Utils.formatOptions(Utils.getfunc(_param))
              DelText = Utils.formatOptions(Utils.dropfunc(_param.name))
              DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName))
              resolve(true)
            } else {
              resolve(false)
@@ -1102,11 +1104,13 @@
          })
        } else {
          let _param = {
            funcName: btn.innerFunc,
            name: _config.setting.tableName || '',
            fields: ''
            fields: '',
            menuNo: this.props.menu.MenuNo
          }
          LText = Utils.formatOptions(Utils.getfunc(_param))
          DelText = Utils.formatOptions(Utils.dropfunc(_param.name))
          DelText = Utils.formatOptions(Utils.dropfunc(_param.funcName))
          resolve(true)
        }
      }).then(res => {
@@ -1193,25 +1197,8 @@
        }
        _param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
        _param.secretkey = Utils.encrypt(_param.LText, _param.timestamp)
        return Api.getSystemConfig(_param)
      }).then(res => {
        console.log(res)
        if (res === false) return res
        if (!res.status) {
          notification.warning({
            top: 92,
            message: res.message,
            duration: 10
          })
          return false
        } else {
          notification.success({
            top: 92,
            message: '创建成功',
            duration: 5
          })
        }
        return Api.getSystemConfig(_param)
      }).then(res => {
        console.log(res)
        if (res === false) return res
@@ -1237,9 +1224,9 @@
        let isupdate = false
        _config.action = _config.action.map(item => {
          if (item.uuid === res.values.uuid) {
          if (item.uuid === btn.uuid) {
            isupdate = true
            return res.values
            return btn
          } else {
            return item
          }
@@ -1248,7 +1235,7 @@
        if (!isupdate) { // 操作不是修改,添加元素至列表
          _config.action.push(res.values)
          _config.action.push(btn)
        }
        let gridbtn = _config.action.filter(act => act.position === 'grid')
@@ -1449,13 +1436,17 @@
    const { config } = this.state
    new Promise(resolve => {
      // 内部请求
      Api.getSystemConfig(param).then(response => {
        if (response.status) {
          resolve('true')
        } else {
          resolve(response)
        }
      })
      if (param.LText) {
        Api.getSystemConfig(param).then(response => {
          if (response.status) {
            resolve('true')
          } else {
            resolve(response)
          }
        })
      } else {
        resolve('true')
      }
    }).then(res => {
      console.log(res)
      if (res === 'true' && this.state.delActions.length > 0) {