CN-1016 知识库列表状态切换失败后要恢复到原状态

This commit is contained in:
hyx
2023-06-05 19:42:44 +08:00
parent 757f1ef696
commit cea7998fd9

View File

@@ -113,7 +113,7 @@ export default {
if (!this.isInit) {
patch(api.knowledgeBaseEnable, { list: [{ knowledgeId: id, status: status }] }).then(response => {
if (response.code === 200) {
this.$message({ duration: 1000, type: 'success', message: this.$t('tip.saveSuccess') })
} else {
console.error(response)
if (response.message) {
@@ -122,6 +122,7 @@ export default {
this.$message.error('Something went wrong...')
}
}
this.$emit('reload')
})
}
},