From 08cce3334a2dc81d690b518136b0aaea64e48b0b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 14 六月 2023 09:55:50 +0800 Subject: [PATCH] 2023-06-14 --- src/menu/datasource/index.jsx | 31 +++++++++++++++++++++++++------ 1 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/menu/datasource/index.jsx b/src/menu/datasource/index.jsx index e0bb557..27d9a81 100644 --- a/src/menu/datasource/index.jsx +++ b/src/menu/datasource/index.jsx @@ -5,7 +5,6 @@ import { SettingOutlined } from '@ant-design/icons' import VerifyCard from './verifycard' -import MKEmitter from '@/utils/events.js' import './index.scss' class DataSource extends Component { @@ -140,8 +139,6 @@ visible: true, mainSearch: search }) - - MKEmitter.emit('modalStatus', '鏁版嵁婧�') } verifySubmit = () => { @@ -165,6 +162,8 @@ } return item }) + + res.columns.reverse() } let maxScript = 0 @@ -187,14 +186,34 @@ } }) }) + } else { + res.scripts.forEach(item => { + if (item.status === 'false') return + + if (/exec\s/ig.test(item.sql)) { + maxScript = 1000 + } else if (item.sql.length > maxScript) { + maxScript = item.sql.length + } + }) } res.setting.maxScript = maxScript + if (config.subtype !== 'dualdatacard') { + delete res.subColumns + } else { + res.subColumns.reverse() + } + + if (this.verifyRef.state.debugId) { + res.setting.debugId = this.verifyRef.state.debugId + } else { + delete res.setting.debugId + } + this.setState({loading: false, visible: false}) this.props.updateConfig({...config, ...res}) - - MKEmitter.emit('modalStatus', false) }, () => { this.setState({loading: false}) }) @@ -216,7 +235,7 @@ okText="鎻愪氦" onOk={this.verifySubmit} confirmLoading={loading} - onCancel={() => { MKEmitter.emit('modalStatus', false);this.setState({ visible: false }) }} + onCancel={() => {this.setState({ visible: false }) }} destroyOnClose > <VerifyCard -- Gitblit v1.8.0