拆分结果保存
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.visible=this.splitVisible
|
||||
console.log('accept11111',this.accept)
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods: {
|
||||
@@ -68,16 +69,24 @@
|
||||
}
|
||||
},
|
||||
beforeUpload(file) {
|
||||
let fileTypes=this.accept.split(',')
|
||||
let fileFlag=false
|
||||
fileTypes.forEach(item=>{
|
||||
if(item==file.type){
|
||||
fileFlag=true
|
||||
}
|
||||
})
|
||||
console.log('filetype',fileFlag)
|
||||
if(!fileFlag){
|
||||
this.$message.warning('文件格式不正确')
|
||||
console.log('accept',this.accept,file)
|
||||
// if(this.accept.indexOf(',')!=-1){
|
||||
// let fileTypes=this.accept.split(',')
|
||||
// fileTypes.forEach(item=>{
|
||||
// if(item==file.type){
|
||||
// fileFlag=true
|
||||
// }
|
||||
// })
|
||||
// }else{
|
||||
// let fileTypes=this.accept.split('/')
|
||||
// let fileNowTypes=file.type.split('/')
|
||||
// fileFlag=fileTypes[0]==fileTypes[0]?true:false
|
||||
// }
|
||||
|
||||
// console.log('filetype',fileFlag)
|
||||
if(fileFlag){
|
||||
this.$message.warning(this.$t('fileFormatIncorrect'))
|
||||
this.fileTypeSatus = false
|
||||
}else{
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
@@ -96,7 +105,7 @@
|
||||
window.open(url, '_blank')
|
||||
},
|
||||
handleChange(info) {
|
||||
// console.log('file',info)
|
||||
|
||||
let { file,fileList } = info
|
||||
const status = info.file.status
|
||||
info.fileList.forEach((val, index) => {
|
||||
@@ -154,6 +163,7 @@
|
||||
this.fileList.push(res)
|
||||
}
|
||||
})
|
||||
// console.log('file111111',this.fileList,fileList)
|
||||
this.$emit('uploadSuccess', this.fileList,fileList)
|
||||
// console.log('uplossss',this.fileList,fileList)
|
||||
if (this.myfileList.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user