From 6def3330d1d1cf4036916ed04c8bbc4128e1e5d0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 03 五月 2020 19:42:17 +0800
Subject: [PATCH] 2020-05-03

---
 src/templates/sharecomponent/actioncomponent/index.jsx |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/index.jsx b/src/templates/sharecomponent/actioncomponent/index.jsx
index e7babb6..5ab5758 100644
--- a/src/templates/sharecomponent/actioncomponent/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/index.jsx
@@ -28,6 +28,7 @@
     type: PropTypes.string,          // 鑿滃崟绫诲瀷锛屼富琛ㄦ垨瀛愯〃
     menu: PropTypes.object,          // 鑿滃崟淇℃伅锛堣彍鍗昳d锛岃彍鍗曞弬鏁帮紝鑿滃崟鍚嶇О锛�
     config: PropTypes.object,        // 鑿滃崟閰嶇疆淇℃伅
+    menuformRef: PropTypes.any,      // 鑿滃崟鍩烘湰淇℃伅琛ㄥ崟瀵硅薄
     pasteContent: PropTypes.object,  // 绮樿创閰嶇疆淇℃伅
     usefulFields: PropTypes.array,   // 鑷畾涔夊嚱鏁板彲鐢ㄥ瓧娈�
     tabs: PropTypes.array,           // 鎵�鏈夋爣绛�
@@ -130,9 +131,14 @@
    * 4銆佷笅鎷夎彍鍗曟暟鎹簮璇硶楠岃瘉
    */
   handleSubmit = () => {
-    const { config, menu } = this.props
+    const { config, menuformRef } = this.props
     const { card } = this.state
     let _actionlist = fromJS(this.state.actionlist).toJS()
+    let menu = fromJS(this.props.menu).toJS() // 鑿滃崟淇℃伅锛屽瓨鍦ㄨ〃鍗曞璞℃椂锛屼粠鑿滃崟涓洿鏂�
+
+    if (menuformRef) {
+      menu = {...menu, MenuName: menuformRef.props.form.getFieldValue('MenuName'), MenuNo: menuformRef.props.form.getFieldValue('MenuNo')}
+    }
 
     this.actionFormRef.handleConfirm().then(btn => {
       _actionlist = _actionlist.filter(item => !item.origin || item.uuid === btn.uuid)
@@ -620,8 +626,13 @@
    * @description 鍒涘缓鎸夐挳瀛樺偍杩囩▼
    */
   creatFunc = () => {
-    const { menu, config } = this.props
+    const { config, menuformRef } = this.props
     let _config = fromJS(this.props.config).toJS()
+    let menu = fromJS(this.props.menu).toJS() // 鑿滃崟淇℃伅锛屽瓨鍦ㄨ〃鍗曞璞℃椂锛屼粠鑿滃崟涓洿鏂�
+
+    if (menuformRef) {
+      menu = {...menu, MenuName: menuformRef.props.form.getFieldValue('MenuName'), MenuNo: menuformRef.props.form.getFieldValue('MenuNo')}
+    }
 
     this.actionFormRef.handleConfirm().then(res => {
       let btn = res         // 鎸夐挳淇℃伅
@@ -787,7 +798,12 @@
    * @description 鍒涘缓鎸夐挳鎺ュ彛锛堝啓鍏ワ級
    */
   btnCreatInterface = () => {
-    const { config, menu, type } = this.props
+    const { config, type, menuformRef } = this.props
+    let menu = fromJS(this.props.menu).toJS() // 鑿滃崟淇℃伅锛屽瓨鍦ㄨ〃鍗曞璞℃椂锛屼粠鑿滃崟涓洿鏂�
+
+    if (menuformRef) {
+      menu = {...menu, MenuName: menuformRef.props.form.getFieldValue('MenuName'), MenuNo: menuformRef.props.form.getFieldValue('MenuNo')}
+    }
 
     this.actionFormRef.handleConfirm().then(result => {
       

--
Gitblit v1.8.0