Explorar o código

:bug: Fixing a bug. #579 角色权限分配导致访问菜单404

冷冷 %!s(int64=5) %!d(string=hai) anos
pai
achega
8cb916d053
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  1. 8 7
      src/views/admin/role/index.vue

+ 8 - 7
src/views/admin/role/index.vue

@@ -285,13 +285,14 @@ export default {
         loading()
       })
     },
-    updatePermession(roleId) {
-      this.menuIds = ''
-      this.menuIds = this.$refs.menuTree.getCheckedKeys().join(',').concat(',').concat(this.$refs.menuTree.getHalfCheckedKeys().join(','))
-      permissionUpd(roleId, this.menuIds).then(() => {
-        this.dialogPermissionVisible = false
-        this.$notify.success('修改成功')
-      })
+    updatePermession (roleId) {
+        this.menuIds = ''
+        this.menuIds = this.$refs.menuTree.getCheckedKeys().join(',').concat(',').concat(this.$refs.menuTree.getHalfCheckedKeys().join(','))
+        permissionUpd(roleId, this.menuIds).then(() => {
+            this.dialogPermissionVisible = false
+            this.$store.dispatch('GetMenu', false)
+            this.$notify.success('修改成功')
+        })
     }
   }
 }