1、入驻管理
This commit is contained in:
61
apps/web-antd/src/api/property/resident/person/index.ts
Normal file
61
apps/web-antd/src/api/property/resident/person/index.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
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}`);
|
||||
}
|
Reference in New Issue
Block a user