Commit fa64e1ee by Mr. Lan

fix bug.

parent f92049a5
Showing with 29 additions and 18 deletions
......@@ -182,12 +182,14 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
createClassify(this.ruleForm).then(response => {
this.getList()
this.$message({
type: 'success',
message: '分类已增加!'
})
this.open = false
if (response !== undefined) {
this.getList()
this.$message({
type: 'success',
message: '分类已增加!'
})
this.open = false
}
})
}
})
......@@ -196,12 +198,14 @@ export default {
this.$refs[formName].validate((valid) => {
if (valid) {
updateClassify(this.ruleForm).then(response => {
this.getList()
this.$message({
type: 'success',
message: '分类已更新!'
})
this.open = false
if (response !== undefined) {
this.getList()
this.$message({
type: 'success',
message: '分类已更新!'
})
this.open = false
}
})
}
})
......@@ -219,12 +223,19 @@ export default {
}).then(() => {
deleteClassify({
classifyId: row.id
}).then(() => {
this.getList()
this.$message({
type: 'success',
message: '分类已删除!'
})
}).then(response => {
if (response !== undefined) {
this.getList()
this.$message({
type: 'success',
message: '分类已删除!'
})
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment