2025-08-07 17:44:45 +08:00
|
|
|
import type {
|
|
|
|
ArrangementVO,
|
|
|
|
ArrangementForm,
|
|
|
|
ArrangementQuery,
|
|
|
|
arrangmentListQuery,
|
|
|
|
} from './model';
|
2025-07-19 17:26:49 +08:00
|
|
|
|
|
|
|
import type { ID, IDS } from '#/api/common';
|
|
|
|
import type { PageResult } from '#/api/common';
|
|
|
|
|
|
|
|
import { requestClient } from '#/api/request';
|
|
|
|
|
|
|
|
/**
|
2025-08-07 17:44:45 +08:00
|
|
|
* 分页查询排班列表
|
|
|
|
* @param params
|
|
|
|
* @returns 排班列表
|
|
|
|
*/
|
2025-07-19 17:26:49 +08:00
|
|
|
export function arrangementList(params?: ArrangementQuery) {
|
2025-08-07 17:44:45 +08:00
|
|
|
return requestClient.get<PageResult<ArrangementVO>>(
|
|
|
|
'/property/arrangement/list',
|
|
|
|
{ params },
|
|
|
|
);
|
2025-07-19 17:26:49 +08:00
|
|
|
}
|
|
|
|
/**
|
2025-08-05 17:07:10 +08:00
|
|
|
* 根据月份查询排班列表
|
2025-07-19 17:26:49 +08:00
|
|
|
* @param params
|
|
|
|
* @returns 排班列表
|
|
|
|
*/
|
2025-08-05 17:07:10 +08:00
|
|
|
export function arrangementCalender(params?: ArrangementQuery) {
|
|
|
|
return requestClient.get<any>('/property/arrangement/explore', { params });
|
2025-07-19 17:26:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询排班详情
|
|
|
|
* @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}`);
|
|
|
|
}
|
2025-08-07 17:44:45 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 查询某天排班详情列表
|
|
|
|
* @param params
|
|
|
|
* @returns 排班列表
|
|
|
|
*/
|
|
|
|
|
|
|
|
export function arrangmentList(params?: arrangmentListQuery) {
|
|
|
|
return requestClient.get<PageResult<ArrangementVO>>(
|
|
|
|
'/property/arrangement/list',
|
|
|
|
{ params },
|
|
|
|
);
|
|
|
|
}
|