|
@ -19,6 +19,7 @@ |
|
|
:with-credentials="true" |
|
|
:with-credentials="true" |
|
|
:show-file-list="false" |
|
|
:show-file-list="false" |
|
|
:auto-upload="true" |
|
|
:auto-upload="true" |
|
|
|
|
|
:on-progress="handleProgress" |
|
|
:on-success="handleExcelSuccess" |
|
|
:on-success="handleExcelSuccess" |
|
|
:before-upload="beforeExcelUpload" |
|
|
:before-upload="beforeExcelUpload" |
|
|
:http-request="uploadHttpRequest" |
|
|
:http-request="uploadHttpRequest" |
|
@ -371,6 +372,9 @@ export default { |
|
|
this.$message.error(res.msg) |
|
|
this.$message.error(res.msg) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleProgress(event, file, fileList) { |
|
|
|
|
|
console.log('percentage', file.percentage) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
beforeExcelUpload (file) { |
|
|
beforeExcelUpload (file) { |
|
|
console.log('file', file) |
|
|
console.log('file', file) |
|
@ -393,11 +397,13 @@ export default { |
|
|
this.$http |
|
|
this.$http |
|
|
.post('/epmetuser/icresiuser/importExcel', formData) |
|
|
.post('/epmetuser/icresiuser/importExcel', formData) |
|
|
.then(({ data: res }) => { |
|
|
.then(({ data: res }) => { |
|
|
if(res.code === 0) { |
|
|
// if(res.code === 0) { |
|
|
// this.$refs.upload.submit() |
|
|
// // this.$refs.upload.submit() |
|
|
// file.onSuccess() |
|
|
// file.onSuccess() |
|
|
|
|
|
// console.log('res-ooooo---', res) |
|
|
|
|
|
// } |
|
|
console.log('res-ooooo---', res) |
|
|
console.log('res-ooooo---', res) |
|
|
} |
|
|
this.download(res, 'info.xlsx') |
|
|
}) |
|
|
}) |
|
|
.catch( err => { |
|
|
.catch( err => { |
|
|
console.log('失败', err) |
|
|
console.log('失败', err) |
|
|