From 3cca19f42bfc1eb99e16e94dc9e89e3f973bc4a6 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 13 九月 2022 09:21:04 +0800
Subject: [PATCH] 2022-09-13

---
 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
index 0e2884c..6c21f28 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
@@ -1,6 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Input, Radio, Tooltip, Icon, notification, InputNumber } from 'antd'
+import { Form, Row, Col, Input, Radio, Tooltip, notification, InputNumber } from 'antd'
+import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -8,6 +9,8 @@
 import Utils from '@/utils/utils.js'
 import CodeMirror from '@/templates/zshare/codemirror'
 import './index.scss'
+
+const { TextArea } = Input
 
 class SettingForm extends Component {
   static propTpyes = {
@@ -33,7 +36,7 @@
     if (usefulFields) {
       try {
         usefulFields = JSON.parse(usefulFields)
-      } catch {
+      } catch (e) {
         usefulFields = []
       }
     } else {
@@ -136,7 +139,7 @@
             param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
             param.secretkey = Utils.encrypt(param.LText, param.timestamp)
     
-            Api.getLocalConfig(param)
+            Api.genericInterface(param)
           }
 
           resolve(values)
@@ -201,8 +204,8 @@
                       message: dict['form.required.input'] + '琛ㄥ悕!'
                     },
                     {
-                      max: formRule.input.max,
-                      message: formRule.input.message
+                      max: 50,
+                      message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
                     }
                   ]
                 })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
@@ -263,7 +266,7 @@
             {interType === 'inner' ? <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={funcTooltip}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   鍐呴儴鍑芥暟
                 </Tooltip>
               }>
@@ -283,7 +286,7 @@
                 })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
               </Form.Item>
             </Col> : null}
-            {interType === 'outer' ? <Col span={12}>
+            {interType === 'outer' ? <Col span={24} className="data-source">
               <Form.Item label="鎺ュ彛鍦板潃">
                 {getFieldDecorator('interface', {
                   initialValue: setting.interface || '',
@@ -293,7 +296,7 @@
                       message: dict['form.required.input'] + '鎺ュ彛鍦板潃!'
                     }
                   ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+                })(<TextArea rows={2}/>)}
               </Form.Item>
             </Col> : null}
             {interType === 'outer' ? <Col span={12}>
@@ -315,7 +318,7 @@
             {interType === '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={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   鏁版嵁婧�
                 </Tooltip>
               }>
@@ -327,7 +330,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Value
                 </Tooltip>
               }>
@@ -352,7 +355,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Label
                 </Tooltip>
               }>
@@ -377,7 +380,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   Parent
                 </Tooltip>
               }>
@@ -402,7 +405,7 @@
             <Col span={12}>
               <Form.Item label="鎺掑簭">
                 {getFieldDecorator('order', {
-                  initialValue: setting.order || '',
+                  initialValue: setting.order || 'ID desc',
                   rules: [
                     {
                       required: true,
@@ -419,7 +422,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   椤剁骇鏍囪瘑
                 </Tooltip>
               }>
@@ -437,7 +440,7 @@
             <Col span={12}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
-                  <Icon type="question-circle" />
+                  <QuestionCircleOutlined className="mk-form-tip" />
                   瀹藉害
                 </Tooltip>
               }>

--
Gitblit v1.8.0