From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 26 八月 2021 17:17:11 +0800
Subject: [PATCH] 2021-08-26

---
 src/tabviews/zshare/actionList/normalbutton/index.jsx |   37 ++++++++++++++++++++++++++++---------
 1 files changed, 28 insertions(+), 9 deletions(-)

diff --git a/src/tabviews/zshare/actionList/normalbutton/index.jsx b/src/tabviews/zshare/actionList/normalbutton/index.jsx
index 952fd74..737abd4 100644
--- a/src/tabviews/zshare/actionList/normalbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/normalbutton/index.jsx
@@ -3,7 +3,7 @@
 import moment from 'moment'
 import {connect} from 'react-redux'
 import { is, fromJS } from 'immutable'
-import { Button, Modal, notification, message, Drawer } from 'antd'
+import { Button, Modal, notification, message, Drawer, Icon } from 'antd'
 
 import Api from '@/api'
 import Utils, { getSysDefaultSql } from '@/utils/utils.js'
@@ -155,11 +155,6 @@
         message: '闇�瑕佷笂绾т富閿�硷紒',
         duration: 5
       })
-      return
-    }
-
-    if (btn.$syncModule && !triggerId) {
-      MKEmitter.emit('getSyncData', btn.$syncModule, btn.uuid)
       return
     }
 
@@ -357,6 +352,9 @@
             param.$callbacksql = callbacksql
           } else {
             param.LText = getSysDefaultSql(btn, setting, formdata, param, data[0], columns, this.props.Tab, false, this.moduleParams, Utils.getAllSearchOptions) // 鏁版嵁婧�
+            if (btn.OpenType === 'formSubmit' && btn.output) {
+              param.key_back_type = 'Y'
+            }
           }
           
           if (sessionStorage.getItem('dataM') === 'true') { // 鏁版嵁鏉冮檺
@@ -1297,8 +1295,13 @@
       this.sendMessage()
     }
 
+    let id = ''
+    if (btn.output) {
+      id = res.mk_b_id || res[btn.output] || ''
+    }
+
     if (btn.execSuccess !== 'never') {
-      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess || '', btn)
+      MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn, id)
     }
   }
 
@@ -1804,6 +1807,22 @@
         {this.getModels()}
       </div>
     } else { // icon銆乼ext銆� all 鍗$墖
+      let label = ''
+      let icon = ''
+
+      if (show === 'button') {
+        label = btn.label
+        icon = btn.icon || ''
+      } else if (show === 'link') {
+        label = <span>{btn.label}{btn.icon ? <Icon style={{marginLeft: '8px'}} type={btn.icon}/> : ''}</span>
+        icon = ''
+      } else if (show === 'icon') {
+        icon = btn.icon || ''
+      // } else if (show === 'text') {
+      } else {
+        label = btn.label
+      }
+
       return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}>
         <Button
           type="link"
@@ -1811,9 +1830,9 @@
           loading={loading}
           disabled={disabled}
           style={btn.style || style}
-          icon={show === 'text' ? '' : (btn.icon || '')}
+          icon={icon}
           onClick={() => {this.actionTrigger()}}
-        >{show === 'icon' && btn.icon ? '' : btn.label}</Button>
+        >{label}</Button>
         {this.getModels()}
       </div>
     }

--
Gitblit v1.8.0