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
31 lines
745 B
TypeScript
import { apiClient } from '../utils/apiClient';
|
|
|
|
export const getWorkArea = async () => {
|
|
return apiClient('/WorkArea/getAll', {
|
|
method: 'GET'
|
|
});
|
|
};
|
|
|
|
// 添加工区
|
|
export const addWorkArea = async (areaName: string) => {
|
|
console.log("addWorkArea 请求参数:", areaName);
|
|
return apiClient('/WorkArea/add', {
|
|
method: 'POST',
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
body: JSON.stringify(areaName),
|
|
});
|
|
};
|
|
|
|
// 设置工区
|
|
export const setWorkArea = async (areaId: string) => {
|
|
console.log("setWorkArea 请求参数:", areaId);
|
|
return apiClient('/WorkArea/set', {
|
|
method: 'POST',
|
|
headers: {
|
|
"Content-Type": "application/json",
|
|
},
|
|
body: JSON.stringify(areaId),
|
|
});
|
|
}; |