Browse Source

Merge branch 'dev' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into dev

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

Loading…
Cancel
Save