62 lines
1.4 KiB
TypeScript
62 lines
1.4 KiB
TypeScript
|
import type { ArrangementVO, ArrangementForm, ArrangementQuery } 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 arrangementList(params?: ArrangementQuery) {
|
||
|
return requestClient.get<PageResult<ArrangementVO>>('/property/arrangement/list', { params });
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 导出排班列表
|
||
|
* @param params
|
||
|
* @returns 排班列表
|
||
|
*/
|
||
|
export function arrangementExport(params?: ArrangementQuery) {
|
||
|
return commonExport('/property/arrangement/export', params ?? {});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 查询排班详情
|
||
|
* @param id id
|
||
|
* @returns 排班详情
|
||
|
*/
|
||
|
export function arrangementInfo(id: ID) {
|
||
|
return requestClient.get<ArrangementVO>(`/property/arrangement/${id}`);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 新增排班
|
||
|
* @param data
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function arrangementAdd(data: ArrangementForm) {
|
||
|
return requestClient.postWithMsg<void>('/property/arrangement', data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 更新排班
|
||
|
* @param data
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function arrangementUpdate(data: ArrangementForm) {
|
||
|
return requestClient.putWithMsg<void>('/property/arrangement', data);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* 删除排班
|
||
|
* @param id id
|
||
|
* @returns void
|
||
|
*/
|
||
|
export function arrangementRemove(id: ID | IDS) {
|
||
|
return requestClient.deleteWithMsg<void>(`/property/arrangement/${id}`);
|
||
|
}
|