@@ -43,6 +43,7 @@ const tableList = ref<any>([])
4343const excelUploadSuccess = ref (false )
4444const tableListLoading = ref (false )
4545const token = wsCache .get (' user.token' )
46+ const checkLoading = ref (false )
4647const request_key = computed (() => {
4748 // eslint-disable-next-line no-undef
4849 return LicenseGenerator .generate ()
@@ -350,23 +351,30 @@ const next = debounce(async (formEl: FormInstance | undefined) => {
350351 emit (' changeActiveStep' , props .activeStep + 1 )
351352 }
352353 } else {
354+ if (checkLoading .value ) return
353355 // check status if success do next
354356 const requestObj = buildConf ()
355- datasourceApi .check (requestObj ).then ((res : boolean ) => {
356- if (res ) {
357- emit (' changeActiveStep' , props .activeStep + 1 )
358- // request tables
359- datasourceApi .getTablesByConf (requestObj ).then ((res : any ) => {
360- tableList .value = res
361- })
362- } else {
363- ElMessage ({
364- message: t (' ds.form.connect.failed' ),
365- type: ' error' ,
366- showClose: true ,
367- })
368- }
369- })
357+ checkLoading .value = true
358+ datasourceApi
359+ .check (requestObj )
360+ .then ((res : boolean ) => {
361+ if (res ) {
362+ emit (' changeActiveStep' , props .activeStep + 1 )
363+ // request tables
364+ datasourceApi .getTablesByConf (requestObj ).then ((res : any ) => {
365+ tableList .value = res
366+ })
367+ } else {
368+ ElMessage ({
369+ message: t (' ds.form.connect.failed' ),
370+ type: ' error' ,
371+ showClose: true ,
372+ })
373+ }
374+ })
375+ .finally (() => {
376+ checkLoading .value = false
377+ })
370378 }
371379 }
372380 })
@@ -480,7 +488,7 @@ defineExpose({
480488
481489<template >
482490 <div
483- v-loading =" uploadLoading || saveLoading"
491+ v-loading =" uploadLoading || saveLoading || checkLoading "
484492 class =" model-form"
485493 :class =" (!isCreate || activeStep === 2) && 'edit-form'"
486494 >
0 commit comments