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.
20 lines
840 B
20 lines
840 B
import { OrgParams, Org, OrgResult } from '/@/api/platform/common/entity/org'; |
|
import { defHttp } from '/@/utils/http/axios'; |
|
|
|
enum Api { |
|
list = '/common_proxy/common/org/list', |
|
get = '/common_proxy/common/org', |
|
save = '/common_proxy/common/org/save', |
|
edit = '/common_proxy/common/org/update', |
|
del = '/common_proxy/common/org/remove' |
|
} |
|
|
|
export const listOrg = (params: OrgParams) => defHttp.get<OrgResult>({url: Api.list, params}, { isReturnResultResponse: true }); |
|
|
|
export const addOrg = (params: Partial<Org>) => defHttp.post({ url: Api.save, data: params }); |
|
|
|
export const editOrg = (params: Partial<Org>) => defHttp.put({ url: Api.edit, data: params }); |
|
|
|
export const getOrg = (id: string) => defHttp.get<Org>({ url: `${Api.get}/${id}` }); |
|
|
|
export const delOrg = (ids: string) => defHttp.delete({ url: `${Api.del}/${ids}` });
|
|
|