| | |
| | | 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' |
| | |
| | | |
| | | state = { |
| | | verify: {}, |
| | | debugId: '', |
| | | activeKey: 'setting', |
| | | defaultscript: '', // 自定义脚本 |
| | | excelColumns: [ |
| | |
| | | } |
| | | |
| | | sqlverify = (_resolve, _reject, scripts) => { |
| | | const { searches, verify } = this.state |
| | | const { searches, verify, debugId } = this.state |
| | | |
| | | if (verify.dataType !== 'custom') { |
| | | _resolve() |
| | |
| | | |
| | | 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', |
| | |
| | | |
| | | Api.genericInterface(param).then(result => { |
| | | if (result.status) { |
| | | this.setState({debugId: _debugId}) |
| | | _resolve() |
| | | } else { |
| | | _reject() |