From 11b6387d74467f81e33eba8f882bff610f240115 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 18 九月 2023 20:01:09 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/templates/sharecomponent/searchcomponent/index.jsx | 23 ++++++----------------- 1 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/templates/sharecomponent/searchcomponent/index.jsx b/src/templates/sharecomponent/searchcomponent/index.jsx index 6eb1a3b..4d077d4 100644 --- a/src/templates/sharecomponent/searchcomponent/index.jsx +++ b/src/templates/sharecomponent/searchcomponent/index.jsx @@ -2,10 +2,8 @@ import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' import { Modal, notification, Switch } from 'antd' -import moment from 'moment' import Api from '@/api' -import Utils from '@/utils/utils.js' import { getSearchForm } from '@/templates/zshare/formconfig' import asyncComponent from '@/utils/asyncComponent' import MKEmitter from '@/utils/events.js' @@ -211,25 +209,16 @@ sqlVerifing: true }) - let param = { - func: 's_debug_sql', - exec_type: 'y', - LText: res.dataSource - } + let sql = res.dataSource + sql = sql.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'1949-10-01 15:00:00'`) - param.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') - param.LText = param.LText.replace(/@\$|\$@/ig, '').replace(/@(BID|ID|LoginUID|SessionUid|UserID|Appkey|time_id)@/ig, `'${param.timestamp}'`) - param.LText = param.LText.replace(/\n/g, ' ') - - param.LText = Utils.formatOptions(param.LText) - param.secretkey = Utils.encrypt('', param.timestamp) - + let rduri = '' if (window.GLOB.mainSystemApi && res.database === 'sso') { - param.rduri = window.GLOB.mainSystemApi + rduri = window.GLOB.mainSystemApi } - Api.genericInterface(param).then(result => { - if (result.status) { + Api.sDebug(sql, rduri).then(result => { + if (result.status || result.ErrCode === '-2') { this.setState({ sqlVerifing: false, searchlist: _searchlist, -- Gitblit v1.8.0