king
2025-04-17 006384185b5cc43140ae23cbc8fc1da96bcee45d
2025-04-17
3个文件已修改
62 ■■■■ 已修改文件
src/menu/components/form/formaction/formconfig.jsx 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/share/actioncomponent/formconfig.jsx 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tabviews/zshare/actionList/normalbutton/index.jsx 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/menu/components/form/formaction/formconfig.jsx
@@ -210,7 +210,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || 'system',
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_invoke 且值为 true_inside 时,将跳过外部接口直接调用回调(回调参数请使用 mk_in_api 返回);当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      required: true,
      options: [{
        value: 'system',
src/menu/components/share/actioncomponent/formconfig.jsx
@@ -474,7 +474,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_invoke 且值为 true_inside 时,将跳过外部接口直接调用回调(回调参数请使用 mk_in_api 返回);当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      required: true,
      options: [{
        value: 'system',
@@ -1988,7 +1988,7 @@
      key: 'procMode',
      label: '参数处理',
      initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      tooltip: '当返回值存在 mk_ex_invoke 且值为 false 时,不会调用外部接口;当返回值存在 mk_ex_invoke 且值为 true_inside 时,将跳过外部接口直接调用回调(回调参数请使用 mk_in_api 返回);当返回值存在 mk_ex_data 时,将以此为参数分批请求自定义接口。注:当选“无”时,按钮选行时会传递主键,存在表单时会传递表单字段,存在BID时会传BID字段。',
      required: true,
      options: [{
        value: 'system',
src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1748,11 +1748,23 @@
      record.mk_api_key = res.mk_api_key || ''
      if (res.status) {
        if (res.mk_ex_invoke + '' === 'false' && params.length === 0) {
          this.execSuccess(res)
          _resolve()
        } else if (res.mk_ex_invoke + '' === 'false' && params.length > 0) {
          this.customLoopRequest(params, _resolve)
        res.mk_ex_invoke = res.mk_ex_invoke + ''
        if (res.mk_ex_invoke === 'false') {
          if (params.length === 0) {
            this.execSuccess(res)
            _resolve()
          } else {
            this.customLoopRequest(params, _resolve)
          }
        } else if (res.mk_ex_invoke === 'true_inside') {
          let data = res.mk_in_api && typeof(res.mk_in_api) === 'object' ? res.mk_in_api : {}
          if (!data.hasOwnProperty('mk_api_key')) {
            data.mk_api_key = record.mk_api_key
          }
          this.customCallbackRequest(params, data, record, _resolve)
        } else {
          if (res.mk_ex_data) { // 数据分批执行
            if (Array.isArray(res.mk_ex_data) && res.mk_ex_data.length > 0) {
@@ -2464,7 +2476,7 @@
   * @description 外部请求循环执行
   */
  outerLoopRequest = (params, _resolve) => {
    const { setting, btn } = this.props
    const { setting, btn, BID } = this.props
    let param = params.shift()
@@ -2493,11 +2505,29 @@
    Api.genericInterface(param, btn.$innerScript, 'inner').then(res => {
      if (res.status) {
        if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) {
          this.execSuccess(res)
          _resolve()
        } else if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length > 0) {
          this.outerLoopRequest(params, _resolve)
        res.mk_ex_invoke = res.mk_ex_invoke + ''
        if (res.mk_ex_invoke === 'false') {
          if (params.length === 0) {
            this.execSuccess(res)
            _resolve()
          } else {
            this.outerLoopRequest(params, _resolve)
          }
        } else if (res.mk_ex_invoke === 'true_inside') {
          let data = res.mk_in_api && typeof(res.mk_in_api) === 'object' ? res.mk_in_api : {}
          if (!data.hasOwnProperty('mk_api_key')) {
            data.mk_api_key = res.mk_api_key || ''
          }
          // 使用处理后的数据调用外部接口
          let keys = Object.keys(data) // 提交外部接口前,添加BID
          if (BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
            data.BID = BID
          }
          this.outerCallbackRequest(params, data, record, {}, _resolve)
        } else {
          delete res.mk_ex_invoke
          delete res.ErrCode
@@ -2507,8 +2537,8 @@
          // 使用处理后的数据调用外部接口
          let keys = Object.keys(res) // 提交外部接口前,添加BID
          if (this.props.BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
            res.BID = this.props.BID
          if (BID && keys.filter(key => key.toLowerCase() === 'bid').length === 0) {
            res.BID = BID
          }
          if (res.mk_api_key) {