|
|
@@ -525,18 +525,20 @@ const handleUpdate = async (row?: ItemVO) => {
|
|
|
const fileIds = Array.isArray(res.data.fileIdList) ? res.data.fileIdList : [];
|
|
|
if (fileIds.length > 0) {
|
|
|
const fileRes = await listMinioData({ ids: fileIds });
|
|
|
- selectedFiles.value = fileIds.map((id: string | number, idx: number) => {
|
|
|
- const file = fileRes.rows.find((f: any) => String(f.id) === String(id));
|
|
|
- return file
|
|
|
- ? {
|
|
|
+ selectedFiles.value = fileIds
|
|
|
+ .map((id: string | number, idx: number) => {
|
|
|
+ const file = fileRes.rows.find((f: any) => String(f.id) === String(id));
|
|
|
+ return file
|
|
|
+ ? {
|
|
|
id: file.id,
|
|
|
name: file.originalName,
|
|
|
type: file.type,
|
|
|
duration: file.type === 1 ? 10 : Number(file.duration),
|
|
|
order: idx + 1
|
|
|
}
|
|
|
- : null;
|
|
|
- }).filter(Boolean);
|
|
|
+ : null;
|
|
|
+ })
|
|
|
+ .filter(Boolean);
|
|
|
} else {
|
|
|
selectedFiles.value = [];
|
|
|
}
|