You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
745 B
TypeScript

1 month ago
import { apiClient } from '../utils/apiClient';
export const getWorkArea = async () => {
1 month ago
return apiClient('/WorkArea/getAll', {
method: 'GET'
});
1 month ago
};
// 添加工区
export const addWorkArea = async (areaName: string) => {
1 month ago
console.log("addWorkArea 请求参数:", areaName);
return apiClient('/WorkArea/add', {
method: 'POST',
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(areaName),
});
1 month ago
};
// 设置工区
export const setWorkArea = async (areaId: string) => {
1 month ago
console.log("setWorkArea 请求参数:", areaId);
return apiClient('/WorkArea/set', {
method: 'POST',
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(areaId),
});
1 month ago
};