diff --git a/frontend/src/api/modules/setting/system/organizationAndProject.ts b/frontend/src/api/modules/setting/system/organizationAndProject.ts index 597f28b465..bc2c276348 100644 --- a/frontend/src/api/modules/setting/system/organizationAndProject.ts +++ b/frontend/src/api/modules/setting/system/organizationAndProject.ts @@ -1,6 +1,7 @@ import MSR from '@/api/http/index'; import * as orgUrl from '@/api/requrls/setting/system/organizationAndProject'; import { TableQueryParams } from '@/models/common'; +import { AddUserToOrgOrPorjectParams } from '@/models/setting/systemOrg'; // 获取组织列表 export function postOrgTable(data: TableQueryParams) { @@ -21,3 +22,11 @@ export function postProjectTableByOrgId(data: TableQueryParams) { export function postUserTableByOrgId(data: TableQueryParams) { return MSR.post({ url: orgUrl.postOrgMemberUrl, data }); } +// 给组织或项目添加成员 +export function addUserToOrgOrProject(data: AddUserToOrgOrPorjectParams) { + return MSR.post({ url: data.projectId ? orgUrl.postAddProjectMemberUrl : orgUrl.postAddOrgMemberUrl, data }); +} +// 获取用户下拉选项 +export function getUserByOrganizationOrProject(sourceId: string) { + return MSR.get({ url: `${orgUrl.getUserByOrgOrProjectUrl}${sourceId}` }); +} diff --git a/frontend/src/api/requrls/setting/system/organizationAndProject.ts b/frontend/src/api/requrls/setting/system/organizationAndProject.ts index b50b428738..f2d6969984 100644 --- a/frontend/src/api/requrls/setting/system/organizationAndProject.ts +++ b/frontend/src/api/requrls/setting/system/organizationAndProject.ts @@ -11,7 +11,7 @@ export const postOrgMemberUrl = '/system/organization/list-member'; // 添加组织 export const postAddOrgUrl = '/system/organization/add'; // 添加组织成员 -export const postAddOrgMemberUrl = '/system/organization/member/add'; +export const postAddOrgMemberUrl = '/system/organization/add-member'; // 删除组织成员 export const getDeleteOrgMemberUrl = '/system/organization/remove-member/'; // 恢复组织 @@ -35,7 +35,7 @@ export const postProjectMemberUrl = '/system/project/member/list'; // 添加项目 export const postAddProjectUrl = '/system/project/add'; // 添加项目成员 -export const postAddProjectMemberUrl = '/system/project/member/add'; +export const postAddProjectMemberUrl = '/system/project/add-member'; // 撤销项目 export const getRevokeProjectUrl = '/system/project/revoke/'; // 移除项目成员 @@ -44,3 +44,5 @@ export const getDeleteProjectMemberUrl = '/system/project/remove-member/'; export const getProjectInfoUrl = '/system/project/get/'; // 删除项目 export const getDeleteProjectUrl = '/system/project/delete/'; +// 系统-组织及项目,获取用户下拉选项 +export const getUserByOrgOrProjectUrl = '/system/user/get-option/'; diff --git a/frontend/src/components/bussiness/ms-user-selector/index.vue b/frontend/src/components/bussiness/ms-user-selector/index.vue index f09752d520..e642fb458d 100644 --- a/frontend/src/components/bussiness/ms-user-selector/index.vue +++ b/frontend/src/components/bussiness/ms-user-selector/index.vue @@ -1,10 +1,10 @@