From 574ea3b532b625456c09f14fc11073aad6b61db7 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 02 八月 2023 12:11:47 +0800
Subject: [PATCH] 2023-08-02

---
 src/components/imgScale/index.scss                                                 |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx  |   67 ++++++---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx |   33 +---
 src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx        |   69 ++++++---
 src/menu/components/table/base-table/index.jsx                                     |    8 +
 src/templates/zshare/verifycard/callbackcustomscript/index.jsx                     |   71 ++++++---
 src/menu/datasource/verifycard/customscript/index.jsx                              |   42 ++++-
 src/views/mkiframe/index.jsx                                                       |    2 
 src/templates/zshare/verifycard/customscript/index.jsx                             |   76 ++++++----
 src/utils/utils.js                                                                 |    8 -
 src/menu/components/table/edit-table/columns/index.jsx                             |    2 
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx              |   29 ++-
 12 files changed, 254 insertions(+), 155 deletions(-)

diff --git a/src/components/imgScale/index.scss b/src/components/imgScale/index.scss
index 8d8c762..8bc7646 100644
--- a/src/components/imgScale/index.scss
+++ b/src/components/imgScale/index.scss
@@ -129,7 +129,7 @@
   margin-left: 12px;
   padding: 10px 12px;
   cursor: pointer;
-  font-size: 18px;
+  font-size: 1.5vw;
 }
 .mk-image-preview-operations-operation-disabled {
   color: rgba(255, 255, 255, 0.25);
diff --git a/src/menu/components/table/base-table/index.jsx b/src/menu/components/table/base-table/index.jsx
index c05c3d4..653881d 100644
--- a/src/menu/components/table/base-table/index.jsx
+++ b/src/menu/components/table/base-table/index.jsx
@@ -308,6 +308,14 @@
       config.absFields = null
     }
 
+    if (!config.setting.primaryKey && config.columns.length > 0) {
+      config.columns.forEach(col => {
+        if (col.field.toLowerCase() === 'id') {
+          config.setting.primaryKey = col.field
+        }
+      })
+    }
+
     this.updateComponent(config)
   }
 
diff --git a/src/menu/components/table/edit-table/columns/index.jsx b/src/menu/components/table/edit-table/columns/index.jsx
index ba13cb7..e30df79 100644
--- a/src/menu/components/table/edit-table/columns/index.jsx
+++ b/src/menu/components/table/edit-table/columns/index.jsx
@@ -722,7 +722,7 @@
         <Modal
           wrapClassName="mk-pop-modal"
           visible={visible}
-          width={'75vw'}
+          width={'80vw'}
           maskClosable={false}
           onOk={this.verifySubmit}
           onCancel={() => { this.setState({ visible: false }) }}
diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
index a4a7025..f4accd7 100644
--- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
+++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -22,6 +22,7 @@
     editItem: null,
     usefulfields: null,
     loading: false,
+    skip: false,
     verifySql: ''
   }
 
@@ -67,7 +68,7 @@
 
   handleConfirm = () => {
     const { type } = this.props
-    const { editItem } = this.state
+    const { editItem, skip } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (type === 'fullscreen' && err) {
@@ -208,27 +209,39 @@
 
         param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
-        
-        this.setState({loading: true})
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
-            this.setState({
-              loading: false,
-              editItem: null
-            }, () => {
-              this.props.scriptsChange(values)
-            })
-            this.props.form.setFieldsValue({
-              sql: ' '
-            })
-          } else {
-            this.setState({loading: false})
 
-            Modal.error({
-              title: res.message
-            })
-          }
-        })
+        if (skip) {
+          this.setState({
+            editItem: null,
+            skip: false
+          }, () => {
+            this.props.scriptsChange(values)
+          })
+          this.props.form.setFieldsValue({
+            sql: ' '
+          })
+        } else {
+          this.setState({loading: true})
+          Api.genericInterface(param).then(res => {
+            if (res.status) {
+              this.setState({
+                loading: false,
+                editItem: null
+              }, () => {
+                this.props.scriptsChange(values)
+              })
+              this.props.form.setFieldsValue({
+                sql: ' '
+              })
+            } else {
+              this.setState({loading: false})
+  
+              Modal.error({
+                title: res.message
+              })
+            }
+          })
+        }
       }
     })
   }
