对接法规月报
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:class="{'uploadFile':isUploadFile}"
|
||||
name="file"
|
||||
:file-list="myfileList"
|
||||
:multiple="true"
|
||||
:multiple="multiple"
|
||||
:action="uploadAction+'?state='+state+'&cut='+cut"
|
||||
:headers="headers"
|
||||
@preview="preview"
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
export default {
|
||||
name: 'file',
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile'],
|
||||
props: ['disableds', 'disabled', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'isMultiple'],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
@@ -46,7 +46,8 @@
|
||||
fileList: [],
|
||||
myfileList: [],
|
||||
isLoding: false,
|
||||
cut: ''
|
||||
cut: '',
|
||||
multiple: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -62,6 +63,9 @@
|
||||
} else if (long && long == 'en-us') {
|
||||
this.cut = 'en'
|
||||
}
|
||||
if (this.isMultiple) {
|
||||
this.multiple = false
|
||||
}
|
||||
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
|
||||
},
|
||||
methods: {
|
||||
@@ -76,11 +80,15 @@
|
||||
this.myfileList = []
|
||||
}
|
||||
},
|
||||
beforeUpload(file) {
|
||||
|
||||
console.log(file)
|
||||
beforeUpload(file, fileList) {
|
||||
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
|
||||
this.fileTypeSatus = true
|
||||
if (this.isMultiple) {
|
||||
if ((this.myfileList && this.myfileList.length == 1) || this.myfileList && this.myfileList.length > 1) {
|
||||
this.$message.warning('只能上传一个文件')
|
||||
return false
|
||||
}
|
||||
}
|
||||
//TODO 客户要求不拦截文件
|
||||
// if(file.type){
|
||||
// if (thisFileType.indexOf(file.type) != -1) {
|
||||
|
||||
Reference in New Issue
Block a user