From 37a134bd23ec4b227a0e010b08a1a89c2bbaaa0d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 03 十一月 2020 17:10:14 +0800
Subject: [PATCH] 2020-11-03

---
 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
index 89c7887..108bc1d 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -1,14 +1,13 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Input, Button, notification, Modal, Icon, Tooltip, Radio, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Modal, Icon, Tooltip, Radio, Select } from 'antd'
 import moment from 'moment'
 
 import Utils from '@/utils/utils.js'
 import Api from '@/api'
+import CodeMirror from '@/templates/zshare/codemirror'
 import './index.scss'
-
-const { TextArea } = Input
 
 class CustomForm extends Component {
   static propTpyes = {
@@ -155,7 +154,7 @@
         param.LText = param.LText.replace(/@\$|\$@/ig, '')
 
         param.LText = Utils.formatOptions(param.LText)
-        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') + '.000'
+        param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
         param.secretkey = Utils.encrypt(param.LText, param.timestamp)
         
         this.setState({loading: true})
@@ -203,7 +202,10 @@
         fields = fields + ','
       }
 
-      _value = `Insert into ${btn.sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From @${btn.sheet}`
+      let database = btn.sheet.match(/(.*)\.(.*)\./ig) || ''
+      let sheet = btn.sheet.replace(/(.*)\.(.*)\./ig, '')
+
+      _value = `Insert into ${database}${sheet} (${fields}createuserid,createuser,createstaff,bid)\nSelect ${fields}@userid@,@username,@fullname,@BID@ From @${sheet}`
     } else {
       _value = value
     }
@@ -314,7 +316,7 @@
                     message: this.props.dict['form.required.input'] + 'sql!'
                   }
                 ]
-              })(<TextArea rows={15} />)}
+              })(<CodeMirror />)}
             </Form.Item>
           </Col>
         </Row>

--
Gitblit v1.8.0