diff --git a/frontend/src/views/chat/ChatCreator.vue b/frontend/src/views/chat/ChatCreator.vue index f53ea62e..02769f97 100644 --- a/frontend/src/views/chat/ChatCreator.vue +++ b/frontend/src/views/chat/ChatCreator.vue @@ -51,6 +51,7 @@ function listDs() { const innerDs = ref() const loading = ref(false) +const statusLoading = ref(false) function showDs() { listDs() @@ -68,12 +69,18 @@ function selectDsInDialog(ds: any) { function confirmSelectDs() { if (innerDs.value) { + statusLoading.value = true //check first - datasourceApi.check_by_id(innerDs.value).then((res: any) => { - if (res) { - createChat(innerDs.value) - } - }) + datasourceApi + .check_by_id(innerDs.value) + .then((res: any) => { + if (res) { + createChat(innerDs.value) + } + }) + .finally(() => { + statusLoading.value = false + }) } } @@ -117,98 +124,100 @@ defineExpose({ - - - {{ $t('qa.select_datasource') }} - - - - - - - - - - - - - - - - - + + + {{ $t('qa.select_datasource') }} + + + + + + + + + + + + + + + + - - - - - + :xs="24" + :sm="12" + :md="12" + :lg="8" + :xl="6" + class="mb-16" + > + + + + + + - - - - - - {{ $t('datasource.new_data_source') }} - - - - - - - - + + + + + + {{ $t('datasource.new_data_source') }} + + + + + + + + +