From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 九月 2021 10:31:45 +0800
Subject: [PATCH] 2021-09-01

---
 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx |   67 +++++++++++++++++++++++++++++----
 1 files changed, 58 insertions(+), 9 deletions(-)

diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
index dd2f8e1..8069d17 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Tooltip, Icon, notification, Select } from 'antd'
+import { Form, Row, Col, Input, Radio, Tooltip, Icon, notification, Select, InputNumber } from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -37,7 +37,7 @@
     if (usefulFields) {
       try {
         usefulFields = JSON.parse(usefulFields)
-      } catch {
+      } catch (e) {
         usefulFields = []
       }
     } else {
@@ -216,6 +216,10 @@
                       required: true,
                       message: dict['form.required.input'] + '琛ㄥ悕!'
                     },
+                    {
+                      max: 50,
+                      message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
+                    }
                   ]
                 })(<Input placeholder={''} autoComplete="off" />)}
               </Form.Item>
@@ -293,8 +297,8 @@
                   鍓嶇疆鍑芥暟
                 </Tooltip>
               }>
-                {getFieldDecorator('innerFunc', {
-                  initialValue: setting.innerFunc || '',
+                {getFieldDecorator('prevFunc', {
+                  initialValue: setting.prevFunc || '',
                   rules: [
                     {
                       required: true,
@@ -310,19 +314,19 @@
               </Form.Item>
             </Col> : null}
             {interType === 'outer' || interType === 'custom' ? <Col className="data-source" span={24}>
-              <Form.Item label="鎺ュ彛鍦板潃">
+              <Form.Item label="娴嬭瘯鍦板潃">
                 {getFieldDecorator('interface', {
                   initialValue: setting.interface || '',
                   rules: [
                     {
                       required: true,
-                      message: dict['form.required.input'] + '鎺ュ彛鍦板潃!'
+                      message: dict['form.required.input'] + '娴嬭瘯鍦板潃!'
                     },
                   ]
                 })(<TextArea rows={2} />)}
               </Form.Item>
             </Col> : null}
-            {interType === 'custom' ? <Col className="data-source" span={24}>
+            {interType === 'outer' || interType === 'custom' ? <Col className="data-source" span={24}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title="姝e紡绯荤粺鎵�浣跨敤鐨勭殑鎺ュ彛鍦板潃銆�">
                   <Icon type="question-circle" />
@@ -332,6 +336,23 @@
                 {getFieldDecorator('proInterface', {
                   initialValue: setting.proInterface || ''
                 })(<TextArea rows={2} />)}
+              </Form.Item>
+            </Col> : null}
+            {interType === 'custom' ? <Col span={12}>
+              <Form.Item label="璇锋眰鏂瑰紡">
+                {getFieldDecorator('method', {
+                  initialValue: setting.method || 'post',
+                  rules: [
+                    {
+                      required: true,
+                      message: dict['form.required.select'] + '璇锋眰鏂瑰紡!'
+                    },
+                  ]
+                })(
+                <Radio.Group>
+                  <Radio value="get">GET</Radio>
+                  <Radio value="post">POST</Radio>
+                </Radio.Group>)}
               </Form.Item>
             </Col> : null}
             {interType === 'custom' ? <Col span={12}>
@@ -392,7 +413,7 @@
             </Col> : null}
             {interType === 'system' || (interType === 'custom' && requestMode === 'system') ? <Col span={24} className="data-source" style={{paddingLeft: '7px'}}>
               <Form.Item help={'鏁版嵁ID锛�' + menu.MenuID} labelCol={{xs: { span: 24 }, sm: { span: 4 }}} wrapperCol={ {xs: { span: 24 }, sm: { span: 20 }} } label={
-                <Tooltip placement="topLeft" title={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}>
+                <Tooltip placement="topLeft" title={`浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� ''銆� @$ -> */ 鎴� ''锛涙煡璇㈡浛鎹㈢ $select@ -> /* 鎴� ''銆� @select$ -> */ 鎴� ''锛涚粺璁℃浛鎹㈢ $sum@ -> /* 鎴� ''銆� @sum$ -> */ 鎴� ''銆俙}>
                   <Icon type="question-circle" />
                   鏁版嵁婧�
                 </Tooltip>
@@ -448,7 +469,7 @@
             <Col span={12}>
               <Form.Item label="榛樿鎺掑簭">
                 {getFieldDecorator('order', {
-                  initialValue: setting.order || '',
+                  initialValue: setting.order || 'ID desc',
                   rules: [
                     {
                       required: true,
@@ -503,6 +524,22 @@
                 <Radio.Group>
                   <Radio value="sync">鍚屾</Radio>
                   <Radio value="async">寮傛</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col> : null}
+            {interType === 'custom' ? <Col span={12}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title={'濡傛灉鑷畾涔夋帴鍙d笉鏀寔璺ㄥ煙璇锋眰锛屼細閫氳繃褰撳墠绯荤粺杞彂銆�'}>
+                  <Icon type="question-circle" />
+                  璺ㄥ煙璇锋眰
+                </Tooltip>
+              }>
+                {getFieldDecorator('cross', {
+                  initialValue: setting.cross || 'true'
+                })(
+                <Radio.Group>
+                  <Radio value="true">鏀寔</Radio>
+                  <Radio value="false">涓嶆敮鎸�</Radio>
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
@@ -579,6 +616,18 @@
             </Col>
             <Col span={12}>
               <Form.Item label={
+                <Tooltip placement="topLeft" title="楂樼骇鎼滅储寮圭獥鐨勫搴︼紝娉細褰撳搴﹀�煎皬浜�100鏃惰〃绀哄崰绐楀彛鐨勭櫨鍒嗘瘮锛屽ぇ浜�100鏃惰〃绀哄搴︾殑缁濆鍊笺��">
+                  <Icon type="question-circle" />
+                  楂樼骇鎼滅储
+                </Tooltip>
+              }>
+                {getFieldDecorator('advanceWidth', {
+                  initialValue: setting.advanceWidth || 1000
+                })(<InputNumber min={10} max={3000} precision={0}/>)}
+              </Form.Item>
+            </Col>
+            <Col span={12}>
+              <Form.Item label={
                 <Tooltip placement="topLeft" title="鍙屽嚮琛ㄦ牸涓锛岃Е鍙戠殑鎸夐挳銆�">
                   <Icon type="question-circle" />
                   鍙屽嚮浜嬩欢

--
Gitblit v1.8.0