refactor(系统设置): 系统&组织-修改更新用户组接口
This commit is contained in:
parent
0e882485b7
commit
7e287301c1
|
@ -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) {
|
||||
|
|
|
@ -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 });
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in New Issue