From 0c84df247914f893ef5e41d57a422e10a2dc814c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 12 十一月 2021 17:02:06 +0800
Subject: [PATCH] 2021-11-12

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx |   29 ++++++++++++++++++++++-------
 1 files changed, 22 insertions(+), 7 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
index 91870f9..1fef86d 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/index.jsx
@@ -2,6 +2,7 @@
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
 import { Form, Tabs, Row, Col, Input, Button, Table, Popconfirm, Icon, Tooltip, notification, Modal, message, InputNumber, Radio, Typography } from 'antd'
+import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -299,7 +300,7 @@
           systemScripts: res.data.map(item => {
             return {
               name: item.funcname,
-              value: Utils.UnformatOptions(item.longparam)
+              value: window.decodeURIComponent(window.atob(item.longparam))
             }
           })
         })
@@ -428,6 +429,22 @@
 
   changeColumns = (columns) => {
     const { verify } = this.state
+
+    if (columns[0] && (columns[0].type === 'image' || columns[0].type === 'text')) {
+      columns = columns.map(col => {
+        let _cell = {
+          uuid: Utils.getuuid(),
+          Column: col.Column,
+          Text: col.Text,
+          type: 'Nvarchar(50)',
+          limit: '50',
+          import: 'true',
+          required: 'true'
+        }
+
+        return _cell
+      })
+    }
 
     columns = columns.map(col => {
       if (/^Nvarchar/ig.test(col.type)) {
@@ -673,9 +690,7 @@
           if (this.scriptsForm && this.scriptsForm.state.editItem) {
             _loading = true
             this.setState({activeKey: 'scripts'})
-          }
-
-          if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql')) {
+          } else if (this.scriptsForm && this.scriptsForm.props.form.getFieldValue('sql') && !/^\s+$/.test(this.scriptsForm.props.form.getFieldValue('sql'))) {
             _loading = true
             this.setState({activeKey: 'scripts'})
           }
@@ -803,7 +818,7 @@
                 <Col span={8}>
                   <Form.Item label={
                     <Tooltip placement="bottomLeft" title="蹇界暐棣栬鏃讹紝浼氭牎楠宔xcel涓〃澶村悕绉颁笌excel鍒楄缃槸鍚︿竴鑷淬��">
-                      <Icon type="question-circle" style={{color: '#c49f47', marginRight: '5px'}}/>
+                      <QuestionCircleOutlined className="mk-form-tip" />
                       蹇界暐琛�
                     </Tooltip>
                   }>
@@ -837,7 +852,7 @@
               娓呯┖Excel鍒�
             </Button>
             <Col style={{fontSize: '12px', color: '#757575', paddingLeft: '10px'}} span={24}>娉細鏁板�肩被鍨嬶紙int 鎴� decimal锛夛紝鍐呭涓哄繀濉紱鏈�澶у�煎拰鏈�灏忓�煎湪绫诲瀷涓烘暟鍊兼椂鏈夋晥銆�</Col>
-            <EditTable data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
+            <EditTable actions={['edit', 'move', 'copy', 'del']} type="excelcolumn" data={verify.columns} columns={excelColumns} onChange={this.changeColumns}/>
           </TabPane>
           {card.intertype === 'system' ? <TabPane tab={
             <span>
@@ -846,7 +861,7 @@
             </span>
           } key="unique">
             <UniqueForm fields={verify.columns} dict={this.props.dict} uniqueChange={this.uniqueChange}/>
-            <EditTable data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/>
+            <EditTable actions={['edit', 'move', 'del']} data={verify.uniques} columns={uniqueColumns} onChange={this.changeUniques}/>
           </TabPane> : null}
           {card.intertype === 'system' ? <TabPane tab={
             <span>

--
Gitblit v1.8.0