From ba9e189dd33c8d48f7f4ac36bcefeef9afb426f8 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 17 七月 2023 23:40:49 +0800
Subject: [PATCH] 2023-07-17

---
 src/menu/components/form/formaction/formconfig.jsx       |    2 
 src/tabviews/custom/components/card/prop-card/index.jsx  |   12 ++++-
 src/menu/components/card/data-card/options.jsx           |    1 
 src/menu/components/share/actioncomponent/formconfig.jsx |    4 +-
 src/tabviews/zshare/actionList/normalbutton/index.jsx    |   74 ++++++++++++++++++++++++++----------
 5 files changed, 65 insertions(+), 28 deletions(-)

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 9f2edb2..0be3642 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -107,7 +107,6 @@
         {field: 'empty', values: ['dynamic', 'public']},
         {field: 'jump', values: ['dynamic', 'public']},
         {field: 'broadcast', values: ['dynamic', 'public']},
-        {field: 'autoExec', values: ['dynamic', 'public']},
         {field: 'supModule', values: ['static']},
         {field: 'publicId', values: ['public']},
       ],
diff --git a/src/menu/components/form/formaction/formconfig.jsx b/src/menu/components/form/formaction/formconfig.jsx
index 9d78a8e..2e98dbc 100644
--- a/src/menu/components/form/formaction/formconfig.jsx
+++ b/src/menu/components/form/formaction/formconfig.jsx
@@ -117,7 +117,7 @@
       key: 'procMode',
       label: '鍙傛暟澶勭悊',
       initVal: card.procMode || 'system',
