From 1b0fd0a20d54068f0f4716177780e00a75b860ef Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 10 一月 2020 17:12:34 +0800
Subject: [PATCH] 2020-01-10

---
 src/templates/comtableconfig/actionform/index.jsx |   37 ++++++++++++++++++++++++++++++-------
 1 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/src/templates/comtableconfig/actionform/index.jsx b/src/templates/comtableconfig/actionform/index.jsx
index 94154e2..529d81a 100644
--- a/src/templates/comtableconfig/actionform/index.jsx
+++ b/src/templates/comtableconfig/actionform/index.jsx
@@ -97,18 +97,18 @@
     } else if (_opentype === 'outerpage') {                              // 鏂伴〉闈紙澶栭儴锛夛紝闇�瑕侀〉闈㈠湴鍧�
       _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position']
     } else if (_opentype === 'blank' || _opentype === 'tab') {           // 鏂版爣绛炬垨褰撳墠椤甸潰鏇挎崲
-      _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position']
+      _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate']
     } else if (_opentype === 'popview') {                                // 妯℃�佹鏍囩椤�
       _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose']
     } else if (_opentype === 'excelIn' || _opentype === 'excelOut') {    // 瀵煎叆瀵煎嚭
       if (_intertype === 'outer') {
-        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method']
+        _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method']
       } else {
         _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError']
       }
     } else {
       if (_intertype === 'outer') {
-        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method']
+        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'method']
       } else {
         _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
       }
@@ -176,12 +176,12 @@
       } else if (value === 'outerpage') {
         _options = ['label', 'Ot', 'OpenType', 'url', 'icon', 'class', 'position']
       } else if (value === 'blank' || value === 'tab') {
-        _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position']
+        _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabTemplate']
       } else if (value === 'popview') {
         _options = ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose']
       } else if (value === 'excelIn' || value === 'excelOut') {
         if (this.state.interType === 'outer') {
-          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method']
+          _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'icon', 'class', 'execSuccess', 'execError', 'method']
         } else {
           _options = ['label', 'OpenType', 'intertype', 'innerFunc', 'icon', 'class', 'execSuccess', 'execError']
         }
@@ -189,7 +189,7 @@
         if (this.state.interType === 'inner') {
           _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
         } else {
-          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method']
+          _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method']
         }
       }
       this.setState({
@@ -304,12 +304,35 @@
       if (value === 'inner') {
         _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sql', 'sqlType']
       } else {
-        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'interface', 'outerFunc', 'callbackFunc', 'method']
+        _options = ['label', 'position', 'OpenType', 'intertype', 'innerFunc', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'sysInterface', 'interface', 'outerFunc', 'callbackFunc', 'method']
       }
       this.setState({
         interType: value,
         formlist: this.state.formlist.map(item => {
           item.hidden = !_options.includes(item.key)
+          if (item.key === 'interface') {
+            item.readonly = false
+          } else if (item.key === 'sysInterface') {
+            item.initVal = 'false'
+          }
+          return item
+        })
+      })
+    } else if (key === 'sysInterface') {
+      if (value === 'true') {
+        this.props.form.setFieldsValue({
+          interface: window.GLOB.mainSystemApi || window.GLOB.subSystemApi
+        })
+      }
+      this.setState({
+        interType: value,
+        formlist: this.state.formlist.map(item => {
+          if (item.key === 'interface' && value === 'true') {
+            item.readonly = true
+          } else if (item.key === 'interface') {
+            item.readonly = false
+          }
+
           return item
         })
       })

--
Gitblit v1.8.0