From c7aece35a62b6e91fd98a625bf0e53f64bfbd18d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 17 八月 2023 16:22:15 +0800
Subject: [PATCH] 2023-08-17

---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx |   40 +++++++++++++++++++++++++++++++++++++---
 1 files changed, 37 insertions(+), 3 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
index 0159b4e..04fa4a8 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -76,6 +76,14 @@
               })
               reject()
               return
+            } else if (/,,/ig.test(values.dataresource)) {
+              notification.warning({
+                top: 92,
+                message: '鏁版嵁婧愪腑锛屼笉鍙嚭鐜拌繛缁殑鑻辨枃閫楀彿锛�,,锛�',
+                duration: 5
+              })
+              reject()
+              return
             }
 
             let error = Utils.verifySql(values.dataresource)
@@ -100,8 +108,18 @@
   }
 
   updateDataType = (e) => {
-    this.setState({dataType: e.target.value})
     this.props.updateDataType(e.target.value)
+
+    if (e.target.value === 'custom') {
+      setTimeout(() => {
+        this.setState({
+          dataType: e.target.value,
+          defaultSql: this.props.setting.defaultSql || 'true'
+        })
+      }, 10)
+    } else {
+      this.setState({dataType: e.target.value})
+    }
   }
 
   render() {
@@ -198,13 +216,13 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
-            {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
+            {/* {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
               <Form.Item label="涓婚敭">
                 {getFieldDecorator('primaryKey', {
                   initialValue: setting.primaryKey || 'ID',
                 })(<Input placeholder={''} autoComplete="off" />)}
               </Form.Item>
-            </Col> : null}
+            </Col> : null} */}
             {dataType === 'custom' && defaultSql === 'true' ? <Col className="short-label" span={8}>
               <Form.Item label="鎺掑簭鏂瑰紡">
                 {getFieldDecorator('order', {
@@ -274,6 +292,22 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
+            {btnType !== 'print' ? <Col span={8}>
+              <Form.Item label={
+                <Tooltip placement="topLeft" title="Excel鍐呭鍖烘槸鍚﹁嚜鍔ㄦ崲琛屻��">
+                  <QuestionCircleOutlined className="mk-form-tip" />
+                  鑷姩鎹㈣
+                </Tooltip>
+              }>
+                {getFieldDecorator('wrapText', {
+                  initialValue: setting.wrapText || 'false'
+                })(
+                <Radio.Group>
+                  <Radio value="false">鍚�</Radio>
+                  <Radio value="true">鏄�</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col> : null}
           </Row>
         </Form>
       </div>

--
Gitblit v1.8.0