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

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