From 3c6c92b68a1b113b5450554db750ebe1d8bd26bb Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期五, 20 九月 2024 15:16:14 +0800
Subject: [PATCH] 整合代码 action管理

---
 Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue |   92 +++++++++++++++++++++++++++++-----------------
 1 files changed, 58 insertions(+), 34 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
index 5a5c1e1..8761d82 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/systemConfig/index.vue
@@ -306,24 +306,35 @@
         ids: row.id,
         isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
       }
-      getAppConfigCategoryInfo(params).then(res => {
-        console.log(res)
-        if (res.data.code === 200) {
-          this.$message.success('鍒犻櫎鎴愬姛');
-          if (this.nodeRow.id === 'firstNode') {
-            this.getTreeList('save');
-          } else {
-            this.configLoading = true;
-            getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
-              if (res.data.code === 200) {
-                const data = res.data.data;
-                this.configData = data;
-                this.configLoading = false;
-              }
-            })
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鏁版嵁鍚楋紵', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        getAppConfigCategoryInfo(params).then(res => {
+          console.log(res)
+          if (res.data.code === 200) {
+            this.$message.success('鍒犻櫎鎴愬姛');
+            if (this.nodeRow.id === 'firstNode') {
+              this.getTreeList('save');
+            } else {
+              this.configLoading = true;
+              getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
+                if (res.data.code === 200) {
+                  const data = res.data.data;
+                  this.configData = data;
+                  this.configLoading = false;
+                }
+              })
+            }
           }
-        }
-      })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
     },
 
     // 閫夋嫨妗�
@@ -352,30 +363,43 @@
         this.$message.error('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�');
         return;
       }
+
       const params = {
         ids: this.selectList.map(item => {
           return item.id
         }).join(','),
         isConfCategorys: this.nodeRow.id === 'firstNode' ? true : false
       }
-      getAppConfigCategoryInfo(params).then(res => {
-        console.log(res)
-        if (res.data.code === 200) {
-          this.$message.success('鍒犻櫎鎴愬姛');
-          if (this.nodeRow.id === 'firstNode') {
-            this.getTreeList('save');
-          } else {
-            this.configLoading = true;
-            getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
-              if (res.data.code === 200) {
-                const data = res.data.data;
-                this.configData = data;
-                this.configLoading = false;
-              }
-            })
+
+      this.$confirm('鎮ㄧ‘瀹氳鍒犻櫎褰撳墠鏁版嵁鍚楋紵', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        getAppConfigCategoryInfo(params).then(res => {
+          console.log(res)
+          if (res.data.code === 200) {
+            this.$message.success('鍒犻櫎鎴愬姛');
+            if (this.nodeRow.id === 'firstNode') {
+              this.getTreeList('save');
+            } else {
+              this.configLoading = true;
+              getAppConfigDetailsByID({clsId: this.nodeRow.id}).then(res => {
+                if (res.data.code === 200) {
+                  const data = res.data.data;
+                  this.configData = data;
+                  this.configLoading = false;
+                }
+              })
+            }
           }
-        }
-      })
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '宸插彇娑堝垹闄�'
+        });
+      });
     },
 
     // 瀵煎嚭鎸夐挳

--
Gitblit v1.9.3