修改批量导入保存失败后不能继续进行批量操作

This commit is contained in:
18571350067 2021-11-30 11:07:27 +08:00
parent 835b548ca8
commit 2072ece81d
1 changed files with 2 additions and 3 deletions

View File

@ -211,21 +211,20 @@ export default {
axios
.post(ossUpload(), data, { headers: header })
.then((res) => {
this.$refs.inputFile.value = ''
if (res.data.code === 200) {
let params = { fileUrl: res.data.url, courseId: this.$route.query.id }
importTemplate(params).then((res1) => {
this.$refs.inputFile.value = ''
this.$message.success('题目导入成功!')
this.getQuestion()
})
} else {
this.$message.error(res.data.msg)
this.$refs.inputFile.value = ''
}
})
.catch((err) => {
this.$message.error(res)
this.$refs.inputFile.value = ''
this.$message.error(res)
})
},