Skip to content

Commit

Permalink
修复多窗口查询时 输入SQL多窗口同步的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
cookieY committed Oct 27, 2020
1 parent 7ed2575 commit 328a65d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/tabQuery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<template>
<div>
<editor v-model="sql" @init="editorInit" @setCompletions="setCompletions"></editor>
<editor v-model="sqls" @init="editorInit" @setCompletions="setCompletions"></editor>
<br>
<span>当前选择的库: {{dataBase}}</span> <span class="margin-left-10">查询耗时: {{queryTime}} ms</span>
<br>
Expand Down Expand Up @@ -150,6 +150,7 @@
queryRes = []
allQueryData = []
total = 0
private sqls = ''
fieldColumns = [
{
title: '字段名',
Expand Down Expand Up @@ -188,7 +189,7 @@
}
copySnippet(vl: { text: any; }) {
this.sql = vl.text
this.sqls = vl.text
}
openSnippet() {
Expand Down Expand Up @@ -231,7 +232,7 @@
}
clearObj() {
this.sql = ''
this.sqls = ''
this.queryRes = [];
this.columnsName = [];
this.current = 1;
Expand Down Expand Up @@ -265,7 +266,7 @@
}
});
this.$http.post(`${this.$config.url}/query/results`, {
'sql': this.sql,
'sql': this.sqls,
'basename': this.dataBase,
'source': this.source
})
Expand Down

0 comments on commit 328a65d

Please sign in to comment.