You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
807 B
36 lines
807 B
import type { Department, LazyGetDeptListParams } from './types' |
|
import { defHttp } from '@/utils/http/axios' |
|
|
|
export function lazyGetDeptList(params?: LazyGetDeptListParams) { |
|
return defHttp.get<Department[]>({ |
|
url: '/system/dept/lazy-list', |
|
params, |
|
}) |
|
} |
|
|
|
export function createDept(data: Partial<Department>) { |
|
return defHttp.post({ |
|
url: '/system/dept/save', |
|
data, |
|
}) |
|
} |
|
|
|
export function updateDept(data: Partial<Department>) { |
|
return defHttp.post({ |
|
url: '/system/dept/update', |
|
data, |
|
}) |
|
} |
|
|
|
export function deleteDept(id: string) { |
|
return defHttp.post({ |
|
url: `/system/dept/delete?id=${id}`, |
|
}) |
|
} |
|
|
|
export function getDeptTree(params?: { tenantId: string }) { |
|
return defHttp.get<{ id: string, title: string }[]>({ |
|
url: '/system/dept/tree', |
|
params, |
|
}) |
|
}
|
|
|