桩点支架分批次上传

This commit is contained in:
Teo
2025-05-27 19:53:19 +08:00
parent 933fe4d74a
commit e2e4550736
9 changed files with 138 additions and 513 deletions

View File

@ -201,11 +201,16 @@ const handleUploadError = () => {
// 上传成功回调
const handleUploadSuccess = (res: any, file: UploadFile) => {
if (res.code === 200) {
uploadList.value.push({
name: res.data.fileName,
url: res.data.url,
ossId: res.data.ossId
});
if (res.data) {
uploadList.value.push({
name: res.data.fileName,
url: res.data.url,
ossId: res.data.ossId
});
} else {
uploadList.value.push({});
}
uploadedSuccessfully();
} else {
number.value--;
@ -242,6 +247,8 @@ const uploadedSuccessfully = () => {
proxy?.$modal.msgSuccess('导入成功');
return;
}
console.log(number.value, uploadList.value);
if (number.value > 0 && uploadList.value.length === number.value) {
fileList.value = fileList.value.filter((f) => f.url !== undefined).concat(uploadList.value);
uploadList.value = [];