From 718a13554dbb2f99e27adeb7b95edfc3096dacc5 Mon Sep 17 00:00:00 2001
From: 董国庆 <364620639@qq.com>
Date: 星期四, 26 六月 2025 14:24:27 +0800
Subject: [PATCH] 删除打印和路由返回

---
 laboratory/src/views/system/role/edit.vue |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/laboratory/src/views/system/role/edit.vue b/laboratory/src/views/system/role/edit.vue
index 0f6351c..a2acc45 100644
--- a/laboratory/src/views/system/role/edit.vue
+++ b/laboratory/src/views/system/role/edit.vue
@@ -91,6 +91,7 @@
 
 <script>
 import { roleInfoFromUserId, getRoleInfo, add, edit } from './service.js'
+import { mapState } from "vuex";
 export default {
   name: 'EditRole',
   components: {},
@@ -110,6 +111,7 @@
     };
   },
   computed: {
+    ...mapState(["tagList", "isFold"]),
     height() {
       return this.$baseTableHeight()
     },
@@ -158,12 +160,20 @@
             obj.roleId = this.$route.query.roleId
             edit(obj).then(() => {
               this.msgsuccess('保存成功')
-              this.$router.go(-1)
+              this.$router.back();
+      this.$store.commit(
+        "SET_TAGLIST",
+        this.tagList.filter((item) => item.path !== this.$route.path)
+      );
             })
           } else {
             add(obj).then(() => {
               this.msgsuccess('保存成功')
-              this.$router.go(-1)
+              this.$router.back();
+      this.$store.commit(
+        "SET_TAGLIST",
+        this.tagList.filter((item) => item.path !== this.$route.path)
+      );
             })
           }
         }

--
Gitblit v1.7.1