2025-09-30 22:20:50 +08:00
|
|
|
import { AreaControllerApi, DeviceApi } from './device.js';
|
2025-10-20 14:52:25 +08:00
|
|
|
import { PlanApi } from './plan.js';
|
|
|
|
|
import { UserApi } from './user.js';
|
2025-11-10 23:22:13 +08:00
|
|
|
import { AlarmApi } from './alarm.js'; // 导入告警API
|
2025-11-10 23:26:27 +08:00
|
|
|
import { HealthApi } from './health.js'; // 导入健康检查API
|
2025-10-20 14:52:25 +08:00
|
|
|
import { DeviceTemplateApi } from './deviceTemplate.js'; // 导入设备模板API
|
2025-11-21 16:09:35 +08:00
|
|
|
import { FeedApi } from './feed.js'; // 导入饲料管理API
|
2025-09-19 14:34:51 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* API客户端
|
|
|
|
|
*/
|
|
|
|
|
export class ApiClient {
|
|
|
|
|
constructor() {
|
2025-09-30 22:20:50 +08:00
|
|
|
this.areaControllers = AreaControllerApi;
|
2025-09-19 14:34:51 +08:00
|
|
|
this.devices = DeviceApi;
|
|
|
|
|
this.plans = PlanApi;
|
|
|
|
|
this.users = UserApi;
|
2025-11-10 23:26:27 +08:00
|
|
|
this.health = HealthApi; // 添加健康检查API
|
2025-11-10 23:22:13 +08:00
|
|
|
this.alarms = AlarmApi; // 添加告警API
|
2025-09-30 23:17:32 +08:00
|
|
|
this.deviceTemplates = DeviceTemplateApi; // 添加设备模板API
|
2025-11-21 16:09:35 +08:00
|
|
|
this.feeds = FeedApi; // 添加饲料管理API
|
2025-09-19 14:34:51 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 导出API客户端实例
|
2025-11-21 16:09:35 +08:00
|
|
|
export default new ApiClient();
|