mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
fix: 策略删除时提示404
This commit is contained in:
@@ -186,7 +186,9 @@ export default {
|
||||
handleDelete(index) {
|
||||
return () => {
|
||||
const item = this.tableConfig.totalData.splice(index, 1)
|
||||
this.$axios.delete(`/api/v1/xpack/cloud/strategy-actions/${item[0]?.id}/`)
|
||||
if (item[0]?.id) {
|
||||
this.$axios.delete(`/api/v1/xpack/cloud/strategy-actions/${item[0].id}/`)
|
||||
}
|
||||
this.$message.success(this.$tc('common.deleteSuccessMsg'))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,9 @@ export default {
|
||||
handleDelete(index) {
|
||||
return () => {
|
||||
const item = this.tableConfig.totalData.splice(index, 1)
|
||||
this.$axios.delete(`/api/v1/xpack/cloud/strategy-rules/${item[0]?.id}/`)
|
||||
if (item[0]?.id) {
|
||||
this.$axios.delete(`/api/v1/xpack/cloud/strategy-rules/${item[0].id}/`)
|
||||
}
|
||||
this.$message.success(this.$tc('common.deleteSuccessMsg'))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user