From 25aa698ba7e077c80ba115697aeadc12226ad48e Mon Sep 17 00:00:00 2001
From: liupengpeng <276665548@qq.com>
Date: 星期一, 13 二月 2023 18:01:10 +0800
Subject: [PATCH] 所有的删除提示

---
 src/views/datamanage/dataLoader.vue |   89 +++++++++++++++++++++++++++++++++++---------
 1 files changed, 71 insertions(+), 18 deletions(-)

diff --git a/src/views/datamanage/dataLoader.vue b/src/views/datamanage/dataLoader.vue
index 2dbdbea..903deb6 100644
--- a/src/views/datamanage/dataLoader.vue
+++ b/src/views/datamanage/dataLoader.vue
@@ -589,18 +589,45 @@
       for (var i in this.multipleDelete) {
         std.push(this.multipleDelete[i].id);
       }
-      const res = await dataLoader_deleteMetas({ ids: std.toString() })
-      if (res.code != 200) {
-        this.$message.error('鍒犻櫎澶辫触');
-      } else {
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎鎵�閫夊唴瀹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(async () => {
+        const data =await dataLoader_deleteMetas({ ids: std.toString() })
+        if (data.code == 200) {
+          this.$message({
+            message: "鍒犻櫎鎴愬姛锛�",
+            type: "success",
+          });
+          this.listData.pageIndex = 1;
+          this.listData.pageSize = 10;
+          this.getAllWareTable();
+        } else {
+          this.$message({
+            message: "鍒犻櫎澶辫触锛�",
+            type: "warning",
+          });
+        }
+      }).catch(() => {
         this.$message({
-          message: '鍒犻櫎鎴愬姛',
-          type: 'success'
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
         });
-        this.listData.pageIndex = 1;
-        this.listData.pageSize = 10;
-        this.getAllWareTable();
-      }
+      });
+
+      // const res = await dataLoader_deleteMetas({ ids: std.toString() })
+      // if (res.code != 200) {
+      //   this.$message.error('鍒犻櫎澶辫触');
+      // } else {
+      //   this.$message({
+      //     message: '鍒犻櫎鎴愬姛',
+      //     type: 'success'
+      //   });
+      //   this.listData.pageIndex = 1;
+      //   this.listData.pageSize = 10;
+      //   this.getAllWareTable();
+      // }
     },
     handleDelteChange(val) {
       this.multipleDelete = val;
@@ -800,14 +827,40 @@
     async setFileDelete() {
       this.handlerLoading(true);
       var data = JSON.stringify(this.multipleSelection);
-      const res = await dataUploadDeleteFiles(data);
-      if (res.code != 200) {
-        this.$message.error('鍒犻櫎澶辫触');
-        this.handlerLoading(false);
-        return;
-      }
-      this.getFileLength();
-      this.handlerLoading(false);
+      this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎鎵�閫夊唴瀹�, 鏄惁缁х画?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(async () => {
+        const data =await dataUploadDeleteFiles(data);
+        if (data.code == 200) {
+          this.$message({
+            message: "鍒犻櫎鎴愬姛锛�",
+            type: "success",
+          });
+          this.getFileLength();
+          this.handlerLoading(false);
+        } else {
+          this.$message({
+            message: "鍒犻櫎澶辫触锛�",
+            type: "warning",
+          });
+          this.handlerLoading(false);
+        }
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
+      // const res = await dataUploadDeleteFiles(data);
+      // if (res.code != 200) {
+      //   this.$message.error('鍒犻櫎澶辫触');
+      //   this.handlerLoading(false);
+      //   return;
+      // }
+      // this.getFileLength();
+      // this.handlerLoading(false);
 
 
 

--
Gitblit v1.9.3