|
@@ -216,6 +216,14 @@ export default { |
|
|
// 删除数据集记录,未删除文件 |
|
|
// 删除数据集记录,未删除文件 |
|
|
await addAttachment(file); |
|
|
await addAttachment(file); |
|
|
} |
|
|
} |
|
|
|
|
|
//不同数据集上传同一个文件 |
|
|
|
|
|
if (file.datasetID != '') { |
|
|
|
|
|
if (Number(file.datasetID) != file.datasetId) { |
|
|
|
|
|
var info = "该文件已上传,对应数据集(" + file.datasetName + ")-文件(" + file.realName + ")"; |
|
|
|
|
|
window.alert(info); |
|
|
|
|
|
window.location.reload(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
console.log('文件已上传完成'); |
|
|
console.log('文件已上传完成'); |
|
|
this.progress = 100; |
|
|
this.progress = 100; |
|
|
this.status = this.dropzoneParams.data('upload-complete'); |
|
|
this.status = this.dropzoneParams.data('upload-complete'); |
|
@@ -257,6 +265,9 @@ export default { |
|
|
file.uploaded = response.data.uploaded; |
|
|
file.uploaded = response.data.uploaded; |
|
|
file.chunks = response.data.chunks; |
|
|
file.chunks = response.data.chunks; |
|
|
file.attachID = response.data.attachID; |
|
|
file.attachID = response.data.attachID; |
|
|
|
|
|
file.datasetID = response.data.datasetID; |
|
|
|
|
|
file.datasetName = response.data.datasetName; |
|
|
|
|
|
file.realName = response.data.fileName; |
|
|
return file; |
|
|
return file; |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
this.emitDropzoneFailed(file); |
|
|
this.emitDropzoneFailed(file); |
|
|