-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
link gh-3
- Loading branch information
Showing
2 changed files
with
58 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,41 @@ | ||
import httpClient from '@/utils/axios' | ||
import type { ApiResult } from '@/api/types' | ||
import type { SysOrganizationVO } from '@/api/system/organization/types' | ||
import type { SysOrganizationDTO, SysOrganizationVO } from '@/api/system/organization/types' | ||
|
||
/** 查询组织机构列表 */ | ||
/** | ||
* 查询组织机构列表 | ||
*/ | ||
export function listOrganizations() { | ||
return httpClient.get<ApiResult<SysOrganizationVO[]>>('/system/organization/list') | ||
} | ||
|
||
/** | ||
* 新建组织 | ||
* @param data | ||
*/ | ||
export function createOrganization(data: SysOrganizationDTO) { | ||
return httpClient.post<ApiResult<void>>('/system/organization', data) | ||
} | ||
|
||
/** | ||
* 修改组织 | ||
* @param data | ||
*/ | ||
export function updateOrganization(data: SysOrganizationDTO) { | ||
return httpClient.put<ApiResult<void>>('/system/organization', data) | ||
} | ||
|
||
/** | ||
* 删除组织 | ||
* @param id 组织id | ||
*/ | ||
export function removeOrganization(id: number) { | ||
return httpClient.delete<ApiResult<void>>(`/system/organization/${id}`) | ||
} | ||
|
||
/** | ||
* 修正组织机构层级 | ||
*/ | ||
export function revisedOrganization() { | ||
return httpClient.patch<ApiResult<void>>('/system/organization/revised') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters