|
|
@@ -84,7 +84,7 @@ export default { |
|
|
|
file.response = resp; |
|
|
|
console.log(resp); |
|
|
|
file.fileList = item.fileList; |
|
|
|
this.onFileListChanged("ADD", resp.id); |
|
|
|
this.onFileListChanged("ADD", resp); |
|
|
|
this.setFileStatus(file, 'done', '文件上传成功'); |
|
|
|
this.$emit('onUploadSuccess', file); |
|
|
|
} |
|
|
@@ -146,15 +146,15 @@ export default { |
|
|
|
return UfileList; |
|
|
|
} |
|
|
|
}, |
|
|
|
onFileListChanged(type, id) { |
|
|
|
onFileListChanged(type, data) { |
|
|
|
if(this.proposerId != -1) return; |
|
|
|
if(type === "ADD") |
|
|
|
{ |
|
|
|
this.newAttachments.push(id); |
|
|
|
this.newAttachments.push(data); |
|
|
|
} |
|
|
|
else if(type === "REMOVE") |
|
|
|
{ |
|
|
|
let index = this.newAttachments.indexOf(id); |
|
|
|
let index = this.newAttachments.indexOf(data.id); |
|
|
|
if(index !== -1) |
|
|
|
this.newAttachments.splice(index, 1); |
|
|
|
} |
|
|
|