|
|
|
@ -374,6 +374,7 @@ import { Codemirror } from 'vue-codemirror';
|
|
|
|
|
import { javascript } from '@codemirror/lang-javascript'; |
|
|
|
|
import { oneDark } from '@codemirror/theme-one-dark'; |
|
|
|
|
import { MsgError, MsgInfo, MsgSuccess } from '@/utils/message'; |
|
|
|
|
import { loadDBOptions } from '@/api/modules/database'; |
|
|
|
|
|
|
|
|
|
const loading = ref(); |
|
|
|
|
const refresh = ref(false); |
|
|
|
@ -400,6 +401,20 @@ const cleanData = ref();
|
|
|
|
|
const acceptParams = async (params: DialogProps): Promise<void> => { |
|
|
|
|
recordShow.value = true; |
|
|
|
|
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(); |
|
|
|
|
timer = setInterval(() => { |
|
|
|
|
search(); |
|
|
|
|