File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export default {
71
71
const confirmEdit = async () => {
72
72
let addRes = 0
73
73
let delRes = 0
74
+ const groupId = parseInt (route .query .id , 10 )
74
75
// 判断是否更改了分组权限
75
76
if (permissions .value .sort ().toString () !== cachePermissions .value .sort ().toString ()) {
76
77
const deletePermissions = cachePermissions .value
@@ -81,10 +82,10 @@ export default {
81
82
.filter (v => ! cachePermissions .value .includes (v))
82
83
83
84
if (addPermissions .length > 0 ) {
84
- addRes = await AdminModel .dispatchPermissions (route . query . id , addPermissions)
85
+ addRes = await AdminModel .dispatchPermissions (groupId , addPermissions)
85
86
}
86
87
if (deletePermissions .length > 0 ) {
87
- delRes = await AdminModel .removePermissions (route . query . id , deletePermissions)
88
+ delRes = await AdminModel .removePermissions (groupId , deletePermissions)
88
89
}
89
90
if (addRes .code < window .MAX_SUCCESS_CODE || delRes .code < window .MAX_SUCCESS_CODE ) {
90
91
ElMessage .success (' 权限修改成功' )
You can’t perform that action at this time.
0 commit comments