|
@@ -407,11 +407,17 @@ const previewModalClose = () => {
|
|
|
}
|
|
|
|
|
|
//删除上传的文件
|
|
|
-const uploadsDel = async ({ link }) => {
|
|
|
- const arrUrl = link.split('.com//')
|
|
|
- if (arrUrl.length > 0) {
|
|
|
- await ossApi.removeFile({ fileName: arrUrl[1] }, false)
|
|
|
- }
|
|
|
+const uploadsDel = async (data) => {
|
|
|
+
|
|
|
+
|
|
|
+ // const arrUrl = link.split('.com//')
|
|
|
+ // if (arrUrl.length > 0) {
|
|
|
+ // await ossApi.removeFile({ fileName: arrUrl[1] }, false)
|
|
|
+ // }
|
|
|
+ const { link } = data
|
|
|
+ await ossApi.removeFile({ fileName:link }, false)
|
|
|
+ uploadFileList.value = uploadFileList.value.filter((item) => item.url !== data.link)
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//上传记录表格
|
|
@@ -444,11 +450,17 @@ const verifyFormData = async (log) => {
|
|
|
formData.contractId = contractId
|
|
|
formData.type = fileType.value || '2'
|
|
|
const fileList = uploadFileList.value
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
//处理文件
|
|
|
let imageUrl = '', pdfUrl = ''
|
|
|
if (fileList.length > 0) {
|
|
|
imageUrl = arrToKey(fileList, 'url', ',')
|
|
|
pdfUrl = arrToKey(fileList, 'pdfUrl', ',')
|
|
|
+ } else {
|
|
|
+ window.$message?.warning('请先上传文件')
|
|
|
+ return
|
|
|
}
|
|
|
//设置数据
|
|
|
formData.imageUrl = imageUrl
|