|
@@ -77,7 +77,7 @@
|
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
|
<el-button
|
|
|
- v-loading.fullscreen.lock="fullscreenLoading"
|
|
|
+ v-loading.fullscreen.lock="fullLoading"
|
|
|
type="primary"
|
|
|
icon="Finished"
|
|
|
size="small"
|
|
@@ -115,7 +115,7 @@ const { getList } = toRefs(props);
|
|
|
/** 表单抽屉 页变量 */
|
|
|
const fileList = ref([]);
|
|
|
const visible = ref(false);
|
|
|
-const fullscreenLoading = ref(false);
|
|
|
+const fullLoading = ref(false);
|
|
|
const addType = ref(1);
|
|
|
const webHost = import.meta.env.VITE_APP_BASE_API;
|
|
|
|
|
@@ -245,6 +245,7 @@ function cancel() {
|
|
|
}
|
|
|
|
|
|
function submitForm() {
|
|
|
+ fullLoading.value = true;
|
|
|
submitFileForm();
|
|
|
}
|
|
|
|
|
@@ -281,6 +282,7 @@ const handleFileUploadProgress = (event, file, fileList) => {
|
|
|
};
|
|
|
/** 文件上传成功处理 */
|
|
|
const handleFileSuccess = (response, file, fileList) => {
|
|
|
+ fullLoading.value = false;
|
|
|
if (addType === 1) {
|
|
|
uploadLoop.open = false;
|
|
|
uploadLoop.isUploading = false;
|
|
@@ -309,13 +311,7 @@ const handleFileSuccess = (response, file, fileList) => {
|
|
|
};
|
|
|
/** 提交上传文件 */
|
|
|
function submitFileForm() {
|
|
|
- fullscreenLoading.value = true;
|
|
|
- const promise = Promise.resolve(proxy.$refs["uploadRef"].submit());
|
|
|
- promise.then((result) => {
|
|
|
- fullscreenLoading.value = false;
|
|
|
- }).catch((err) => {
|
|
|
- fullscreenLoading.value = false;
|
|
|
- })
|
|
|
+ proxy.$refs["uploadRef"].submit();
|
|
|
}
|
|
|
|
|
|
// 暴露给父组件的方法
|