From 6e3961ad82e2dfb204b79caf50c6637c15cfbe8d Mon Sep 17 00:00:00 2001
From: shj <1790240199@qq.com>
Date: 星期四, 31 三月 2022 10:17:44 +0800
Subject: [PATCH] Merge branch 'shf' of https://sinanoaq.cn:8888/r/ztqt into shf

---
 src/views/safetyproduction/feature.vue |   39 ++++++++++++++++++++++++++-------------
 1 files changed, 26 insertions(+), 13 deletions(-)

diff --git a/src/views/safetyproduction/feature.vue b/src/views/safetyproduction/feature.vue
index 8ab28c8..4872385 100644
--- a/src/views/safetyproduction/feature.vue
+++ b/src/views/safetyproduction/feature.vue
@@ -139,7 +139,7 @@
         <el-button type="primary" class="btns" @click="AddelementManagement()"
           >确 定</el-button
         >
-        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button @click="cancel()">取 消</el-button>
       </span>
     </el-dialog>
   </div>
@@ -303,18 +303,31 @@
       });
     },
     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 =>{
+            });
     },
+      cancel(){
+          this.elementManagementL();
+          this.dialogVisible = false;
+      },
   find(){
      this.elementManagementL();
   },
@@ -334,4 +347,4 @@
   background-color: #034ea2;
   border: 1px solid #034ea2;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.2