diff --git a/frontend/src/views/ds/Card.vue b/frontend/src/views/ds/Card.vue index a99cafac..f2e777c7 100644 --- a/frontend/src/views/ds/Card.vue +++ b/frontend/src/views/ds/Card.vue @@ -35,6 +35,8 @@ const emits = defineEmits([ 'dataTableDetail', 'showTable', 'recommendation', + 'startChecking', + 'endChecking', ]) const icon = computed(() => { return (dsTypeWithImg.find((ele) => props.type === ele.type) || {}).img @@ -53,11 +55,17 @@ const handleDel = () => { const handleQuestion = () => { //check first - datasourceApi.check_by_id(props.id).then((res: any) => { - if (res) { - emits('question', props.id) - } - }) + emits('startChecking') + datasourceApi + .check_by_id(props.id) + .then((res: any) => { + if (res) { + emits('question', props.id) + } + }) + .finally(() => { + emits('endChecking') + }) } function runSQL() { diff --git a/frontend/src/views/ds/Datasource.vue b/frontend/src/views/ds/Datasource.vue index 72bd1c8d..82c4f7e7 100644 --- a/frontend/src/views/ds/Datasource.vue +++ b/frontend/src/views/ds/Datasource.vue @@ -198,6 +198,15 @@ const back = () => { currentDataTable.value = null } +const loading = ref(false) + +function startLoading() { + loading.value = true +} +function endLoading() { + loading.value = false +} + useEmitt({ name: 'ds-index-click', callback: back, @@ -205,7 +214,7 @@ useEmitt({