|
|
|
@ -727,6 +727,24 @@ const fetchDetail = (id) => { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
// 回填附件:将接口返回的 fileList 映射为 van-uploader 可识别的格式 |
|
|
|
// 接口可能返回对象数组 [{uploadPath, fileName}] 或字符串路径数组 |
|
|
|
if (data.fileList && data.fileList.length > 0) { |
|
|
|
formData.fileList = data.fileList.map(item => { |
|
|
|
const path = typeof item === 'string' |
|
|
|
? item |
|
|
|
: (item.uploadPath || item.url || ''); |
|
|
|
return { |
|
|
|
url: path, |
|
|
|
uploadPath: path, |
|
|
|
status: 'done', |
|
|
|
message: '', |
|
|
|
name: typeof item === 'object' ? (item.fileName || item.name || '') : '' |
|
|
|
}; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
formData.fileList = []; |
|
|
|
} |
|
|
|
} else { |
|
|
|
showToast(res.msg || '获取详情失败'); |
|
|
|
} |
|
|
|
|