拆分图片显示修改

This commit is contained in:
caoyang
2022-04-21 16:16:18 +08:00
parent 71f705c08a
commit ccc08a5cc2
6 changed files with 73 additions and 46 deletions
+25 -18
View File
@@ -35,7 +35,7 @@
data() {
return {
visible: false,
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
uploadAction: window._CONFIG['domianURL'] + '/split/sarFileSplitItems/upload',
upDataList: [],
downLoadFileUrl: window._CONFIG['domianURL'] + '/sys/common/static',
fileList: [],
@@ -83,7 +83,10 @@
this.fileTypeSatus = false
}else{
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.uploadFileFlag++
if(this.uploadFileFlag<20){
this.uploadFileFlag++
}
this.fileTypeSatus = true
this.$message.destroy()
// 207M.doc文件大小超出100MB限制, 请压缩或降低文件质量!
@@ -107,6 +110,7 @@
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
if (this.fileTypeSatus) {
if (file.size > 1000000000) {
@@ -138,7 +142,10 @@
this.uploadFileFlag--
this.fileList = []
this.myfileList = info.fileList
console.log('listLength11111',info.fileList.length)
if (info.fileList.length > 20) {
this.$message.destroy()
this.$message.error(this.$t('uploadMaximumATime'))
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
@@ -148,25 +155,25 @@
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList,fileList,this.uploadFileFlag)
this.$message.destroy()
this.$message.error('最多只能上传二十个')
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}else{
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
// 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'))
}
})
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