|
@@ -225,6 +225,7 @@ import { deepClone } from '/@/utils/other'
|
|
|
import { useUserInfo } from '/@/stores/userInfo'
|
|
import { useUserInfo } from '/@/stores/userInfo'
|
|
|
import { ProcurementChannels, FeedingSpecial, UploadFileType } from '/@/constants/pageConstants'
|
|
import { ProcurementChannels, FeedingSpecial, UploadFileType } from '/@/constants/pageConstants'
|
|
|
import { handleUpload } from '/@/utils/upload'
|
|
import { handleUpload } from '/@/utils/upload'
|
|
|
|
|
+import { getFileUrl } from '/@/utils/url'
|
|
|
import { formatDate } from '/@/utils/formatTime'
|
|
import { formatDate } from '/@/utils/formatTime'
|
|
|
|
|
|
|
|
const stores = useUserInfo()
|
|
const stores = useUserInfo()
|
|
@@ -514,11 +515,11 @@ const openDialog = async (type: 'add' | 'edit', row?: any) => {
|
|
|
state.form.ethicsCheckFile = isValidJsonArray(row.ethicsCheckFile) ? JSON.parse(row.ethicsCheckFile) : []
|
|
state.form.ethicsCheckFile = isValidJsonArray(row.ethicsCheckFile) ? JSON.parse(row.ethicsCheckFile) : []
|
|
|
state.form.ethicsAdviceFile = isValidJsonArray(row.ethicsAdviceFile) ? JSON.parse(row.ethicsAdviceFile) : []
|
|
state.form.ethicsAdviceFile = isValidJsonArray(row.ethicsAdviceFile) ? JSON.parse(row.ethicsAdviceFile) : []
|
|
|
|
|
|
|
|
- licenseNumberFileList.value = (state.form.licenseNumberFile || []).map((f: any) => ({ url: f.url, name: f.name }))
|
|
|
|
|
- animalTestDateFileList.value = (state.form.animalTestDateFile || []).map((f: any) => ({ url: f.url, name: f.name }))
|
|
|
|
|
- geneIdentificationFileList.value = (state.form.geneIdentificationFile || []).map((f: any) => ({ url: f.url, name: f.name }))
|
|
|
|
|
- ethicsCheckFileList.value = (state.form.ethicsCheckFile || []).map((f: any) => ({ url: f.url, name: f.name }))
|
|
|
|
|
- ethicsAdviceFileList.value = (state.form.ethicsAdviceFile || []).map((f: any) => ({ url: f.url, name: f.name }))
|
|
|
|
|
|
|
+ licenseNumberFileList.value = (state.form.licenseNumberFile || []).map((f: any) => ({ url: getFileUrl(f.url), name: f.name }))
|
|
|
|
|
+ animalTestDateFileList.value = (state.form.animalTestDateFile || []).map((f: any) => ({ url: getFileUrl(f.url), name: f.name }))
|
|
|
|
|
+ geneIdentificationFileList.value = (state.form.geneIdentificationFile || []).map((f: any) => ({ url: getFileUrl(f.url), name: f.name }))
|
|
|
|
|
+ ethicsCheckFileList.value = (state.form.ethicsCheckFile || []).map((f: any) => ({ url: getFileUrl(f.url), name: f.name }))
|
|
|
|
|
+ ethicsAdviceFileList.value = (state.form.ethicsAdviceFile || []).map((f: any) => ({ url: getFileUrl(f.url), name: f.name }))
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
safePromise.value = false
|
|
safePromise.value = false
|
|
@@ -580,7 +581,7 @@ const handleFileUpload = async (file: any, type: UploadFileType) => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
item.status = 'done'
|
|
item.status = 'done'
|
|
|
- item.url = res
|
|
|
|
|
|
|
+ item.url = getFileUrl(res as string)
|
|
|
item.name = item.file.name
|
|
item.name = item.file.name
|
|
|
|
|
|
|
|
// 保存到 form
|
|
// 保存到 form
|