@@ -287,7 +300,7 @@
 
   render() {
     const { systemScripts, btn, type } = this.props
-    const { usefulfields, editItem } = this.state
+    const { usefulfields, editItem, skip } = this.state
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -338,7 +351,7 @@
               )}
             </Form.Item>
           </Col> : null}
-          {!type ? <Col span={10}>
+          {!type ? <Col span={8}>
             <Form.Item style={{marginBottom: 0}} label={'蹇嵎娣诲姞'}>
               <Select
                 showSearch
@@ -360,14 +373,18 @@
               </Select>
             </Form.Item>
           </Col> : null}
-          <Col span={6} className="add">
-            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
+          <Col span={5} style={{paddingTop: '3px', whiteSpace: 'nowrap'}}>
+            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 15}}>
               {type === 'fullscreen' && !editItem ? '娣诲姞' : '淇濆瓨'}
             </Button>
             <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
               鍙栨秷
             </Button>
           </Col>
+          <Col span={3} style={{paddingTop: '12px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col>
           <Col span={24} className="sql">
             <Form.Item label={'sql'}>
               {getFieldDecorator('sql', {
diff --git a/src/menu/datasource/verifycard/customscript/index.jsx b/src/menu/datasource/verifycard/customscript/index.jsx
index 8c27284..af82358 100644
--- a/src/menu/datasource/verifycard/customscript/index.jsx
+++ b/src/menu/datasource/verifycard/customscript/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Button, notification, Select, Tooltip, Modal } from 'antd'
+import { Form, Row, Col, Button, notification, Select, Tooltip, Modal, Switch } from 'antd'
 import Toast from 'antd-mobile/es/components/toast'
 import Dialog from 'antd-mobile/es/components/dialog'
 
@@ -22,6 +22,7 @@
   }
 
   state = {
+    skip: false,
     editItem: null,
     loading: false,
     usefulFields: ''
@@ -100,6 +101,7 @@
   }
 
   handleConfirm = () => {
+    const { skip } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
@@ -163,11 +165,10 @@
           return
         }
 
-        this.setState({loading: true})
-        this.props.scriptsChange(values).then(() => {
+        if (skip) {
           this.setState({
             editItem: null,
-            loading: false
+            skip: false
           })
 
           if (values.uuid) {
@@ -178,11 +179,28 @@
             sql: ' '
           })
           this.props.scriptSubmit(values)
-        }, () => {
-          this.setState({
-            loading: false
+        } else {
+          this.setState({loading: true})
+          this.props.scriptsChange(values).then(() => {
+            this.setState({
+              editItem: null,
+              loading: false
+            })
+  
+            if (values.uuid) {
+              MKEmitter.emit('editLineId', values.uuid)
+            }
+  
+            this.props.form.setFieldsValue({
+              sql: ' '
+            })
+            this.props.scriptSubmit(values)
+          }, () => {
+            this.setState({
+              loading: false
+            })
           })
-        })
+        }
       }
     })
   }
@@ -258,7 +276,7 @@
   render() {
     const { systemScripts, setting, type } = this.props
     const { getFieldDecorator } = this.props.form
-    const { usefulFields } = this.state
+    const { usefulFields, skip } = this.state
 
     let urlFields = window.GLOB.urlFields ? window.GLOB.urlFields.join(', ') : ''
 
@@ -312,7 +330,7 @@
               </Select>
             </Form.Item>
           </Col>
-          <Col span={6} className="add">
+          <Col span={5} style={{whiteSpace: 'nowrap'}}>
             <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginTop: 5, marginBottom: 15, marginLeft: 30}}>
               淇濆瓨
             </Button>
@@ -320,6 +338,10 @@
               鍙栨秷
             </Button>
           </Col>
