From af2cf421bb6f2d8a8cd7d114e124e0416a2d0d79 Mon Sep 17 00:00:00 2001 From: v_yjjiaoyu <1981190393@qq.com> Date: Thu, 2 Jan 2025 17:14:07 +0800 Subject: [PATCH 01/12] =?UTF-8?q?feat=EF=BC=9A=E7=94=A8=E6=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=A7=86=E8=A7=92=20=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=20#11138=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2028286?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/project-user-selector.vue | 2 +- .../permission-manage/detail-group-tab.vue | 249 +++++++++++++ .../permission-manage/detail-tab-table.vue | 109 ++++++ .../children/permission-manage/group-tab.vue | 37 +- .../children/permission-manage/manage-all.vue | 335 ++++++++++++------ .../children/permission-manage/tab-table.vue | 5 +- src/frontend/devops-manage/src/http/api.ts | 20 +- .../src/store/userDetailGroupTable.ts | 239 +++++++++++++ .../devops-manage/src/store/userGroupTable.ts | 2 +- .../permission-manage/tab-table.vue | 5 +- .../src/views/auth/oauth/oauth-card.vue | 10 +- .../src/views/my-permission/my-permission.vue | 4 +- src/frontend/locale/manage/en-US.json | 19 +- src/frontend/locale/manage/zh-CN.json | 17 +- src/frontend/locale/permission/en-US.json | 6 +- src/frontend/locale/permission/zh-CN.json | 6 +- 16 files changed, 895 insertions(+), 170 deletions(-) create mode 100644 src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue create mode 100644 src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-tab-table.vue create mode 100644 src/frontend/devops-manage/src/store/userDetailGroupTable.ts diff --git a/src/frontend/devops-manage/src/components/project-user-selector.vue b/src/frontend/devops-manage/src/components/project-user-selector.vue index 0e22c16c869e..511b403027a2 100644 --- a/src/frontend/devops-manage/src/components/project-user-selector.vue +++ b/src/frontend/devops-manage/src/components/project-user-selector.vue @@ -3,7 +3,7 @@ ref="tagInputRef" class="manage-user-selector" clearable - :placeholder="t('输入授权人,选中回车进行校验')" + :placeholder="t('输入交接人,选中回车进行有效性校验')" :search-key="searchKeyArr" save-key="id" display-key="displayName" diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue new file mode 100644 index 000000000000..bfbe4c0f7588 --- /dev/null +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-tab-table.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-tab-table.vue new file mode 100644 index 000000000000..581bf1ce17bd --- /dev/null +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-tab-table.vue @@ -0,0 +1,109 @@ + + + + + diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/group-tab.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/group-tab.vue index 5007f17fe2f0..476d9814c319 100644 --- a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/group-tab.vue +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/group-tab.vue @@ -57,7 +57,11 @@ 'manage-icon manage-icon-right-shape': !item.activeFlag, 'shape-icon': true, }" /> - + {{item.resourceTypeName}} ({{ item.resourceType }}) {{item.count}}

