From 1da6506bf58270bacc2a4345002c6b082835580e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 十月 2021 23:17:08 +0800
Subject: [PATCH] 2021-10-21

---
 src/menu/datasource/verifycard/settingform/index.jsx |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx
index d7916a3..abdd2ad 100644
--- a/src/menu/datasource/verifycard/settingform/index.jsx
+++ b/src/menu/datasource/verifycard/settingform/index.jsx
@@ -33,10 +33,7 @@
   UNSAFE_componentWillMount () {
     const { menu, config } = this.props
 
-    let modules = MenuUtils.getSupModules(menu.components, config.uuid)
-    if (!modules) {
-      modules = []
-    }
+    let modules = MenuUtils.getSupModules(menu.components, config.uuid) || []
 
     modules.unshift({
       value: 'empty',
@@ -47,7 +44,7 @@
     if (usefulFields) {
       try {
         usefulFields = JSON.parse(usefulFields)
-      } catch {
+      } catch (e) {
         usefulFields = []
       }
     } else {
@@ -137,6 +134,14 @@
     }
   }
 
+  onSysInter = (e) => {
+    let value = e.target.value
+
+    if (value === 'true') {
+      this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi})
+    }
+  }
+
   changeSupModule = (val) => {
     this.setState({supModule: val})
   }
@@ -210,6 +215,17 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col>
+            {interType === 'outer' ? <Col span={8}>
+              <Form.Item label="绯荤粺鎺ュ彛">
+                {getFieldDecorator('sysInterface', {
+                  initialValue: setting.sysInterface || 'false'
+                })(
+                <Radio.Group onChange={this.onSysInter}>
+                  <Radio value="true">鏄�</Radio>
+                  <Radio value="false">鍚�</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col> : null}
             {interType === 'system' ? <Col span={8}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鑷畾涔夎剼鏈腑鐨勫彉閲忥紙闄ゆ姤閿欏強鍙敤瀛楁澶栵級锛岄渶浠ユ鏍囪瘑寮�澶淬��'}>
@@ -455,6 +471,17 @@
                 )}
               </Form.Item>
             </Col> : null}
+            <Col span={8}>
+              <Form.Item label="浜嬪姟">
+                {getFieldDecorator('transaction', {
+                  initialValue: setting.transaction || 'false'
+                })(
+                <Radio.Group>
+                  <Radio value="true">浣跨敤</Radio>
+                  <Radio value="false">涓嶄娇鐢�</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col>
             {config.type !== 'navbar' && config.type !== 'balcony' ? <Col span={8}>
               <Form.Item label="鍒濆鍖栨暟鎹�">
                 {getFieldDecorator('onload', {

--
Gitblit v1.8.0