|
|
@ -56,7 +56,7 @@ |
|
|
|
<div class="warning-message" v-if="active == 1 && !error"> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="table-container"> |
|
|
|
<div class="table-container" v-loading="isShowLoading"> |
|
|
|
<Table v-clientTable |
|
|
|
:columns="Array.isArray(currentColumns) ? currentColumns : []" |
|
|
|
:data="tableObject.tableList" |
|
|
@ -88,8 +88,8 @@ |
|
|
|
{{ t('ts.下载差异数据') }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 0 || (active == 1 && !error)">{{ t('ts.下一步') }}</el-button> |
|
|
|
<el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="active == 2 || (active == 1 && error)">{{ t('ts.好的') }}</el-button> |
|
|
|
<el-button :disabled="formLoading || isShowLoading" type="primary" @click="submitForm" v-if="active == 0 || (active == 1 && !error)">{{ t('ts.下一步') }}</el-button> |
|
|
|
<el-button :disabled="formLoading || isShowLoading" type="primary" @click="submitForm" v-if="active == 2 || (active == 1 && error)">{{ t('ts.好的') }}</el-button> |
|
|
|
<el-button @click="dialogVisible = false">{{ t('ts.取 消') }}</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
@ -298,14 +298,17 @@ const open = () => { |
|
|
|
defineExpose({ open }) // 提供 open 方法,用于打开弹窗 |
|
|
|
|
|
|
|
const formRef = ref() |
|
|
|
const isShowLoading = ref(false) |
|
|
|
|
|
|
|
/** 提交表单 */ |
|
|
|
const submitForm = async () => { |
|
|
|
// 如果当前在确认数据步骤,调用确认函数 |
|
|
|
if (active.value === 1) { |
|
|
|
if(error.value){ |
|
|
|
isShowLoading.value = true |
|
|
|
if(error.value){ |
|
|
|
dialogVisible.value = false |
|
|
|
error.value = false |
|
|
|
isShowLoading.value = false |
|
|
|
}else{ |
|
|
|
if (props.confirmFormSuccess) { |
|
|
|
await props.confirmFormSuccess(props.tableObject.tableList, |
|
|
@ -313,11 +316,13 @@ const submitForm = async () => { |
|
|
|
if(msg){ |
|
|
|
message.error(msg) |
|
|
|
error.value = false |
|
|
|
isShowLoading.value = false |
|
|
|
return |
|
|
|
}else{ |
|
|
|
message.success("导入成功!") |
|
|
|
error.value = false |
|
|
|
active.value = 2 // 设置为第三步 |
|
|
|
isShowLoading.value = false |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|