fix(项目管理): 项目组织用户组展示问题
--bug=1039754 --user=宋昌昌 【项目管理】项目与权限-用户组-点击成员数-点击添加成员-添加提示无权限 https://www.tapd.cn/55049933/s/1501754
This commit is contained in:
parent
11ea1ab153
commit
a26a4dd1ad
|
@ -131,7 +131,6 @@ public class ProjectUserRoleController {
|
||||||
@Operation(summary = "项目管理-项目与权限-用户组-添加用户组成员")
|
@Operation(summary = "项目管理-项目与权限-用户组-添加用户组成员")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_GROUP_UPDATE)
|
@RequiresPermissions(PermissionConstants.PROJECT_GROUP_UPDATE)
|
||||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = ProjectUserRoleLogService.class)
|
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = ProjectUserRoleLogService.class)
|
||||||
@CheckProjectOwner(resourceId = "#request.getUserRoleId()", resourceType = "user_role", resourceCol = "scope_id")
|
|
||||||
public void addMember(@Validated @RequestBody ProjectUserRoleMemberEditRequest request) {
|
public void addMember(@Validated @RequestBody ProjectUserRoleMemberEditRequest request) {
|
||||||
projectUserRoleService.addMember(request, SessionUtils.getUserId());
|
projectUserRoleService.addMember(request, SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
@ -140,7 +139,6 @@ public class ProjectUserRoleController {
|
||||||
@Operation(summary = "项目管理-项目与权限-用户组-删除用户组成员")
|
@Operation(summary = "项目管理-项目与权限-用户组-删除用户组成员")
|
||||||
@RequiresPermissions(PermissionConstants.PROJECT_GROUP_UPDATE)
|
@RequiresPermissions(PermissionConstants.PROJECT_GROUP_UPDATE)
|
||||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = ProjectUserRoleLogService.class)
|
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = ProjectUserRoleLogService.class)
|
||||||
@CheckProjectOwner(resourceId = "#request.getUserRoleId()", resourceType = "user_role", resourceCol = "scope_id")
|
|
||||||
public void removeMember(@Validated @RequestBody ProjectUserRoleMemberEditRequest request) {
|
public void removeMember(@Validated @RequestBody ProjectUserRoleMemberEditRequest request) {
|
||||||
projectUserRoleService.removeMember(request);
|
projectUserRoleService.removeMember(request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,6 @@ public class OrganizationUserRoleController {
|
||||||
@Operation(summary = "系统设置-组织-用户组-添加用户组成员")
|
@Operation(summary = "系统设置-组织-用户组-添加用户组成员")
|
||||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_USER_ROLE_READ_UPDATE)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_USER_ROLE_READ_UPDATE)
|
||||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = OrganizationUserRoleLogService.class)
|
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = OrganizationUserRoleLogService.class)
|
||||||
@CheckOrgOwner(resourceId = "#request.getUserRoleId()", resourceType = "user_role", resourceCol = "scope_id")
|
|
||||||
public void addMember(@Validated @RequestBody OrganizationUserRoleMemberEditRequest request) {
|
public void addMember(@Validated @RequestBody OrganizationUserRoleMemberEditRequest request) {
|
||||||
organizationUserRoleService.addMember(request, SessionUtils.getUserId());
|
organizationUserRoleService.addMember(request, SessionUtils.getUserId());
|
||||||
}
|
}
|
||||||
|
@ -140,7 +139,6 @@ public class OrganizationUserRoleController {
|
||||||
@Operation(summary = "系统设置-组织-用户组-删除用户组成员")
|
@Operation(summary = "系统设置-组织-用户组-删除用户组成员")
|
||||||
@RequiresPermissions(PermissionConstants.ORGANIZATION_USER_ROLE_READ_UPDATE)
|
@RequiresPermissions(PermissionConstants.ORGANIZATION_USER_ROLE_READ_UPDATE)
|
||||||
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = OrganizationUserRoleLogService.class)
|
@Log(type = OperationLogType.UPDATE, expression = "#msClass.editMemberLog(#request)", msClass = OrganizationUserRoleLogService.class)
|
||||||
@CheckOrgOwner(resourceId = "#request.getUserRoleId()", resourceType = "user_role", resourceCol = "scope_id")
|
|
||||||
public void removeMember(@Validated @RequestBody OrganizationUserRoleMemberEditRequest request) {
|
public void removeMember(@Validated @RequestBody OrganizationUserRoleMemberEditRequest request) {
|
||||||
organizationUserRoleService.removeMember(request);
|
organizationUserRoleService.removeMember(request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ public class UserPlatformAccountService {
|
||||||
PluginWrapper pluginWrapper = pluginLoadService.getPluginWrapper(plugin.getId());
|
PluginWrapper pluginWrapper = pluginLoadService.getPluginWrapper(plugin.getId());
|
||||||
MsPlugin msPlugin = (MsPlugin) pluginWrapper.getPlugin();
|
MsPlugin msPlugin = (MsPlugin) pluginWrapper.getPlugin();
|
||||||
((Map) accountInfo).put("pluginName", msPlugin.getName());
|
((Map) accountInfo).put("pluginName", msPlugin.getName());
|
||||||
|
((Map) accountInfo).put("pluginLogo", ((AbstractPlatformPlugin) msPlugin).getLogo());
|
||||||
accountInfoMap.put(plugin.getId(), accountInfo);
|
accountInfoMap.put(plugin.getId(), accountInfo);
|
||||||
});
|
});
|
||||||
return accountInfoMap;
|
return accountInfoMap;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
<div v-if="orgOptions.length > 0" class="platform-card-container">
|
<div v-if="orgOptions.length > 0" class="platform-card-container">
|
||||||
<div v-for="config of dynamicForm" :key="config.key" class="platform-card">
|
<div v-for="config of dynamicForm" :key="config.key" class="platform-card">
|
||||||
<div class="mb-[16px] flex items-center">
|
<div class="mb-[16px] flex items-center">
|
||||||
<a-image :src="`/plugin/image/${config.key}?imagePath=static/${config.key}.jpg`" width="24"></a-image>
|
<a-image :src="`/plugin/image/${config.key}?imagePath=${config.pluginLogo}`" width="24"></a-image>
|
||||||
<div class="ml-[8px] mr-[4px] font-medium text-[var(--color-text-1)]">{{ config.pluginName }}</div>
|
<div class="ml-[8px] mr-[4px] font-medium text-[var(--color-text-1)]">{{ config.pluginName }}</div>
|
||||||
<a-tooltip v-if="config.tooltip" :content="config.tooltip" position="right">
|
<a-tooltip v-if="config.tooltip" :content="config.tooltip" position="right">
|
||||||
<icon-exclamation-circle
|
<icon-exclamation-circle
|
||||||
|
@ -148,6 +148,7 @@
|
||||||
dynamicForm.value[key] = {
|
dynamicForm.value[key] = {
|
||||||
key,
|
key,
|
||||||
pluginName: res[key].pluginName,
|
pluginName: res[key].pluginName,
|
||||||
|
pluginLogo: res[key].pluginLogo,
|
||||||
status: 0,
|
status: 0,
|
||||||
formModel: {},
|
formModel: {},
|
||||||
formRules: res[key].formItems,
|
formRules: res[key].formItems,
|
||||||
|
@ -250,4 +251,4 @@
|
||||||
color: var(--color-text-4) !important;
|
color: var(--color-text-4) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
|
@ -30,6 +30,12 @@
|
||||||
@press-enter="handleBeforeOk"
|
@press-enter="handleBeforeOk"
|
||||||
@keyup.esc="handleCancel"
|
@keyup.esc="handleCancel"
|
||||||
/>
|
/>
|
||||||
|
<span
|
||||||
|
v-if="!props.id && props.authScope === AuthScopeEnum.SYSTEM"
|
||||||
|
class="mt-[8px] text-[13px] font-medium text-[var(--color-text-4)]"
|
||||||
|
>
|
||||||
|
{{ t('system.userGroup.createUserGroupTip') }}
|
||||||
|
</span>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -164,12 +164,38 @@
|
||||||
@submit="handleRenameCancel(element, element.id)"
|
@submit="handleRenameCancel(element, element.id)"
|
||||||
>
|
>
|
||||||
<div class="flex max-w-[100%] grow flex-row items-center justify-between">
|
<div class="flex max-w-[100%] grow flex-row items-center justify-between">
|
||||||
<a-tooltip :content="element.name">
|
<a-tooltip
|
||||||
|
:content="
|
||||||
|
systemType === AuthScopeEnum.ORGANIZATION
|
||||||
|
? element.name +
|
||||||
|
`(${
|
||||||
|
element.internal
|
||||||
|
? t('common.internal')
|
||||||
|
: element.scopeId === 'global'
|
||||||
|
? t('common.system.custom')
|
||||||
|
: t('common.custom')
|
||||||
|
})`
|
||||||
|
: element.name
|
||||||
|
"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
class="list-item-name one-line-text text-[var(--color-text-1)]"
|
class="list-item-name one-line-text text-[var(--color-text-1)]"
|
||||||
:class="{ '!text-[rgb(var(--primary-5))]': element.id === currentId }"
|
:class="{ '!text-[rgb(var(--primary-5))]': element.id === currentId }"
|
||||||
>{{ element.name }}</div
|
>{{ element.name }}</div
|
||||||
>
|
>
|
||||||
|
<div
|
||||||
|
v-if="systemType === AuthScopeEnum.ORGANIZATION"
|
||||||
|
class="one-line-text ml-1 text-[var(--color-text-4)]"
|
||||||
|
>{{
|
||||||
|
`(${
|
||||||
|
element.internal
|
||||||
|
? t('common.internal')
|
||||||
|
: element.scopeId === 'global'
|
||||||
|
? t('common.system.custom')
|
||||||
|
: t('common.custom')
|
||||||
|
})`
|
||||||
|
}}</div
|
||||||
|
>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
|
|
|
@ -59,7 +59,8 @@ export default {
|
||||||
'common.leave': 'Leave',
|
'common.leave': 'Leave',
|
||||||
'common.rename': 'Rename',
|
'common.rename': 'Rename',
|
||||||
'common.noData': 'No data',
|
'common.noData': 'No data',
|
||||||
'common.internal': 'Internal',
|
'common.internal': 'System-Internal',
|
||||||
|
'common.system.custom': 'System-Custom',
|
||||||
'common.custom': 'Custom',
|
'common.custom': 'Custom',
|
||||||
'common.preview': 'Preview',
|
'common.preview': 'Preview',
|
||||||
'common.fullScreen': 'Full screen',
|
'common.fullScreen': 'Full screen',
|
||||||
|
|
|
@ -62,6 +62,7 @@ export default {
|
||||||
'common.rename': '重命名',
|
'common.rename': '重命名',
|
||||||
'common.noData': '暂无数据',
|
'common.noData': '暂无数据',
|
||||||
'common.internal': '系统内置',
|
'common.internal': '系统内置',
|
||||||
|
'common.system.custom': '系统自定义',
|
||||||
'common.custom': '自定义',
|
'common.custom': '自定义',
|
||||||
'common.preview': '预览',
|
'common.preview': '预览',
|
||||||
'common.fullScreen': '全屏',
|
'common.fullScreen': '全屏',
|
||||||
|
|
|
@ -17,7 +17,13 @@
|
||||||
<div class="flex flex-row items-center gap-[4px]">
|
<div class="flex flex-row items-center gap-[4px]">
|
||||||
<div class="one-line-text">{{ record.name }}</div>
|
<div class="one-line-text">{{ record.name }}</div>
|
||||||
<div class="ml-1 text-[var(--color-text-4)]">{{
|
<div class="ml-1 text-[var(--color-text-4)]">{{
|
||||||
`(${record.scopeId === 'global' ? t('common.internal') : t('common.custom')})`
|
`(${
|
||||||
|
record.internal
|
||||||
|
? t('common.internal')
|
||||||
|
: record.scopeId === 'global'
|
||||||
|
? t('common.system.custom')
|
||||||
|
: t('common.custom')
|
||||||
|
})`
|
||||||
}}</div>
|
}}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -328,4 +334,4 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
|
@ -12,6 +12,7 @@ export default {
|
||||||
addUser: 'Add user',
|
addUser: 'Add user',
|
||||||
addMember: 'Add member',
|
addMember: 'Add member',
|
||||||
createUserGroup: 'Create user group',
|
createUserGroup: 'Create user group',
|
||||||
|
createUserGroupTip: 'This user group will be available system-wide',
|
||||||
emptyUserGroup:
|
emptyUserGroup:
|
||||||
'There are currently no custom user groups available. Please click "Create" or "+" above to create a user group',
|
'There are currently no custom user groups available. Please click "Create" or "+" above to create a user group',
|
||||||
rename: 'Rename',
|
rename: 'Rename',
|
||||||
|
|
|
@ -22,6 +22,7 @@ export default {
|
||||||
create: '创建',
|
create: '创建',
|
||||||
cancel: '取消',
|
cancel: '取消',
|
||||||
createUserGroup: '创建用户组',
|
createUserGroup: '创建用户组',
|
||||||
|
createUserGroupTip: '该用户组将在整个系统范围内可用',
|
||||||
userGroupName: '用户组名称',
|
userGroupName: '用户组名称',
|
||||||
authScope: '权限范围',
|
authScope: '权限范围',
|
||||||
auth: '权限',
|
auth: '权限',
|
||||||
|
|
Loading…
Reference in New Issue