From 20185ab64a165df51515d9fa1c9b12a7a8c55f59 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 07 四月 2023 23:11:04 +0800
Subject: [PATCH] 2023-04-07

---
 src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
index e307490..1ea9109 100644
--- a/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
+++ b/src/templates/sharecomponent/actioncomponent/verifyexcelout/index.jsx
@@ -4,6 +4,7 @@
 import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Radio, Spin, Typography, Popconfirm } from 'antd'
 import { EditOutlined, StopOutlined, CheckCircleOutlined, SwapOutlined, DeleteOutlined } from '@ant-design/icons'
 import moment from 'moment'
+import md5 from 'md5'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -28,6 +29,7 @@
 
   state = {
     verify: {},
+    debugId: '',
     activeKey: 'setting',
     defaultscript: '', // 鑷畾涔夎剼鏈�
     excelColumns: [
@@ -995,7 +997,7 @@
   }
 
   sqlverify = (_resolve, _reject, scripts) => {
-    const { searches, verify } = this.state
+    const { searches, verify, debugId } = this.state
 
     if (verify.dataType !== 'custom') {
       _resolve()
@@ -1004,6 +1006,14 @@
 
     let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
     let sql = SettingUtils.getDebugSql(verify, scripts, (verify.useSearch === 'true' ? searches : []), Utils, timestamp)
+
+    let _debugId = md5(sql)
+
+    if (debugId === _debugId) {
+      _resolve()
+      return
+    }
+
     let param = {
       func: 's_debug_sql',
       exec_type: 'y',
@@ -1015,6 +1025,7 @@
 
     Api.genericInterface(param).then(result => {
       if (result.status) {
+        this.setState({debugId: _debugId})
         _resolve()
       } else {
         _reject()

--
Gitblit v1.8.0