导入拆分位置错误修改
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
headers:'',
|
||||
previewImage:{},
|
||||
// accept:'image/*'
|
||||
uploadFileFlag:0,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -81,6 +83,7 @@
|
||||
this.fileTypeSatus = false
|
||||
}else{
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
this.uploadFileFlag++
|
||||
this.fileTypeSatus = true
|
||||
this.$message.destroy()
|
||||
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
|
||||
@@ -111,10 +114,12 @@
|
||||
return
|
||||
} else {
|
||||
if (status === 'error') {
|
||||
this.uploadFileFlag--
|
||||
this.$emit('uploadSuccess', this.fileList)
|
||||
this.$message.destroy()
|
||||
this.$message.error(`${info.file.name} `+this.$t('fileUploadFailed'))
|
||||
} else if (status === 'removed') {
|
||||
this.uploadFileFlag--
|
||||
this.myfileList = info.fileList
|
||||
this.fileList = []
|
||||
this.myfileList.forEach((res) => {
|
||||
@@ -124,12 +129,13 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.$emit('uploadSuccess', this.fileList,fileList)
|
||||
this.$emit('uploadSuccess', this.fileList,fileList,this.uploadFileFlag)
|
||||
if (this.myfileList.length > 0) {
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} `+this.$t('deletedSuccessfully'))
|
||||
}
|
||||
} else if (status === 'done') {
|
||||
this.uploadFileFlag--
|
||||
this.fileList = []
|
||||
this.myfileList = info.fileList
|
||||
if (info.fileList.length > 20) {
|
||||
@@ -142,7 +148,7 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
this.$emit('uploadSuccess', this.fileList,fileList)
|
||||
this.$emit('uploadSuccess', this.fileList,fileList,this.uploadFileFlag)
|
||||
this.$message.destroy()
|
||||
this.$message.error('最多只能上传二十个')
|
||||
return
|
||||
@@ -154,14 +160,15 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
// console.log('file111111',this.fileList,fileList)
|
||||
this.$emit('uploadSuccess', this.fileList,fileList)
|
||||
console.log('file111111',this.fileList,fileList,file,this.uploadFileFlag)
|
||||
this.$emit('uploadSuccess',file, this.fileList,fileList,this.uploadFileFlag)
|
||||
// console.log('uplossss',this.fileList,fileList)
|
||||
if (this.myfileList.length > 0) {
|
||||
this.$message.destroy()
|
||||
this.$message.success(`${info.file.name} `+this.$t('uploadSuccessful'))
|
||||
}
|
||||
} else if (status === 'uploading') {
|
||||
// this.uploadFileFlag++
|
||||
this.myfileList = info.fileList
|
||||
// this.$message.success(`${info.file.name} 文件上传成功。`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user