Browse Source

优化一维表上传功能

pull/3/head
wangxy 3 years ago
parent
commit
95518434b1
1 changed files with 10 additions and 4 deletions
  1. +10
    -4
      src/views/oneimport/components/upload.vue

+ 10
- 4
src/views/oneimport/components/upload.vue View File

@ -41,7 +41,7 @@ export default {
//
uploadEvent() {
this.uploadLoading = true
if (this.excle === null || this.excle === '') {
if (this.excle === null || this.excle === '' || this.excle === undefined) {
this.$message({
showClose: true,
duration: 2000,
@ -58,19 +58,25 @@ export default {
this.$message({
showClose: true,
duration: 2000,
message: 'submit success',
message: '上传成功',
type: 'success'
})
} else {
this.$message({
showClose: true,
duration: 2000,
message: 'submit failed',
message: res.msg,
type: 'error'
})
}
}).catch(() => {
}).catch((res) => {
this.uploadLoading = false
this.$message({
showClose: true,
duration: 2000,
message: res.msg,
type: 'error'
})
})
}
},


Loading…
Cancel
Save