jiangyy 4 years ago
parent
commit
8e6a1ce769
  1. 5
      src/views/modules/base/resi.vue

5
src/views/modules/base/resi.vue

@ -444,13 +444,13 @@ export default {
const isType = file.type === 'application/vnd.ms-excel'
const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
const fileType = isType || isTypeComputer
const isLt1M = (file.size / 1024 / 1024) < 10
const isLt1M = (file.size / 1024 / 1024) < 100
if (!fileType) {
this.$message.error('上传文件只能是xls/xlsx格式!')
}
if (!isLt1M) {
this.$message.error('上传文件大小不能超过 10MB!')
this.$message.error('上传文件大小不能超过 100MB!')
}
return fileType && isLt1M
},
@ -463,6 +463,7 @@ export default {
url: window.SITE_CONFIG['apiURL'] + '/epmetuser/icresiuser/importExcel',
method: 'post',
data: formData,
timeout: '300000',
responseType: 'blob'
})
.then((res) => {

Loading…
Cancel
Save