|
|
@ -374,6 +374,7 @@ import { Codemirror } from 'vue-codemirror'; |
|
|
|
import { javascript } from '@codemirror/lang-javascript'; |
|
|
|
import { javascript } from '@codemirror/lang-javascript'; |
|
|
|
import { oneDark } from '@codemirror/theme-one-dark'; |
|
|
|
import { oneDark } from '@codemirror/theme-one-dark'; |
|
|
|
import { MsgError, MsgInfo, MsgSuccess } from '@/utils/message'; |
|
|
|
import { MsgError, MsgInfo, MsgSuccess } from '@/utils/message'; |
|
|
|
|
|
|
|
import { loadDBOptions } from '@/api/modules/database'; |
|
|
|
|
|
|
|
|
|
|
|
const loading = ref(); |
|
|
|
const loading = ref(); |
|
|
|
const refresh = ref(false); |
|
|
|
const refresh = ref(false); |
|
|
@ -400,6 +401,20 @@ const cleanData = ref(); |
|
|
|
const acceptParams = async (params: DialogProps): Promise<void> => { |
|
|
|
const acceptParams = async (params: DialogProps): Promise<void> => { |
|
|
|
recordShow.value = true; |
|
|
|
recordShow.value = true; |
|
|
|
dialogData.value = params; |
|
|
|
dialogData.value = params; |
|
|
|
|
|
|
|
if (dialogData.value.rowData.type === 'database') { |
|
|
|
|
|
|
|
const data = await loadDBOptions(); |
|
|
|
|
|
|
|
let itemDBs = data.data || []; |
|
|
|
|
|
|
|
for (const item of itemDBs) { |
|
|
|
|
|
|
|
if (item.id == dialogData.value.rowData.dbName) { |
|
|
|
|
|
|
|
if (item.from === 'local') { |
|
|
|
|
|
|
|
dialogData.value.rowData.dbName = i18n.global.t('database.localDB') + ' [' + item.name + ']'; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
dialogData.value.rowData.dbName = item.from + ' [' + item.name + ']'; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
search(); |
|
|
|
search(); |
|
|
|
timer = setInterval(() => { |
|
|
|
timer = setInterval(() => { |
|
|
|
search(); |
|
|
|
search(); |
|
|
|