-      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
+      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛锛涘綋杩斿洖鍊煎瓨鍦� mk_ex_data 鏃讹紝灏嗕互姝や负鍙傛暟鍒嗘壒璇锋眰鑷畾涔夋帴鍙c�傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
       required: true,
       options: [{
         value: 'system',
diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index dff3ec2..b8be088 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -344,7 +344,7 @@
       key: 'procMode',
       label: '鍙傛暟澶勭悊',
       initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
-      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
+      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛锛涘綋杩斿洖鍊煎瓨鍦� mk_ex_data 鏃讹紝灏嗕互姝や负鍙傛暟鍒嗘壒璇锋眰鑷畾涔夋帴鍙c�傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
       required: true,
       options: [{
         value: 'system',
@@ -1449,7 +1449,7 @@
       key: 'procMode',
       label: '鍙傛暟澶勭悊',
       initVal: card.procMode || (card.innerFunc ? 'inner' : 'system'),
-      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛銆傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
+      tooltip: '褰撹繑鍥炲�煎瓨鍦� mk_ex_invoke 涓斿�间负 false 鏃讹紝涓嶄細璋冪敤澶栭儴鎺ュ彛锛涘綋杩斿洖鍊煎瓨鍦� mk_ex_data 鏃讹紝灏嗕互姝や负鍙傛暟鍒嗘壒璇锋眰鑷畾涔夋帴鍙c�傛敞锛氬綋閫夆�滄棤鈥濇椂锛屾寜閽�夎鏃朵細浼犻�掍富閿紝瀛樺湪琛ㄥ崟鏃朵細浼犻�掕〃鍗曞瓧娈碉紝瀛樺湪BID鏃朵細浼燘ID瀛楁銆�',
       required: true,
       options: [{
         value: 'system',
diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 837a22d..01d85b5 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -328,7 +328,7 @@
     if ((position === 'mainline' || position === 'popclose') && config.setting.supModule && BID) { // 鍒锋柊婧愮粍浠舵椂锛岄檮甯﹀埛鏂颁笂绾ц涓庡綋鍓嶇粍浠�
       MKEmitter.emit('reloadData', config.setting.supModule, BID)
     } else {
-      this.loadData()
+      this.loadData(false, btn)
     }
   }
 
@@ -384,7 +384,7 @@
     this.loadData()
   }
 
-  async loadData (hastimer) {
+  async loadData (hastimer, btn) {
     const { mainSearch } = this.props
     const { config, arr_field, BID, BData, selected } = this.state
 
@@ -397,6 +397,10 @@
       this.setState({
         data: {$$BID: BID || '', $$BData: BData, $$empty: true},
       })
+
+      if (!btn) {
+        this.autoExec()
+      }
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�
       this.setState({
@@ -455,7 +459,9 @@
           } else {
             this.transferLine()
           }
-          this.autoExec()
+          if (!btn) {
+            this.autoExec()
+          }
         }
       })
 
diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 1d010b2..9ac4aef 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -1211,25 +1211,52 @@
     let record = {
       BID: param.BID || '',
       ID: param.ID || '',
-      callbacksql: param.$callbacksql || ''
+      callbacksql: param.$callbacksql || '',
+      mk_api_key: ''
     }
 
     delete param.$callbacksql
 
-    if (!param.func) {
+    if (param.$pice) {
+      record = param.$record
+
+      delete param.$record
+
+      this.customOuterRequest(params, param, record, _resolve)
+      return
+    } else if (!param.func) {
       this.customOuterRequest(params, param, record, _resolve)
       return
     }
 
     Api.genericInterface(param).then(res => {
+      record.mk_api_key = res.mk_api_key || ''
+
       if (res.status) {
-        if ((res.mk_ex_invoke === 'false' || res.mk_ex_invoke === false) && params.length === 0) {
+        if (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) {
+        } else if (res.mk_ex_invoke + '' === 'false' && params.length > 0) {
           this.customLoopRequest(params, _resolve)
         } else {
-          this.customOuterRequest(params, res, record, _resolve)
+          if (res.mk_ex_data) { // 鏁版嵁鍒嗘壒鎵ц
+            if (Array.isArray(res.mk_ex_data) && res.mk_ex_data.length > 0) {
+              let pices = res.mk_ex_data.map(item => {
+                item.$pice = true
+                item.$record = record
+                return item
+              })
+              params = [...pices, ...params]
+              this.customLoopRequest(params, _resolve)
+            } else if (params.length === 0) {
+              this.execSuccess(res)
+              _resolve()
+            } else {
+              this.customLoopRequest(params, _resolve)
+            }
+          } else {
+            this.customOuterRequest(params, res, record, _resolve)
+          }
         }
       } else {
         this.execError(res)
@@ -1261,21 +1288,26 @@
       url = btn.interface
     }
 
-    let mkey = result.mk_api_key || ''
-
-    delete result.mk_ex_invoke
-    delete result.status
-    delete result.message
-    delete result.ErrCode
-    delete result.ErrMesg
-    delete result.mk_api_key
-
+    
     let param = {}
 
-    Object.keys(result).forEach(key => {
-      key = key.replace(/^mk_/ig, '')
-      param[key] = result[key]
-    })
+    if (result.$pice) {
+      delete result.$pice
+
+      param = {...result}
+    } else {
+      delete result.mk_ex_invoke
+      delete result.status
+      delete result.message
+      delete result.ErrCode
+      delete result.ErrMesg
+      delete result.mk_api_key
+
+      Object.keys(result).forEach(key => {
+        key = key.replace(/^mk_/ig, '')
+        param[key] = result[key]
+      })
+    }
 
     let _params = {
       url: url,
@@ -1331,7 +1363,7 @@
         }
 
         let result = {
-          mk_api_key: mkey,
+          mk_api_key: record.mk_api_key,
           $ErrCode: 'E',
           $ErrMesg: error
         }
@@ -1351,12 +1383,12 @@
           })
         }
         
-        res.mk_api_key = mkey
+        res.mk_api_key = record.mk_api_key
         this.customCallbackRequest(params, res, record, _resolve)
       }
     }, (e) => {
       let result = {
-        mk_api_key: mkey,
+        mk_api_key: record.mk_api_key,
         $ErrCode: 'E',
         $ErrMesg: e && e.statusText ? e.statusText : ''
       }

--
Gitblit v1.8.0