From 46aa44856bcb0e262d98918e06b4f83d2c11777a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 15 四月 2023 14:32:02 +0800
Subject: [PATCH] 2023-04-15

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

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
index 09e0fe5..04fa4a8 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -108,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() {
@@ -206,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', {
@@ -282,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