猪群管理让用户选择猪栏

This commit is contained in:
2025-10-23 12:14:39 +08:00
parent 98cd24ee29
commit 70e3a4f2b0
3 changed files with 98 additions and 6 deletions

View File

@@ -191,3 +191,21 @@ export const recordDeathInBatch = (id, deathData) => {
export const recordCullInBatch = (id, cullData) => {
return http.post(`/api/v1/pig-batches/record-cull/${id}`, cullData);
};
// --- 新增的猪栏和猪舍API ---
/**
* 获取所有猪栏的列表
* @returns {Promise<*>}
*/
export const getAllPens = () => {
return http.get('/api/v1/pens');
};
/**
* 获取所有猪舍的列表
* @returns {Promise<*>}
*/
export const getAllPigHouses = () => {
return http.get('/api/v1/pig-houses');
};