diff --git a/common/static/ace/ace-init.js b/common/static/ace/ace-init.js index 98fb43679c..4a1c495cf6 100644 --- a/common/static/ace/ace-init.js +++ b/common/static/ace/ace-init.js @@ -40,7 +40,7 @@ editor.commands.addCommand({ exec: function (editor) { let pathname = window.location.pathname; if (pathname === "/sqlquery/") { - sqlquery(); + dosqlquery() } } }); diff --git a/sql/templates/sqlquery.html b/sql/templates/sqlquery.html index 24d94b5246..c3d8ed431d 100644 --- a/sql/templates/sqlquery.html +++ b/sql/templates/sqlquery.html @@ -622,11 +622,7 @@ //先做表单验证,验证成功再成功提交查询请求 $("#btn-sqlquery").click(function () { - if (sqlquery_validate()) { - $('input[type=button]').addClass('disabled'); - $('input[type=button]').prop('disabled', true); - sqlquery(); - } + dosqlquery(); } ); @@ -913,6 +909,14 @@ } }); } + + function dosqlquery() { + if (sqlquery_validate()) { + $('input[type=button]').addClass('disabled'); + $('input[type=button]').prop('disabled', true); + sqlquery(); + } + }