|
|
@@ -239,16 +239,20 @@ export default {
|
|
|
this.getSecurityPatrolList()
|
|
|
},
|
|
|
handleDelete(row) {
|
|
|
- confirm().then(() => {
|
|
|
- deleteSecurityPatrol(row.id).then((res) => {
|
|
|
- if (res.data) {
|
|
|
- this.$message({ message: '删除成功', type: 'success' })
|
|
|
- this.getSecurityPatrolList()
|
|
|
- } else {
|
|
|
- this.$message({ message: '删除失败', type: 'error' })
|
|
|
- }
|
|
|
+ confirm()
|
|
|
+ .then(() => {
|
|
|
+ deleteSecurityPatrol(row.id).then((res) => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$message({ message: '删除成功', type: 'success' })
|
|
|
+ this.getSecurityPatrolList()
|
|
|
+ } else if (res.code === 500) {
|
|
|
+ this.$message({ message: '任务已执行!', type: 'warning' })
|
|
|
+ } else {
|
|
|
+ this.$message({ message: '删除失败', type: 'error' })
|
|
|
+ }
|
|
|
+ })
|
|
|
})
|
|
|
- }).catch(() => {})
|
|
|
+ .catch(() => {})
|
|
|
}
|
|
|
},
|
|
|
destroyed() {
|