Browse Source

删除失败检测

gangyj 2 years ago
parent
commit
442daffcef
1 changed files with 16 additions and 7 deletions
  1. 16 7
      src/views/manager/wbsinfo/edit.vue

+ 16 - 7
src/views/manager/wbsinfo/edit.vue

@@ -1908,13 +1908,22 @@ export default {
         confirmButtonText: '删除',
         confirmButtonText: '删除',
         cancelButtonText: '取消'
         cancelButtonText: '取消'
       }).then(() => {
       }).then(() => {
-        removeTableById(row.id).then(() => {
-          this.formData.splice(index, 1);
-          //this.updateTreeNewNode();
-          this.$message({
-            type: "success",
-            message: "删除成功!"
-          });
+        removeTableById(row.id).then((res) => {
+          //console.log(res)
+          if(res.data.success){
+            this.formData.splice(index, 1);
+            //this.updateTreeNewNode();
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+          }else{
+            this.$message({
+              type: "error",
+              message: res.data.msg
+            });
+          }
+          
         })
         })
       })
       })
     },
     },