|
@@ -272,7 +272,7 @@ const delUploadData = async (file) => {
|
|
|
}
|
|
|
uploadRef.value.abort()
|
|
|
uploadDisabled.value = false
|
|
|
- return true
|
|
|
+
|
|
|
} else {
|
|
|
// 如果id存在且文件不在上传状态,调用接口删除文件
|
|
|
loadingText.value = '删除中...'
|
|
@@ -288,12 +288,13 @@ const delUploadData = async (file) => {
|
|
|
if (index !== -1) {
|
|
|
fileListData.value.splice(index, 1)
|
|
|
}
|
|
|
- return true
|
|
|
+
|
|
|
} else {
|
|
|
window?.$message?.error(msg || '操作失败')
|
|
|
- return false
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
+ // emit('change', { type: 'del' })
|
|
|
}
|
|
|
|
|
|
const uploadRemove = () => {
|
|
@@ -339,7 +340,7 @@ const submitUpload = async () => {
|
|
|
|
|
|
|
|
|
if (file.raw !== undefined) {
|
|
|
- formData.append('files', file.raw) // 确保 file.raw 是 File 对象
|
|
|
+ formData.append('file', file.raw) // 确保 file.raw 是 File 对象
|
|
|
}
|
|
|
})
|
|
|
function hasFileFields(formData) {
|
|
@@ -441,8 +442,8 @@ const sortFile = async ()=>{
|
|
|
|
|
|
}
|
|
|
const { error, code, msg } = await (isListFile.value
|
|
|
- ? wbsApi.addFileSort(obj1)
|
|
|
- : wbsApi.addFileSort(obj2))
|
|
|
+ ? wbsApi.addFileSort(obj2)
|
|
|
+ : wbsApi.addFileSort(obj1))
|
|
|
uploadDisabled.value = false
|
|
|
if (!error && code === 200) {
|
|
|
// window?.$message?.success('排序成功')
|