Compare commits
No commits in common. "f6243a66a0ff7dfd50405dbb29c68d86368bc266" and "19ec7ca25ae20f0950c307588c53908fa90bb908" have entirely different histories.
f6243a66a0
...
19ec7ca25a
@ -307,23 +307,11 @@ const handleUploadCertificate = () => {
|
||||
|
||||
const handleViewCertificate = () => {
|
||||
certificateModalMode.value = 'view'
|
||||
|
||||
const formatFiles = (urlData) => {
|
||||
if (!urlData) return []
|
||||
// Handle string (single or comma-separated)
|
||||
const urls = typeof urlData === 'string' ? urlData.split(',') : (Array.isArray(urlData) ? urlData : [])
|
||||
|
||||
return urls.filter(u => u).map((url, index) => ({
|
||||
id: String(index),
|
||||
name: url.substring(url.lastIndexOf('/') + 1) || 'unknown',
|
||||
status: 'finished',
|
||||
url: url
|
||||
}))
|
||||
}
|
||||
|
||||
// 这里可以从 props.detailData 中获取已上传的证书数据
|
||||
certificateData.value = {
|
||||
reportFiles: formatFiles(props.detailData?.report_url),
|
||||
certificateFiles: formatFiles(props.detailData?.certificate_url)
|
||||
title: '非遗传承人等级证书',
|
||||
description: '非遗传承人等级证书相关文件',
|
||||
files: props.detailData?.certificates || []
|
||||
}
|
||||
certificateModalVisible.value = true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user