@@ -101,40 +105,13 @@ import { useI18n } from 'vue-i18n'; import { defineProps, defineEmits, computed } from 'vue'; import userGroupTable from '@/store/userGroupTable'; import TabTable from './tab-table.vue'; -import pipelineIcon from '../../../svg/color-logo-pipeline.svg'; -import codelibIcon from '../../../svg/color-logo-codelib.svg'; -import codeccIcon from '../../../svg/color-logo-codecc.svg'; -import environmentIcon from '../../../svg/color-logo-environment.svg'; -import experienceIcon from '../../../svg/color-logo-experience.svg'; -import qualityIcon from '../../../svg/color-logo-quality.svg'; -import ticketIcon from '../../../svg/color-logo-ticket.svg'; -import turboIcon from '../../../svg/color-logo-turbo.svg'; +import userDetailGroupTable from '@/store/userDetailGroupTable'; const { t } = useI18n(); const groupTableStore = userGroupTable(); const projectTable = computed(() => props.sourceList.find(item => item.resourceType == 'project')); const sourceTable= computed(() => props.sourceList.filter(item => item.resourceType != 'project')); - -const getServiceIcon = (type) => { - const iconMap = { - 'pipeline': pipelineIcon, - 'pipeline_group': pipelineIcon, - 'repertory': codelibIcon, - 'credential': ticketIcon, - 'cert': ticketIcon, - 'environment': environmentIcon, - 'env_node': pipelineIcon, - 'codecc_task': codeccIcon, - 'codecc_rule_set': codeccIcon, - 'codecc_ignore_type': codeccIcon, - 'experience_task': experienceIcon, - 'experience_group': experienceIcon, - 'rule': qualityIcon, - 'quality_group': qualityIcon, - 'pipeline_template': pipelineIcon, - } - return iconMap[type] -} +const detailGroupTable = userDetailGroupTable(); const props = defineProps({ isShowOperation: { diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/manage-all.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/manage-all.vue index 8ad3a587c8e6..031c7125d1ac 100644 --- a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/manage-all.vue +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/manage-all.vue @@ -269,119 +269,139 @@ + diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/tab-table.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/tab-table.vue index 48ef5807468d..04e104d11afd 100644 --- a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/tab-table.vue +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/tab-table.vue @@ -211,8 +211,8 @@ const resourceType = computed(() => props.resourceType); const groupTotal = computed(() => props.groupTotal); const remainingCount = computed(()=> props.groupTotal - props.data.length); const TOOLTIPS_CONTENT = { - UNIQUE_MANAGER: t('唯一管理员,不可移出。请添加新的管理员后再移出'), - UNIQUE_OWNER: t('唯一拥有者,不可移出。请添加新的拥有者后再移出'), + UNIQUE_MANAGER: t('唯一管理员,不可直接移出。请交接或停用项目'), + UNIQUE_OWNER: t('唯一拥有者,不可直接移出。请交接或删除资源'), TEMPLATE: t('通过用户组加入,不可直接移出。如需调整,请编辑用户组') } const projectId = computed(() => route.params?.projectCode || route.query?.projectCode); @@ -299,6 +299,7 @@ function handleSelectAllData() { function handleClear() { refTable.value.clearSelection(); isCurrentAll.value = false; + curSelectedData.value = []; emit('handleClear', resourceType.value); } /** diff --git a/src/frontend/devops-manage/src/http/api.ts b/src/frontend/devops-manage/src/http/api.ts index c2bcaeca4f4f..d1f445e56842 100644 --- a/src/frontend/devops-manage/src/http/api.ts +++ b/src/frontend/devops-manage/src/http/api.ts @@ -373,5 +373,23 @@ export default { */ getIsDirectRemove(projectId: string, groupId: number, params: any) { return http.DELETE(`${IAM_PERFIX}/member/${projectId}/single/${groupId}/${OPERATE_CHANNEL}/remove`, params); - } + }, + /** + * 获取资源授权管理数量 + */ + getResourceType2CountOfHandover(params: any) { + return http.post(`${USER_PERFIX}/auth/handover/getResourceType2CountOfHandover`, params); + }, + /** + * 获取交接单中授权相关 + */ + listAuthorizationsOfHandover(params: any) { + return http.post(`${USER_PERFIX}/auth/handover/listAuthorizationsOfHandover`, params); + }, + /** + * 获取交接单中用户组相关 + */ + listGroupsOfHandover(params: any) { + return http.post(`${USER_PERFIX}/auth/handover/listGroupsOfHandover`, params); + }, }; diff --git a/src/frontend/devops-manage/src/store/userDetailGroupTable.ts b/src/frontend/devops-manage/src/store/userDetailGroupTable.ts new file mode 100644 index 000000000000..b7cf2f6ef0d7 --- /dev/null +++ b/src/frontend/devops-manage/src/store/userDetailGroupTable.ts @@ -0,0 +1,239 @@ +import http from '@/http/api'; +import { defineStore } from 'pinia'; +import { ref } from 'vue'; +import pipelineIcon from '@/components/user-group/svg/color-logo-pipeline.svg'; +import codelibIcon from '@/components/user-group/svg/color-logo-codelib.svg'; +import codeccIcon from '@/components/user-group/svg/color-logo-codecc.svg'; +import environmentIcon from '@/components/user-group/svg/color-logo-environment.svg'; +import experienceIcon from '@/components/user-group/svg/color-logo-experience.svg'; +import qualityIcon from '@/components/user-group/svg/color-logo-quality.svg'; +import ticketIcon from '@/components/user-group/svg/color-logo-ticket.svg'; +import turboIcon from '@/components/user-group/svg/color-logo-turbo.svg'; + +enum HandoverType { + AUTHORIZATION = 'AUTHORIZATION', + GROUP = 'GROUP' +} +interface GroupTableType { + groupName?: String; + iamGroupId?: Number; + projectCode?: String; + resourceCode: String; + resourceName: String; + handoverType?: HandoverType; + handoverFrom?: String; + groupDesc?: String; + +}; +interface Pagination { + limit: number; + current: number; + count: number; +} + +interface SourceType { + activeFlag?: boolean; + count?: number; + pagination: Pagination; + resourceType: string; + resourceTypeName?: string; + tableData: GroupTableType[]; + tableLoading?: boolean; + type: HandoverType; +} + +interface CollapseListType { + resourceType: string; + resourceTypeName: string; + count: number; + type: HandoverType; +} + +interface DetailParams { + projectCode?: String; + resourceType?: String, + batchOperateType?: String; + previewConditionReq?: String; + queryChannel?: String; + page?: Number, + pageSize?: Number, + flowNo?: String +} + +export default defineStore('userDetailGroupTable', () => { + const isLoading = ref(true); + const detailSourceList = ref([]); + const collapseList = ref([]); + let currentRequestId = 0; + const detailParams = ref(); + + /** + * 获取资源授权管理数量 + */ + async function getCollapseList() { + try { + const params = detailParams.value; + const res = await http.getResourceType2CountOfHandover(params); + collapseList.value = res; + detailSourceList.value = collapseList.value.map(item => ({ + ...item, + tableLoading: false, + pagination: { count: 0, current: 1, limit: 10 }, + tableData: [], + })); + } catch (error) { + console.log(error); + } + } + + async function fetchListData(fetchFunction: (item: DetailParams) => Promise, item: SourceType) { + if (!collapseList.value.some(collapseItem => collapseItem.resourceType === item.resourceType)) { + return {}; + } + try { + const params: DetailParams = { + ...detailParams.value, + resourceType: item.resourceType, + page: item.pagination.current, + pageSize: item.pagination.limit, + }; + return await fetchFunction(params); + } catch (error) { + console.log(error); + return {}; + } + } + /** + * 获取交接单中授权相关 + * @param resourceType 资源类型 + */ + async function getAuthorizationsList(item: SourceType) { + return fetchListData(http.listAuthorizationsOfHandover, item); + } + /** + * 获取交接单中用户组相关 + * @param resourceType 资源类型 + */ + async function getGroupList(item: SourceType) { + return fetchListData(http.listGroupsOfHandover, item); + } + /** + * 获取页面数据 + */ + async function fetchDetailList(projectIdParam: DetailParams) { + // 初始化数据 + detailSourceList.value = []; + + detailParams.value = projectIdParam; + const requestId = ++currentRequestId; + + // 加载权限管理数量 + await getCollapseList(); + + try { + isLoading.value = true; + + const [authorizationItem, userGroupItem] = [ + detailSourceList.value.find(item => item.type === HandoverType.AUTHORIZATION), + detailSourceList.value.find(item => item.type === HandoverType.GROUP) + ]; + // 同时获取授权列表和用户组列表 + const [authorizationList, userGroupList] = await Promise.all([ + authorizationItem ? getAuthorizationsList(authorizationItem) : Promise.resolve(null), + userGroupItem ? getGroupList(userGroupItem) : Promise.resolve(null) + ]); + + if (currentRequestId === requestId) { + detailSourceList.value.forEach(item => { + if (authorizationList && item === authorizationItem) { + item.tableData = authorizationList.records; + item.activeFlag = true; + } + if (userGroupList && item === userGroupItem) { + item.tableData = userGroupList.records; + item.activeFlag = true; + } + item.pagination.count = item.count!; + }); + } + } catch (error) { + console.log(error); + } finally { + isLoading.value = false; + } + } + + async function handlePaginationChange(fetchFunction: (item: SourceType) => Promise, item: SourceType) { + try { + item.tableLoading = true; + const res = await fetchFunction(item); + item.tableData = res.records; + } catch (error) { + console.log(error); + } finally { + item.tableLoading = false; + } + } + /** + * 折叠面板调用接口获取表格数据 + */ + async function detailCollapseClick(resourceType: string, flag: HandoverType) { + const item = detailSourceList.value.find(item => item.resourceType === resourceType && item.type === flag); + if (!item || !item.count || item.tableData.length) return; + + item.pagination.current = 1; + await handlePaginationChange(flag === HandoverType.GROUP ? getGroupList : getAuthorizationsList, item); + } + /** + * 切换表格每页显示条数时 + */ + async function detailPageLimitChange(limit: number, resourceType: string, flag: HandoverType) { + const item = detailSourceList.value.find(item => item.resourceType === resourceType && item.type === flag); + if (item) { + item.pagination.limit = limit; + await handlePaginationChange(flag === HandoverType.GROUP ? getGroupList : getAuthorizationsList, item); + } + } + /** + * 切换表格分页时 + */ + async function detailPageValueChange(value: number, resourceType: string, flag: HandoverType) { + const item = detailSourceList.value.find(item => item.resourceType === resourceType && item.type === flag); + if (item) { + item.pagination.current = value; + await handlePaginationChange(flag === HandoverType.GROUP ? getGroupList : getAuthorizationsList, item); + } + } + + function getServiceIcon (type: string) { + const iconMap = { + 'pipeline': pipelineIcon, + 'pipeline_group': pipelineIcon, + 'repertory': codelibIcon, + 'credential': ticketIcon, + 'cert': ticketIcon, + 'environment': environmentIcon, + 'env_node': pipelineIcon, + 'codecc_task': codeccIcon, + 'codecc_rule_set': codeccIcon, + 'codecc_ignore_type': codeccIcon, + 'experience_task': experienceIcon, + 'experience_group': experienceIcon, + 'rule': qualityIcon, + 'quality_group': qualityIcon, + 'pipeline_template': pipelineIcon, + } + return iconMap[type] + } + + return { + isLoading, + detailSourceList, + collapseList, + fetchDetailList, + detailCollapseClick, + detailPageLimitChange, + detailPageValueChange, + getServiceIcon, + }; +}); diff --git a/src/frontend/devops-manage/src/store/userGroupTable.ts b/src/frontend/devops-manage/src/store/userGroupTable.ts index 282f80a4e6f6..d75dcf96e613 100644 --- a/src/frontend/devops-manage/src/store/userGroupTable.ts +++ b/src/frontend/devops-manage/src/store/userGroupTable.ts @@ -277,7 +277,7 @@ export default defineStore('userGroupTable', () => { count: sourceItem.isAll ? sourceItem.count! : tableData.length }, ...sourceItem, - tableData: tableData.slice(0,11), + tableData: tableData, count: sourceItem.isAll ? sourceItem.count! : tableData.length, ...(!sourceItem.isAll && { groupIds: tableData.map(item => ({ id: item.groupId, memberType: item.memberType })) }), ...(!sourceItem.isAll && { isRemotePagination: false }), diff --git a/src/frontend/devops-permission/src/components/permission-manage/tab-table.vue b/src/frontend/devops-permission/src/components/permission-manage/tab-table.vue index 7276b475f213..5ffecb34fcc2 100644 --- a/src/frontend/devops-permission/src/components/permission-manage/tab-table.vue +++ b/src/frontend/devops-permission/src/components/permission-manage/tab-table.vue @@ -210,8 +210,8 @@ const selectedResourceCode = computed(() => isCurrentAll.value ? tableList.value const resourceType = computed(() => props.resourceType); const remainingCount = computed(()=> props.groupTotal - props.data.length); const TOOLTIPS_CONTENT = { - UNIQUE_MANAGER: t('唯一管理员,不可退出。请添加新的管理员后再退出'), - UNIQUE_OWNER: t('唯一拥有者,不可退出。请添加新的拥有者后再退出'), + UNIQUE_MANAGER: t('唯一管理员,不可直接退出。请交接或停用项目'), + UNIQUE_OWNER: t('唯一拥有者,不可直接退出。请交接或删除资源'), TEMPLATE: t('通过用户组加入,不可直接退出。如需调整,请编辑用户组'), DEPARTMENT: t('通过组织加入的 不允许 续期/退出/移交') } @@ -305,6 +305,7 @@ function handleSelectAllData() { function handleClear() { refTable.value.clearSelection(); isCurrentAll.value = false; + curSelectedData.value = []; emit('handleClear', resourceType.value); } /** diff --git a/src/frontend/devops-permission/src/views/auth/oauth/oauth-card.vue b/src/frontend/devops-permission/src/views/auth/oauth/oauth-card.vue index 360ab33b3813..44357764ac0f 100644 --- a/src/frontend/devops-permission/src/views/auth/oauth/oauth-card.vue +++ b/src/frontend/devops-permission/src/views/auth/oauth/oauth-card.vue @@ -303,12 +303,14 @@ const handleAuthorize = () => { v-for="item in relSourceList" :key="item.name" > + {{ item.aliasName }} + @@ -515,7 +517,7 @@ const handleAuthorize = () => { .resource-list-content { border: 1px solid #EAEBF0; height: 210px; - overflow: auto; + overflow-y: auto; &::-webkit-scrollbar { width: 6px; height: 6px; @@ -525,6 +527,12 @@ const handleAuthorize = () => { box-shadow: inset 0 0 6px hsla(0, 0%, 80%, .3); } } + li { + width: 90%; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } li a { padding: 0 12px; height: 32px; diff --git a/src/frontend/devops-permission/src/views/my-permission/my-permission.vue b/src/frontend/devops-permission/src/views/my-permission/my-permission.vue index 08a410d5fcf8..36748bb8706a 100644 --- a/src/frontend/devops-permission/src/views/my-permission/my-permission.vue +++ b/src/frontend/devops-permission/src/views/my-permission/my-permission.vue @@ -1206,8 +1206,8 @@ function goBack() { } } - .main-line-remove { - margin-top: 40px; + .main-line-handover { + margin-top: 26px; } } diff --git a/src/frontend/locale/manage/en-US.json b/src/frontend/locale/manage/en-US.json index d2174a98a302..8484da707548 100644 --- a/src/frontend/locale/manage/en-US.json +++ b/src/frontend/locale/manage/en-US.json @@ -182,7 +182,6 @@ "待移出用户": "Users to be removed", "所在用户组": "User Group", "已选择X个用户组": "Selected {0} user groups", - ";其中X个用户组X,本次操作将忽略": "; Among them, {0} user groups {1}, will be ignored in this operation", "无法移出": "cannot be removed", "续期对象": "Renewal Object", "用户": "User", @@ -229,8 +228,6 @@ "用户组权限已移交": "User group permissions have been transferred", "用户组已移出": "User group has been removed", "永久": "permanent", - "唯一管理员,不可移出。请添加新的管理员后再移出": "Only administrator, cannot be removed. Please add a new administrator before removing", - "唯一拥有者,不可移出。请添加新的拥有者后再移出": "Only owner, cannot be removed. Please add a new owner before removing", "通过用户组加入,不可直接移出。如需调整,请编辑用户组": "Added through user group, cannot be directly removed. If adjustments are needed, please edit the user group", "组织/用户": "Organization/User", "无需续期": "No renewal required", @@ -243,7 +240,6 @@ "没有数据": "No data", "可以尝试 调整关键词 或 清空筛选条件": "You can try adjusting the keywords or {0}", "清空筛选条件": "Clear filter conditions", - "输入授权人,选中回车进行校验": "Enter the authorizer, select and press Enter to verify", "已离职": "Resigned", "授权校验中": "Authorization verification in progress", "目标对象和交接人不允许相同。": "The target and the transferee cannot be the same person.", @@ -307,10 +303,17 @@ "X个资源没有拥有者": " {0} resources to have no owner", "X个环境节点授权失效": "{0} environment node authorizations have expired", "请确认是否同步移交授权。": "Please confirm whether to also transfer the authorization.", - "退出以上用户组,将导致": "Exiting the above user group will cause", - "请填写交接人,完成交接后才能成功退出。": "Please specify a transferee and complete the transfer before successfully exiting.", - "申请交接": "Confirm transfer", + "移出以上用户组,将导致": "Removing from the above user group will result in", + "请填写交接人,完成交接后才能成功移出。": "Please fill in the handover person, and only after completing the handover can you successfully remove.", + "确认交接": "Confirm handover", "升级后,该项目下的流水线引用变量时仅支持X模式。": "After the upgrade, the pipelines under this project only support the {'${{xxx}}'} mode when referencing variables.", "升级有可能导致存量流水线X,请谨慎操作。": "The upgrade might cause existing pipelines to {0}, please proceed with caution.", - "运行失败": "Run failed" + "运行失败": "Run failed", + "唯一管理员,不可直接移出。请交接或停用项目": "The sole administrator, cannot be removed directly. Please hand over or deactivate the project", + "唯一拥有者,不可直接移出。请交接或删除资源": "The sole owner, cannot be removed directly. Please hand over or delete resources", + "无法直接移出": "Cannot be removed directly", + ";其中X个用户组X,": "; among them {0} user groups {1},", + "批量移出操作尚未完成,确认放弃操作吗?": "Batch removal operation has not been completed, are you sure you want to abandon the operation?", + "待移交详情": "Pending transfer details", + "输入交接人,选中回车进行有效性校验": "Input the handover person, and press Enter for validity check" } diff --git a/src/frontend/locale/manage/zh-CN.json b/src/frontend/locale/manage/zh-CN.json index f1a01060dc71..e1913309788e 100644 --- a/src/frontend/locale/manage/zh-CN.json +++ b/src/frontend/locale/manage/zh-CN.json @@ -183,7 +183,6 @@ "待移出用户": "待移出用户", "所在用户组": "所在用户组", "已选择X个用户组": "已选择{0}个用户组", - ";其中X个用户组X,本次操作将忽略": ";其中{0}个用户组{1},本次操作将忽略", "无法移出": "无法移出", "续期对象": "续期对象", "用户": "用户", @@ -230,8 +229,6 @@ "用户组权限已移交": "用户组权限已移交", "用户组已移出": "用户组已移出", "永久": "永久", - "唯一管理员,不可移出。请添加新的管理员后再移出": "唯一管理员,不可移出。请添加新的管理员后再移出", - "唯一拥有者,不可移出。请添加新的拥有者后再移出": "唯一拥有者,不可移出。请添加新的拥有者后再移出", "通过用户组加入,不可直接移出。如需调整,请编辑用户组": "通过用户组加入,不可直接移出。如需调整,请编辑用户组", "组织/用户": "组织/用户", "无需续期": "无需续期", @@ -244,7 +241,6 @@ "没有数据": "没有数据", "可以尝试 调整关键词 或 清空筛选条件": "可以尝试 调整关键词 或 {0}", "清空筛选条件": "清空筛选条件", - "输入授权人,选中回车进行校验": "输入授权人,选中回车进行校验", "已离职": "已离职", "授权校验中": "授权校验中", "目标对象和交接人不允许相同。": "目标对象和交接人不允许相同。", @@ -308,10 +304,17 @@ "X个资源没有拥有者": " {0} 个资源没有拥有者", "X个环境节点授权失效": "{0} 个环境节点授权失效", "请确认是否同步移交授权。": "请确认是否同步移交授权。", - "退出以上用户组,将导致": "退出以上用户组,将导致", - "请填写交接人,完成交接后才能成功退出。": "请填写交接人,完成交接后才能成功退出。", + "移出以上用户组,将导致": "移出以上用户组,将导致", + "请填写交接人,完成交接后才能成功移出。": "请填写交接人,完成交接后才能成功移出。", "确认交接": "确认交接", "升级后,该项目下的流水线引用变量时仅支持X模式。": "升级后,该项目下的流水线引用变量时仅支持 {'${{xxx}}'} 模式。", "升级有可能导致存量流水线X,请谨慎操作。": "升级有可能导致存量流水线 {0} ,请谨慎操作。", - "运行失败": "运行失败" + "运行失败": "运行失败", + "唯一管理员,不可直接移出。请交接或停用项目": "唯一管理员,不可直接移出。请交接或停用项目", + "唯一拥有者,不可直接移出。请交接或删除资源": "唯一拥有者,不可直接移出。请交接或删除资源", + "无法直接移出": "无法直接移出", + ";其中X个用户组X,": ";其中{0}个用户组{1},", + "批量移出操作尚未完成,确认放弃操作吗?": "批量移出操作尚未完成,确认放弃操作吗?", + "待移交详情": "待移交详情", + "输入交接人,选中回车进行有效性校验": "输入交接人,选中回车进行有效性校验" } diff --git a/src/frontend/locale/permission/en-US.json b/src/frontend/locale/permission/en-US.json index 67d0b8289729..7f76ca62bae2 100644 --- a/src/frontend/locale/permission/en-US.json +++ b/src/frontend/locale/permission/en-US.json @@ -158,8 +158,6 @@ "用户组权限已移交": "User Group Permissions Transferred", "用户组已退出": "User Group Exited", "永久": "Permanent", - "唯一管理员,不可退出。请添加新的管理员后再退出": "Sole administrator, cannot exit. Please add a new administrator before exiting.", - "唯一拥有者,不可退出。请添加新的拥有者后再退出": "Sole owner, cannot exit. Please add a new owner before exiting.", "通过用户组加入,不可直接退出。如需调整,请编辑用户组": "Joined through user group, cannot exit directly. Please edit the user group for adjustments.", "无需续期": "No Renewal Needed", "通过用户组获得权限,请到流水线里续期整个用户组": "Permissions acquired through user group, please renew the entire user group in the pipeline.", @@ -252,5 +250,7 @@ "审批人": "Approver", "项目名称": "Project name", "本次操作将忽略": "This operation will be ignored", - "需先完成交接。": "Handover must be completed first." + "需先完成交接。": "Handover must be completed first.", + "唯一管理员,不可直接退出。请交接或停用项目": "The sole administrator, cannot exit directly. Please hand over or deactivate the project", + "唯一拥有者,不可直接退出。请交接或删除资源": "The sole owner, cannot exit directly. Please hand over or delete resources" } diff --git a/src/frontend/locale/permission/zh-CN.json b/src/frontend/locale/permission/zh-CN.json index 253d06963c81..ac794ffe8cec 100644 --- a/src/frontend/locale/permission/zh-CN.json +++ b/src/frontend/locale/permission/zh-CN.json @@ -158,8 +158,6 @@ "用户组权限已移交": "用户组权限已移交", "用户组已退出": "用户组已退出", "永久": "永久", - "唯一管理员,不可退出。请添加新的管理员后再退出": "唯一管理员,不可退出。请添加新的管理员后再退出", - "唯一拥有者,不可退出。请添加新的拥有者后再退出": "唯一拥有者,不可退出。请添加新的拥有者后再退出", "通过用户组加入,不可直接退出。如需调整,请编辑用户组": "通过用户组加入,不可直接退出。如需调整,请编辑用户组", "无需续期": "无需续期", "通过用户组获得权限,请到流水线里续期整个用户组": "通过用户组获得权限,请到流水线里续期整个用户组", @@ -252,5 +250,7 @@ "审批人": "审批人", "项目名称": "项目名称", "本次操作将忽略": "本次操作将忽略", - "需先完成交接。": "需先完成交接。" + "需先完成交接。": "需先完成交接。", + "唯一管理员,不可直接退出。请交接或停用项目": "唯一管理员,不可直接退出。请交接或停用项目", + "唯一拥有者,不可直接退出。请交接或删除资源": "唯一拥有者,不可直接退出。请交接或删除资源" } From 2291dd1a7bd79f2df3d2b53f2cabbeb1088893f8 Mon Sep 17 00:00:00 2001 From: v_yjjiaoyu <1981190393@qq.com> Date: Fri, 3 Jan 2025 10:22:42 +0800 Subject: [PATCH 02/12] =?UTF-8?q?feat=EF=BC=9A=E7=94=A8=E6=88=B7=E4=B8=AA?= =?UTF-8?q?=E4=BA=BA=E8=A7=86=E8=A7=92=20=E6=9D=83=E9=99=90=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BC=98=E5=8C=96=20#11138=20#=20Reviewed,=20transact?= =?UTF-8?q?ion=20id:=2028321?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../permission-manage/detail-group-tab.vue | 35 ++++++++----------- .../permission-manage/detail-tab-table.vue | 29 +++++++-------- .../src/store/userDetailGroupTable.ts | 2 +- src/frontend/locale/manage/en-US.json | 6 +++- src/frontend/locale/manage/zh-CN.json | 6 +++- 5 files changed, 38 insertions(+), 40 deletions(-) diff --git a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue index bfbe4c0f7588..3c937d07c4c7 100644 --- a/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue +++ b/src/frontend/devops-manage/src/components/user-group/components/children/permission-manage/detail-group-tab.vue @@ -20,11 +20,7 @@ >