fix(用户组和权限): 用户组修改
This commit is contained in:
parent
a3fd15fd84
commit
a9c395cc18
|
@ -107,6 +107,9 @@ public class GroupService {
|
|||
}
|
||||
|
||||
public void editGroup(EditGroupRequest request) {
|
||||
if (StringUtils.equals(request.getId(), "admin")) {
|
||||
MSException.throwException("系统管理员无法编辑!");
|
||||
}
|
||||
checkGroupExist(request);
|
||||
Group group = new Group();
|
||||
request.setScopeId(null);
|
||||
|
@ -116,6 +119,9 @@ public class GroupService {
|
|||
}
|
||||
|
||||
public void deleteGroup(String id) {
|
||||
if (StringUtils.equals(id, "admin")) {
|
||||
MSException.throwException("系统管理员无法删除!");
|
||||
}
|
||||
groupMapper.deleteByPrimaryKey(id);
|
||||
UserGroupPermissionExample example = new UserGroupPermissionExample();
|
||||
example.createCriteria().andGroupIdEqualTo(id);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="dialogVisible" width="50%"
|
||||
:title="dialogTitle"
|
||||
:title="title"
|
||||
:destroy-on-close="true">
|
||||
<el-form ref="form" :model="form" label-width="auto" size="small" :rules="rules">
|
||||
<el-row>
|
||||
|
@ -11,7 +11,7 @@
|
|||
</el-col>
|
||||
<el-col :span="11" :offset="2">
|
||||
<el-form-item label="所属类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择所属类型" style="width: 100%" @change="changeGroup">
|
||||
<el-select v-model="form.type" placeholder="请选择所属类型" style="width: 100%" @change="changeGroup" :disabled="dialogType === 'edit'">
|
||||
<el-option label="系统" value="SYSTEM"></el-option>
|
||||
<el-option label="组织" value="ORGANIZATION"></el-option>
|
||||
<el-option label="工作空间" value="WORKSPACE"></el-option>
|
||||
|
@ -70,7 +70,8 @@ export default {
|
|||
dialogType: '',
|
||||
isSystem: false,
|
||||
show: true,
|
||||
organizations: []
|
||||
organizations: [],
|
||||
title: '创建用户组'
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
@ -117,7 +118,8 @@ export default {
|
|||
this.dialogVisible = false;
|
||||
})
|
||||
},
|
||||
open(row, type) {
|
||||
open(row, type, title) {
|
||||
this.title = title;
|
||||
this.isSystem = false;
|
||||
this.show = true;
|
||||
this.dialogVisible = true;
|
||||
|
|
|
@ -102,10 +102,14 @@ export default {
|
|||
});
|
||||
},
|
||||
create() {
|
||||
this.$refs.editUserGroup.open({}, 'create');
|
||||
this.$refs.editUserGroup.open({}, 'create', '创建用户组');
|
||||
},
|
||||
edit(row) {
|
||||
this.$refs.editUserGroup.open(row, 'edit');
|
||||
if (row.id === "admin") {
|
||||
this.$warning("系统管理员不支持编辑!");
|
||||
return ;
|
||||
}
|
||||
this.$refs.editUserGroup.open(row, 'edit', '编辑用户组');
|
||||
},
|
||||
_handleDel(row) {
|
||||
this.result = this.$get("/user/group/delete/" + row.id, () => {
|
||||
|
@ -114,6 +118,10 @@ export default {
|
|||
});
|
||||
},
|
||||
del(row) {
|
||||
if (row.id === "admin") {
|
||||
this.$warning("系统管理员不支持删除!");
|
||||
return ;
|
||||
}
|
||||
this.$refs.deleteConfirm.open(row);
|
||||
},
|
||||
copy(row) {
|
||||
|
|
Loading…
Reference in New Issue