Skip to content

Commit

Permalink
修复查询 tab 随意跳转的 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote committed Nov 24, 2023
1 parent 527eb30 commit 33e387c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions sql/templates/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>
//获取当前的标签页,如果当前不在执行结果页则默认新增一个页面
var active_li_id = sessionStorage.getItem('active_li_id');
let active_li_title = sessionStorage.getItem('active_li_title');
let tb_name
let tb_name, n
let need_describe_display = false
if (data.status === 0) {
// 查看表结构默认新增tab相同表结构获取不新增
Expand All @@ -726,7 +726,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>
}
// 执行结果页默认不新增
else if (active_li_title.match(/^执行结果\d$/)) {
let n = active_li_id.split("execute_result_tab")[1];
n = active_li_id.split("execute_result_tab")[1];
} else {
tab_add();
n = sessionStorage.getItem('tab_num');
Expand Down Expand Up @@ -774,7 +774,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>
});
if (need_describe_display) {
//初始化表结构显示
$("#" + ("query_result" + n)).bootstrapTable('destroy').bootstrapTable({
$(`#query_result${n}`).bootstrapTable('destroy').bootstrapTable({
escape: false,
data: result['rows'],
columns: [{
Expand Down Expand Up @@ -806,7 +806,7 @@ <h4 class="modal-title text-danger">收藏语句</h4>
isdetail = true
}
var showExport = {{can_download}}===1
$("#" + ('query_result' + n)).bootstrapTable('destroy').bootstrapTable({
$(`#query_result${n}`).bootstrapTable('destroy').bootstrapTable({
escape: true,
data: result['rows'],
columns: columns,
Expand Down Expand Up @@ -995,7 +995,6 @@ <h4 class="modal-title text-danger">收藏语句</h4>
complete: function () {
$('input[type=button]').removeClass('disabled');
$('input[type=button]').prop('disabled', false);
optgroup_control();
},
success: function (data) {
var target = $("#instance_name").val()+"/"+$("#db_name").val();
Expand Down

0 comments on commit 33e387c

Please sign in to comment.