From fa76b73b7a1c9671a76c9821ed1a28e2f2b9e2b7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 20 二月 2024 14:19:19 +0800
Subject: [PATCH] Merge branch 'positec' into dms

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

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
index 1bbd830..3460133 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/datasource/index.jsx
@@ -17,7 +17,8 @@
 
   state = {
     dataType: '',
-    defaultSql: 'true'
+    defaultSql: 'true',
+    excelHandle: 'false'
   }
 
   UNSAFE_componentWillMount () {
@@ -25,7 +26,8 @@
 
     this.setState({
       dataType: btnType === 'print' ? 'custom' : setting.dataType,
-      defaultSql: setting.defaultSql || 'true'
+      defaultSql: setting.defaultSql || 'true',
+      excelHandle: setting.excelHandle || 'false'
     })
   }
 
@@ -78,7 +80,7 @@
   render() {
     const { setting, btnType } = this.props
     const { getFieldDecorator } = this.props.form
-    const { dataType, defaultSql } = this.state
+    const { dataType, defaultSql, excelHandle } = this.state
 
     const formItemLayout = {
       labelCol: {
@@ -217,6 +219,35 @@
             </Col> : null}
             {btnType !== 'print' ? <Col span={8}>
               <Form.Item label={
+                <Tooltip placement="topRight" title="鑷畾涔夌敓鎴怑xcel锛屽彲鐢ㄥ弬鏁颁负 XLSX銆乨ata銆乧olumns銆乧allback銆�">
+                  <QuestionCircleOutlined className="mk-form-tip" />
+                  瀵煎嚭鏍煎紡
+                </Tooltip>
+              }>
+                {getFieldDecorator('excelHandle', {
+                  initialValue: excelHandle
+                })(
+                <Radio.Group onChange={(e) => this.setState({excelHandle: e.target.value})}>
+                  <Radio value="false">榛樿</Radio>
+                  <Radio value="true">鑷畾涔�</Radio>
+                </Radio.Group>)}
+              </Form.Item>
+            </Col> : null}
+            {btnType !== 'print' && excelHandle === 'true' ? <Col span={24} style={{paddingLeft: '30px'}}>
+              <Form.Item wrapperCol={ {xs: { span: 24 }, sm: { span: 24 }} } label="">
+                {getFieldDecorator('excel_func', {
+                  initialValue: setting.excel_func || '',
+                  rules: [
+                    {
+                      required: true,
+                      message: '璇峰~鍐欒嚜瀹氫箟閫昏緫!'
+                    }
+                  ]
+                })(<CodeMirror mode="text/javascript" theme="cobalt" />)}
+              </Form.Item>
+            </Col> : null}
+            {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}>
+              <Form.Item label={
                 <Tooltip placement="topLeft" title="瀵煎嚭excel涓伐浣滆〃鍚嶇О锛岄粯璁や负Sheet1銆�">
                   <QuestionCircleOutlined className="mk-form-tip" />
                   宸ヤ綔琛�
@@ -227,7 +258,7 @@
                 })(<Input placeholder="" autoComplete="off" />)}
               </Form.Item>
             </Col> : null}
-            {btnType !== 'print' ? <Col span={8}>
+            {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title="瀵煎嚭excel涓殑琛岄珮銆�">
                   <QuestionCircleOutlined className="mk-form-tip" />
@@ -239,7 +270,7 @@
                 })(<InputNumber min={10} max={200} precision={0} />)}
               </Form.Item>
             </Col> : null}
-            {btnType !== 'print' ? <Col span={8}>
+            {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title="璇峰皢闇�瑕佸悎骞剁殑琛ㄥご浣跨敤涓í绾垮垎闅旓紙濡傦細鍟嗗搧-鏁伴噺銆佸晢鍝�-鍗曚环锛夛紝鍓嶉儴鍒嗗皢浣滀负涓昏〃澶达紝鍚庨儴鍒嗗皢浣滀负瀛愯〃澶淬��">
                   <QuestionCircleOutlined className="mk-form-tip" />
@@ -255,7 +286,7 @@
                 </Radio.Group>)}
               </Form.Item>
             </Col> : null}
-            {btnType !== 'print' ? <Col span={8}>
+            {btnType !== 'print' && excelHandle !== 'true' ? <Col span={8}>
               <Form.Item label={
                 <Tooltip placement="topLeft" title="Excel鍐呭鍖烘槸鍚﹁嚜鍔ㄦ崲琛屻��">
                   <QuestionCircleOutlined className="mk-form-tip" />

--
Gitblit v1.8.0