From 4b6695b7bc2f79f8aa67cc151563d03852c8fc7e Mon Sep 17 00:00:00 2001
From: Kxc0822a <kxc000822>
Date: 星期三, 30 三月 2022 17:51:05 +0800
Subject: [PATCH] 重大

---
 src/views/safetyproduction/feature.vue |   33 ++++++++++------
 src/views/contingencyplan/index.vue    |   39 +++++++++----------
 2 files changed, 40 insertions(+), 32 deletions(-)

diff --git a/src/views/contingencyplan/index.vue b/src/views/contingencyplan/index.vue
index 9e07de8..7df3d1b 100644
--- a/src/views/contingencyplan/index.vue
+++ b/src/views/contingencyplan/index.vue
@@ -126,7 +126,7 @@
           { required: true, message: "预案名称不能为空", trigger: "change" },
         ],
         remark: [
-          { required: true, message: "责任人不能为空", trigger: "blur" },
+          { required: true, message: "备注不能为空", trigger: "blur" },
         ],
       },
     };
@@ -215,11 +215,6 @@
                   message: "新增成功",
                   title: "成功",
                 });
-              } else {
-                this.$message({
-                  type: "warning",
-                  message: res.data.message,
-                });
               }
             });
           }
@@ -234,11 +229,6 @@
                 message: "编辑成功",
                 title: "成功",
               });
-            } else {
-              this.$message({
-                type: "warning",
-                message: res.data.message,
-              });
             }
           });
         }
@@ -246,15 +236,24 @@
       });
     },
     deleteById(val) {
-      emergencyPlanDel({ id: val }).then(() => {
-        this.emergencyPlan();
-        this.$notify({
-          title: "成功",
-          message: "删除成功",
-          type: "success",
-          duration: 2000,
-        });
-      });
+        this.$confirm('确认删除吗','提示', {
+            confirmButtonText: '确认',
+            cancelButtonText: '取消',
+            type: 'warning'
+        })
+            .then(()=>{
+              emergencyPlanDel({ id: val }).then(() => {
+                this.emergencyPlan();
+                this.$notify({
+                  title: "成功",
+                  message: "删除成功",
+                  type: "success",
+                  duration: 2000,
+                });
+              });
+            })
+            .catch(error =>{
+            });
     },
     find() {
       this.emergencyPlan();
diff --git a/src/views/safetyproduction/feature.vue b/src/views/safetyproduction/feature.vue
index 8ab28c8..8db69d8 100644
--- a/src/views/safetyproduction/feature.vue
+++ b/src/views/safetyproduction/feature.vue
@@ -303,17 +303,26 @@
       });
     },
     deleteById(val) {
-      elementManagementDel({id:val}).then((res) => {
-        if (res.data.code == 200) {
-          this.elementManagementL();
-          this.$notify({
-            title: "成功",
-            message: "删除成功",
-            type: "success",
-            duration: 2000,
-          });
-        }
-      });
+        this.$confirm('确认删除吗','提示', {
+            confirmButtonText: '确认',
+            cancelButtonText: '取消',
+            type: 'warning'
+        })
+            .then(()=>{
+               elementManagementDel({id:val}).then((res) => {
+                 if (res.data.code == 200) {
+                   this.elementManagementL();
+                   this.$notify({
+                     title: "成功",
+                     message: "删除成功",
+                     type: "success",
+                     duration: 2000,
+                   });
+                 }
+               });
+            })
+            .catch(error =>{
+            });
     },
   find(){
      this.elementManagementL();
@@ -334,4 +343,4 @@
   background-color: #034ea2;
   border: 1px solid #034ea2;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.2