+          <Col span={3} style={{paddingTop: '15px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col>
           <Col span={24} className="sql">
             <Form.Item label="sql">
               {getFieldDecorator('sql', {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
index c3e8a56..7a197af 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelin/customscript/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -23,6 +23,7 @@
     editItem: null,
     usefulfields: null,
     loading: false,
+    skip: false,
     verifySql: ''
   }
 
@@ -81,7 +82,7 @@
 
   handleConfirm = () => {
     const { type } = this.props
-    const { editItem } = this.state
+    const { editItem, skip } = this.state
 
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
@@ -226,26 +227,38 @@
         param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
         
-        this.setState({loading: true})
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
-            this.setState({
-              loading: false,
-              editItem: null
-            }, () => {
-              this.props.scriptsChange(values)
-            })
-            this.props.form.setFieldsValue({
-              sql: ' '
-            })
-          } else {
-            this.setState({loading: false})
-
-            Modal.error({
-              title: res.message
-            })
-          }
-        })
+        if (skip) {
+          this.setState({
+            skip: false,
+            editItem: null
+          }, () => {
+            this.props.scriptsChange(values)
+          })
+          this.props.form.setFieldsValue({
+            sql: ' '
+          })
+        } else {
+          this.setState({loading: true})
+          Api.genericInterface(param).then(res => {
+            if (res.status) {
+              this.setState({
+                loading: false,
+                editItem: null
+              }, () => {
+                this.props.scriptsChange(values)
+              })
+              this.props.form.setFieldsValue({
+                sql: ' '
+              })
+            } else {
+              this.setState({loading: false})
+  
+              Modal.error({
+                title: res.message
+              })
+            }
+          })
+        }
       }
     })
   }
@@ -305,7 +318,7 @@
 
   render() {
     const { systemScripts, btn, type } = this.props
-    const { usefulfields, editItem } = this.state
+    const { usefulfields, editItem, skip } = this.state
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -356,7 +369,7 @@
               )}
             </Form.Item>
           </Col> : null}
-          {!type ? <Col span={10}>
+          {!type ? <Col span={8}>
             <Form.Item style={{marginBottom: 0}} label={'蹇嵎娣诲姞'}>
               <Select
                 showSearch
@@ -378,7 +391,7 @@
               </Select>
             </Form.Item>
           </Col> : null}
-          <Col span={6} className="add">
+          <Col span={5} className="add" style={{paddingTop: '2px', whiteSpace: 'nowrap'}}>
             <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
             {type === 'fullscreen' && !editItem ? '娣诲姞' : '淇濆瓨'}
             </Button>
@@ -386,6 +399,10 @@
               鍙栨秷
             </Button>
           </Col>
+          <Col span={3} style={{paddingTop: '15px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col>
           <Col span={24} className="sql">
             <Form.Item label={'sql'}>
               {getFieldDecorator('sql', {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
index bf43e2c..2c8eaf4 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/customscript/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { is, fromJS } from 'immutable'
-import { Form, Row, Col, Button, notification, Tooltip, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Tooltip, Select, Switch } from 'antd'
 import moment from 'moment'
 
 import Api from '@/api'
@@ -21,6 +21,7 @@
     systemScripts: [],
     usefulfields: null,
     loading: false,
+    skip: false
   }
 
   UNSAFE_componentWillMount () {
@@ -119,6 +120,7 @@
   }
 
   handleConfirm = () => {
+    const { skip } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
@@ -189,6 +191,7 @@
         this.props.scriptsChange(values, (status) => {
           if (status) {
             this.setState({
+              skip: false,
               loading: false,
               editItem: null
             })
@@ -200,7 +203,7 @@
               loading: false
             })
           }
-        })
+        }, skip)
       }
     })
   }
