diff --git a/frontend/src/api/modules/project-management/projectMember.ts b/frontend/src/api/modules/project-management/projectMember.ts index 37c98dd7f6..4fe24d857d 100644 --- a/frontend/src/api/modules/project-management/projectMember.ts +++ b/frontend/src/api/modules/project-management/projectMember.ts @@ -11,6 +11,7 @@ import { ProjectMemberOptions, ProjectUserGroupUrl, RemoveProjectMemberUrl, + UpdateProjectMemberUrl, } from '@/api/requrls/project-management/projectMember'; import { ReviewUserItem } from '@/models/caseManagement/caseReview'; @@ -34,6 +35,10 @@ export function addOrUpdateProjectMember(data: ActionProjectMember) { } return MSR.post({ url: AddMemberToProjectUrl, data }); } +// 系统设置-系统-组织与项目-项目-更新成员用户组 +export function updateProjectMember(data: ActionProjectMember) { + return MSR.post({ url: UpdateProjectMemberUrl, data }); +} // 添加项目成员到用户组 export function addProjectUserGroup(data: ActionProjectMember) { diff --git a/frontend/src/api/modules/setting/member.ts b/frontend/src/api/modules/setting/member.ts index 09ede9d890..b8c426fc4e 100644 --- a/frontend/src/api/modules/setting/member.ts +++ b/frontend/src/api/modules/setting/member.ts @@ -10,6 +10,7 @@ import { getUserList, inviteOrgMemberUrl, UpdateMemberUrl, + UpdateSystemOrganizationMemberUrl, } from '@/api/requrls/setting/member'; import type { CommonList, TableQueryParams } from '@/models/common'; @@ -31,6 +32,10 @@ export function addOrUpdate(data: AddOrUpdateMemberModel, type: string) { } return MSR.post({ url: UpdateMemberUrl, data }); } +// 系统设置-系统-组织与项目-组织-成员-更新成员用户组 +export function updateSystemOrganizationMember(data: AddOrUpdateMemberModel) { + return MSR.post({ url: UpdateSystemOrganizationMemberUrl, data }); +} // 添加到项目 export function batchAddProject(data: BatchAddProjectModel) { return MSR.post({ url: BatchAddProjectUrl, data }); diff --git a/frontend/src/api/requrls/project-management/projectMember.ts b/frontend/src/api/requrls/project-management/projectMember.ts index eb24548196..13467aa1c6 100644 --- a/frontend/src/api/requrls/project-management/projectMember.ts +++ b/frontend/src/api/requrls/project-management/projectMember.ts @@ -10,3 +10,5 @@ export const ProjectMemberList = '/project/get-member/option'; export const ProjectMemberCommentOptions = '/project/member/comment/user-option'; // 项目成员-@成员下拉列表 // 项目成员-邀请成员 export const ProjectMemberInviteUrl = '/project/member/invite'; +// 系统设置-系统-组织与项目-项目-更新成员用户组 +export const UpdateProjectMemberUrl = '/project/member/update-member'; diff --git a/frontend/src/api/requrls/setting/member.ts b/frontend/src/api/requrls/setting/member.ts index dcdb5638b1..814e7b84ee 100644 --- a/frontend/src/api/requrls/setting/member.ts +++ b/frontend/src/api/requrls/setting/member.ts @@ -16,3 +16,5 @@ export const getProjectListUrl = '/organization/project/list'; export const getSystemProjectListUrl = '/system/project/list'; // 邀请组织成员 export const inviteOrgMemberUrl = '/organization/user/invite'; +// 系统设置-系统-组织与项目-组织-成员-更新成员用户组 +export const UpdateSystemOrganizationMemberUrl = '/system/organization/update-member'; diff --git a/frontend/src/views/setting/organization/project/components/userDrawer.vue b/frontend/src/views/setting/organization/project/components/userDrawer.vue index 370574bb8f..626d85aabe 100644 --- a/frontend/src/views/setting/organization/project/components/userDrawer.vue +++ b/frontend/src/views/setting/organization/project/components/userDrawer.vue @@ -98,7 +98,7 @@ import MsSelect from '@/components/business/ms-select'; import AddUserModal from './addUserModal.vue'; - import { addOrUpdateProjectMember, getProjectUserGroup } from '@/api/modules/project-management/projectMember'; + import { getProjectUserGroup, updateProjectMember } from '@/api/modules/project-management/projectMember'; import { deleteProjectMemberByOrg, postProjectMemberByProjectId } from '@/api/modules/setting/organizationAndProject'; import { useI18n } from '@/hooks/useI18n'; import { formatPhoneNumber } from '@/utils'; @@ -214,7 +214,7 @@ if (!val) { record.selectUserGroupLoading = true; if (props.projectId) { - await addOrUpdateProjectMember({ + await updateProjectMember({ projectId: props.projectId, userId: record.id, roleIds: record.userRoleList.map((e) => e.id), diff --git a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue index 2193b52763..dbc33206ec 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue @@ -100,8 +100,8 @@ import MsSelect from '@/components/business/ms-select'; import AddUserModal from './addUserModal.vue'; - import { addOrUpdateProjectMember, getProjectUserGroup } from '@/api/modules/project-management/projectMember'; - import { addOrUpdate, getGlobalUserGroup } from '@/api/modules/setting/member'; + import { getProjectUserGroup, updateProjectMember } from '@/api/modules/project-management/projectMember'; + import { getGlobalUserGroup, updateSystemOrganizationMember } from '@/api/modules/setting/member'; import { deleteUserFromOrgOrProject, postUserTableByOrgIdOrProjectId, @@ -229,16 +229,13 @@ if (!val) { record.selectUserGroupLoading = true; if (props.organizationId) { - await addOrUpdate( - { - organizationId: props.organizationId, - memberId: record.id, - userRoleIds: record.userRoleList.map((e) => e.id), - }, - 'edit' - ); + await updateSystemOrganizationMember({ + organizationId: props.organizationId, + memberId: record.id, + userRoleIds: record.userRoleList.map((e) => e.id), + }); } else if (props.projectId) { - await addOrUpdateProjectMember({ + await updateProjectMember({ projectId: props.projectId, userId: record.id, roleIds: record.userRoleList.map((e) => e.id),