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

---
 src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx |  622 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 310 insertions(+), 312 deletions(-)

diff --git a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
index 6c21f28..48382e0 100644
--- a/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/treesettingcomponent/settingform/datasource/index.jsx
@@ -8,7 +8,7 @@
 import { formRule } from '@/utils/option.js'
 import Utils from '@/utils/utils.js'
 import CodeMirror from '@/templates/zshare/codemirror'
-import './index.scss'
+// import './index.scss'
 
 const { TextArea } = Input
 
@@ -191,317 +191,315 @@
     }
 
     return (
-      <div className="model-table-datasource-setting-form-box">
-        <Form {...formItemLayout} className="model-setting-form">
-          <Row gutter={24}>
-            <Col span={12}>
-              <Form.Item label="琛ㄥ悕">
-                {getFieldDecorator('tableName', {
-                  initialValue: setting.tableName || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '琛ㄥ悕!'
-                    },
-                    {
-                      max: 50,
-                      message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="鏍囬">
-                {getFieldDecorator('title', {
-                  initialValue: setting.title || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '鏍囬!'
-                    },
-                    {
-                      max: formRule.input.max,
-                      message: formRule.input.message
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={dict['header.form.intertype']}>
-                {getFieldDecorator('interType', {
-                  initialValue: interType,
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.select'] + dict['header.form.intertype'] + '!'
-                    }
-                  ]
-                })(
-                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
-                  <Radio value="system">绯荤粺</Radio>
-                  <Radio value="inner">鍐呴儴</Radio>
-                  <Radio value="outer">澶栭儴</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col>
-            {interType === 'outer' ? <Col span={12}>
-              <Form.Item label={dict['header.form.sysInterface']}>
-                {getFieldDecorator('sysInterface', {
-                  initialValue: setting.sysInterface || 'false',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!'
-                    },
-                  ]
-                })(
-                <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}>
-                  <Radio value="true">{dict['model.true']}</Radio>
-                  <Radio value="false">{dict['model.false']}</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col> : null}
-            {interType === 'inner' ? <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={funcTooltip}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  鍐呴儴鍑芥暟
-                </Tooltip>
-              }>
-                {getFieldDecorator('innerFunc', {
-                  initialValue: setting.innerFunc || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '鍐呴儴鍑芥暟!'
-                    },
-                    {
-                      max: formRule.func.max,
-                      message: formRule.func.maxMessage
-                    },
-                    ...funcRules
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col> : null}
-            {interType === 'outer' ? <Col span={24} className="data-source">
-              <Form.Item label="鎺ュ彛鍦板潃">
-                {getFieldDecorator('interface', {
-                  initialValue: setting.interface || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '鎺ュ彛鍦板潃!'
-                    }
-                  ]
-                })(<TextArea rows={2}/>)}
-              </Form.Item>
-            </Col> : null}
-            {interType === 'outer' ? <Col span={12}>
-              <Form.Item label="澶栭儴鍑芥暟">
-                {getFieldDecorator('outerFunc', {
-                  initialValue: setting.outerFunc || '',
-                  rules: [
-                    {
-                      pattern: formRule.func.pattern,
-                      message: formRule.func.message
-                    }, {
-                      max: formRule.func.max,
-                      message: formRule.func.maxMessage
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col> : null}
-            {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={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  鏁版嵁婧�
-                </Tooltip>
-              }>
-                {getFieldDecorator('dataresource', {
-                  initialValue: setting.dataresource || ''
-                })(<CodeMirror />)}
-              </Form.Item>
-            </Col> : null}
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  Value
-                </Tooltip>
-              }>
-                {getFieldDecorator('valueField', {
-                  initialValue: setting.valueField || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + 'Value!'
-                    },
-                    {
-                      pattern: formRule.field.pattern,
-                      message: formRule.field.message
-                    }, {
-                      max: formRule.field.max,
-                      message: formRule.field.maxMessage
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  Label
-                </Tooltip>
-              }>
-                {getFieldDecorator('labelField', {
-                  initialValue: setting.labelField || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + 'Label!'
-                    },
-                    {
-                      pattern: formRule.field.pattern,
-                      message: formRule.field.message
-                    }, {
-                      max: formRule.field.max,
-                      message: formRule.field.maxMessage
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  Parent
-                </Tooltip>
-              }>
-                {getFieldDecorator('parentField', {
-                  initialValue: setting.parentField || '',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + 'Label!'
-                    },
-                    {
-                      pattern: formRule.field.pattern,
-                      message: formRule.field.message
-                    }, {
-                      max: formRule.field.max,
-                      message: formRule.field.maxMessage
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="鎺掑簭">
-                {getFieldDecorator('order', {
-                  initialValue: setting.order || 'ID desc',
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '鎺掑簭!'
-                    },
-                    {
-                      max: formRule.input.max,
-                      message: formRule.input.message
-                    }
-                  ]
-                })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  椤剁骇鏍囪瘑
-                </Tooltip>
-              }>
-                {getFieldDecorator('mark', {
-                  initialValue: setting.mark || '',
-                  rules: [
-                    {
-                      max: formRule.input.max,
-                      message: formRule.input.message
-                    }
-                  ]
-                })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label={
-                <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
-                  <QuestionCircleOutlined className="mk-form-tip" />
-                  瀹藉害
-                </Tooltip>
-              }>
-                {getFieldDecorator('width', {
-                  initialValue: setting.width || 5,
-                  rules: [
-                    {
-                      required: true,
-                      message: dict['form.required.input'] + '瀹藉害!'
-                    }
-                  ]
-                })(<InputNumber min={2} max={12} precision={0} />)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="鎼滅储">
-                {getFieldDecorator('searchable', {
-                  initialValue: setting.searchable || 'true'
-                })(
-                <Radio.Group>
-                  <Radio value="true">鏄剧ず</Radio>
-                  <Radio value="false">闅愯棌</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col>
-            {interType === 'system' ? <Col span={12}>
-              <Form.Item label="榛樿sql">
-                {getFieldDecorator('default', {
-                  initialValue: setting.default || 'true'
-                })(
-                <Radio.Group>
-                  <Radio value="true">鎵ц</Radio>
-                  <Radio value="false">涓嶆墽琛�</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col> : null}
-            <Col span={12}>
-              <Form.Item label="鏄剧ず鍥炬爣">
-                {getFieldDecorator('showIcon', {
-                  initialValue: setting.showIcon || 'false'
-                })(
-                <Radio.Group>
-                  <Radio value="true">鏄�</Radio>
-                  <Radio value="false">鍚�</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col>
-            <Col span={12}>
-              <Form.Item label="鏄剧ず鍒嗗壊绾�">
-                {getFieldDecorator('showLine', {
-                  initialValue: setting.showLine || 'false'
-                })(
-                <Radio.Group>
-                  <Radio value="true">鏄�</Radio>
-                  <Radio value="false">鍚�</Radio>
-                </Radio.Group>)}
-              </Form.Item>
-            </Col>
-          </Row>
-        </Form>
-      </div>
+      <Form {...formItemLayout}>
+        <Row gutter={24}>
+          <Col span={8}>
+            <Form.Item label="琛ㄥ悕">
+              {getFieldDecorator('tableName', {
+                initialValue: setting.tableName || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '琛ㄥ悕!'
+                  },
+                  {
+                    max: 50,
+                    message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label="鏍囬">
+              {getFieldDecorator('title', {
+                initialValue: setting.title || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '鏍囬!'
+                  },
+                  {
+                    max: formRule.input.max,
+                    message: formRule.input.message
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label={dict['header.form.intertype']}>
+              {getFieldDecorator('interType', {
+                initialValue: interType,
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.select'] + dict['header.form.intertype'] + '!'
+                  }
+                ]
+              })(
+              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'interType')}}>
+                <Radio value="system">绯荤粺</Radio>
+                <Radio value="inner">鍐呴儴</Radio>
+                <Radio value="outer">澶栭儴</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col>
+          {interType === 'outer' ? <Col span={8}>
+            <Form.Item label={dict['header.form.sysInterface']}>
+              {getFieldDecorator('sysInterface', {
+                initialValue: setting.sysInterface || 'false',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!'
+                  },
+                ]
+              })(
+              <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}>
+                <Radio value="true">{dict['model.true']}</Radio>
+                <Radio value="false">{dict['model.false']}</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col> : null}
+          {interType === 'inner' ? <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={funcTooltip}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鍐呴儴鍑芥暟
+              </Tooltip>
+            }>
+              {getFieldDecorator('innerFunc', {
+                initialValue: setting.innerFunc || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '鍐呴儴鍑芥暟!'
+                  },
+                  {
+                    max: formRule.func.max,
+                    message: formRule.func.maxMessage
+                  },
+                  ...funcRules
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col> : null}
+          {interType === 'outer' ? <Col span={24} className="mk-through-line3">
+            <Form.Item label="鎺ュ彛鍦板潃">
+              {getFieldDecorator('interface', {
+                initialValue: setting.interface || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '鎺ュ彛鍦板潃!'
+                  }
+                ]
+              })(<TextArea rows={2}/>)}
+            </Form.Item>
+          </Col> : null}
+          {interType === 'outer' ? <Col span={8}>
+            <Form.Item label="澶栭儴鍑芥暟">
+              {getFieldDecorator('outerFunc', {
+                initialValue: setting.outerFunc || '',
+                rules: [
+                  {
+                    pattern: formRule.func.pattern,
+                    message: formRule.func.message
+                  }, {
+                    max: formRule.func.max,
+                    message: formRule.func.maxMessage
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col> : null}
+          {interType === 'system' ? <Col span={24} className="mk-through-line3">
+            <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={'浣跨敤绯荤粺鍑芥暟鏃讹紝闇�濉啓鏁版嵁婧愩�傛敞锛氭暟鎹潈闄愭浛鎹㈢ $@ -> /* 鎴� \'\'銆� @$ -> */ 鎴� \'\''}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                鏁版嵁婧�
+              </Tooltip>
+            }>
+              {getFieldDecorator('dataresource', {
+                initialValue: setting.dataresource || ''
+              })(<CodeMirror />)}
+            </Form.Item>
+          </Col> : null}
+          <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={'鏁版嵁鍊煎瓧娈点��'}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                Value
+              </Tooltip>
+            }>
+              {getFieldDecorator('valueField', {
+                initialValue: setting.valueField || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + 'Value!'
+                  },
+                  {
+                    pattern: formRule.field.pattern,
+                    message: formRule.field.message
+                  }, {
+                    max: formRule.field.max,
+                    message: formRule.field.maxMessage
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={'鏄剧ず鏂囧瓧瀛楁銆�'}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                Label
+              </Tooltip>
+            }>
+              {getFieldDecorator('labelField', {
+                initialValue: setting.labelField || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + 'Label!'
+                  },
+                  {
+                    pattern: formRule.field.pattern,
+                    message: formRule.field.message
+                  }, {
+                    max: formRule.field.max,
+                    message: formRule.field.maxMessage
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={'鐖剁骇瀛楁銆�'}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                Parent
+              </Tooltip>
+            }>
+              {getFieldDecorator('parentField', {
+                initialValue: setting.parentField || '',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + 'Label!'
+                  },
+                  {
+                    pattern: formRule.field.pattern,
+                    message: formRule.field.message
+                  }, {
+                    max: formRule.field.max,
+                    message: formRule.field.maxMessage
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label="鎺掑簭">
+              {getFieldDecorator('order', {
+                initialValue: setting.order || 'ID desc',
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '鎺掑簭!'
+                  },
+                  {
+                    max: formRule.input.max,
+                    message: formRule.input.message
+                  }
+                ]
+              })(<Input placeholder={'ID asc, UID desc'} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={'鐖剁骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负椤剁骇鑺傜偣銆�'}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                椤剁骇鏍囪瘑
+              </Tooltip>
+            }>
+              {getFieldDecorator('mark', {
+                initialValue: setting.mark || '',
+                rules: [
+                  {
+                    max: formRule.input.max,
+                    message: formRule.input.message
+                  }
+                ]
+              })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title={'鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒楋紝鏍戝舰姣斾緥鍙缃负2-12锛堟渶澶�50%锛�'}>
+                <QuestionCircleOutlined className="mk-form-tip" />
+                瀹藉害
+              </Tooltip>
+            }>
+              {getFieldDecorator('width', {
+                initialValue: setting.width || 5,
+                rules: [
+                  {
+                    required: true,
+                    message: dict['form.required.input'] + '瀹藉害!'
+                  }
+                ]
+              })(<InputNumber min={2} max={12} precision={0} />)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label="鎼滅储">
+              {getFieldDecorator('searchable', {
+                initialValue: setting.searchable || 'true'
+              })(
+              <Radio.Group>
+                <Radio value="true">鏄剧ず</Radio>
+                <Radio value="false">闅愯棌</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col>
+          {interType === 'system' ? <Col span={8}>
+            <Form.Item label="榛樿sql">
+              {getFieldDecorator('default', {
+                initialValue: setting.default || 'true'
+              })(
+              <Radio.Group>
+                <Radio value="true">鎵ц</Radio>
+                <Radio value="false">涓嶆墽琛�</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col> : null}
+          <Col span={8}>
+            <Form.Item label="鏄剧ず鍥炬爣">
+              {getFieldDecorator('showIcon', {
+                initialValue: setting.showIcon || 'false'
+              })(
+              <Radio.Group>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col>
+          <Col span={8}>
+            <Form.Item label="鏄剧ず鍒嗗壊绾�">
+              {getFieldDecorator('showLine', {
+                initialValue: setting.showLine || 'false'
+              })(
+              <Radio.Group>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
+              </Radio.Group>)}
+            </Form.Item>
+          </Col>
+        </Row>
+      </Form>
     )
   }
 }

--
Gitblit v1.8.0