@@ -216,20 +219,7 @@
   }
 
   selectScript = (value, option) => {
-    const { usefulfields, sheet } = this.props
-
-    let _value = ''
-    if (value === 'default') {
-      let fields = usefulfields.filter(item => item.import !== 'false')
-      fields = fields.map(col => col.Column).join(',')
-
-      let _sheet = sheet.replace(/(.*)\.(.*)\.|@db@/ig, '')
-
-      _value = `Select ${fields} From ${_sheet}`
-    } else {
-      _value = value
-    }
-
+    let _value = value
     let _sql = this.props.form.getFieldValue('sql')
     if (/^\s+$/.test(_sql)) {
       _sql = ''
@@ -253,7 +243,7 @@
 
   render() {
     const { sheet, linefields } = this.props
-    const { usefulfields, systemScripts } = this.state
+    const { usefulfields, systemScripts, skip } = this.state
     const { getFieldDecorator } = this.props.form
     const formItemLayout = {
       labelCol: {
@@ -295,9 +285,6 @@
                 onSelect={this.selectScript}
                 getPopupContainer={() => document.getElementById('verify-excelin-custom-scripts')}
               >
-                <Select.Option key="default" value={'default'}>
-                  榛樿sql
-                </Select.Option>
                 <Select.Option key="debugger" value={`z_debug: select @ErrorCode='E',@retmsg='娴嬭瘯鏂偣' goto aaa`}>
                   娴嬭瘯鏂偣
                 </Select.Option>
@@ -309,7 +296,7 @@
               </Select>
             </Form.Item>
           </Col>
-          <Col span={6} className="add">
+          <Col span={5} className="add" style={{whiteSpace: 'nowrap'}}>
             <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
               淇濆瓨
             </Button>
@@ -317,6 +304,10 @@
               鍙栨秷
             </Button>
           </Col>
+          <Col span={3} style={{paddingTop: '15px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col>
           <Col span={24} className="sql">
             <Form.Item label="sql">
               {getFieldDecorator('sql', {
diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index 8e04fc0..b538627 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -975,7 +975,7 @@
     }
   }
 
-  scriptsChange = (values, callback) => {
+  scriptsChange = (values, callback, skip) => {
     let verify = JSON.parse(JSON.stringify(this.state.verify))
 
     if (values.uuid) {
@@ -991,20 +991,27 @@
       verify.scripts.push(values)
     }
 
-    this.setState({loading: true})
-
-    this.sqlverify(() => { // 楠岃瘉鎴愬姛
+    if (skip) {
       this.setState({
-        loading: false,
         verify: verify
       })
       callback(true)
-    }, () => {             // 楠岃瘉澶辫触
-      this.setState({
-        loading: false
-      })
-      callback(false)
-    }, verify.scripts)
+    } else {
+      this.setState({loading: true})
+  
+      this.sqlverify(() => { // 楠岃瘉鎴愬姛
+        this.setState({
+          loading: false,
+          verify: verify
+        })
+        callback(true)
+      }, () => {             // 楠岃瘉澶辫触
+        this.setState({
+          loading: false
+        })
+        callback(false)
+      }, verify.scripts)
+    }
   }
 
   sqlverify = (_resolve, _reject, scripts) => {
diff --git a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
index ce0b0fd..d484478 100644
--- a/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
+++ b/src/templates/zshare/verifycard/callbackcustomscript/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -21,7 +21,8 @@
 
   state = {
     editItem: null,
-    loading: false
+    loading: false,
+    skip: false
   }
 
   edit = (record) => {
@@ -36,7 +37,7 @@
   }
 
   handleConfirm = () => {
-    const { editItem } = this.state
+    const { editItem, skip } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (!err) {
@@ -161,26 +162,38 @@
         param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
         
-        this.setState({loading: true})
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
-            this.setState({
-              loading: false,
-              editItem: null
-            }, () => {
-              this.props.scriptsChange(values)
-            })
-            this.props.form.setFieldsValue({
-              sql: ' '
-            })
-          } else {
-            this.setState({loading: false})
-
-            Modal.error({
-              title: res.message
-            })
-          }
-        })
+        if (skip) {
+          this.setState({
+            skip: false,
+            editItem: null
+          }, () => {
+            this.props.scriptsChange(values)
+          })
+          this.props.form.setFieldsValue({
+            sql: ' '
+          })
+        } else {
+          this.setState({loading: true})
+          Api.genericInterface(param).then(res => {
+            if (res.status) {
+              this.setState({
+                loading: false,
+                editItem: null
+              }, () => {
+                this.props.scriptsChange(values)
+              })
+              this.props.form.setFieldsValue({
+                sql: ' '
+              })
+            } else {
+              this.setState({loading: false})
+  
+              Modal.error({
+                title: res.message
+              })
+            }
+          })
+        }
       }
     })
   }
@@ -198,6 +211,9 @@
   selectScript = (value, option) => {
     if (!value || !option) return
     let _sql = this.props.form.getFieldValue('sql')
+    if (/^\s+$/.test(_sql)) {
+      _sql = ''
+    }
     if (_sql) {
       _sql = _sql + ` 
 
@@ -218,6 +234,7 @@
   render() {
     const { usefulfields, systemScripts, btn } = this.props
     const { getFieldDecorator } = this.props.form
+    const { skip } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -269,7 +286,7 @@
               )}
             </Form.Item>
           </Col>
-          <Col span={10}>
+          <Col span={8}>
             <Form.Item label={'蹇嵎娣诲姞'} style={{marginBottom: 0}}>
               <Select
                 allowClear
@@ -285,7 +302,7 @@
               </Select>
             </Form.Item>
           </Col>
-          <Col span={6} className="add">
+          <Col span={5} className="add" style={{whiteSpace: 'nowrap'}}>
             <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
               淇濆瓨
             </Button>
@@ -293,6 +310,10 @@
               鍙栨秷
             </Button>
           </Col>
+          <Col span={3} style={{paddingTop: '15px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col>
           <Col span={24} className="sql">
             <Form.Item label="sql">
               {getFieldDecorator('sql', {
diff --git a/src/templates/zshare/verifycard/customscript/index.jsx b/src/templates/zshare/verifycard/customscript/index.jsx
index 8e7181a..b176479 100644
--- a/src/templates/zshare/verifycard/customscript/index.jsx
+++ b/src/templates/zshare/verifycard/customscript/index.jsx
@@ -1,6 +1,6 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
-import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select } from 'antd'
+import { Form, Row, Col, Button, notification, Modal, Tooltip, Radio, Select, Switch } from 'antd'
 import { QuestionCircleOutlined } from '@ant-design/icons'
 import moment from 'moment'
 
@@ -23,7 +23,8 @@
 
   state = {
     editItem: null,
-    loading: false
+    loading: false,
+    skip: false
   }
 
   edit = (record) => {
@@ -45,7 +46,7 @@
 
   handleConfirm = () => {
     const { type } = this.props
-    const { editItem } = this.state
+    const { editItem, skip } = this.state
     // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭�
     this.props.form.validateFieldsAndScroll((err, values) => {
       if (type === 'fullscreen' && err) {
@@ -203,26 +204,38 @@
         param.LText = Utils.formatOptions(param.LText)
         param.secretkey = Utils.encrypt('', param.timestamp)
         
-        this.setState({loading: true})
-        Api.genericInterface(param).then(res => {
-          if (res.status) {
-            this.setState({
-              loading: false,
-              editItem: null
-            }, () => {
-              this.props.scriptsChange(values)
-            })
-            this.props.form.setFieldsValue({
-              sql: ' '
-            })
-          } else {
-            this.setState({loading: false})
-
-            Modal.error({
-              title: res.message
-            })
-          }
-        })
+        if (skip) {
+          this.setState({
+            skip: false,
+            editItem: null
+          }, () => {
+            this.props.scriptsChange(values)
+          })
+          this.props.form.setFieldsValue({
+            sql: ' '
+          })
+        } else {
+          this.setState({loading: true})
+          Api.genericInterface(param).then(res => {
+            if (res.status) {
+              this.setState({
+                loading: false,
+                editItem: null
+              }, () => {
+                this.props.scriptsChange(values)
+              })
+              this.props.form.setFieldsValue({
+                sql: ' '
+              })
+            } else {
+              this.setState({loading: false})
+  
+              Modal.error({
+                title: res.message
+              })
+            }
+          })
+        }
       }
     })
   }
@@ -241,6 +254,9 @@
     if (!value || !option) return
 
     let _sql = this.props.form.getFieldValue('sql')
+    if (/^\s+$/.test(_sql)) {
+      _sql = ''
+    }
     if (_sql) {
       _sql = _sql + ` 
 
@@ -261,7 +277,7 @@
   render() {
     const { usefulfields, systemScripts, btn, type } = this.props
     const { getFieldDecorator } = this.props.form
-    const { editItem } = this.state
+    const { editItem, skip } = this.state
     const formItemLayout = {
       labelCol: {
         xs: { span: 24 },
@@ -298,7 +314,7 @@
               {usefulfields ? <span>, {usefulfields}</span> : ''}
             </Form.Item>
           </Col> : null}
-          {!_type ?<Col span={8} style={{whiteSpace: 'nowrap'}}>
+          {!_type ? <Col span={8} style={{whiteSpace: 'nowrap'}}>
             <Form.Item style={{marginBottom: 0}} label={
               <Tooltip placement="bottomLeft" title={'鑷畾涔夎剼鏈笌榛樿sql浣嶇疆鍏崇郴銆�'}>
                 <QuestionCircleOutlined className="mk-form-tip" />
@@ -316,7 +332,7 @@
               )}
             </Form.Item>
           </Col> : null}
-          {!_type ?<Col span={10}>
+          {!_type ? <Col span={8}>
             <Form.Item label={'蹇嵎娣诲姞'} style={{marginBottom: 0}}>
               <Select
                 showSearch
@@ -334,14 +350,18 @@
               </Select>
             </Form.Item>
           </Col> : null}
-          <Col span={6} className="add">
-            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 40}}>
+          <Col span={5} className="add" style={{whiteSpace: 'nowrap'}}>
+            <Button onClick={this.handleConfirm} loading={this.state.loading} className="mk-green" style={{marginBottom: 15, marginLeft: 30}}>
               {_type === 'fullscreen' && !editItem ? '娣诲姞' : '淇濆瓨'}
             </Button>
             <Button onClick={this.handleCancel} style={{marginBottom: 15, marginLeft: 10}}>
               鍙栨秷
             </Button>
           </Col>
+          {!_type ? <Col span={3} style={{paddingTop: '15px', fontSize: '12px', whiteSpace: 'nowrap'}}>
+            寮哄埗淇濆瓨锛�
+            <Switch checked={skip} size="small" onChange={() => this.setState({skip: !skip})}/>
+          </Col> : null}
           <Col span={24} className="sql">
             <Form.Item label={
               <Tooltip placement="topLeft" overlayStyle={{width: '320px', maxWidth: '320px'}} title={<><div>{'璋冭瘯鏇挎崲绗� /*$breakpoint_begin_xxxx@ 銆丂breakpoint_end_xxxx$*/锛屽湪鎺у埗鍙颁腑杈撳叆 window.debug = \'xxxx\' 浼氬惎鐢ㄥ搴旂殑璋冭瘯璇彞锛屽揩鎹烽敭 ctrl+c 鎴栧湪鎺у埗鍙颁腑杈撳叆 window.debug = false 鍏抽棴璋冭瘯銆傛敞锛氳皟璇曟椂瀛楃 $breakpoint_proc@ 灏嗚鏇挎崲銆�'}</div><div style={{height: '5px'}}></div><div>{'鏁版嵁妫�鏌ユ浛鎹㈢ $check@ -> \'\'銆� @check$ -> \'\'锛孍rrorCode绛変簬C鏃朵細璇㈤棶鏄惁缁х画鎵ц锛岀‘瀹氭椂 $check@ -> /*銆� @check$ -> */銆傛敞锛�1銆侀渶浣跨敤绯荤粺鎺ュ彛 2銆佽璁剧疆涓衡�滈�夋嫨澶氳鈥濇椂鏃犳晥銆�'}</div></>}>
diff --git a/src/utils/utils.js b/src/utils/utils.js
index a5e08e5..967ae7e 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -216,12 +216,6 @@
   //   value = window.atob(value)
   //   value = value.replace('minKe', '')
   //   value = window.decodeURIComponent(window.atob(value))
-
-  //   // 澶栬仈鏁版嵁搴撴浛鎹�
-  //   if (window.GLOB.externalDatabase !== null && window.GLOB.externalDatabase) {
-  //     value = value.replace(window.GLOB.externalDatabase, '@db@')
-  //   }
-
   //   value = value.replace(/ mpercent /ig, '%')
     
   //   // 鏇挎崲鍏抽敭瀛�
@@ -230,7 +224,7 @@
   //     value = value.replace(reg, ' ' + item.key + ' ')
   //   })
 
-  //   // value = value.replace(/\n/ig, ' \n ')
+  //   value = value.replace(/ \n /ig, '\n')
 
   //   return value
   // }
diff --git a/src/views/mkiframe/index.jsx b/src/views/mkiframe/index.jsx
index e3a1cde..7923874 100644
--- a/src/views/mkiframe/index.jsx
+++ b/src/views/mkiframe/index.jsx
@@ -5,6 +5,7 @@
 import Api from '@/api'
 import asyncComponent from '@/utils/asyncLoadComponent'
 import MKEmitter from '@/utils/events.js'
+import ImgScale from '@/components/imgScale'
 import './index.scss'
 
 const CustomPage = asyncComponent(() => import('@/tabviews/custom'))
@@ -182,6 +183,7 @@
           {!loading && type === 'CustomPage' ? <CustomPage MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null}
           {!loading && type === 'BaseTable' ? <BaseTable MenuID={MenuId} param={{$BID: BID}} changeTemp={this.changeTemp}/> : null}
         </ConfigProvider>
+        <ImgScale />
       </div>
     )
   }

--
Gitblit v1.8.0