king
2023-05-15 b20a4d7c75c2ff8951e93d9c0394df9277fc6093
2023-05-15
5个文件已修改
125 ■■■■ 已修改文件
src/menu/components/share/actioncomponent/actionform/index.jsx 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/sharecomponent/actioncomponent/actionform/index.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/templates/zshare/formconfig.jsx 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/actionform/index.jsx
@@ -206,6 +206,9 @@
        }
      } else if (intertype === 'inner') {
        shows.push('innerFunc', 'output')
        if (Ot === 'requiredOnce') { // 前置函数
          shows.push('preFunc')
        }
        reRequired.innerFunc = true
      } else {
        shows.push('sql', 'sqlType', 'output')
@@ -763,7 +766,7 @@
            { pattern: /^[a-zA-Z0-9@_]+$/, message: '表名只可使用字母、数字以及_' },
            { max: formRule.func.max, message: formRule.func.maxMessage }
          )
        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc') {
        } else if (item.key === 'outerFunc' || item.key === 'callbackFunc' || item.key === 'preFunc') {
          rules.push(
            { pattern: formRule.func.pattern, message: formRule.func.message },
            { max: formRule.func.max, message: formRule.func.maxMessage }
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -974,6 +974,15 @@
      }]
    },
    {
      type: 'text',
      key: 'preFunc',
      label: '前置函数',
      initVal: card.preFunc || '',
      tooltip: '前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。',
      required: false,
      forbid: appType === 'mob'
    },
    {
      type: 'radio',
      key: 'control',
      label: '按钮控制',
@@ -1824,6 +1833,14 @@
      }]
    },
    {
      type: 'text',
      key: 'preFunc',
      label: '前置函数',
      initVal: card.preFunc || '',
      tooltip: '前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。',
      required: false
    },
    {
      type: 'radio',
      key: 'control',
      label: '按钮控制',
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1061,37 +1061,48 @@
      if (params[0].$unCheckParam) {
        this.checkLoopRequest(params, _resolve)
      } else if (btn.preFunc && params.length === 1) {
        let param = params[0]
        let _param = fromJS(param).toJS()
        _param.func = btn.preFunc
        Api.genericInterface(_param).then(res => {
          if (res.status) {
            if (res.ErrCode !== '-1') {
              param = {...param, ...res}
              delete param.status
              delete param.ErrCode
              delete param.ErrMesg
              delete param.message
              setTimeout(() => {
                Api.genericInterface(param).then(result => {
                  if (!result.status) {
                    notification.warning({
                      top: 92,
                      message: result.message,
                      duration: 5
                    })
                  }
                })
              }, 600)
            }
            this.triggerNote(res) // 消息
            this.execSuccess(res)
          } else {
            this.execError(res)
          }
        }, () => {
          this.updateStatus()
          _resolve()
        })
      } else if (params.length <= 20 && btn.execType !== 'single') {
        let deffers = params.map((param, i) => {
          return new Promise(resolve => {
            setTimeout(() => {
              let _param = null
              if (btn.preFunc) {
                _param = fromJS(param).toJS()
                param.func = btn.preFunc
              }
              Api.genericInterface(param).then(res => {
                if (btn.preFunc && res.status && res.ErrCode !== '-1') {
                  _param = {..._param, ...res}
                  delete _param.status
                  delete _param.ErrCode
                  delete _param.ErrMesg
                  delete _param.message
                  setTimeout(() => {
                    Api.genericInterface(_param).then(result => {
                      if (!result.status) {
                        notification.warning({
                          top: 92,
                          message: result.message,
                          duration: 5
                        })
                      }
                    })
                  }, 600)
                }
                if (res.status) {
                  this.triggerNote(res) // 消息
                }
@@ -1566,36 +1577,8 @@
      loadingNumber: params.length
    })
    let _param = null
    if (btn.preFunc) {
      _param = fromJS(param).toJS()
      param.func = btn.preFunc
    }
    Api.genericInterface(param).then(res => {
      if (res.status) {
        if (btn.preFunc && res.ErrCode !== '-1') {
          _param = {..._param, ...res}
          delete _param.status
          delete _param.ErrCode
          delete _param.ErrMesg
          delete _param.message
          setTimeout(() => {
            Api.genericInterface(_param).then(result => {
              if (!result.status) {
                notification.warning({
                  top: 92,
                  message: result.message,
                  duration: 5
                })
              }
            })
          }, 600)
        }
        this.triggerNote(res) // 消息
        if (params.length === 0) {
src/templates/sharecomponent/actioncomponent/actionform/index.jsx
@@ -186,7 +186,7 @@
          reReadonly.interface = true
          reRequired.interface = false
        }
      } else if (intertype === 'inner') { // preFunc 前置函数
      } else if (intertype === 'inner') {
        shows.push('innerFunc', 'output')
        reRequired.innerFunc = true
      } else {
src/templates/zshare/formconfig.jsx
@@ -1521,16 +1521,6 @@
      }]
    },
    {
      type: 'text',
      key: 'preFunc',
      label: '前置函数',
      initVal: card.preFunc || '',
      tooltip: usefulFields.length ? `函数名称需以${usefulFields.join(', ')}等字符开始;前置函数执行完成后,结果会传入内部函数中,此时内部函数会异步执行;当前置函数返回中ErrCode等于-1时,将不再执行内部函数。` : '',
      fields: usefulFields,
      required: false,
      readonly: false
    },
    {
      type: 'radio',
      key: 'control',
      label: '按钮控制',