|
@@ -37,7 +37,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-card>
|
|
</el-card>
|
|
|
|
|
|
|
|
- <el-dialog v-model="DialogVisibleErr" title="Warning" width="50%" align-center @close="() => { emits('close'); }">
|
|
|
|
|
|
|
+ <el-dialog v-model="DialogVisibleErr" title="Warning" width="50%" align-center @close="() => { emits('update'); }">
|
|
|
<template #header>
|
|
<template #header>
|
|
|
<el-icon :size="24" color="#f2b20a" style="margin: 0 5px 2px">
|
|
<el-icon :size="24" color="#f2b20a" style="margin: 0 5px 2px">
|
|
|
<WarnTriangleFilled />
|
|
<WarnTriangleFilled />
|
|
@@ -70,7 +70,7 @@ import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus';
|
|
|
import { Close, Document, WarnTriangleFilled, Download } from '@element-plus/icons-vue';
|
|
import { Close, Document, WarnTriangleFilled, Download } from '@element-plus/icons-vue';
|
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
import { useGlobSetting } from '@/hooks/setting';
|
|
|
|
|
|
|
|
-const emits = defineEmits(['close']);
|
|
|
|
|
|
|
+const emits = defineEmits(['close', 'update']);
|
|
|
|
|
|
|
|
const userStore = useUserStore();
|
|
const userStore = useUserStore();
|
|
|
const headers = {
|
|
const headers = {
|
|
@@ -179,7 +179,7 @@ const handleUploadSuccess = (response, _file, _fileList) => {
|
|
|
message: '添加成功', // 1.全部添加成功 —— failCount === 0
|
|
message: '添加成功', // 1.全部添加成功 —— failCount === 0
|
|
|
type: 'success',
|
|
type: 'success',
|
|
|
});
|
|
});
|
|
|
- emits('close');
|
|
|
|
|
|
|
+ emits('update');
|
|
|
} else {
|
|
} else {
|
|
|
DialogVisibleErr.value = true; // 2.有错误 —— 显示错误dialog
|
|
DialogVisibleErr.value = true; // 2.有错误 —— 显示错误dialog
|
|
|
};
|
|
};
|
|
@@ -189,13 +189,13 @@ const handleUploadSuccess = (response, _file, _fileList) => {
|
|
|
message: '系统错误',
|
|
message: '系统错误',
|
|
|
type: 'error',
|
|
type: 'error',
|
|
|
});
|
|
});
|
|
|
- emits('close');
|
|
|
|
|
|
|
+ emits('update');
|
|
|
};
|
|
};
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const handleErrComfirm = () => {
|
|
const handleErrComfirm = () => {
|
|
|
DialogVisibleErr.value = false;
|
|
DialogVisibleErr.value = false;
|
|
|
- emits('close');
|
|
|
|
|
|
|
+ emits('update');
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 当超出只能上传一个文件的限制时,自动替换上一个文件
|
|
// 当超出只能上传一个文件的限制时,自动替换上一个文件
|