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.
20 lines
539 B
TypeScript
20 lines
539 B
TypeScript
import { apiClient } from '../utils/apiClient';
|
|
|
|
let requestUrl = '/api/WorkArea';
|
|
// if (import.meta.env.DEV) {
|
|
// requestUrl = '/api/WorkArea';
|
|
// }
|
|
|
|
export const getWorkArea = async () => {
|
|
return apiClient.get(`${requestUrl}/getAll`);
|
|
};
|
|
|
|
// 添加工区
|
|
export const addWorkArea = async (areaName: string) => {
|
|
return apiClient.post(`${requestUrl}/add`, JSON.stringify(areaName));
|
|
};
|
|
|
|
// 设置工区
|
|
export const setWorkArea = async (areaId: string) => {
|
|
return apiClient.post(`${requestUrl}/set`, JSON.stringify(areaId));
|
|
}; |