From 5023f311e2f4654e0b7c52fe3b2d70679de1739a Mon Sep 17 00:00:00 2001
From: liupengpeng <276665548@qq.com>
Date: 星期五, 03 三月 2023 10:54:49 +0800
Subject: [PATCH] 提示信息

---
 src/views/maintenance/blackwhiteList.vue |   36 ++++++++++++++++++++++++++++++------
 1 files changed, 30 insertions(+), 6 deletions(-)

diff --git a/src/views/maintenance/blackwhiteList.vue b/src/views/maintenance/blackwhiteList.vue
index ec3bacf..94f146e 100644
--- a/src/views/maintenance/blackwhiteList.vue
+++ b/src/views/maintenance/blackwhiteList.vue
@@ -310,6 +310,7 @@
     <el-dialog
       :title="$t('common.append')"
       :visible.sync="InsertFormdialog"
+      :before-close="handleClose"
     >
 
       <el-form ref="insertform" :model="insertform" label-position="top">
@@ -358,6 +359,7 @@
       :title="$t('common.update')"
       style="overflow: hidden"
       :visible.sync="updateFormdialog"
+      :before-close="handleCloseEdit"
     >
       <el-form ref="editfrom" :model="editfrom" label-position="top">
         <el-form-item :label-width="formLabelWidth" label="IP鍦板潃">
@@ -471,10 +473,14 @@
       });
     },
     editFromDataClose() {
-      this.updateFormdialog = false;
-      this.$nextTick(() => {
-        this.editForm = JSON.parse(this.initialForm);
-      });
+      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?")
+        .then((_) => {
+          this.updateFormdialog = false;
+          this.$nextTick(() => {
+            this.editForm = JSON.parse(this.initialForm);
+          });
+        })
+        .catch((_) => { });
     },
     queryBlackInfo() {
       let searchData = {
@@ -602,8 +608,12 @@
       this.InsertFormdialog = true;
     },
     insertFromDataClose() {
-      this.InsertFormdialog = false;
-      this.insertform = {};
+      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?")
+        .then((_) => {
+          this.InsertFormdialog = false;
+          this.insertform = {};
+        })
+        .catch((_) => { });
     },
     async insertFromData() {
       var count = await blacklistSelectCount(this.insertform);
@@ -715,6 +725,20 @@
           break;
       }
     },
+    handleClose() {
+      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?")
+        .then((_) => {
+          this.InsertFormdialog = false
+        })
+        .catch((_) => { });
+    },
+    handleCloseEdit() {
+      this.$confirm("鍏抽棴鍚庢棤娉曚繚瀛橈紝鏄惁鍏抽棴?")
+        .then((_) => {
+          this.updateFormdialog = false
+        })
+        .catch((_) => { });
+    },
   },
   mounted() {
     window.addEventListener("resize", this.onResize);

--
Gitblit v1.9.3