From 89f85223ff7b1b5ee3931ae01efa3dd17d5524fc Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 21 十一月 2022 16:03:27 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx index 4835267..fa48a0f 100644 --- a/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx +++ b/src/menu/components/table/edit-table/columns/tableIn/customscript/index.jsx @@ -61,6 +61,15 @@ // 琛ㄥ崟鎻愪氦鏃舵鏌ヨ緭鍏ュ�兼槸鍚︽纭� this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { + if (/^[\s\n]+$/.test(values.sql)) { + notification.warning({ + top: 92, + message: '璇疯緭鍏ql!', + duration: 5 + }) + return + } + values.uuid = this.state.editItem ? this.state.editItem.uuid : '' let _quot = values.sql.match(/'{1}/g) @@ -161,7 +170,8 @@ 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, ' ') + // 澶栬仈鏁版嵁搴撴浛鎹� if (window.GLOB.externalDatabase !== null) { param.LText = param.LText.replace(/@db@/ig, window.GLOB.externalDatabase) -- Gitblit v1.8.0