From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 14 六月 2023 09:55:50 +0800
Subject: [PATCH] 2023-06-14

---
 src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx |   65 ++++++++++++++++----------------
 1 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
index 5ce74b1..29f51db 100644
--- a/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
+++ b/src/templates/sharecomponent/settingcomponent/settingform/datasource/index.jsx
@@ -17,7 +17,6 @@
 class SettingForm extends Component {
   static propTpyes = {
     config: PropTypes.object,     // 椤甸潰閰嶇疆
-    dict: PropTypes.object,       // 瀛楀吀椤�
     menu: PropTypes.object,       // 鑿滃崟淇℃伅
     setting: PropTypes.object,    // 鏁版嵁婧愰厤缃�
     columns: PropTypes.array,     // 鍒楄缃�
@@ -120,6 +119,14 @@
               })
               reject()
               return
+            } else if (/,,/ig.test(values.dataresource)) {
+              notification.warning({
+                top: 92,
+                message: '鏁版嵁婧愪腑锛屼笉鍙嚭鐜拌繛缁殑鑻辨枃閫楀彿锛�,,锛�',
+                duration: 5
+              })
+              reject()
+              return
             }
 
             let error = Utils.verifySql(values.dataresource)
@@ -190,7 +197,7 @@
   }
 
   render() {
-    const { setting, dict, menu, config, columns } = this.props
+    const { setting, menu, config, columns } = this.props
     const { getFieldDecorator } = this.props.form
     const { interType, funcRules, funcTooltip, tableType, controlField, sysInterface } = this.state
 
@@ -215,28 +222,28 @@
                 rules: [
                   {
                     required: true,
-                    message: dict['form.required.input'] + '琛ㄥ悕!'
+                    message: '璇疯緭鍏ヨ〃鍚�!'
                   },
                   {
                     max: 50,
                     message: '琛ㄥ悕鏈�闀夸负50涓瓧绗�!'
                   },
                   {
-                    pattern: /^[a-zA-Z_]+$/,
-                    message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝浠ュ強_'
+                    pattern: /^[a-zA-Z0-9@_]+$/,
+                    message: '琛ㄥ悕鍙彲浣跨敤瀛楁瘝銆佹暟瀛椾互鍙奯'
                   }
                 ]
               })(<Input placeholder={''} autoComplete="off" />)}
             </Form.Item>
           </Col>
           <Col span={8}>
-            <Form.Item label={dict['header.form.intertype']}>
+            <Form.Item label="鎺ュ彛绫诲瀷">
               {getFieldDecorator('interType', {
                 initialValue: interType,
                 rules: [
                   {
                     required: true,
-                    message: dict['form.required.select'] + dict['header.form.intertype'] + '!'
+                    message: '璇烽�夋嫨鎺ュ彛绫诲瀷!'
                   },
                 ]
               })(
@@ -261,19 +268,24 @@
             </Form.Item>
           </Col>
           {interType === 'outer' ? <Col span={8}>
-            <Form.Item label={dict['header.form.sysInterface']}>
+            <Form.Item label={
+              <Tooltip placement="topLeft" title="鍗曠偣鐧诲綍绯荤粺">
+                <QuestionCircleOutlined className="mk-form-tip" />
+                绯荤粺鎺ュ彛
+              </Tooltip>
+            }>
               {getFieldDecorator('sysInterface', {
                 initialValue: sysInterface,
                 rules: [
                   {
                     required: true,
-                    message: dict['form.required.select'] + dict['header.form.sysInterface'] + '!'
+                    message: '璇烽�夋嫨绯荤粺鎺ュ彛!'
                   },
                 ]
               })(
               <Radio.Group onChange={(e) => {this.onRadioChange(e, 'sysInterface')}}>
-                <Radio value="true">{dict['model.true']}</Radio>
-                <Radio value="false">{dict['model.false']}</Radio>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
               </Radio.Group>)}
             </Form.Item>
           </Col> : null}
@@ -284,7 +296,7 @@
                 rules: [
                   {
                     required: interType === 'outer' && sysInterface === 'true' ? false : true,
-                    message: dict['form.required.input'] + '鎺ュ彛鍦板潃!'
+                    message: '璇疯緭鍏ユ帴鍙e湴鍧�!'
                   },
                 ]
               })(<TextArea rows={2} readOnly={interType === 'outer' && sysInterface === 'true'}/>)}
@@ -314,7 +326,7 @@
                 rules: [
                   {
                     required: true,
-                    message: dict['form.required.input'] + '鍐呴儴鍑芥暟!'
+                    message: '璇疯緭鍏ュ唴閮ㄥ嚱鏁�!'
                   },
                   {
                     max: formRule.func.max,
@@ -403,7 +415,7 @@
                 rules: [
                   {
                     required: true,
-                    message: dict['form.required.input'] + '榛樿鎺掑簭!'
+                    message: '璇疯緭鍏ラ粯璁ゆ帓搴�!'
                   },
                   {
                     max: formRule.input.max,
@@ -419,8 +431,8 @@
                 initialValue: setting.laypage || 'true'
               })(
               <Radio.Group>
-                <Radio value="true">{dict['model.true']}</Radio>
-                <Radio value="false">{dict['model.false']}</Radio>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
               </Radio.Group>)}
             </Form.Item>
           </Col>
@@ -438,11 +450,11 @@
           {config.Template === 'CommonTable' ? <Col span={8}>
             <Form.Item label="鎸夐挳鍥哄畾">
               {getFieldDecorator('actionfixed', {
-                initialValue: setting.actionfixed === 'true' || setting.actionfixed === true ? 'true' : 'false'
+                initialValue: setting.actionfixed === 'true' ? 'true' : 'false'
               })(
               <Radio.Group>
-                <Radio value="true">{dict['model.true']}</Radio>
-                <Radio value="false">{dict['model.false']}</Radio>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
               </Radio.Group>)}
             </Form.Item>
           </Col> : null}
@@ -457,8 +469,8 @@
                 initialValue: setting.columnfixed === 'true' || setting.columnfixed === true ? 'true' : 'false'
               })(
               <Radio.Group>
-                <Radio value="true">{dict['model.true']}</Radio>
-                <Radio value="false">{dict['model.false']}</Radio>
+                <Radio value="true">鏄�</Radio>
+                <Radio value="false">鍚�</Radio>
               </Radio.Group>)}
             </Form.Item>
           </Col> : null} */}
@@ -488,17 +500,6 @@
                 <Radio value="middle">涓�</Radio>
                 <Radio value="small">灏�</Radio>
                 <Radio value="mini">杩蜂綘</Radio>
-              </Radio.Group>)}
-            </Form.Item>
-          </Col>
-          <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>

--
Gitblit v1.8.0