62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
import type { PersonVO, PersonForm, PersonQuery } from './model';
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
import type { PageResult } from '#/api/common';
|
|
|
|
import { commonExport } from '#/api/helper';
|
|
import { requestClient } from '#/api/request';
|
|
|
|
/**
|
|
* 查询入驻员工列表
|
|
* @param params
|
|
* @returns 入驻员工列表
|
|
*/
|
|
export function personList(params?: PersonQuery) {
|
|
return requestClient.get<PageResult<PersonVO>>('/property/person/list', { params });
|
|
}
|
|
|
|
/**
|
|
* 导出入驻员工列表
|
|
* @param params
|
|
* @returns 入驻员工列表
|
|
*/
|
|
export function personExport(params?: PersonQuery) {
|
|
return commonExport('/property/person/export', params ?? {});
|
|
}
|
|
|
|
/**
|
|
* 查询入驻员工详情
|
|
* @param id id
|
|
* @returns 入驻员工详情
|
|
*/
|
|
export function personInfo(id: ID) {
|
|
return requestClient.get<PersonVO>(`/property/person/${id}`);
|
|
}
|
|
|
|
/**
|
|
* 新增入驻员工
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function personAdd(data: PersonForm) {
|
|
return requestClient.postWithMsg<void>('/property/person', data);
|
|
}
|
|
|
|
/**
|
|
* 更新入驻员工
|
|
* @param data
|
|
* @returns void
|
|
*/
|
|
export function personUpdate(data: PersonForm) {
|
|
return requestClient.putWithMsg<void>('/property/person', data);
|
|
}
|
|
|
|
/**
|
|
* 删除入驻员工
|
|
* @param id id
|
|
* @returns void
|
|
*/
|
|
export function personRemove(id: ID | IDS) {
|
|
return requestClient.deleteWithMsg<void>(`/property/person/${id}`);
|
|
}
|