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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
|
|
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,
|
|
|
|
})
|
|
|
|
}
|