|
|
@@ -887,7 +887,7 @@
|
|
|
<el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
|
|
|
:on-remove="filremove" :file-list="fileList" :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
|
|
|
<i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
- <div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">大小为512KB-5MB
|
|
|
+ <div slot="tip" class="el-upload__tip" v-if="SubfileForm.NeedFileType !=yasuoname">最大可上传 10MB
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
@@ -928,7 +928,7 @@
|
|
|
<el-upload multiple style="margin-top: 10px;" action="" ref="newrefuploadattach"
|
|
|
:http-request="uploadrequest" class="attach-uploader" :before-upload="newbeforeAvatarUpload">
|
|
|
<i class="el-icon-plus attach-uploader-icon"></i>
|
|
|
- <div slot="tip" class="el-upload__tip">大小为512KB-5MB
|
|
|
+ <div slot="tip" class="el-upload__tip">最大可上传 10MB
|
|
|
</div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
@@ -1725,19 +1725,10 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
})
|
|
|
},
|
|
|
newbeforeAvatarUpload (file) {
|
|
|
- let isLt512K = file.size / 1024 < 512
|
|
|
- if (isLt512K) {
|
|
|
- this.$message.error('上传文件大小不能小于 512KB!')
|
|
|
- return false
|
|
|
- }
|
|
|
if (this.newSubfileForm.NeedFileType != this.yasuoname) {
|
|
|
- if (file.type.indexOf('image') < 0) {
|
|
|
- this.$message.error('请上传图片!')
|
|
|
- return false
|
|
|
- }
|
|
|
- let isLt50m = file.size / 1024 / 1024 / 5 < 1
|
|
|
- if (!isLt50m) {
|
|
|
- this.$message.error('上传文件大小不能超过 5MB!')
|
|
|
+ let isLt10m = file.size / 1024 / 1024 / 10 < 1
|
|
|
+ if (!isLt10m) {
|
|
|
+ this.$message.error('上传文件大小不能超过 10MB!')
|
|
|
return false
|
|
|
}
|
|
|
return true
|
|
|
@@ -2008,19 +1999,10 @@ import apiCert from '@/api/oilsupplier/suppliercert'
|
|
|
}
|
|
|
},
|
|
|
beforeAvatarUpload (file) {
|
|
|
- let isLt512K = file.size / 1024 < 512
|
|
|
- if (isLt512K) {
|
|
|
- this.$message.error('上传文件大小不能小于 512KB!')
|
|
|
- return false
|
|
|
- }
|
|
|
if (this.SubfileForm.NeedFileType !== this.yasuoname) {
|
|
|
- if (file.type.indexOf('image') < 0) {
|
|
|
- this.$message.error('请上传图片!')
|
|
|
- return false
|
|
|
- }
|
|
|
- let isLt50m = file.size / 1024 / 1024 / 5 < 1
|
|
|
- if (!isLt50m) {
|
|
|
- this.$message.error('上传文件大小不能超过 5MB!')
|
|
|
+ let isLt10m = file.size / 1024 / 1024 / 10 < 1
|
|
|
+ if (!isLt10m) {
|
|
|
+ this.$message.error('上传文件大小不能超过 10MB!')
|
|
|
return false
|
|
|
}
|
|
|
return true
|