From 69070570c9b5c4f1c5ca38eaf052f1a72e5fd888 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 09 六月 2022 00:54:06 +0800
Subject: [PATCH] 2022-06-09

---
 src/menu/components/form/formaction/actionform/index.jsx |   28 ++++++++++++++++++++++------
 1 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/src/menu/components/form/formaction/actionform/index.jsx b/src/menu/components/form/formaction/actionform/index.jsx
index 8021155..3dc6914 100644
--- a/src/menu/components/form/formaction/actionform/index.jsx
+++ b/src/menu/components/form/formaction/actionform/index.jsx
@@ -21,6 +21,7 @@
     formlist: null,  // 琛ㄥ崟淇℃伅
     interType: null, // 鎺ュ彛绫诲瀷锛氬唴閮ㄣ�佸閮�
     procMode: null,  // 鍙傛暟鏂瑰紡
+    linkmenu: null
   }
 
   
@@ -30,11 +31,12 @@
     let _intertype = card.intertype || 'system'  // 鎺ュ彛绫诲瀷
     let _procMode = card.procMode || 'system'    // 鍙傛暟璇锋眰鏂瑰紡
 
-    let _options = this.getOptions(_intertype, _procMode)
+    let _options = this.getOptions(_intertype, _procMode, card.linkmenu)
 
     this.setState({
       interType: _intertype,
       procMode: _procMode,
+      linkmenu: card.linkmenu,
       formlist: this.props.formlist.map(item => {
         if (item.key === 'innerFunc' && _procMode === 'inner') {
           item.required = true
@@ -46,7 +48,7 @@
     })
   }
 
-  getOptions = (_intertype, _procMode) => {
+  getOptions = (_intertype, _procMode, linkmenu) => {
     const { card } = this.props
 
     if (card.type === 'prev') {
@@ -54,7 +56,7 @@
     } else if (card.type === 'next') {
       return ['type', 'label', 'enable']
     }
-    let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'open', 'enable', 'output', 'reload'] // 閫夐」鍒楄〃
+    let _options = ['type', 'label', 'intertype', 'Ot', 'execSuccess', 'syncComponent', 'anchors', 'linkmenu', 'enable', 'output', 'reload'] // 閫夐」鍒楄〃
     
     if (_intertype === 'custom') {
       _options.pop()
@@ -71,6 +73,10 @@
     } else {
       _options.push('sql', 'sqlType')
     }
+    
+    if (linkmenu && linkmenu !== 'goback') {
+      _options.push('open')
+    }
 
     return _options
   }
@@ -82,10 +88,10 @@
    * 3銆佸垏鎹㈡爣绛剧被鍨嬶紝閲嶇疆鍙�夋爣绛�
    */
   optionChange = (key, value) => {
-    const { procMode } = this.state
+    const { procMode, linkmenu } = this.state
 
     if (key === 'intertype') {
-      let _options = this.getOptions(value, procMode)
+      let _options = this.getOptions(value, procMode, linkmenu)
 
       this.setState({
         interType: value,
@@ -101,7 +107,7 @@
         })
       })
     } else if (key === 'procMode') {
-      let _options = this.getOptions(this.state.interType, value)
+      let _options = this.getOptions(this.state.interType, value, linkmenu)
 
       this.setState({
         procMode: value,
@@ -114,6 +120,16 @@
           return item
         })
       })
+    } else if (key === 'linkmenu') {
+      let _options = this.getOptions(this.state.interType, procMode, value)
+
+      this.setState({
+        linkmenu: value,
+        formlist: this.state.formlist.map(item => {
+          item.hidden = !_options.includes(item.key)
+          return item
+        })
+      })
     } else if (key === 'sysInterface') {
       if (value === 'true') {
         this.props.form.setFieldsValue({

--
Gitblit v1.8.0