From 606b0b991748740179fa37448f645e6e9c7f1c41 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 24 一月 2021 19:17:38 +0800
Subject: [PATCH] 2021-01-24

---
 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
index 53ea2eb..dd2f8e1 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -19,11 +19,12 @@
     setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
     columns: PropTypes.array,     // 鍒楄缃�
     scripts: PropTypes.array,     // 鑷畾涔夎剼鏈�
+    updateStatus: PropTypes.func, // 鐘舵�佹洿鏂�
   }
 
   state = {
     interType: 'system',
-    procMode: 'system',
+    procMode: 'script',
     requestMode: 'system',
     funcTooltip: '',
     funcRules: []
@@ -59,7 +60,7 @@
 
     this.setState({
       interType: setting.interType || 'system',
-      procMode: setting.procMode || 'system',
+      procMode: setting.procMode || 'script',
       requestMode: setting.requestMode || 'system',
       funcTooltip: tooltip,
       funcRules: rules
@@ -175,6 +176,7 @@
         interface: window.GLOB.mainSystemApi || ''
       })
     }
+    this.props.updateStatus({[key]: value})
   }
 
   primaryKeyChange = (val) => {
@@ -279,7 +281,7 @@
                   ]
                 })(
                 <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => {this.onRadioChange(e, 'procMode')}}>
-                  <Radio value="system">鍓嶇疆鑴氭湰</Radio>
+                  <Radio value="script">鍓嶇疆鑴氭湰</Radio>
                   <Radio value="inner">鍓嶇疆鍑芥暟</Radio>
                 </Radio.Group>)}
               </Form.Item>
@@ -463,15 +465,32 @@
             {interType === 'custom' ? <Col span={12}>
               <Form.Item label="鍥炶皟鏂瑰紡">
                 {getFieldDecorator('callbackType', {
-                  initialValue: setting.callbackType || 'default'
+                  initialValue: setting.callbackType || 'script'
                 })(
-                <Radio.Group>
+                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'callbackType')}}>
                   <Radio value="default">榛樿鑴氭湰</Radio>
                   <Radio value="script">鑷畾涔夎剼鏈�</Radio>
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
             {interType === 'custom' ? <Col span={12}>
+              <Form.Item label="鍥炶皟琛ㄥ悕">
+                {getFieldDecorator('cbTable', {
+                  initialValue: setting.cbTable || '',
+                  rules: [
+                    {
+                      required: true,
+                      message: dict['form.required.input'] + '鍥炶皟琛ㄥ悕!'
+                    },
+                    {
+                      max: formRule.input.max,
+                      message: formRule.input.message
+                    }
+                  ]
+                })(<Input placeholder={''} autoComplete="off" />)}
+              </Form.Item>
+            </Col> : null}
+            {interType === 'custom' ? <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鍚屾鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄦ垚鍔熷悗鍐嶈姹傛暟鎹紱寮傛鎵ц锛氬閮ㄦ帴鍙h皟鐢ㄤ笌璇锋眰鏁版嵁鍚屾椂杩涜銆�'}>
                   <Icon type="question-circle" />

--
Gitblit v1.8.0