Restore core admin menu modules
This commit is contained in:
@@ -29,6 +29,7 @@ export interface PostCreateInput {
|
||||
status?: boolean;
|
||||
description?: string;
|
||||
dept_id?: string;
|
||||
sort?: number;
|
||||
}
|
||||
|
||||
export interface PostUpdateInput extends Partial<PostCreateInput> {}
|
||||
@@ -120,7 +121,7 @@ export async function deletePostApi(postId: string) {
|
||||
*/
|
||||
export async function batchDeletePostApi(data: PostBatchDeleteInput) {
|
||||
return requestClient.post<{ count: number }>(
|
||||
'/api/core/post/batch_delete',
|
||||
'/api/core/post/batch/delete',
|
||||
data,
|
||||
);
|
||||
}
|
||||
@@ -132,7 +133,7 @@ export async function batchUpdatePostStatusApi(
|
||||
data: PostBatchUpdateStatusInput,
|
||||
) {
|
||||
return requestClient.post<{ count: number }>(
|
||||
'/api/core/post/batch_update_status',
|
||||
'/api/core/post/batch/status',
|
||||
data,
|
||||
);
|
||||
}
|
||||
@@ -141,7 +142,7 @@ export async function batchUpdatePostStatusApi(
|
||||
* 根据部门ID获取岗位列表
|
||||
*/
|
||||
export async function getPostsByDeptApi(deptId: string) {
|
||||
return requestClient.get<Post[]>(`/api/core/post/by_dept/${deptId}`);
|
||||
return requestClient.get<Post[]>(`/api/core/post/by/dept/${deptId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,7 +195,7 @@ export async function getPostStatsApi() {
|
||||
* 导出岗位数据
|
||||
*/
|
||||
export async function exportPostApi(params?: PostListParams) {
|
||||
return requestClient.get<Blob>('/api/core/post/export', {
|
||||
return requestClient.get<Blob>('/api/core/post/export/excel', {
|
||||
params,
|
||||
responseType: 'blob',
|
||||
});
|
||||
@@ -207,7 +208,7 @@ export async function importPostApi(file: File) {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
return requestClient.post<{ error_count: number; success_count: number }>(
|
||||
'/api/core/post/import',
|
||||
'/api/core/post/import/excel',
|
||||
formData,
|
||||
{
|
||||
headers: {
|
||||
@@ -221,7 +222,7 @@ export async function importPostApi(file: File) {
|
||||
* 获取简单岗位列表(用于选择器)
|
||||
*/
|
||||
export async function getSimplePostListApi() {
|
||||
return requestClient.get<Post[]>('/api/core/post/simple');
|
||||
return requestClient.get<Post[]>('/api/core/post/all');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user