king
2023-04-07 20185ab64a165df51515d9fa1c9b12a7a8c55f59
src/templates/sharecomponent/actioncomponent/verifyprint/index.jsx
@@ -4,6 +4,7 @@
import { Form, Tabs, Row, Col, Button, notification, Modal, message, InputNumber, Input, Select, Radio, Tooltip, Typography, Popconfirm, Spin } from 'antd'
import { QuestionCircleOutlined, 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'
@@ -33,6 +34,7 @@
  state = {
    verify: {},
    debugId: '',
    templates: [],
    loading: false,
    activeKey: 'base',
@@ -611,10 +613,18 @@
  }
  sqlverify = (_resolve, _reject, scripts) => {
    const { verify, declareSql } = this.state
    const { verify, declareSql, debugId } = this.state
    let timestamp = moment().format('YYYY-MM-DD HH:mm:ss')
    let sql = SettingUtils.getDebugSql(verify.setting || {}, verify.columns, scripts, declareSql, timestamp)
    let _debugId = md5(sql)
    if (debugId === _debugId) {
      _resolve()
      return
    }
    let param = {
      func: 's_debug_sql',
      exec_type: 'y',
@@ -626,6 +636,7 @@
    Api.genericInterface(param).then(result => {
      if (result.status) {
        this.setState({debugId: _debugId})
        _resolve()
      } else {
        _reject()